Fluid dynamics problem: Equalize the volume of water in tanks at differing heights

  • Thread starter Thread starter Hankelec
  • Start date Start date
Click For Summary
The discussion centers on optimizing the filling rates of two bladder-type pressure tanks in a reverse osmosis water system, one positioned at floor level and the other five feet above. The challenge lies in ensuring both tanks fill at approximately equal rates despite the height difference, which introduces a pressure differential that could affect flow. Participants debate the impact of this height difference on pressure and flow rates, with some asserting that as long as the tanks are pressurized similarly, water will flow to maintain equilibrium. The conversation also touches on the need for potential adjustments, such as using floats and differential pressure gauges, to balance the filling process and avoid significant discrepancies in water volume between the tanks. Ultimately, the goal is to achieve a reliable method for equalizing water levels in the tanks while accommodating the inherent pressure dynamics.
  • #31
erobz said:
To be honest, I would nix the method I'm proposing in #11 in its entirety. The method I'm using in #18 does not have steady flow assumption built in. It's readily amenable to include both the work from the pump and the changing kinetic energies of the mass both contained inside the tanks and any piping as the flow slows down. It will amount to solving a single second order non-linear ODE(I think).
I was wrong about this, it gets messy.

We need to be using "Unsteady -Bernoulli"1 which says in general:

$$ P_1 + \rho g z_1 + \frac{1}{2}\rho v_1^2 = \int_1^2 \rho \frac{\partial v_s}{\partial t} ds + P_2 + \rho g z_2 + \frac{1}{2}\rho v_2^2 \tag{1}$$

If we assume uniformly distributed properties, the streamlines in a particular section of the flow are straight. As a result, the partial derivative of the velocity of the flow in that section does not depend on its position, and can be taken outside the integral. Basically... this ignores the flow transition between tanks and pipes.

Apply ##(1)## between the junction and tank liquid surface in each tank. Splitting the integral at the transition we have that:

$$\begin{aligned} P_j + \frac{1}{2}\rho \left(\frac{A}{A_p}\right)^2 \dot z_1^2 &= \int_j^a \rho \frac{\partial v_s}{\partial t} ds + \int_a^1 \rho \frac{\partial v_s}{\partial t} ds + P_1(z_1) + \rho g z_1 + \frac{1}{2}\rho \dot z_1^2 \\ \quad \\ &= \rho \frac{A}{A_p} \ddot z_1 \int_j^a ds + \rho \ddot z_1 \int_a^1 ds + P_1(z_1) + \rho g z_1 + \frac{1}{2}\rho \dot z_1^2 \\ \quad \\ &= \rho \frac{A}{A_p} \ddot z_1 l + \rho \ddot z_1 z_1 + P_1(z_1) + \rho g z_1 + \frac{1}{2}\rho \dot z_1^2 \\ \quad \\ &= \rho \left( \frac{A}{A_p} l + z_1 \right)\ddot z_1 + P_1(z_1) + \rho g z_1 + \frac{1}{2}\rho \dot z_1^2 \end{aligned}$$

$$ \tag{2} $$

##l## is just an arbitrary length of pipe joining the junction to tank 1
##A_p## is the area of the branch.

Applying ##(1)## from the junction to tank 2 we get:

$$ P_j + \frac{1}{2}\rho \left(\frac{A}{A_p}\right)^2 \dot z_2^2 = \rho \left( \frac{A}{A_p} H + z_2 \right)\ddot z_2 + P_2(z_2) + \rho g \left(H+z_2\right) + \frac{1}{2}\rho \dot z_2^2 \tag{3}$$

We also have continuity at the junction:

$$ Q = A \dot z_1 + A \dot z_2 \tag{4}$$

Then assuming the pump is drawing from a very large reservoir at atmospheric pressure:

$$ P_{atm} + \rho g h_p(Q) = P_j + \frac{1}{2}\rho \frac{Q^2}{A_m^2} + \rho L \dot Q \tag{5} $$

Where ##A_m## is the area of the main feeding the system. We can use ##(5)## to eliminate ##P_j## in each of the equations.

For the pump curve we can say generally:

$$ h_p(Q) = C - \beta Q^2 $$Using what we figured out earlier, set the tanks in an initial state of equilibrium at time ##t = 0##, pick the thermodynamics for the ideal gas compression (adiabatic?). Turn on the pump, simultaneously solve ##(2)## through ##(5)## under the initial conditions:

##z_1(0) = z_{1,o}##
##z_2(0) = z_{2,o}##
##\dot z_1(0) = 0 ##
## \dot z_2(0) = 0 ##

Reference:
[1] https://ocw.mit.edu/courses/2-25-ad...edabdfd4b95c1792_MIT2_25F13_Unstea_Bernou.pdf
 
Last edited:
Engineering news on Phys.org
  • #32
O
erobz said:
I meant experiment at small scale. You can buy some relatively cheap bladder tanks used in residential potable water systems at the local hardware store, or online.

Possibly it's just malfunction that is causing the issue, but the math surrounding the problem is complicated enough IMO not to be absolutely sure of the scale of effects.

If the others have firsthand experience with the exact scenario and they say it's always small, then the math reduces, and the problem goes away.

Are there check valves in each branch? If not, is the top tank to slowly draining into the bottom tank after the valve on the main fill line is closed? Lets say the effects during filling are small as suggested. Then at the end of filling you have a head imbalance of 5 ft which will initiate flow from the top to the bottom tank. Calculating equilibrium of the system should be far more accessible than the dynamics of filling the system.
 
  • #33
erobz. I appreciate the suggestions and interest generated on this question.I have gone ahead with the process of lowering the static start pressure in the upper tank by 3 psi. Fill rate seemed acceptable for both tanks. When initially seeing this system, the lower tank appeared 100% full and the upper tank sounded virtually empty. And like you mentioned, after pressure pump stops, it might be the case that a gravity flow is initiated. I will have an opportunity to check on these tanks and if that is a problem, I will create a thread. One tank is on a stand above the other due to space constraints. It was added after initial installation of system. So at present the system is running a producing a satisfactory amount of RO water. Thanks to all who replied. I am uncertain if this thread will be closed and archived but I will occasionally visit to see if it has or if other conclusions have been drawn. I am also uncertain if the electronics analogy is useful with this problem as I don't know what would represent gravity in the pump off state.
 
  • #34
Hankelec said:
I am also uncertain if the electronics analogy is useful with this problem as I don't know what would represent gravity in the pump off state.
Gravitational potential is a capacitor of some variety. While the pump is on and there is flow in the system gravitational potential is accumulating. It is capable of being returned to the lower tank at later time. This is indeed what happens when the pump is switched off, unless the tanks end the cycle in equilibrium.

Anyhow the analogy is not so important at this point. I believe I have captured the necessary system of equations in #31. I doubt turning them into electrical components makes the system any easier to physically solve.
 
  • #35
P.s. I would not make a new thread about the same topic. The mods don’t like that. They probably wont shut it down to new replies for some time, so I wouldn’t worry about that too much.
 
  • #36
erobz said:
I was wrong about this, it gets messy.

We need to be using "Unsteady -Bernoulli"1 which says in general:

$$ P_1 + \rho g z_1 + \frac{1}{2}\rho v_1^2 = \int_1^2 \rho \frac{\partial v_s}{\partial t} ds + P_2 + \rho g z_2 + \frac{1}{2}\rho v_2^2 \tag{1}$$
Messy is an understatement for me. I had never seen this version of Bernoulli. Fluids are hard... Anyways, this just proves this problem is a chance to learn some new things for me.

After reading the PDF you shared here's my attempt to show the equations before moving into coding where traceability will be much harder. I want to ensure we agree on the methodology before crunching numbers and plotting graphs. I'll express everything in terms of flow instead of velocities which I believe is more closely related to what we're interested in.
I'll need to redraw the diagram and rename a few things. I hate doing it at this stage but I need to do it to keep track of the relevant points and variables assigned to them.
1692383752507.png
Unsteady Bernoulli ##(1)## from the PDF you shared.
1692383767421.png
Using ##(1)## between the points ##P## and ##D## gives ##(2)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +P_D + \frac{1}{2}\rho v_D^2+\rho g (H+z_D) - P_P-\frac{1}{2}\rho v_P^2 - \rho g z_P = 0 \tag{2}$$

Taking into account the height of ##P## is zero and writing the velocities in terms of flow yields ##(3)##
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +P_D + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+z_D) - P_P-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{3}$$

