0

Modelica control of constant input (Type Real)

I have a real constant serving as the source for a linear valve in Modelica. I would like to control this input.

I tried redefining the parameter k=k: "parameter Real k = 0.5;" --> works fine, gives a result!

Then if I redefine as "parameter Real k;" and try defining "k = 0.5;" under equations, I get the error that there are one too many equations. Okay...kind of makes sense as I did add one but I only defined k once.

My goal was to define k in equations so that I could set up a controller to stabilize flow. Should I be able to do this? If not, is there another method I should be trying?

Thanks!

first1's avatar
71
first1
asked 2019-06-17 19:12:05 -0500
shorowit's avatar
11.8k
shorowit
updated 2019-06-18 11:56:39 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Update. It turns out I can get rid of the real constant icon and redefine this term as something like valve.opening = 0.5 in the equation section.

first1's avatar
71
first1
answered 2019-06-18 10:13:54 -0500, updated 2019-06-18 10:16:12 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments