.ModelicaReference.'flow'

Information

Declare flow (through) variable, which have to sum up to zero in connections

Examples

connector Pin
  Modelica.Units.SI.Voltage v;
  flow Modelica.Units.SI.Current i;
end Pin;

model A
  Pin p;
end A;

model Composition
  A a;
  A b;
  A c;
equation
  connect(a.p, b.p);
  connect(a.p, c.p);
end Composition;

From the connect statements in model Composition, the following connect equations are derived:

a.p.v = b.p.v;
a.p.v = c.p.v;
a.p.i + b.p.i + c.p.i = 0;

Syntax

See section on type_prefix in the Modelica Grammar.

Description

The flow prefix is used in order to generate equations for through variables, which sum up to zero in connections, whereas variables without the flow prefix are identical in a connection.


Generated at 2024-12-02T19:25:45Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos