Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

setState initialization

setState initialization

Hi guys,

I'm creating my own fluid models like valves pipes ect, I noticed that in the standard library they use BaseProperties to calculate the state while I'd like to use the setState approach; my doubt is about initialization: how should I do it?

In the BaseProperties apporach the write

Medium.BaseProperties gas(p(start=p0),T(start=T),Xi(start=Xnom[1:Medium.nXi]));

should I write

Medium.ThermodynamicState gas=Medium.setState_pTX(p0,T,Xnom) ?

Than you very much!

Regards

Jacopo

There are 0 guests and 0 other users also viewing this topic
You are here: