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~~UsesGraph module~mus_enrtl_module mus_eNRTL_module iso_c_binding iso_c_binding module~mus_enrtl_module->iso_c_binding module~env_module env_module module~mus_enrtl_module->module~env_module

Used by

  • module~~mus_enrtl_module~~UsedByGraph module~mus_enrtl_module mus_eNRTL_module module~mus_msliquid_module mus_MSLiquid_module module~mus_msliquid_module->module~mus_enrtl_module module~mus_mixture_module mus_mixture_module module~mus_msliquid_module->module~mus_mixture_module module~mus_derquanmsliquid_module mus_derQuanMSLiquid_module module~mus_derquanmsliquid_module->module~mus_enrtl_module module~mus_auxfieldvar_module mus_auxFieldVar_module module~mus_auxfieldvar_module->module~mus_enrtl_module module~mus_bc_species_module mus_bc_species_module module~mus_bc_species_module->module~mus_enrtl_module module~mus_bc_species_module->module~mus_derquanmsliquid_module module~mus_bc_species_module->module~mus_mixture_module module~mus_mixture_module->module~mus_enrtl_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_enrtl_module module~mus_flow_module->module~mus_mixture_module module~mus_bc_passivescalar_module mus_bc_passiveScalar_module module~mus_bc_passivescalar_module->module~mus_mixture_module module~mus_bc_fluid_noneqexpol_module mus_bc_fluid_nonEqExpol_module module~mus_bc_fluid_noneqexpol_module->module~mus_mixture_module module~mus_field_module mus_field_module module~mus_field_module->module~mus_mixture_module module~mus_bc_header_module mus_bc_header_module module~mus_bc_header_module->module~mus_mixture_module module~mus_bc_fluid_wall_module mus_bc_fluid_wall_module module~mus_bc_fluid_wall_module->module~mus_mixture_module module~mus_variable_module mus_variable_module module~mus_variable_module->module~mus_derquanmsliquid_module module~mus_variable_module->module~mus_auxfieldvar_module module~mus_bc_fluid_turbulent_module mus_bc_fluid_turbulent_module module~mus_bc_fluid_turbulent_module->module~mus_mixture_module module~mus_bc_fluid_experimental_module mus_bc_fluid_experimental_module module~mus_bc_fluid_experimental_module->module~mus_mixture_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_flow_module module~mus_bc_general_module mus_bc_general_module module~mus_bc_general_module->module~mus_bc_species_module module~mus_bc_general_module->module~mus_mixture_module module~mus_bc_nernstplanck_module mus_bc_nernstPlanck_module module~mus_bc_nernstplanck_module->module~mus_mixture_module module~mus_derquanmsgas_module mus_derQuanMSGas_module module~mus_derquanmsgas_module->module~mus_derquanmsliquid_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_flow_module module~mus_bc_poisson_module mus_bc_poisson_module module~mus_bc_poisson_module->module~mus_mixture_module module~mus_initmultispecies_module mus_initMultispecies_module module~mus_initmultispecies_module->module~mus_msliquid_module module~mus_scheme_type_module mus_scheme_type_module module~mus_scheme_type_module->module~mus_mixture_module module~mus_bc_fluid_module mus_bc_fluid_module module~mus_bc_fluid_module->module~mus_mixture_module module~mus_derquanpoisson_module mus_derQuanPoisson_module module~mus_derquanpoisson_module->module~mus_auxfieldvar_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_flow_module module~mus_scheme_module mus_scheme_module module~mus_scheme_module->module~mus_auxfieldvar_module module~mus_scheme_module->module~mus_mixture_module

Contents


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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    character(kind=c_char), 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="0")

    Arguments

    TypeIntentOptionalAttributesName
    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="0")

    Arguments

    TypeIntentOptionalAttributesName
    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="0")

    Arguments

    TypeIntentOptionalAttributesName
    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

TypeIntentOptionalAttributesName
character(kind=c_char), 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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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