Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Lluc
  • » Profile

Posts

Posts

Sep-20-21 13:05:21
Write variables to the csv results file just only a time event

Hi ,

I would like to know if it is possible to write the system variables into the csv file just after a selected time. For instance, if I execute a simulation of 70s, and I just want the results from 50s to 70 seconds, how can I set it?

Many thanks,
Lluc

Apr-16-21 15:21:01
Matlab S-Functions to Modelica
Category: Programming

Hi everyone,

Is it possible to translate Matlab S-Functions to Modelica automatically?

Many thanks,
Lluc

Apr-16-21 15:20:06
Matlab to Modelica

Hi everyone,

Is it possible to translate Matlab S-Functions to Modelica automatically?

Many thanks,
Lluc

Dec-17-20 21:46:58
How to display results in a showValue block
Category: Programming

I think that there is only the possibility to see the results in the plot. However, you can also filter the variables you want to plot/see and export them in a CSV file. Then you could check at each time instant. To can see the results clearly maybe you could use the RealExpression blocks to refer each of your variables of interest.

Dec-11-20 13:59:40
Novice trying to make a simple model in OM

Hi,

In the MSL you have some examples and pipes components in the Fluid library. Also, there is the ThermoPower library, where there are lots of components and example models (tanks, heat sources, dynamic pipes ...)

Perhaps you could create your own blocks with the equations and dynamics of each element (Tank, static pipe...) and afterwards connect them. For instance, for the control valve, you could give a step signal to the block at 10s.

Hi,

In the MSL you have the Pspice3 library. Also, in the PowerSystems library, you can find some power devices. Otherwise, Modelon has some commercial Modelica libraries.

Nov-19-20 16:46:46
Cannot install omlib

Problem solved.

Thank you again

Nov-19-20 13:39:12
Cannot install omlib

If I can't solve this issue, is there another way to install de om library?

Thank you

Nov-19-20 11:45:53
Cannot install omlib



Yes I have called "apt update" and I have the repo.
I am also on focal and this is my output:


lub@lub-VirtualBox:~$ apt-cache search "omlib-.*"
omlib-adgenkinetics - ADGenKinetics is a Modelica library
omlib-admsl -ADMSL is a Modelica library
...

Should I write exactly this command : $  for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done ?
I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apt-cache search "omlib-.*" | cut -d" " -f1
E: Couldn't find any package by glob 'apt-cache search "omlib-.*" | cut -d" " -f1'
E: Couldn't find any package by regex 'apt-cache search "omlib-.*" | cut -d" " -f1'

Thank you

Nov-18-20 23:01:19
Cannot install omlib

Hi all,

I am trying to install OpenModelica in Linux Ubuntu 20.04 LTS (Focal Fossa). When installing the omlibrary using

$  for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done # Installs optional Modelica libraries (most have not been tested with OpenModelica)

I get the error:

E: Unable to locate package omlib-.*

How should I install it?

Thank you

Hi,

When carrying out simulations the file generated is very large and the results can't be plotted in OMEdit, it appears that the file is corrupt. Is there any way to kind of "filter" the shown results and choose only the desired ones?

Thank you

When setting initial parameters I only know how to set the basic parameters such as v and i, but is possible to set der(i) or der(v) values at initialization?

nonlinear system 972 fails: at t=0

proper start-values for some of the following iteration variables might help
[1] Real der(VSC10.Lc.inductor[3].i)(start=0, nominal=1)
[2] Real der(VSC10.Lc.inductor[1].i)(start=0, nominal=1)
[3] Real der(T4.inductor2.inductor[1].i)(start=0, nominal=1)
[4] Real der(T4.inductor2.inductor[3].i)(start=0, nominal=1)
[5] Real der(T4.inductor2.inductor[2].i)(start=0, nominal=1)
[6] Real der(VSC10.Lc.inductor[2].i)(start=0, nominal=1)
Solving non-linear system 972 failed at time=0.
For more information please use -lv LOG_NLS.
simulation terminated by an assertion at initialization
Simulation process failed. Exited with code -1.

I am trying to simulate TLM model pendulum given as an example but I get the following error:

Manager Output

D:/OpenModelica//OMTLMSimulator/bin/tlmmanager -p 11111 -m 12111 D:/OpenModelica/OMTLMSimulator/CompositeModels/PendulumBeastOmc/pendulum.xml
execution directory is brg1
Starting a Beast simulation with input file: dgbb
Make sure that:
execution directory is shaft1
time = 0
timeEnd = 10
MaxTimeStep "<"= 0.000050
Writing caseID brg1 and server name 192.168.0.100:11111 to file dgbb.tlm
Starting a OpenModelica simulation with input file: shaft1.mo
Make sure that:
time = 0
timeEnd = 10
MaxTimeStep "<"= 0.000050
Writing caseID shaft1 and server name 192.168.0.100:11111 to file tlm.config
Starting beast
"/bin//FORMAT-/Beast_Serial" dgbb.in
execution directory is shaft2
Writing shaft1.mos
Starting a OpenModelica simulation with input file: shaft2.mo
Make sure that:
time = 0
timeEnd = 10
MaxTimeStep "<"= 0.000050
Writing caseID shaft2 and server name 192.168.0.100:11111 to file tlm.config
Starting OpenModelica
D:/OpenModelica//bin/omc.exe shaft1.mos
Writing shaft2.mos
Starting OpenModelica
D:/OpenModelica//bin/omc.exe shaft2.mos
El sistema no puede encontrar la ruta especificada.(The system cannot find the specified location).
singleModel =
Fatal error: Failed to send message header. Aborting.
TLMManager process failed. Exited with code 1.

