public ThermodynamicSystem AddComponent(MolecularComponent comp) { Components.Add(comp); var enthalpy = PureEnthalpyFunction.Create(this, comp); enthalpy.ReferenceState = PhaseState.Vapour; enthalpy.Tref.ValueInSI = 298.15; EnthalpyMethod.PureComponentEnthalpies.Add(enthalpy); return(this); }
public static PureEnthalpyFunction Create(ThermodynamicSystem sys, MolecularComponent comp) { var func = new PureEnthalpyFunction(); func.Component = comp; func.Tref = sys.VariableFactory.CreateVariable("Tref", "Reference temperature for enthalpy calculation", PhysicalDimension.Temperature); func.Href = sys.VariableFactory.CreateVariable("Href", "Reference enthalpy for enthalpy calculation", PhysicalDimension.SpecificMolarEnthalpy); func.PhaseChangeAtSystemTemperature = true; func.TPhaseChange = sys.VariableFactory.CreateVariable("TPC", "Temperature of phase change for enthalpy calculation", PhysicalDimension.Temperature); func.ReferenceState = PhaseState.Vapour; return(func); }