- Index
- » Programming
- » Modelica Language
- » balancing
balancing
balancing
Hello Everyone,
I don't understand why the following model is not equalt in variables and equation. I do get which the equations and variables are. I just don't understand how I should change the model to get equal size of equations and variables.
type VolumeFlowRate = Real(final quantity = "VolumeFlowRate", final unit = "m3/s");
connector AirFlow "Airflow connector"
flow VolumeFlowRate Q_air;
end AirFlow;
model blower
parameter VolumeFlowRate Q_max = 20000
parameter VolumeFlowRate Q_min = 0.0
Real H;
Interfaces.AirFlow AirOut;
Modelica.Blocks.Interfaces.RealInput u;
equation
H = 0.5 * ((-Q_min) + Q_max) + u * 0.5 * ((-Q_min) + Q_max) + Q_min;
AirOut.Q_air = -(if H > Q_max then Q_max else if H < Q_min then Q_min else H);
end blower;
It tells me 2 variables and 3 equations and therefor structurally singular.
- Index
- » Programming
- » Modelica Language
- » balancing