Monitor Output
D:/OpenModelica//OMTLMSimulator/bin/tlmmonitor 192.168.0.100:12111 D:/OpenModelica/OMTLMSimulator/CompositeModels/PendulumBeastOmc/pendulum.xml
Fatal error: Wrong size of message in interface registration : DataSize 10 sizeof(TLMConnectionParams)=232
TLMMonitor process failed. Exited with code 1.



Apprecite if someone could help.

May-19-20 09:08:02
Category: Programming

I am working on large scale electrical models. I wish to simulate in DAE mode to avoid errors in the nonlinear systems while solving the models with ODE mode. But if the model contains implicit functions it doesn't work. In my case, i have a 'mod()' function. Should I replace it?

Thanks

May-19-20 09:02:22
goto reference tags for connectors

There is an option in Modelica > Blocks > Sources > RealExpression that is kind of GoTo in Simulink. You can write a value or an expression from the output of another block and you avoid having all full of connection lines.

I have a model with large nonlinear systems and to have less problems with the simulations I want to set as 0 the initial value of the voltage/current sources with the homotopy function. How could I do it? I try to set up V = {homotopy(actual=V value, simplified=0.0)} in the voltage source but it doesn't work.

Appreciate if someone can help with this issue. Thank you.

I want to simulate in parallel OpenModelica models. Is it possible to export the models to simulate them with OpenMP to speed up simulation?

Does TLM give any speed up in the large models simulations?

I have different models, which depend on other models. How can I create a package, so I can have all the models in only one file?

Thanks

Yes, but I only get as output: The initialization finished successfully without homotopy method. I only have this problem with one particular simulation. The others I get the statistics.

Thank you for your response.

I am running the simulations from OMEdit. I have the LOG_STATS logging enabled but I get the .log output file empty. Only with the directory and the simulation settings, not the time performance.

I only have this problem with one specific model that I simulate, maybe it is some issue in the model?

When running simulations of electrical systems, the simulation output file doesn't give statistics even though the results are correct and the simulation runs successfully. Is it for some reason?

Thanks

Is there any three winding transformer model in Modelica that works in abc frame? I don't find any that works. In the MSL I have found only two winding transformer. It is for a photovoltaic power plant model.

Thank you.

Is there any solid model of dc/ac average model inverter? For a PV array.

Apr-21-20 12:12:55
Model simulation on parallel in many cores

As far as I am concerned, for now the only automatic parallelization option is to use HPCOM. Here there is a link to a tutorial:

https://hpc-om.de/fileadmin/user_upload … torial.pdf

I have tried this example, but when running the .mos file, I only get the results file as in the OMEdit usual simulation and the task graphs (ODE, DAE, schedule and so on) but I don't know how to get the serial and parallel costs.

Which kind of models do you want to parallelize?

Apr-08-20 21:36:18
Topic: OpenMP
Parallel simulation

In the OpenModelica Users Guide appears:

Faster simulations on multi-core computers can be obtained by using a new OpenModelica feature that automatically
partitions the system of equations and schedules the parts for execution on different cores using sharedmemory
OpenMP based execution. The speedup obtained is dependent on the model structure, whether the system
of equations can be partitioned well. This version in the current OpenModelica release is an experimental version
without load balancing. The following command, not yet available from the OpenModelica GUI, will run a
parallel simulation on a model:

>>> omc -d=openmp model.mo

How can I write this command in order to execute parallel simulation? I don't know if this function is already available.

Apr-08-20 10:17:47
Running the OMC and BLT
Category: Programming

I am working on an electrical control model. I would like to know how to run OM Compiler in order to proceed to a parallel simulation. Execute the simulation on many cores. Someone knows how it works?

Apr-07-20 21:25:57
Model simulation on parallel in many cores

Hi, I want to know if is possible to execute parallel simulations of electrical systems with Modelica. I have seen some related issues such as ParModelica or ways to compile the code and after execute, but not very clear. Thank you

When writting a text for a model, I write all the submodels of the model in the text view. But it appears that it cannot be initialized because all models are in the same text, the same script. How can I solve it? Instance classes?

  • Index
  • » Users
  • » Lluc
  • » Profile
You are here: