.MultiPhaseMixture.Templates.ExternalTwoPhaseMixture.Auxilary.calcProperties_psX_ext

Information

Return thermodynamic state record from p and h

Interface

function calcProperties_psX_ext
  extends MultiPhaseMixture.Icons.ExternalFunction;
  input Modelica.SIunits.AbsolutePressure p "pressure";
  input Modelica.SIunits.SpecificEntropy s "specific entropy";
  input Modelica.SIunits.MassFraction X[nC] = reference_X "Mass fractions";
  input Integer X_unit = UnitBasis.MassFraction;
  input Integer phase = 0 "2 for two-phase, 1 for one-phase, 0 if not known";
  input MultiPhaseMixture.Templates.ExternalObjects.ExternalMediaObject eo;
  output Modelica.SIunits.AbsolutePressure p_overall_ "pressure";
  output Modelica.SIunits.Temperature T_overall_ "temperature";
  output Modelica.SIunits.Density d_overall_ "density";
  output Modelica.SIunits.SpecificEnthalpy h_overall_ "specific enthalpy";
  output Modelica.SIunits.SpecificEntropy s_overall_ "specific entropy";
  output Modelica.SIunits.Density d_1ph_[nP] "density";
  output Modelica.SIunits.SpecificEnthalpy h_1ph_[nP] "specific enthalpy";
  output Modelica.SIunits.SpecificEntropy s_1ph_[nP] "specific entropy";
  output Modelica.SIunits.PrandtlNumber Pr_1ph_[nP] "prandtl number";
  output Modelica.SIunits.VelocityOfSound a_1ph_[nP] "velocity of sound";
  output Modelica.SIunits.CubicExpansionCoefficient beta_1ph_[nP] "isobaric expansion coefficient";
  output Modelica.SIunits.SpecificHeatCapacity cp_1ph_[nP] "specific heat capacity cp";
  output Modelica.SIunits.SpecificHeatCapacity cv_1ph_[nP] "specific heat capacity cv";
  output Modelica.SIunits.Compressibility kappa_1ph_[nP] "compressibility";
  output Modelica.SIunits.ThermalConductivity lambda_1ph_[nP] "thermal conductivity";
  output Modelica.SIunits.DynamicViscosity eta_1ph_[nP] "dynamic viscosity";
  output Modelica.SIunits.DerPressureByTemperature dpdT_dN_1ph_[nP] "Derivative of pressure w.r.t. temperature";
  output Modelica.SIunits.DerPressureByDensity dpdd_TN_1ph_[nP] "Derivative of pressure w.r.t. density";
  output Integer nbrOfPresentPhases_(min = 0, max = nP) "Number of present phases, 0= unknown,1=single phase";
  output Integer presentPhaseIndex_[nP];
  output Modelica.SIunits.MassFraction phaseCompositions_[nP*nC] "matrix with composition for each phase";
  output Modelica.SIunits.MoleFraction phaseFractions_[nP] "molar fraction of the fluid that is in the specified phase";
end calcProperties_psX_ext;

Generated at 2024-11-23T19:25:52Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos