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
  • » mghf
  • » Profile

Posts

Posts

Aug-29-17 11:09:49
use one parameter from a model in another model in one package
Category: Programming

Hi,

I am making a model in Modelica. I have different components like GasTurbine, Solarcell and for example wind source.
I have written programs for their functionality separately in 3 different sub-program but in one package. Now I want to combine all these 3 program in one file and use 'power' parameter and adding power from all these 3 models. You can see the model in the following.


How can I extract power for example from gasturbine?
p_el is the parameter I need in gasturbine program. But when I am writting like ' model.Gasturbine gasturbine1.p_el' I am getting error. Missing token: SEMICOLON. Even when I try to define this as a Real parameter.
Please tell me how to get a parameter like 'power'(p_el) from for example 'GasTurbine' sub-model?

model combinationall
  model.widturbine widturbine1
annotation(Placement(visible = true, transformation(origin = {0, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  model.Gasturbine gasturbine1
annotation(Placement(visible = true, transformation(origin = {60, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
model.PVmodel pVmodel1
annotation(Placement(visible = true, transformation(origin = {-56, 34}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));

end combinationall;


Thank you so much for your kind help. I am looking forward to hearing from you.
Maryam

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