Considering ideal gas law and constant temperature then the pressure of the air inside tank 2 can be expressed in relation to its water level. That it'll be equation ##4##.
$$P_DV_2=m_2RT \ \left \{ V_2=S_T(H_T-z_D) \right \} \rightarrow P_D= \frac{m_2RT}{S_T(H_T-z_D)} \tag{4}$$

The water level ##z_D## is related to the water flow ##(5)##.
$$z_D = z_{D_0}+\frac{Q_2}{S_T}t \tag{5}$$

Combining ##(4)## and ##(5)##, ##(6)## is obtained.
$$P_D= \frac{m_2RT}{S_T(H_T-\left (z_{D_0}+\frac{Q_2}{S_T}t \right ))} \tag{6}$$

The equation ##(5)## can also be used on ##(3)##. The results from ##(6)## will be implemented too to give ##(7)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +\left (\frac{m_2RT}{S_T(H_T-\left (z_{D_0}+\frac{Q_2}{S_T}t \right ))} \right ) + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+\left (z_{D_0}+\frac{Q_2}{S_T}t \right )) - P_P-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{7}$$

Pressure at P (##P_P##) is an input value for the problem so I'll consider it known. Its expression is ##(8)##.
$$P_P = P_{atm}+\rho g h_{pump}(Q)\rightarrow P_P = P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \tag{8}$$

Using the information from ##(8)## into ##(7)## gives ##(9)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +\left (\frac{m_2RT}{S_T(H_T-\left (z_{D_0}+\frac{Q_2}{S_T}t \right ))} \right ) + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+\left (z_{D_0}+\frac{Q_2}{S_T}t \right )) - \left (P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \right )-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{9}$$

Finally, it is necessary to evaluate the path integral in ##(9)## that goes from ##P## to ##D##. Before doing it I want to clarify the change of variable to have it in terms of the flow instead of the velocity ##(10)##.
$$\rho\frac{\partial v}{\partial t}ds \rightarrow \left \{ v=\frac{Q}{S} \right \} \rightarrow \frac{\rho}{S}\frac{\partial Q}{\partial t}ds \tag{10}$$

Here is something that mathematically might not be expressed correctly because I'll go from a general variable ##Q## between the points ##P## and ##D## to the specific flows ##Q_2## and ##Q## in the pipes. I'll write the "generic" flow with ##Q_g## and the generic section with ##S_g## to be able to tell the difference. This will be the equation ##(11)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds = \int_{P}^{D} \frac{\rho}{S_g}\frac{\partial Q_g}{\partial t}ds \tag{11}$$

According to the document from MIT, that integral from ##P## to ##D## can be simplified to the integral from ##P## to ##F## because ##S_T>>S_P## which only considers what's going on in the pipes. In this case, it is necessary to note the distinction in the flow from ##P## to ##A## and from ##B## to ##F## because the velocities/flow rates will not be the same. Equation ##(12)##.
$$\int_{P}^{D} \frac{\rho}{S_g}\frac{\partial Q_g}{\partial t}ds = \int_{P}^{A} \frac{\rho}{S_p}\frac{\partial Q}{\partial t}ds+\int_{B}^{F} \frac{\rho}{S_p}\frac{\partial Q_2}{\partial t}ds=\frac{\rho}{S_p}\left ( \frac{\partial Q}{\partial t}L_{PA} + \frac{\partial Q_2}{\partial t}(H+L_{JF})\right ) \tag{12}$$

The expression from ##(12)## can be plugged in ##(9)## to obtain the final expression of Unsteady Bernoulli from ##(2)## for Tank 2. Equation ##(13)##.
$$\frac{\rho}{S_p}\left ( \frac{\partial Q}{\partial t}L_{PA} + \frac{\partial Q_2}{\partial t}(H+L_{JF})\right ) +\left (\frac{m_2RT}{S_T(H_T-\left (z_{D_0}+\frac{Q_2}{S_T}t \right ))} \right ) + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+\left (z_{D_0}+\frac{Q_2}{S_T}t \right )) - \left (P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \right )-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{13}$$

Following the same logic it is possible to obtain the expression for Unsteady Bernoulli applied to Tank 1.
Finally, with the conservation of mass ##Q = Q_1+Q_2##, I feel there is enough information to solve the system and obtain the functions ##Q(t)##, ##Q_1(t)## and ##Q_2(t)## although I'd love to have confirmation about it if you know it for sure.

