Fluid Connectors - ThermoFluid

Gallery
Tutorial
Click on the image to view it full size

The Modelica By Example target code is:


connector ThermoFluid
    Modelica.SIunits.Pressure p;
    flow Modelica.SIunits.MassFlowRate m_flow;
    Modelica.SIunits.Temperature T;
    flow Modelica.SIunits.HeatFlowRate q;
end ThermoFluid;

There are no examples in the SysPhS-1.1 spec of handling this kind of dual-flow, and it's not clear that the specification supports this physical case yet:

The introduction in this trail version of a conserved quantity MassHeat is a HACK that at least enables generation of correct Modelica code.

An equivalent Modelica connector MassHeatFlowElement can be generated via SysPhS as part of a minimal compressible thermal fluid system:


model ThermoFluidContext
  ThermoFluidContext _ThermoFluidContext;
  model ThermoFluidContext
    ThermoFluidA a;
    ThermoFluidB b;
  equation
    connect(a.io,b.io);
  end ThermoFluidContext;
  model ThermoFluidA
    MassHeatFlowElement io;
  end ThermoFluidA;
  model ThermoFluidB
    MassHeatFlowElement io;
  end ThermoFluidB;

  connector MassHeatFlowElement
    flow MassFlowRate mFR;
    Pressure p;
    flow HeatFlowRate hFR;
    Temperature t;
  end MassHeatFlowElement;

  type MassFlowRate=Real(unit="kg/s");
  type Pressure=Real(unit="Pa");
  type HeatFlowRate=Real(unit="J/s");
  type Temperature=Real(unit="K");
end ThermoFluidContext;
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)
External links