Question: How to correctly specify events in dsolve?

Dear Community,

I try to solve a simple flow problem between two fluid tanks. They are connected with a pipe and a pump. Simulation runs from 0s to 3000s. Fluid levels are H1(t), H2(t), and flow rate between the tanks is Q1(t). I operate the pump between 500s and 2000s, with a constant head, and after that I would like to shut down the system from 2000s to 2500s (i.e. for 500s Q1(t) should be 0, and consequently H1, H2 remain constant) and then reopen it again, so tanks can equilibrate. I've attached the worksheet (FlowProblem.mw).

I tried to achieve this in the event section of dsolve (indicated in red), but it seemingly did not work out. So my question is: how to correctly specify it in dsolve, so flow (Q1) remains 0. between 2000s and 2500s, and can flow again afterwards? Am I right to do it in dsolve, or is there any other way to do it?

Your kind help is appreciated in advance,

best regards

Andras

FlowProblem.mw

Please Wait...