If we are on the same page about the procedure then I'd be ready to put it into Python to try solving it which will probably be a challenge in itself because I don't have a lot of experience with it.
 
Last edited:
  • #37
Juanda said:
Messy is an understatement for me. I had never seen this version of Bernoulli. Fluids are hard... Anyways, this just proves this problem is a chance to learn some new things for me.

After reading the PDF you shared here's my attempt to show the equations before moving into coding where traceability will be much harder. I want to ensure we agree on the methodology before crunching numbers and plotting graphs. I'll express everything in terms of flow instead of velocities which I believe is more closely related to what we're interested in.
I'll need to redraw the diagram and rename a few things. I hate doing it at this stage but I need to do it to keep track of the relevant points and variables assigned to them.
View attachment 330727Unsteady Bernoulli ##(1)## from the PDF you shared.
View attachment 330728Using ##(1)## between the points ##P## and ##D## gives ##(2)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +P_D + \frac{1}{2}\rho v_D^2+\rho g (H+z_D) - P_P-\frac{1}{2}\rho v_P^2 - \rho g z_P = 0 \tag{2}$$

Taking into account the height of ##P## is zero and writing the velocities in terms of flow yields ##(3)##
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +P_D + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+z_D) - P_P-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{3}$$

I believe the last term on the right should be:

$$\frac{1}{2}\rho \left ( \frac{Q_2}{S_p} \right ) ^2 $$

We are summing along a single streamline, what you have written is the kinetic energy along both streamlines.
Juanda said:
The water level ##z_D## is related to the water flow ##(5)##.
$$z_D = z_{D_0}+\frac{Q_2}{S_T}t \tag{5}$$

That is only if ##Q,Q_2,Q_1## are constant in time, I think it should be:

$$z_D = z_{D_0}+ \int \frac{Q_2}{S_T} dt \tag{5}$$

That propagates into a few other equations.
Juanda said:
The equation ##(5)## can also be used on ##(3)##. The results from ##(6)## will be implemented too to give ##(7)##.
$$\int_{P}^{D}\rho\frac{\partial v}{\partial t}ds +\left (\frac{m_2RT}{S_T(H_T-\left (z_{D_0}+\frac{Q_2}{S_T}t \right ))} \right ) + \frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2+\rho g (H+\left (z_{D_0}+\frac{Q_2}{S_T}t \right )) - P_P-\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2 = 0 \tag{7}$$

