Phases classes
Documentation for the class objects creation are presented in this section [Highlighted in blue]. Documentation for methods called internally and not requiring user definition are ignored.
Single Phases
- class PharmaPy.Phases.LiquidPhase(path_thermo=None, temp=298.15, pres=101325, mass=0, vol=0, moles=0, mass_frac=None, mole_frac=None, mass_conc=None, mole_conc=None, name_solv=None, verbose=True, check_input=True)
Bases:
ThermoPhysicalManagerCreates a LiquidPhase object.
- Parameters:
mass_frac (array-like (optional)) – mass fractions of the constituents of the phase.
mole_conc (array-like (optional)) – molar concentrations of the constituents of the phase, excluding the solvent
ind_solv (int) – index of solvent components in the liquid phase. It must be only specified if ‘mass_frac’ or ‘mole_frac’ are not given.
- getActivityCoeff(method='ideal', mole_frac=None, temp=None)
- getBubblePoint(pres=None, mass_frac=None, mole_frac=None, thermo_method='ideal', y_vap=False)
- getBubblePressure(temp=None, mass_frac=None, mole_frac=None, thermo_method='ideal', y_vap=False)
- getCp(temp=None, mass_frac=None, mole_frac=None, basis='mole')
- getDensity(mass_frac=None, mole_frac=None, temp=None, basis='mass')
- getEnthalpy(temp=None, temp_ref=298.15, mass_frac=None, mole_frac=None, total_h=True, basis='mass')
- getProps(basis='mass')
- getSurfTension(mass_frac=None, mole_frac=None, temp=None)
- getSurfTensionPure(temp=None)
- getViscosity(temp=None, mass_frac=None, mole_frac=None)
- property name
- updatePhase(mole_conc=None, mass_conc=None, mass_frac=None, mole_frac=None, vol=0, mass=0, moles=0, temp=None, pres=None)
- class PharmaPy.Phases.SolidPhase(path_thermo, temp=298.15, temp_ref=298.15, pres=101325, mass=0, mass_frac=None, moments=None, num_mom=4, distrib=None, x_distrib=None, distrib_type='vol_perc', moisture=0, porosity=0, mole_conc=None, kv=1)
Bases:
ThermoPhysicalManager- Parameters:
path_thermo (string) – Directory of the physical properties .json file
temp (float or array-like) – Temperature for enthalpy calculation in K.
temp_ref (float, optional) – Reference temperature for enthalpy calculation. The default is 298.15.
pres (float, optional) – Pressure in atmosphere of the system in pascals. The default is 101325.
mass (float, optional) – Mass of solids in kg. The default is 0.
mass_frac (array-like, optional) – Fraction of the species participating in the solid phase in mass basis. The default is None.
moments (array, optional) – Array of size N, containing the distribution moments in um**n, for n = 0,…,N - 1. The default is None.
num_mom (integer, optional) – Maximum order of moments describing solid phase. The default is 4.
x_distrib (array, optional) – Array of size N, containing the internal grid size coordinate of the solids [um]. The default is None
distrib (array, optional) – Array of size N, constaining the initial distribution of crystals [#/m**3/um]. The default is None.
distrib_type (string, optional) – Type of distribution of crystals. The option is ‘mass_frac’ or ‘vol_perc’. The default is ‘vol_perc’.
moisture (float, optional) – Initial moisture content of the solids. The default is 0.
porosity (float, optional) – Volume-based pore fraction out of the packed solid beds. The default is 0.
mole_conc (array-like, optional) – Concentration of the species participating in the solid phase in mole basis. The default is None.
kv (float, optional) – Volumetric shape factor of the solids. The default is 1.
- Return type:
None.
- convert_distribution(x_distrib=None, num_distr=None, vol_distr=None, mass=0)
- getCp(temp=None, mass_frac=None, mole_frac=None, basis='mass')
- getDensity(mass_frac=None, mole_frac=None, temp=None, basis='mass')
- getDistribution(x_distrib, distrib)
- getEnthalpy(temp=None, temp_ref=298.15, mass_frac=None, mole_frac=None, total_h=True, basis='mass')
- getMoments(x_distrib=None, distrib=None, mom_num=None)
- getPorosity(distrib=None, diam_filter=1, AR=None, sphericity=None)
- property name
- updatePhase(x_distrib=None, distrib=None, mass=None, moments=None)
- class PharmaPy.Phases.VaporPhase(path_thermo=None, temp=298.15, pres=101325, mass=0, vol=0, moles=0, mass_frac=None, mole_frac=None, mole_conc=None, check_input=True, verbose=True)
Bases:
ThermoPhysicalManager- AntoineEquation(temp=None, pres=None)
- getCp(temp, mass_frac=None, mole_frac=None, basis='mass')
- getDensity(pres_gas=None, temp_gas=None, phase='gas', basis='mole')
- getDewPoint(pres=None, mass_frac=None, mole_frac=None, thermo_method='ideal', x_liq=False)
- getEnthalpy(temp=None, temp_ref=298.15, mass_frac=None, mole_frac=None, total_h=True, basis='mass')
Calculate vapor phase enthalpy. It assumes that the reference state is a liquid at t_ref.
- Parameters:
temp (float or array-like) – Temperature for enthalpy calculation in K.
temp_ref (float, optional) – Reference temperature for enthalpy calculation. The default is 298.15.
mass_frac (array-like, optional) – Fraction of the species participating in the vapor phase in mass. The default is None.
mole_frac (array-like, optional) – Fraction of the species participating in the vapor phase in mole. The default is None.
total_h (bool, optional) – If True, the total enthalpy is returned. If False, an array of individual enthalpy for each species is returned. he default is True.
- Returns:
hvapMass (J/kg)
hvapMole (J/mol)
- getHeatVaporization(temp, basis='mass')
- getViscosity(temp=None, mass_frac=None, mole_frac=None)
- property name
- updatePhase(mole_conc=None, mass_conc=None, mass_frac=None, mole_frac=None, vol=0, mass=0, moles=0)
- PharmaPy.Phases.classify_phases(instance, names=None)
- PharmaPy.Phases.getPropsPhaseMix(phases, basis='mass')
Mixed Phases
Created on Tue Jun 16 15:43:14 2020
@author: dcasasor
- class PharmaPy.MixedPhases.Cake(z_external=None, num_discr=50, saturation=None)
Bases:
object- property Phases
- getEnthalpy(temp=None, mass_frac=None, distrib=None)
- get_alpha()
- PharmaPy.MixedPhases.Interpolation(t_data, y_data, time)
- class PharmaPy.MixedPhases.Slurry(vol=0, moments=None, x_distrib=None, distrib=None)
Bases:
objectCreate Slurry object.
- Parameters:
vol (float, optional) – Volume of the Slurry [m**3]. The default is 0.
moments (array, optional) – Array of size N, containing the distribution moments in um**n, for n = 0,…,N - 1. The default is None.
mass_slurry (#) – DESCRIPTION. The default is 0.
x_distrib (array, optional) – Array of size N, containing the internal grid size coordinate of the solids [um]. The default is None
distrib (array, optional) – Array of size N, constaining the initial distribution of crystals [#/m**3/um]. The default is None.
- Return type:
None.
- property Phases
- getCp(temp, volfracs=None, density=None, times_vliq=False, basis='mass')
- getDensity(temp=None, basis='mass', total=False)
- getEnthalpy(temp, volfracs=None, densMass=None, volumetric=True)
- getFractions(distrib=None, mu_3=None, vol_basis=True)
- getSolidsConcentr(distrib=None, basis='vol')
- getTotalVol()
- class PharmaPy.MixedPhases.SlurryStream(vol_flow=0, moments=None, x_distrib=None, distrib=None)
Bases:
SlurryCreate a slurry stream object.
- Parameters:
vol_flow (float, optional) – Volumetric flow rate in which the slurry is transfered [m**3/s]. The default is 0.
moments (array, optional) – Array of size N, containing the distribution moments in um**n, for n = 0,…,N - 1. The default is None.
x_distrib (array, optional) – Array of size N, containing the internal grid size coordinate of the solids [um]. The default is None
distrib (array, optional) – Array of size N, constaining the initial distribution of crystals [#/m**3/um]. The default is None.
- Return type:
None.
- InterpolateInputs(time)
- property Phases
- evaluate_inputs(time)
- PharmaPy.MixedPhases.energy_balance(inst, mass_str)