modelica

Using “Save start values in the model” option to help the convergence in Dymola

前提是你 提交于 2021-01-27 13:03:53
问题 I build a model in dymola. Even though there are some errors during the initialization process, but the calculation succeeded at last. After the model converged successfully, I tried to use the "Save start values in the model" option to get the right iteration variable strat values stored into the model so that the model would NOT get errors in the next calculation. But after I did this and tried to do calculation once more, I still got the same errors. So, my question is: Could I use the

Dynamic piping system

给你一囗甜甜゛ 提交于 2021-01-07 02:49:56
问题 I try to model a hydraulic system in Twinbuilder with Modelica. But I get always errors which I think has to do with convergence problem. To understand what the problem is, I simplified my system to a dynamic pipe, fixed boundary, and swept volume whose movement will be given by a sinus function. But I still get an error in this simplified case. I am able to compile the model even though I get warnings. When I try to solve the model,. It is not solved. I want to ask if you give me a

Modelica Simulation breaks when if condition changes

て烟熏妆下的殇ゞ 提交于 2021-01-05 10:53:26
问题 I try a simple code on modelica using if: model thermostat1 parameter Real T0=10; Real T(start=T0); equation if T<73 then der(T)=-T+80; else der(T)=-T+50; end if; end thermostat1; the simulation stops at the moment T reaches 73. Why can't the simulation continue with the new equation ( der(T)=-T+50 )? And how can i fix it? Thank you. 回答1: What happens in your model is called chattering . This means, that there are very frequent events happening. In you case specifically this is caused by the

Problems understanding a dymola error message

僤鯓⒐⒋嵵緔 提交于 2020-12-31 07:57:09
问题 Can anyone give me a hint what "algebraic loop" means -- and how I am supposed to cope with this situation by adding "pre"-operators? I'm seriously not getting it... Error: Failed to generate code for an algebraic loop involving when equations or algorithms with when parts. Unknowns: pump.Hb_flow pump.medium.d pump.medium.h pump.medium.state.melting pump.medium.state.T pump.V_flow pump.V_flow_single pump.W_single Equations: algorithm when Modelica.SIunits.Conversions.to_degC(pump.medium.state

Why does the “der()” operator in Modelica apply to the time variable only?

喜夏-厌秋 提交于 2020-12-30 03:13:37
问题 I build a simple to model in Dymola, but I got confused about the der() operator, why does the der() operator apply to the time variable only? What if I want to use the derivate to other variables In the following code, if I want to calculate dy/dx (derivative of y to x), how should I do this? model A Real x, y, z; equation x=10; y=sin(x); z=der(y); end A; 回答1: Partial derivatives are supported via functions. See chapter 12.7.2 in Modelica Spec 3.4: Partial Derivatives of Functions . You have