Juanda said:
Pressure at P (##P_P##) is an input value for the problem so I'll consider it known. Its expression is ##(8)##.
$$P_P = P_{atm}+\rho g h_{pump}(Q)\rightarrow P_P = P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \tag{8}$$

You could just pretend ##P_p## is a constant for now for slightly more simple expressions, but that is up to you. It's going to be a beast to solve either way.
 
  • #38
erobz said:
I believe the last term on the right should be:

$$\frac{1}{2}\rho \left ( \frac{Q_2}{S_p} \right ) ^2 $$

We are summing along a single streamline, what you have written is the kinetic energy along both streamlines.
I'm integrating along a single streamline in this case. However, along that streamline, the velocity is not constant because the flow ##Q## must divide into ##Q_1## and ##Q_2##. Since the cross-section of the pipes is constant, the velocity of the fluid after the separation must be smaller. At the junction, there's a discontinuity I'm choosing to ignore which is why I created the points ##A##, ##B##, and ##C## around it and "infinitely" close to it. That discontinuity would of course disappear with a more detailed analysis such as CFD but this already is complex enough the way it is.
At the point ##P##, we have ##v_P## which in terms of the flow it is ##Q/S_p## (##S_p## is the cross-section of the pipe) and at the point ##D## we have ##v_D## which in terms of the flow is ##Q_2/S_T## (##S_T## is the cross-section of the tank).
Therefore, I think the equation ##(3)## is correct.

erobz said:
That is only if ##Q,Q_2,Q_1## are constant in time, I think it should be:

$$z_D = z_{D_0}+ \int \frac{Q_2}{S_T} dt \tag{5}$$

That propagates into a few other equations.
You're absolutely right here. I'll need to update that when I try to solve it.

erobz said:
You could just pretend ##P_P## is a constant for now for slightly more simple expressions, but that is up to you. It's going to be a beast to solve either way.
It's true I could. However, I'll have to discretize the rest of the problem anyways so maybe there's not much extra effort needed to describe the pump as a function of the flow. I just need to be careful when choosing the values of ##\alpha## and ##\beta## to make sure there'll be no backflow. I think the equations should predict that scenario without needing modifications (assuming the pipes are always full) but I'm interested in seeing first the "simple" case.
 
Last edited:
  • #39
Juanda said:
I'm integrating along a single streamline in this case. However, along that streamline, the velocity is not constant because the flow ##Q## must divide into ##Q_1## and ##Q_2##. Since the cross-section of the pipes is constant, the velocity of the fluid after the separation must be smaller. At the junction, there's a discontinuity I'm choosing to ignore which is why I created the points ##A##, ##B##, and ##C## around it and "infinitely" close to it. That discontinuity would of course disappear with a more detailed analysis such as CFD but this already is complex enough the way it is.
At the point ##P##, we have ##v_P## which in terms of the flow it is ##Q/S_p## (##S_p## is the cross-section of the pipe) and at the point ##D## we have ##v_D## which in terms of the flow is ##Q_2/S_T## (##S_T## is the cross-section of the tank).
Therefore, I think the equation ##(3)## is correct.
I don't think that a streamline begins until after we are outside the infinitesimal ball we're calling the junction. You should be going from ##B## to ##D##, and ##C## to ##E## IMO.

1692448846926.png


Imagine a cylinder is rolling down a hill of mass ##2M##, and it splits. On the path where the object is becomes the object, to where that particular object is going, I'm not going to uses kinetic energies involving ##2M## to describe a particular portion of its mechanical energy just after it became an object of mass ##M##. I think the same is true here.

But I'm not going to argue further. You're modeling it, do whatever you want.
 
Last edited:
  • #40
erobz said:
I don't think that a streamline begins until after we are outside the infinitesimal ball we're calling the junction. You should be going from ##B## to ##D##, and ##C## to ##E## IMO.
Why would you think that though? The flow starts at ##P## and goes to both ##D## and ##E## according to the diagram.
1692528864090.png


It'd be similar to something like this. Would you have trouble applying Bernoulli in this situation to find the state at A, B, C and D? With Bernoulli and mass conservation is possible. The only difference when compared with the problem we're discussing is that the flow isn't reuniting again after the junction but accumulating in the tanks.
1692529698975.png


Besides, in the problem with the tanks, it is necessary to use Bernoulli P→E and P→D so that the equations are related and can be solved simultaneosly in a system.

I'm not trying to argue for the sake of arguing but I'd prefer we both agree on how to model the problem before trying to implement it in the simulation.
 
  • #41
If we go directly from A to D in the side problem you propose we learn nothing about the division of flow. We must visit the junctions in our equations.

We go from ##P## ( Which is just outside the pump) to the junction, then from the junction to each of the endpoints independently.
 
  • #42
erobz said:
If we go directly from A to D in the side problem you propose we learn nothing about the division of flow. We must visit the junctions in our equations.

We go from ##P## ( Which is just outside the pump) to the junction, then from the junction to each of the endpoints independently.

Ok, after a quick example mimicking the problem at hand a bit more( one were the streamlines don't reunite), I convinced myself that we don't always have to visit nodes (the problem you chose as an instructive example, we do have to visit the nodes if we are to learn anything of the flow division - and we also would need to consider head loss to solve it). It could be that I just like visiting nodes out of habit, and may not be the most "streamlined" approach. I'm not 100% sure at the moment if what we are discussing isn't just going to give the same results in the end (but I believe they will)...have to think on that a bit. But I see now that (at least) your equations are good.
 
Last edited:
  • #43
Joe591 said:
This is my take on it. on the incoming line where it splits you put a flow divider. there whole purpose is to split the flow to near 50/50.
We are basically just pontificating on the possibility of this at this point to try to learn something.
 
  • #44
erobz said:
We are basically just pontificating on the possibility of this at this point.
I'm not sure what you mean
 
  • #45
erobz said:
Ok, after a quick example mimicking the problem at hand a bit more( one were the streamlines don't reunite), I convinced myself that we don't always have to visit nodes (the problem you chose as an instructive example, we do have to visit the nodes if we are to learn anything of the flow division - and we also would need to consider head loss to solve it). It could be that I just like visiting nodes out of habit, and may not be the most "streamlined" approach. I'm not 100% sure at the moment if what we are discussing isn't just going to give the same results in the end (but I believe they will)...have to think on that a bit. But I see now that (at least) your equations are good.
I'm glad we agree. Knowing information about all the nodes within a streamline would be possible by applying Bernoulli to them but I chose the points I considered most relevant (exiting the pump and at the top of the tanks).
I'm then ready to try to write all this in code to solve it. Let's see if I can actually do it and get some physically possible results that make any sense.
 
  • #46
@Joe591 Some say the flow just splits 50/50 without intervention, other suggest control ( like yourself). @Juanda and I are trying to tease something out of underlying physics for "fun".
 
  • #47
erobz said:
Some say the flow just splits 50/50 without intervention, other suggest control ( like yourself). @Juanda and I are trying to tease something out of underlying physics for "fun".
oh I see. yeah, I'm reasonably convinced it will require intervention. I tend to solve my problems with technology rather than math though, lol...

I must admit I don't have the faintest idea about the math that your using, haha
 
  • #48
Juanda said:
I'm glad we agree. Knowing information about all the nodes within a streamline would be possible by applying Bernoulli to them but I chose the points I considered most relevant (exiting the pump and at the top of the tanks).
I'm then ready to try to write all this in code to solve it. Let's see if I can actually do it and get some physically possible results that make any sense.
Can you write up the system of equations you are going to solve in final reduced form if you get a chance and talk about the numerical approach? I think this is going to be challenging system to solve (even programmatically).
 
  • #49
erobz said:
Can you write up the system of equations you are going to solve in final reduced form if you get a chance and talk about the numerical approach? I think this is going to be challenging system to solve (even programmatically).
I still owe you this. It's not that I have forgotten it but I know it's going to take at the very least a couple of hours being focussed to be able to do it and I can't get to it now. I'll try next week though.
 
  • #50
@erobz I think I got the system of equations you were talking about in post #48.
Equations will be referred to this diagram.
Juanda said:

The dynamic state when filling it up can be defined by the equations ##(1)##, ##(2)## and ##(3)##.
Equation ##(1)## is unsteady Bernoullin from ##P## to ##D##.
$$
\overbrace{\frac{\rho}{S_p}\left ( \frac{\partial Q}{\partial t}L_{PA} + \frac{\partial Q_2}{\partial t}(H+L_{JF})\right )}^{\int_{P}^{D} \frac{\rho}{S_g}\frac{\partial Q_g}{\partial t}ds}
+
\overbrace{\left (\frac{m_2RT}{S_T(H_T-\left (z_{D_0}+ \int \frac{Q_2}{S_T} dt \right ))} \right )}^{P_D}
+
\overbrace{\frac{1}{2}\rho \left ( \frac{Q_2}{S_T} \right ) ^2}^{\frac{1}{2}\rho v_D^2}
+
\overbrace{\rho g (H+\left (z_{D_0}+ \int \frac{Q_2}{S_T} dt \right ))}^{\rho g (H+z_D)}
-
\overbrace{\left (P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \right )}^{P_P}
-
\overbrace{\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2}^{\frac{1}{2}\rho v_P^2}
=
0 \tag{1}
$$

Equation ##(2)## is unsteady Bernoulli from ##P## to ##E##.
$$
\overbrace{\frac{\rho}{S_p}\left ( \frac{\partial Q}{\partial t}L_{PA} + \frac{\partial Q_1}{\partial t}L_{CG}\right )}^{\int_{P}^{E} \frac{\rho}{S_g}\frac{\partial Q_g}{\partial t}ds}
+
\overbrace{\left (\frac{m_1RT}{S_T(H_T-\left (z_{E_0}+ \int \frac{Q_1}{S_T} dt \right ))} \right )}^{P_E}
+
\overbrace{\frac{1}{2}\rho \left ( \frac{Q_1}{S_T} \right ) ^2}^{\frac{1}{2}\rho v_E^2}
+
\overbrace{\rho g \left (z_{E_0}+ \int \frac{Q_1}{S_T} dt \right )}^{\rho g z_E}
-
\overbrace{\left (P_{atm}+ \rho g \left ( \alpha - \beta Q^2 \right ) \right )}^{P_P}
-
\overbrace{\frac{1}{2}\rho \left ( \frac{Q}{S_p} \right ) ^2}^{\frac{1}{2}\rho v_P^2}
=
0 \tag{2}
$$

Equation ##(3)## is mass conservation.
$$Q=Q_1+Q_2 \tag{3}$$

From those 3 equations, I'm hoping it's possible to obtain the functions ##Q(t)##, ##Q_1(t)## and ##Q_3(t)## from which it would also be possible to obtain the functions ##z_E(t)## and ##z_D(t)##.

It'd be necessary to define the geometry of the problem (pipe lengths, tank's cross-section, tank's height, tanks' height difference), the amount of air in each tank, the system's temperature, pump's properties, gravity, fluid's density, and the initial conditions (initial heights and flows).

To set up the initial conditions ##(t=0)## I'd prefer to start the system from an equilibrium point. I feel like it's not necessary but I think it's convenient because it's more realistic and the oscillatory nature of the result will be suppressed (or so I think).

To find the initial conditions there are different ways of doing it. Previously in the thread (post #27), we discussed using Bernoulli from ##E## to ##D## and the conservation of mass. I'll change the method to using Bernoulli from ##P## to ##E## and Bernoulli from ##P## to ##D##.
$$
\overbrace{\frac{m_2RT}{S_T(H_T-z_{D_0})}}^{P_{D_0}}
+
\rho g(H+z_{D_0})
=
P_{P_0} \tag{4}
$$
$$\overbrace{\frac{m_1RT}{S_T(H_T-z_{E_0})}}^{P_{E_0}}
+
\rho gz_{E_0}
=
P_{P_0} \tag{5}
$$

The change is because of two main reasons. First, the initially proposed method required to know the initial water in the system which is not realistic. It's easier to install a manometer at ##P## and read the pressure when the valve is closed. Secondly, doing it this way is more consistent with the previous set of equations ##(1)##, ##(2)## and ##(3)## and the equations ##(6)## and ##(7)## that will be written later and describe the new equilibrium at ##t \rightarrow \infty## when the amount of mass that entered the system is unknown but the pressure at ##P## is known.

So, for the initial conditions, we have ##(4)## and ##(5)##.
During the fill-up process the equations are ##(1)##, ##(2)## and ##(3)##.
Finally, for ##t \rightarrow \infty## we know the flow tends to 0 so we can use "normal" Bernoulli again just like it was done to set up the equations ##(4)## and ##(5)##. Also, there will be no difference between having the inlet valve open or closed. That defines the equations ##(6)## and ##(7)##
$$\overbrace{\frac{m_2RT}{S_T(H_T-z_{D_f})}}^{P_{D_f}}
+
\rho g(H+z_{D_f})
=
P_{atm}+\rho g \alpha \tag{6}
$$
$$\overbrace{\frac{m_1RT}{S_T(H_T-z_{E_f})}}^{P_{E_f}}
+
\rho gz_{E_f}
=
P_{atm}+\rho g \alpha \tag{7}
$$

It's useful to define some "checkpoints" to make sure the results are correct. Some of them are:
  • Functions for flow and height should not oscillate since we started from an equilibrium point with zero velocity.
  • We know that the evolution described by ##(1)##, ##(2)## and ##(3)## when starting from ##(4)## and ##(5)## with zero velocity must tend towards the result from ##(6)## and ##(7)## with zero velocity as time goes on.
  • The functions ##z_E## and ##z_D## can never be negative. It'd imply the tanks have no water and from the beginning, we said the pipes are always full so the very minimum is that the height is zero. From the previous points, it can also be understood that their slopes can't be negative either.
  • Since I'll be working with absolute pressure. No pressures can be negative either.

I think from there the last point would be to try to code it to find a numerical solution. I'm not too experienced in this but by looking at the presented math I feel it should be possible.
 
Last edited:
  • #51
Juanda said:
To set up the initial conditions ##(t=0)## I'd prefer to start the system from an equilibrium point. I feel like it's not necessary but I think it's convenient because it's more realistic and the oscillatory nature of the result will be suppressed (or so I think).
I think starting from a state of non-equilibrium would pose some issues. The initial conditions would be no longer be ##Q_1, Q_2,Q = 0 ## nor would the initial flow accelerations be ## \dot Q_1, \dot Q_2 = 0 ##
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 66 ·
3
Replies
66
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 56 ·
2
Replies
56
Views
6K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K