dymola

How to ensure convergence during the initialization of the nonlinear system in Dymola

跟風遠走 提交于 2020-01-06 05:21:06
问题 Is there a guide for increasing the ability of convergence during the initialization of the nonlinear system in Dymola? Usually, the connector contains start values, but they are not always suited for the model I build, so there might be a divergence issue during the initialization. How could I avoid this issue? 回答1: The Dymola User Manual Volume 1 has several chapters, which deal with the initialization of nonlinear systems. In Dymola 2020 the chapters are: 5.6.8 Initial guesses for

How to use the value of the variable in the previous interval as an input to the equation…?

别说谁变了你拦得住时间么 提交于 2020-01-03 21:03:19
问题 Is it possible to use the previous value of the time varying variable for eg: Suppose I have pipe whose inlet temperature is 298K with a specified uniform mass flow(m_flow), now suppose i am heating the pipe using a heater of 100 watts. The outlet temperature will be attain a higher temperature of suppose 302K, now if i have to use this outlet temperature as my inlet temperature (in the sense i am recircuilating the water), how would i be doing it? is it possible to update the value of the

List of Dymola flags

♀尐吖头ヾ 提交于 2019-12-30 05:24:06
问题 Some settings in Dymola can be altered by setting flags in the "Commands" window: Some examples for flags are: Advanced.AutoFormatting Advanced.PedanticModelica Advanced.LogStartValuesForIterationVariables Hidden.PrintFailureToDifferentiate Is there a comprehensive list of all Dymola flags? Or, even better, a command to print such a list? Or, even better, something like the about:config in Firefox? Especially, I would like to change the default setting for the Save contents in one file

dymola.readTrajectory - different sample times

♀尐吖头ヾ 提交于 2019-12-24 14:27:49
问题 Given a python script that triggers simulations in the Dynamic Modeling Laboratory (Dymola). My goal is to get the data of the trajectories of my simulation, but in different sampling intervals. E.g. I want the transient section from 0 sec to 1000 sec to be sampled in 1sec intervals and the steady state section from 1000sec to 100000sec to be sampled in 100sec intervals without having to perform two simulations with different start times, stop times and output intervals. An excerpt of the

How are the data types in dsin.txt defined?

自闭症网瘾萝莉.ら 提交于 2019-12-24 12:26:30
问题 I am currently developing a python interface for running Modelica simulations using Dymola and I can't find any documentation on the data types used in the dsin.txt file : ... 0 0 0 0 4 328 # timeToEmpty -1 0 0 100 2 272 # level 0 0 0 0 3 256 # der(level) -1 10 0 0 1 280 # initialFlowRate 0 0 0 0 6 320 # flowRate ... There is some documentation inside the file itself, but it's not very helpful : ... # column 6: Data type of variable. # = 0: real. # = 1: boolean. # = 2: integer. ... As you can

OpenModelica: “Warning: maximal number of iteration reached but no root found” with conditional equation

天大地大妈咪最大 提交于 2019-12-20 05:32:58
问题 I am an OpenModelica beginner trying to model a DC/DC converter with constant voltage and current limiting. Basically the output is supposed to give a constant voltage until the maximum current is reached and then hold that current by reducing voltage. This is the equation part of my code so far: model DC_DC "Voltage source with current limiting" import SI = Modelica.SIunits; parameter SI.Voltage Vnom(start=1) "Value of nominal output voltage"; parameter SI.Current Inom(start=1) "Value for

OpenModelica: “Warning: maximal number of iteration reached but no root found” with conditional equation

只谈情不闲聊 提交于 2019-12-20 05:31:13
问题 I am an OpenModelica beginner trying to model a DC/DC converter with constant voltage and current limiting. Basically the output is supposed to give a constant voltage until the maximum current is reached and then hold that current by reducing voltage. This is the equation part of my code so far: model DC_DC "Voltage source with current limiting" import SI = Modelica.SIunits; parameter SI.Voltage Vnom(start=1) "Value of nominal output voltage"; parameter SI.Current Inom(start=1) "Value for

External Functions: Alternative Method to use .dll from a C-script

强颜欢笑 提交于 2019-12-20 04:16:26
问题 This is a companion question to External Functions: Reference headers in C-script to compiled dll. That stack overflow question is using a Modelica external function call to a c-script. That c-script then uses c-functions contained within a .dll. Below is the initial preferred method I had attempted and a working attempt that I do not prefer. Initial Attempt: The following code would not work. My assumption was since I loaded the .dll Library libgsl in Modelica I could then simply use headers

External Functions: Reference headers in C-script to compiled dll

倾然丶 夕夏残阳落幕 提交于 2019-12-20 02:01:18
问题 Using Dymola 2017. Case A) Calling an external c-script I have had success implementing simple external c functions that have no “# include <-->” statements: Modelica Function: function chirp input Modelica.SIunits.AngularVelocity w_start; input Modelica.SIunits.AngularVelocity w_end; input Real A; input Real M; input Real t; output Real u "output signal"; external "C" u=chirp(w_start,w_end,A,M,t) annotation(IncludeDirectory="modelica://ExternalFuncTest/Resources/Source/", Include="#include \

Define Model Parameter as Variable

十年热恋 提交于 2019-12-13 01:08:22
问题 I am attempting to define the parameter of a model (block) as a variable. For example: Real WallThickness = 0.5; Real WallConductance = 10*WallThickness; Modelica.Thermal.HeatTransfer.Components.ThermalConductor TopPanelConductor(G=WallConductance); I would like to define "G" so that it remains constant throughout the simulation but the coefficient is updated prior to the simulation based on the other variable "WallThickness". When defining the ThermalConductor parameter "G" as a variable in