mus_eNRTL_module Module

This module contains an interface for external C++ code to compute liquid mixture property like thermodynamic factor and Maxwell-Stefan Diffusivity coefficients


Uses

  • module~~mus_enrtl_module~2~~UsesGraph module~mus_enrtl_module~2 mus_eNRTL_module env_module env_module module~mus_enrtl_module~2->env_module iso_c_binding iso_c_binding module~mus_enrtl_module~2->iso_c_binding

Interfaces

public interface mus_calc_thermFactor

  • private subroutine mus_calc_thermFactor_single(nFields, temp, press, mole_frac, therm_factors)

    This routine calculates thermodynamic factor for given mole_frac of all species for single element

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nFields

    number of fields in mixture

    real(kind=rk), intent(in) :: temp

    mixture temperature

    real(kind=rk), intent(in) :: press

    mixture pressure

    real(kind=rk), intent(in) :: mole_frac(nFields)

    mole fraction of all species of single element

    real(kind=rk), intent(out) :: therm_factors(nFields,nFields)

    thermodynamic factor matrix

public interface mus_calc_MS_DiffMatrix

  • private subroutine mus_calc_MS_DiffMatrix_single(nFields, temp, press, mole_dens, D_ij_out)

    This routine calculates Diffusivity coefficients matrix for given mole_frac of all species for single element

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nFields

    number of fields in mixture

    real(kind=rk), intent(in) :: temp

    mixture temperature

    real(kind=rk), intent(in) :: press

    mixture pressure

    real(kind=rk), intent(in) :: mole_dens(nFields)

    mole density of all species of single element

    real(kind=rk), intent(out) :: D_ij_out(nFields,nFields)

    thermodynamic factor matrix

interface

This function initialize eNRTL model by loading liquid mixture property from filename

  • private function init_enrtl_loc(filename, nSpc) bind(c, name='init_enrtl')

    Arguments

    Type IntentOptional Attributes Name
    character(kind=c_char, len=1), dimension(*) :: filename
    integer(kind=c_int), intent(out) :: nSpc

    Return Value integer

interface

This routine calculates thermodynamic factor for given mole_frac of all species

  • private subroutine calc_therm_factor_loc(nSpc, Temp, Press, Mole_frac, Therm_factors) bind(c, name='calc_therm_factor_C')

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(in), value :: nSpc
    real(kind=c_double), intent(in), value :: Temp
    real(kind=c_double), intent(in), value :: Press
    real(kind=c_double), intent(in), dimension(*) :: Mole_frac
    real(kind=c_double), intent(out), dimension(*) :: Therm_factors

interface

This routine calculates Maxwell-Stefan diffusivity coeffcient Matrix for given mole_frac of all species

  • private subroutine calc_ms_diff_matrix_from_molefrac(nSpc, Temp, Press, Mole_frac, D_ij_out) bind(c, name='calc_ms_diff_matrix_from_molefrac_C')

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(in), value :: nSpc
    real(kind=c_double), intent(in), value :: Temp
    real(kind=c_double), intent(in), value :: Press
    real(kind=c_double), intent(in), dimension(*) :: Mole_frac
    real(kind=c_double), intent(out), dimension(*) :: D_ij_out

interface

This routine calculates Maxwell-Stefan diffusivity coeffcient Matrix for given mole_frac of all species

  • private subroutine calc_ms_diff_matrix_from_moledens(nSpc, Temp, Press, Mole_dens, D_ij_out) bind(c, name='calc_ms_diff_matrix_from_moledens_C')

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), intent(in), value :: nSpc
    real(kind=c_double), intent(in), value :: Temp
    real(kind=c_double), intent(in), value :: Press
    real(kind=c_double), intent(in), dimension(*) :: Mole_dens
    real(kind=c_double), intent(out), dimension(*) :: D_ij_out

Functions

public function mus_init_eNRTL(filename, nFields) result(success)

This function loads property file using external c-function

Arguments

Type IntentOptional Attributes Name
character(kind=c_char, len=1), dimension(*) :: filename
integer, intent(out) :: nFields

number of fields in mixture

Return Value logical


Subroutines

private subroutine mus_calc_thermFactor_single(nFields, temp, press, mole_frac, therm_factors)

This routine calculates thermodynamic factor for given mole_frac of all species for single element

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nFields

number of fields in mixture

real(kind=rk), intent(in) :: temp

mixture temperature

real(kind=rk), intent(in) :: press

mixture pressure

real(kind=rk), intent(in) :: mole_frac(nFields)

mole fraction of all species of single element

real(kind=rk), intent(out) :: therm_factors(nFields,nFields)

thermodynamic factor matrix

private subroutine mus_calc_MS_DiffMatrix_single(nFields, temp, press, mole_dens, D_ij_out)

This routine calculates Diffusivity coefficients matrix for given mole_frac of all species for single element

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nFields

number of fields in mixture

real(kind=rk), intent(in) :: temp

mixture temperature

real(kind=rk), intent(in) :: press

mixture pressure

real(kind=rk), intent(in) :: mole_dens(nFields)

mole density of all species of single element

real(kind=rk), intent(out) :: D_ij_out(nFields,nFields)

thermodynamic factor matrix