Testing the inheritance structure of a package in Modelica -
i test inheritance construction of media bundle in set of models can define right set of variables model, , @ loss how this.
for example, trying write generic model can take few different media input, such dryairnasa , r134a. since dryairnasa not model two-phase part , result state records liq , vap not valid, way of creating conditional set of variable declarations these state records defined r134a. seems me 1 natural way test inheritance construction of medium package. if medium used inherits partialtwophasemedium, can define two-phase variables; otherwise, not define them.
however, it's not clear me how write such test in modelica. ideally, code like:
if isequal(classofmedium(medium), modelica.media.interfaces.partialtwophasemedium) then
variable definitions
end if;
any ideas?
inheritance modelica
No comments:
Post a Comment