Exposed Functionality

The exposed methods do not apply to all EOS models. The assumption here, until the transition to Clapeyron.jl is made, is that only what is needed in downstream membrane packages is exposed / implemented. If you need some extra functionality for a project, please submit an issue (pull requests also welcome).

MembraneBase.pressure — Method
pressure(model, v, t, [mole_fractions])

Get the pressure of the state in MPa given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.VT_chemical_potential — Method
VT_chemical_potential(model, v, t, [mole_fractions])

Get the chemical potential of the state in J/mol given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.VT_compressibility_factor — Method
compressibility_factor(model, v, t, [mole_fractions])

Get the compressibility factor (z) of the state given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.VT_mass_density — Method
VT_mass_density(model, v, t, [mole_fractions])

Get the density of the state in g/cm3 given a volume (L/mol), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.activity — Method
activity(model, p, t, [mole_fractions])

Get the chemical activity of the state given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.chemical_potential — Method
chemical_potential(model, p, t, [mole_fractions])

Get the chemical potential of the state in J/mol given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.chemical_potential_res — Method
chemical_potential_res(model, p, t, [mole_fractions])

Get the residual chemical potential of the state in J/mol given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.compressibility_factor — Method
compressibility_factor(model, p, t, [mole_fractions])

Get the compressibility factor (z) of the state given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.density_upper_bound — Method
density_upper_bound(model, [mass_fractions])

Get the maximum possible mass density that the system can exhibit (e.g., for Sanchez Lacombe, this is its mixed characteristic density, for cubic EOSs, it is infinite), given its composition (omitted if system is pure).

source
MembraneEOS.fugacity — Method
fugacity(model, p, t, [mole_fractions])

Get a vector of fugacities for each component in the state in MPa given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.get_kij — Method
get_kij(modeltype, component_1::String, component_2::String; [default_value=0.0])

Attempt to look up the kij value between two components for a given EOS model type.

  • Returns missing if the value is not in the database.
  • Equal pairings (i.e., "CO2" and "CO2" will return the default_value).
source
MembraneEOS.get_kij_matrix — Function
get_kij_matrix(modeltype, components::AbstractVector{<:String})

Attempt to look up all pairings in a list of components and arrange them into a corresponding KIJ matrix.

  • When constructing an entire matrix at once, it is assumed you want to ignore missing values, so component pairings not in the database are assumed to interact ideally instead of being listed as missing.

e.g.,

get_kij_matrix(PR(), ["CO2", "CH4"])

> 2×2 Matrix{Union{Missing, Float64}}:
> 0.0   0.09
> 0.09  0.0
get_kij_matrix(PR(), ["CO2", "Something not in the database"])

> 2×2 Matrix{Union{Missing, Float64}}:
> 0.0  0.0
> 0.0  0.0
source
MembraneEOS.mass_density — Method
mass_density(model, p, t, [mole_fractions])

Get the mass density of the state in g/cm3 given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.volume — Method
volume(model, p, t, [mole_fractions])

Get the volume of the state in MPa given a pressure (MPa), temperature (K) and composition in mole fraction (can be omitted if the system is pure).

source
MembraneEOS.ρTω_activity — Method
ρTω_activity(model, ρ, t, [mass_fractions])

Get the chemical activity of the state given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).

source
MembraneEOS.ρTω_chemical_potential — Method
ρTω_chemical_potential(model, ρ, t, [mass_fractions])

Get the chemical potential of the state in J/mol given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).

source
MembraneEOS.ρTω_chemical_potential_res — Method
ρTω_chemical_potential_res(model, ρ, t, [mass_fractions])

Get the residual chemical potential of the state in J/mol given a density (g/cm3), temperature (K) and composition in mass fraction (can be omitted if the system is pure).

source