Does the model compatible with Dymola2021X?
Created by: tiny-sponge
I check the model and error pops out. The message is as follows. I wonder what modification should I make to fix it? Any commends would be appreciated!
Check of ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_Ph:
For equation if (region == 1) then T = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.tph1(p, h); g = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.g1(p, T); pro = ThermoSysPro.Properties.WaterSteam.Common.gibbsToProps_ph( g); pro.x = (if supercritical then -1 else 0); elseif (region == 2) then T = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.tph2(p, h); g = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.g2(p, T); pro = ThermoSysPro.Properties.WaterSteam.Common.gibbsToProps_ph( g); pro.x = (if supercritical then -1 else 1); elseif (region == 3) then (d, T, error) = ThermoSysPro.Properties.WaterSteam.BaseIF97.Inverses.dtofph3 (p, h, 1E-07, 1E-06); f = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.f3(d, T); pro = ThermoSysPro.Properties.WaterSteam.Common.helmholtzToProps_ph( f); if (h > 2087546.84511715) then pro.x = (if supercritical then -1 else 1); else pro.x = (if supercritical then -1 else 0); end if; elseif (region == 4) then pro = ThermoSysPro.Properties.WaterSteam.Common.water_ph_r4(p, h); elseif (region == 5) then (T, error) = ThermoSysPro.Properties.WaterSteam.BaseIF97.Inverses.tofph5( p, h, 1E-07); g = ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.g5(p, T); pro = ThermoSysPro.Properties.WaterSteam.Common.gibbsToProps_ph( g); pro.x = (if supercritical then -1 else 1); else assert(false, "Water_Ph: Incorrect region number ("+ String(region, true, 0)+")"); end if; found in class ThermoSysPro.Properties.WaterSteam.IF97_packages.IF97_wAJ.Water_Ph, C:/Users/Zhang/Desktop/ThermoSysPro-master/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo at line 95.
The types of the operands in (g) = (ThermoSysPro.Properties.WaterSteam.BaseIF97.Basic.g5(p, T)) are incompatible records. record LeftHandSide Real R "not found in other"; Real T ; Real g ; Real gpi ; Real gpipi ; Real gtau ; Real gtaupi ; Real gtautau ; Real p ; Real pi ; Real tau ; end LeftHandSide; record RightHandSide Real R_s "not found in other"; Real T ; Real g ; Real gpi ; Real gpipi ; Real gtau ; Real gtaupi ; Real gtautau ; Real p ; Real pi ; Real tau ; end RightHandSide;
Variable g was declared in class ThermoSysPro.Properties.WaterSteam.Common, C:/Users/Zhang/Desktop/ThermoSysPro-master/ThermoSysPro/Properties/WaterSteam/IF97_packages.mo at line 82, and used in component Water_Ph.
Errors detected in functions.
Check aborted.
ERRORS have been issued.