Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
0

Modelica control of constant input (Type Real)

asked 2019-06-17 19:12:05 -0500

first1's avatar

updated 2019-06-18 11:56:39 -0500

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-18 10:13:54 -0500

first1's avatar

updated 2019-06-18 10:16:12 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2019-06-17 19:12:05 -0500

Seen: 276 times

Last updated: Jun 18 '19