-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thermal.FixedHeatFlow cannot actually model a fixed heat flow rate source #234
Comments
|
In Modelica it works with alpha=0. I see this more as an issue with the observed generation. |
Yes I know that MSL defines this the way it is. May be as you said there is a problem with observed generation. But defining a temperature dependent heat flow for a fixed heat source is illogical unless MTSL is going to be an exact replica of MSL. |
Here is an MWE that shows this:
The last line gives the following error:
The problem stems from the temperature dependence of the heat flow implemented in
Thermal.FixedHeatFlow
.observed(sys)
gives the following list for the observed variables.The culprit is the 7th equation in which
alpha
is in denominator and for constant heat source is zero. Also if the source is modeling an insulated point whereQ_flow = 0
, the same symptom occurs regardless of the value ofalpha
.The remedy is to correctly define the
Thermal.FixedHeatFlow
equation asport.Q_flow ~ -Q_flow
and ditch the temperature dependence, which is meaningless for a fixed heat flow source anyway. Note that the same argument applies toThermal.PrescribedHeatFlow
for which the correct equation should beport.Q_flow ~ -Q_flow.u
.PS. I know that Modelica Standard Library defines the above sources the same way that they are currently implemented in ModelingToolkit Standard Library, but I think the correct way to define them is as discussed above. When a temperature dependent heat flow source is desired, it can be achieved by combining
Thermal.PrescribedHeatFlow
,Thermal.TemperatureSensor
and some function block.The text was updated successfully, but these errors were encountered: