- Index
- » Programming
- » Modelica Language
- » Call the Function of Heat Capacity Cp
Call the Function of Heat Capacity Cp
Call the Function of Heat Capacity Cp
Hello everyone, I am having some problems to call the Specific Heat Capacity of my working fluid that in this case is Hydrogen, I can't call it using the Pressure or either the Temeperature, if someone could help me please, thanks in advance.
Here is my code
import Modelica.SIunits;
package Hyd
extends ExternalMedia.Media.CoolPropMedium(
mediumName="hydrogen",
substanceNames={"hydrogen"},
inputChoice=ExternalMedia.Common.InputChoice.pT);
end Hyd;
SIunits.SpecificHeatCapacity cp_in;//[J/kg*K]
Hyd.AbsolutePressure Pb_0;
Hyd.Temperature Tin;
Hyd.SaturationProperties sat9,sat10;
Equation
sat9=Hyd.setSat_T(Tin);
sat10=Hyd.setSat_p(Pb_0);
cp_in=Hyd.specificHeatCapacityCp(sat9);//[J/kg*K]
cp_in=Hyd.specificHeatCapacityCp(sat10);//[J/kg*K]
ERROR
For equation
cp_in = specificHeatCapacityCp_Unique8(
sat10);
found in class Bunkering_Green_Fuels.Hydrogen_STS, declaration window at line 1118.
For equation
cp_in = specificHeatCapacityCp_Unique8(
sat10);
found in class Bunkering_Green_Fuels.Hydrogen_STS, declaration window at line 1118.
Non-matching record for
argument number 1, state = sat10, in
specificHeatCapacityCp_Unique8(
sat10)
record state
Real T "not found in other";
Real a "not found in other";
Real beta "not found in other";
Real cp "not found in other";
Real cv "not found in other";
Real d "not found in other";
Real ddhp "not found in other";
Real ddph "not found in other";
Real eta "not found in other";
Real h "not found in other";
Real kappa "not found in other";
Real lambda "not found in other";
Real p "not found in other";
Integer phase "not found in other";
Real s "not found in other";
end state;
record RightHandSide
Real Tsat "not found in other";
Real dTp "not found in other";
Real ddldp "not found in other";
Real ddvdp "not found in other";
Real dhldp "not found in other";
Real dhvdp "not found in other";
Real dl "not found in other";
Real dv "not found in other";
Real hl "not found in other";
Real hv "not found in other";
Real psat "not found in other";
Real sigma "not found in other";
Real sl "not found in other";
Real sv "not found in other";
end RightHandSide;
The function is declared as:
function specificHeatCapacityCp_Unique8
input ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.ThermodynamicState state ;
output Modelica.Media.Interfaces.Types.SpecificHeatCapacity cp := 1000.0 "Specific heat capacity at constant pressure";
end specificHeatCapacityCp_Unique8;
- Index
- » Programming
- » Modelica Language
- » Call the Function of Heat Capacity Cp