EosType
despasito.equations_of_state.saft.saft.EosType
- class EosType(saft_name='gamma_mie', Aideal_method=None, combining_rules=None, **kwargs)[source]
Initialize EOS object for SAFT variant.
All input and calculated parameters are defined as hidden attributes.
- Parameters:
beads (list[str]) – List of unique bead names used among components
bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters:
mass: Bead mass [kg/mol]
epsilonHB-*-*: Optional, Interaction energy between each bead and
association site. Asterisk represents string from sitenames. - K-*-*: Optional, Bonding volume between each association site. Asterisk represents two strings from sitenames. - rc-*-*: Optional, Cutoff distance for association sites. Asterisk represents two strings from sitenames. - rd-*-*: Optional, Site position. Asterisk represents two strings from sitenames. - Nk-*: Optional, The number of sites of from list sitenames. Asterisk represents string from sitenames. - etc. depending on SAFT variant
cross_library (dict, Optional, default={}) – Optional library of bead cross interaction parameters. As many or as few of the desired parameters may be defined for whichever group combinations are desired. Note that the astericks below represent first the sitename of the primary bead and second the sitename of the secondary bead in the .json or dictionary structure.
epsilonHB-*-*: Optional, Interaction energy between each bead and
association site. Asterisk represents string from sitenames. - K-*-*: Optional, Bonding volume between each association site. Asterisk represents two strings from sitenames. - rc-*-*: Optional, Cutoff distance for association sites. Asterisk represents two strings from sitenames. - rd-*-*: Optional, Site position. Asterisk represents two strings from sitenames. - etc. depending on SAFT variant
combining_rules (dict, Optional, default=None) – Provided to overwrite functional form of combining rules defined for parameters in specific SAFT variant. See appropriate class.
saft_name (str, Optional, default=”gamma_mie”) – Define the SAFT variant, options listed in
saft_type().molecular_composition (numpy.ndarray) – \(\nu_{i,k}/k_B\). Array of number of components by number of bead types. Defines the number of each type of group in each component, as it corresponds to the
beadsarray.Aideal_method (str, Optional) – Functional form of ideal gas contribution for Helmholtz energy. Default is defined in SAFT variant defined with
saft_name. SeeAideal_contribution()for more options.reduction_ratio (float, Optional) – Reduced distance of the sites from the center of the sphere of interaction. This value is used when site position,
eos_dict['rd_klab'] == None. Seecalc_bonding_volume()for more details.method_stat (obj) – EOS object containing the the method status of the available options.
kwargs – Other keywords that are specific to the chosen SAFT variant
- Variables:
beads (list[str]) – List of unique bead names used among components
bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters. See entry in Parameters section.
cross_library (dict) – Library of bead cross interaction parameters. As many or as few of the desired parameters may be defined for whichever group combinations are desired. See entry in Parameters section.
number_of_components (int) – Number of components in mixture represented by given EOS object.
parameter_types (list[str]) – This list of parameter names for the association site calculation, “epsilonHB”, “K”, “rc”, and/or “rd” as well as parameters for the specific SAFT variant.
parameter_bound_extreme (dict) –
With each parameter names as an entry representing a list with the minimum and maximum feasible parameter value.
epsilonHB: [100.,5000.]
K: [1e-5,10000.]
rc: [0.1,10.0]
rd: [0.1,10.0]
etc., other parameters from SAFT variant
saft_name (str, Optional, default="gamma_mie") – Define the SAFT variant, options listed in
saft_type().saft_source (obj) – Object representing SAFT variant. This attribute can be used to access intermediate calculations.
eos_dict (dict) –
Temperature value is initially defined as NaN for a placeholder until temperature dependent attributes are initialized by using a method of this class.
molecular_composition (numpy.ndarray) - \(\nu_{i,k}/k_B\). Array
containing the number of components by the number of bead types. Defines the number of each type of group in each component - residual_helmholtz_contributions (list[str]) - List of methods from the specified saft_source representing contributions to the Helmholtz energy that are functions of density, temperature, and composition - Aideal_method (str) - Method defined in SAFT variant - massi (list) - List of molecular weight for each group in
beadsarray - flag_assoc (bool) - flag indicating whether there is an association site contribution to the Helmholtz energy - sitenames (list[str]) - List of sitenames for association site interactions. This array is extracted frombead_libraryentries - nk (numpy.ndarray) - A matrix of (Nbeads x Nsites) Contains for each bead the number of each type of site - epsilonHB (numpy.ndarray) - Optional, Interaction energy between each bead and association site. - Kklab (numpy.ndarray) - Optional, Bonding volume between each association site - rc_klab, Optional, Cutoff distance for association sites - rd_klab, Optional, Association site position - reduction_ratio (float) - Reduced distance of the sites from the center of the sphere of interaction. This value is used when site position,eos_dict['rd_klab'] == None.
EosType.Aassoc(rho, T, xi)Return a vector of association site contribution of Helmholtz energy.
EosType.Aideal(rho, T, xi[, method])Return a vector of ideal contribution of Helmholtz energy.
EosType.check_bounds(parameter, param_name, ...)Ensures that bounds given for parameter are within the range of feasibility defined in this class.
EosType.density_max(xi, T[, maxpack])Estimate the maximum density based on the hard sphere packing fraction.
EosType.fugacity_coefficient(P, rho, xi, T)Compute fugacity coefficient.
EosType.guess_parameters(param_name, bead_names)Output a guess for the given parameter type.
EosType.helmholtz_energy(rho, T, xi)Return a vector of Helmholtz energy.
To refresh dependent parameters
EosType.pressure(rho, T, xi[, step_size])Compute pressure given system information.
EosType.residual_helmholtz_energy(rho, T, xi)Return a vector of residual Helmholtz energy.
EosType.update_parameter(param_name, ...)Update a single parameter value during parameter fitting process.