calc_composition_dependent_variables
despasito.equations_of_state.saft.saft_toolbox.calc_composition_dependent_variables
- calc_composition_dependent_variables(xi, molecular_composition, bead_library, beads)[source]
Calculate the factor for converting molar density to bead density and molecular mole fractions to bead fractions.
- Parameters:
xi (numpy.ndarray) – Mole fraction of each component, sum(xi) should equal 1.0
molecular_composition (numpy.array) – \(\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. Defined for eq. 11. Note that indices are flipped from definition in reference.
bead_library (dict) – A dictionary where bead names are the keys to access EOS self interaction parameters:
Vks: \(V_{k,s}\), Number of groups, k, in component
Sk: Optional, \(S_{k}\), Shape parameter of group k
beads (list[str]) – List of unique bead names used among components
- Returns:
Cmol2seg (float) – Conversion factor from from molecular number density, \(\rho\), to segment (i.e. group) number density, \(\rho_S\). Shown in eq. 13
xskl (numpy.ndarray) – Matrix of mole fractions of bead (i.e. segment or group) k multiplied by that of bead l