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

Dip pipe in closed tank

Dip pipe in closed tank

I’ve been working on what should be a fairly simple model. I have a dip pipe inside a closed tank. There is also an air/water inlet and a water outlet. The variable h varies with the water level. I’ve tried to implement this but none of the solutions seems to work. Any recommendation.

What I thought would work:

Code:


Real h(start=0.5);
when h > 0.5 then
    // Use equations for water out the dip pipe
end when;

when h < 0.5 then
    // Use equations for air out the dip pipe
end when;

Any ideas? I’ve also tried using a variable in the when statements that “activates” the different function. Like Q_out = someequation * water_level_high

There are 0 guests and 0 other users also viewing this topic