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

Q_Flow Gain

Q_Flow Gain

Hey,
I am new to Modelica modeling and I have the following problem: I want to make a model that has an heat port input and an heat port output. The OutputPort.Q_flow = inputPort.Q_flow * constant.
It should work similar the the gain block.

the model
model gain
  parameter Real k = 3;

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a a
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b b
   
equation
  b.Q_flow = a.Q_flow *k;
end gain

I got the following error message: Error: Scalar system is always singular for gain_heat.a.T = (fixedHeatFlow.Q_flow*(1-fixedHeatFlow.alpha*fixedHeatFlow.T_ref)-gain_heat.a.Q_flow)/( -fixedHeatFlow.Q_flow*fixedHeatFlow.alpha) = 200/-0
Error: Failed to start model.

Thank you very much for your help!

Edited by: Gerald - Sep-08-15 13:53:58
There are 0 guests and 0 other users also viewing this topic