When I check Modelica.Thermal.HeatTransfer.Components.HeatCapacitor using OpenModelica, it tells me that HeatCapacitor has 4 equations and 4 variables. But I can only find 3 equations in the model listed below for 4 variables(i.e, T, port.T, der_T, port.Q_flow):
T = port.T;
der_T = der(T);
C*der(T) = port.Q_flow;
I created a new model named MyHeatCapacitor by deleting der_T and the second equation listed above. The tool indicates that MyHeatCapacitor has 3 equations for 3 variables.
The two heat-capacitor models can give me the correct answers. I was just wondering where I can find the equation which does not appear in the equation section.
Thanks!!!
Check of Modelica.Thermal.HeatTransfer.Components.HeatCapacitor: The model has the same number of unknowns and equations: 3
This makes sense, as the model will need two equations for the two unkowns (T
andder_T
). Another one is necessary for every pair of across and flow variables in a physical connector (which in this case is one). This assumes that one equation is used to relate the interface variables internally and the other one is set from the outside (which happens when you connect the component). – Markus A.