Error getting single phase heatCapacityCp
Posted: 31 October 2021, 12:23
Greetings, I am trying to get heatCapacityCp for calculation method in COBIA unit operation but getting the following error:
I can clearly see the phase heatCapacityCp value for the mixture in COFE. So, I'm a bit confused about the error. Hope to get your help on it.
Here is a sample code:CAPE-OPEN error, caused by: in ICapeThermoMaterial::GetSinglePhaseProp of 'feed': no values set for heatCapacityCp, phase Vapor, CalcType mixture (2x)
Code: Select all
CAPEOPEN_1_2::CapeThermoMaterial foo;
foo = feed->getMaterial()
CapeArrayStringImpl phaseLabels;
CapeArrayEnumerationImpl<CAPEOPEN_1_2::CapePhaseStatus> phaseStatus;
foo.GetPresentPhases(phaseLabels, phaseStatus);
CapeArrayRealImpl Cp;
Cp.resize(phaseLabels.size());
for (ConstCapeString phaseLabel : phaseLabels) {
CapeArrayRealImpl phaseCp;
foo.GetSinglePhaseProp(ConstCapeString(COBIATEXT("heatCapacityCp")),
phaseLabel, ConstCapeString(COBIATEXT("mole")), phaseCp);
Cp.emplace_back(phaseCp[0]);
}