dymola

Displaying parameter in annotation in DYMOLA

被刻印的时光 ゝ 提交于 2019-12-10 18:09:04
问题 I have a simulation model using different components. In order to get a quick overview of the used parameters I use the functionality of annotations to display certain model parameters (e.g. m_flow_nominal) via: textString="Nominal Flow Rate = %m_flow_nominal" in the annotation dialog. Which will give out something like Nominal Flow Rate = 5 This is working perfectly fine for parameters that are integers. I also have a parameter that is calculated from other values. Like, let's say the Volume

Modelica - Dymola Python interface: Set output format to textual

和自甴很熟 提交于 2019-12-07 19:54:55
问题 I am running Modelica simulations with Dymola via the Dymola Python interface. My aim is to have the result file written to textual output (i.e. to a .txt file). Even though my model contains the annotation __Dymola_experimentSetupOutput(textual=true, events=false) , the output is written to a .mat file. Unfortunately, when I type find() into the Dymola command line, I cannot find a suitable flag for setting the output format via dymola.ExecuteCommand() . Is there a possibility to set the

Modelica - Dymola Python interface: Set output format to textual

浪尽此生 提交于 2019-12-06 06:25:59
I am running Modelica simulations with Dymola via the Dymola Python interface. My aim is to have the result file written to textual output (i.e. to a .txt file). Even though my model contains the annotation __Dymola_experimentSetupOutput(textual=true, events=false) , the output is written to a .mat file. Unfortunately, when I type find() into the Dymola command line, I cannot find a suitable flag for setting the output format via dymola.ExecuteCommand() . Is there a possibility to set the output format to textual via the Python interface? Thanks! You can set textual output in the python

How can I add a custom package to the startup path in Dymola/Modelica?

走远了吗. 提交于 2019-12-06 06:08:45
问题 I have a custom package that I find myself reusing repeatedly in Dymola models, and I'd like to put this package in a common directory that is automatically loaded whenever I start Dymola. My current strategy is to load the custom package when a model I'm working on is loaded and then save total. This is not elegant because the contents of the custom package end up saved in multiple locations across my hard drive, and if I change one of them, the changes are not reflected everywhere. I would

How can I add a custom package to the startup path in Dymola/Modelica?

爷,独闯天下 提交于 2019-12-04 11:16:50
I have a custom package that I find myself reusing repeatedly in Dymola models, and I'd like to put this package in a common directory that is automatically loaded whenever I start Dymola. My current strategy is to load the custom package when a model I'm working on is loaded and then save total. This is not elegant because the contents of the custom package end up saved in multiple locations across my hard drive, and if I change one of them, the changes are not reflected everywhere. I would like a more robust way of distributing this custom package to all of my models. Is there a way to tell

Initialization of a Dymola FMU in Simulink

无人久伴 提交于 2019-12-04 06:18:19
问题 I have encountered an issue while trying to simulate a model using an fmu file in Simulink: I am using the Modelon FMI toolbox for a Dymola/Simulink interface to import a Model-Exchange type fmu file (version 1.0) into the Simulink model. I have a Matlab m-file that programmatically simulates the model sequentially, saving the final internal states of the model for initialization in the next simulation. The first iteration of the simulation runs without errors, but on the second iteration,

How to compile with /bigobj within Dymola (Modelica)

柔情痞子 提交于 2019-12-02 14:06:39
问题 I am integrating a relative small Finite Element (FE) model into Modelica. In doing so, I created a Model (Modelica class) that can read the mass (M) and stiffness (K) matrix in Matlab binary file format. I connected the FE model with some components from the Modelica Standard Library (Modelica.Mechanics.MultiBody). If M and K are very small (say 20x20), then Dymola is able to run the Model and provides pretty accurate results compared to Abaqus (but computational not that efficient). However

Initialization of a Dymola FMU in Simulink

爱⌒轻易说出口 提交于 2019-12-02 07:50:20
I have encountered an issue while trying to simulate a model using an fmu file in Simulink: I am using the Modelon FMI toolbox for a Dymola/Simulink interface to import a Model-Exchange type fmu file (version 1.0) into the Simulink model. I have a Matlab m-file that programmatically simulates the model sequentially, saving the final internal states of the model for initialization in the next simulation. The first iteration of the simulation runs without errors, but on the second iteration, Matlab returns the following errors at the call for the simulation: module = partial_run_sim2/BasicModels

How to add load libraries, change directory, etc. on startup?

爷,独闯天下 提交于 2019-12-02 06:22:45
Is there a way to automatically load libraries, change to a certain working directory, etc. when launching Dymola? The question is slightly ambiguous - the other answer is quite good for one scenario. (The openModel call in Step 2 can be modified.) However, if you always want to launch Dymola in a specific directory etc it is possible using the GUI in Dymola 2017 FD01 (and slightly differently from Dymola 2016 FD01): Change Directory (File>Change Directory) Add to Modelica Path (File>Modelica Path) Save those settings (Edit>Options>Settings: Select Startup and Modelica Path) If you want to

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

安稳与你 提交于 2019-12-02 05:17:20
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 in the C-script to use function calls from that .dll. However, the dslog.txt file indicated that it