- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OpenModelica with Python
OpenModelica with Python
OpenModelica with Python
Hi,
Greetings!
I am new to OpenModelica. How to set value the OpenModelica variable of non Parameter type using OMPython. I am able to set the value using Python for the Parameter type: Ex.
OpenModelica Code:
parameter Real E1tf2in = 50 "Exch1Inlet Temperature Fluid 2";
Python Code:
mod.setParameters(E1tf2in = 50)
I am not able to set the value using Python
Ex:
Real E1tmetalout(start = 57.15098) "Exch1Tube Metal Temperature metal Outlet";
If I set the value it shows the error E1tmetalout is not a parameter.
Please help me to resolve this issue.
Thank You
Re: OpenModelica with Python
- adeas
- 454 Posts
Re: OpenModelica with Python
Hi Adeel,
Once again thanks a lot for your help. I agree with your answer. Some of the variables of non parameter type can be set using setContinuous method. This method is working with the BouncingBall test model. Same method is not working with my model. I assume that the OpenModelica engine determines the non parameter variable can be modified or not via python based on the nature of the equation.
Thank You
Kar
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OpenModelica with Python