modelica

Variable sampling frequency in OpenModelica

最后都变了- 提交于 2020-06-28 03:39:16
问题 I am referring to this post: alternative to sample function with varying sampling range I want to measure an RMS value (or a mean value) with a variable sampling frequency, which i can feed in as an input signal. The suggested way which nearly suits my need is the following: model RMS constant Real f_max = 2*2*asin(1.0); constant Real f = 1+abs(2*asin(time)); Real signal = sin(time); Real rms = if time < f then (if time < 1e-10 then signal else sqrt(i_sq / time)) else sqrt(i_sq_f / f); Real i

Looking for PID tuning library in Modelica

橙三吉。 提交于 2020-06-01 04:49:05
问题 I am building a control system with the Modelica Standard Library. But I got trouble in tuning the parameters in the PID system,so I wanna use a library that could do auto-tuning for the PID system. After some searching on Google, it seems there is no such a library in Modelica. My question: Could anyone recommend an auto-tuning library for the PID system? 回答1: You should take a look at Modelica IndustrialControlSystems (https://github.com/mbonvini/IndustrialControlSystems). It has some

How much is the largest capability of solving the nonlinear system model in Dymola?

百般思念 提交于 2020-05-30 06:10:17
问题 In Dymola, I often meet a nonlinear system initialization failure or maybe a stiff system that is hard to solve in the large thermo-fluid system, but for a simple system, there wouldn't be this kind of problem. My questions are: So I am wondering how much is the largest capability of solving a nonlinear system model? For example, how many nonlinear equations I could include in my model at most? Is there any setting in Dymola which allows increasing the capability of solving nonlinear system?

How much is the largest capability of solving the nonlinear system model in Dymola?

╄→尐↘猪︶ㄣ 提交于 2020-05-30 06:10:03
问题 In Dymola, I often meet a nonlinear system initialization failure or maybe a stiff system that is hard to solve in the large thermo-fluid system, but for a simple system, there wouldn't be this kind of problem. My questions are: So I am wondering how much is the largest capability of solving a nonlinear system model? For example, how many nonlinear equations I could include in my model at most? Is there any setting in Dymola which allows increasing the capability of solving nonlinear system?

Modelica total time calculation of simulation and equation initialization

不想你离开。 提交于 2020-05-29 04:04:00
问题 I would like to measure the total simulation and initialization time of a system of DAEs. I am interested in the wall-clock time (like the one given in Matlab by the function tic-toc). I noticed in Modelica there are different flags for the simulation time but actually the time I get is very small compared to the time that elapses since I press the simulation button to the end of the simulation (approximately measured with the clock of my phone). I guess this short time is just the time

Modelica total time calculation of simulation and equation initialization

大城市里の小女人 提交于 2020-05-29 04:03:13
问题 I would like to measure the total simulation and initialization time of a system of DAEs. I am interested in the wall-clock time (like the one given in Matlab by the function tic-toc). I noticed in Modelica there are different flags for the simulation time but actually the time I get is very small compared to the time that elapses since I press the simulation button to the end of the simulation (approximately measured with the clock of my phone). I guess this short time is just the time

How to see the nonlinear equations of a Modelica model in Dymola?

痴心易碎 提交于 2020-05-16 22:30:53
问题 I build a large model in Dymola, there are nonlinear equations in this model, I wanna know which nonlinear equations decrease the performance and cause an initialization failure, but with the following settings of debugging, I can't see the nonlinear equations in the dslog.txt file, only the iteration variables, how could I find the nonlinear equations? 来源: https://stackoverflow.com/questions/61797757/how-to-see-the-nonlinear-equations-of-a-modelica-model-in-dymola

Follow up question: Modelica total time calculation of simulation and equation initialization

强颜欢笑 提交于 2020-05-15 19:26:06
问题 I am writing this question related to this. In his reply, Marco gave me an excellent answer but, unfortunately, I am new with OpenModelica so I would need some further help. I am actually using OpenModelica and not Dymola so unfortunately I have to build the function that does it for me and I am very new with OpenModelica language. So far, I have a model that simulates the physical behavior based on a DAEs. Now, I am trying to build what you suggest here: With get time() you can build a

Replacement of deprecated function cardinality(c) in Modelica

ⅰ亾dé卋堺 提交于 2020-05-14 20:42:34
问题 In the documentation it is indicated, that cardinality() function is deprecated and should no longer be used. However, it is still used in the libraries such as ThermoSysPro. e.g. if (cardinality(C) == 0) then some code end if; where C is FluidInlet or FluidOutlet Could anyone give a simple example of how it could be replaced? 回答1: The usual solution is to make the connector conditional, and if enabled you require that it is connected. For physical connectors you can see how heatports and

Is there a way to list of parameters of FMU (or of submodel in FMU) using the python libraries FMPy or pyFMI?

狂风中的少年 提交于 2020-05-09 04:35:52
问题 I have a FMU of a model and the use case is to change parameter values of the FMU to see the impact on the results. Is there a way to list top level parameters of the FMU using either FMPy or pyFMI if I dont' have access to the Modelica model? One of the process I have been following is to open the FMU using FMPy.gui and go through the list of parameters and then use them in the script but I would like to know if there an easier way of doing it so that I can list then in the Jupyter notebook