Questions tagged [openmodelica]

OpenModelica is an open-source Modelica-based modeling and simulation environment.

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage. Its long-term development is supported by a non-profit organization – the Open Source Modelica Consortium (OSMC).

The goal with the OpenModelica effort is to create a comprehensive Open Source Modelica modeling, compilation and simulation environment based on free software distributed in binary and source code form for research, teaching, and industrial usage.

698 questions
3
votes
1 answer

Modelica - Using parameter equations without losing the ability to parameterize after compilation

Often, I will build Modelica models with parameters that are dependent on other parameters: model ParameterTest parameter Real a = 5; parameter Real b = a/2; end ParameterTest; Here, parameter b is no longer available to be parameterized in the…
Matt
  • 363
  • 1
  • 7
3
votes
1 answer

Best Practices for Over/Under-determined Modelica Sources

In standard Modelica fluid flow sources, normally either the flow rate or the pressure is specified. For example, the following boundary setups (P meaning pressure boundary, F meaning flow boundary) would typically surround a pipe component: P -…
Matt
  • 363
  • 1
  • 7
3
votes
0 answers

OPC UA Server Read and Write Rights (using OpenModelica OPC UA Server)

I have got some problems with writing data via my OPC UA connection and that is why I am wondering if I have to somehow set the rights to be able to change a value. I have started an OPC UA Server in OpenModelica OMShell and tested it with UAExpert…
mueggge
  • 61
  • 3
3
votes
1 answer

Can't represent a variable on openmodelica

I want to create a variable with these unit: ((rad/s)/((N/m)^0.5)) I've tried many settings but it still doesn't work. That's my last try: Real Cap_fact (quantity = "CapacityFactor", unit = "((rad/s)/((N/m)^0.5))"); I've tried also with: Real…
3
votes
2 answers

Division by zero depending on parameter

I am using the FixedRotation component and get a division by zero error. This happens in a translated expression of the form var = nominator/fixedRotation.R_rel_inv.T[1,3] because T[1,3] is 0 for the chosen parameters: n={0,1,0} angle=180 deg. It…
Cimi
  • 43
  • 3
3
votes
1 answer

Spice3 NMOS Model interface with standard Modelica models

I'm experiencing an issue in Open Modelica when trying to use NMOS model of the library Spice3 coupled with a standard Modelica voltage source model. With reference to the example of a simple half-bridge configuration with an RL load, I've…
Knot83
  • 63
  • 4
3
votes
0 answers

Integration in OpenModelica

I have been trying to make an integral in open modelica. The integral that I would like to solve is the following: W_fluido=Q/3600*∫〖Cp_fluido*dT, [Ti-Tf] Where Cp_fluido= =(A+B*((C/T)/sinh⁡(C/T) )^2+D*((E/T)/cosh⁡(E/T) )^2)) I hope someone can…
3
votes
1 answer

Assigning into connectors

I'm missing something elementary about Modelica connectors in that anytime a model assigns into a flange, I end up with too many equations. It seems the translator, in resolving the connections, adds equations that I don't want(/need), torpedoing…
Ben
  • 65
  • 1
  • 5
3
votes
0 answers

How to specify medium in Openmodelica?

I am simulating a heat pump water heating system in Modelica. I have attached the picture of my model. However, when I run the model I get the error "Medium is partial, name lookup is not allowed in partial classes". Can you please let me know: How…
user186204
  • 47
  • 5
3
votes
1 answer

OMShell Simulation Times Output

When I simulate an OpenModelica model using OMShell I got the following times as output: timeFrontend timeBackend timeSimCode timeTemplates timeCompile timeSimulation timeTotal I wasn't able to find any information about the meaning of each…
3
votes
1 answer

Can the Modelica "Fluid" library handle choked flow?

I'd like to start off by saying that I'm new to StackOverflow and to Modelica. My goal is to simulate the injector system of a Rotating Detonation Engine. Essentially this is a piping system from a tank to a rocket engine. This system will change…
Thomas
  • 51
  • 1
3
votes
1 answer

First order Modelica model with null time constant

I'd like to figure out whether it's possible (and semantically legal) in Modelica to simulate a model of a first-order transfer function, with a time constant equal to zero (T below). I'm using OpenModelica 1.15.0~dev-48-g3656b95, but I'm asking…
Pierre H.
  • 388
  • 1
  • 11
3
votes
1 answer

Running OpenModelica GUI from Docker causes "Could not connect to any X display" error

On Modelica Language Discord, someone posted the commands to get the OpenModelica GUI (OMEdit) running on Linux: xhost +"local:docker@" docker run -ti --rm --privileged --net=host -e "DISPLAY=$DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
3
votes
1 answer

Question about the components HeatCapacitor in the Modelica Standard Library

When I check Modelica.Thermal.HeatTransfer.Components.HeatCapacitor using OpenModelica, it tells me that HeatCapacitor has 4 equations and 4 variables. But I can only find 3 equations in the model listed below for 4 variables(i.e, T, port.T, der_T,…
Min Li
  • 31
  • 1
3
votes
2 answers

Save start / initial guess values in OpenModelica & implement initial values from file

There is an option in Dymola "Save start values in the model", which allows one to re-use these parameters in order to tune the simulation. I was looking for a similar possibility in OpenModelica, but so far I wasn't able to figure it out.…
Tomillo
  • 157
  • 7