Mass and energy balance equations for a tank filled with H20

In summary, the conversation discusses the problem of determining the temperature and level of a tank containing water with variable flow rates and heat loss. The equations used are the mass balance equation, where A is the section of the tank and l is the level of water inside, and the energy balance equation, where H represents enthalpy and Q represents heat loss. The conversation also touches on the use of Isobaric volumetric heat capacity and the assumption of neglecting kinetic and potential energy in the tank. It is suggested to use numerical integration to solve the differential equations and initial conditions for level and temperature must be included.
  • #1
dRic2
Gold Member
883
225
Hi, this problem should be very simple: I have a tank containing water. (going in and out). I want to write the differential equations to see what happen to the temperature and the level of the vessel if the flow of water is not constant.

the system should be:

$$A \frac {dl} {dt} = F_{in} - F_{out} $$
$$ \frac {dE} {dt} = H_{in} - H_{out} - Q_{out} $$

##A## is the section of the tank
##l## is the level of water inside the vessel
##F## are the volumetric flow rates
##Q_{out}## represents the heat loss

I have a problem with the second equation (energy balance). How do I handle ##H_{in}## and ##H_{out}## ?

I tried to do this:

$$ \frac {dE} {dt} = ρ F_{in} \left [ h(T_r) + \int_{T_r}^{T_{in}} cp \right ] - ρ F_{out} \left [ h(T_r) + \int_{T_r}^{T_{out}} cp \right ] - Q_{out}$$

##\rho## can be assumed to be constant, but ##F_{in} ≠ F_{out}##, so how to I handle ##h(T_r)##? I can arbitrary set ##h(T_r)## to be ##0##, but then what about ##T_r## ?

Thanks
Ric
 
Engineering news on Phys.org
  • #2
Make up your mind. Either use mass flows, mass balance, and energy balance, or volume flow, volume balance, and temperature balance. Since you are dealing with water, it is easy either way. Use ##C_{[p,v]}## the Isobaric volumetric heat capacity (or ##c_p##) to convert between the two representations.

I don't understand your energy balance. You didn't define all the symbols. I suspect that you also have problems with the units.

But you have only two temperatures to work with, the inlet temperature and the tank temperature. Outlet flow comes at tank temperature by definition.

You do not say what range of temperatures you need, or what accuracy. But either you assume ##C_{[p,v]}## is constant, or you can use the steam tables to get the values needed and make a curve fit ##C_{[p,v]}## as a function of temperature.

The next step I presume is numerical integration of the differential equations. You are not trying for a closed form time domain solution, correct?

Don't forget to add in the initial conditions for level and temperature.
 
  • Like
Likes Bystander
  • #3
By the way, you did not mention pressure. It is an open top tank, correct?
 
  • #4
First of all, thank you for the reply :)

anorlunda said:
Make up your mind. Either use mass flows, mass balance, and energy balance, or volume flow, volume balance, and temperature balance. Since you are dealing with water, it is easy either way. Use ##C_{[p,v]}## the Isobaric volumetric heat capacity (or ##c_p##) to convert between the two representations.

Mhm, I don't get what you are saying. Here's what I did (according to the properties of the system given by my professor - it is not really an exercise so I posted here ):

Mass balance:

$$ \frac {dm} {dt} = \dot m_{in} - \dot m_{out}$$
$$ \frac {d( \rho V)} {dt} = \rho_{in} \dot F_{in} - \rho_{out} \dot F_{out} $$
Assuming ##\rho## constant (the temperature range is not very wide) I get:
$$ \frac {d(V)} {dt} = \dot F_{in} - \dot F_{out} → \frac {d(lA)} {dt} = \dot F_{in} - \dot F_{out}$$

I also apologize for my bad notation: when I wrote ##c_p## I meant ##c = \left ( \frac {δQ} {dT} \right )## because, in fluids, ##c_p ≈ c_v ≈ c##.

anorlunda said:
I don't understand your energy balance

##E## is the total energy: ##dE = d(U + K + φ) = dU ≈ dH## because, for fluids, at constant pressure and density ##d(PV) ≈ 0## so, internal energy can be replaced with enthalpy.

##K## is the kinetic energy, and so ##dK ≈ 0## (in this case).
##Φ## is the potential energy, and so ##dΦ ≈ 0## (in this case).

##H_{in }## and ##H_{out}## are the enthalpies of the inlet and outlet flow, because because mass flows carry energy inside and outside the system.
 
  • #5
anorlunda said:
You do not say what range of temperatures you need

Well, I want to know the temperature profile if something happens to ##F_{in}## or ##F_{out}##. ##F_{in}## has a Temperature of ##60 °C## while the outside temperature is ##25 °C##. Heat loss (##Q_{out}##) can be approximated with ##Q_{out} = UA(T-T_{outside})##. For a first general idea ##U## can be treated as a constant.

anorlunda said:
The next step I presume is numerical integration of the differential equations
Yes.

anorlunda said:
Don't forget to add in the initial conditions for level and temperature.
Of course.

anorlunda said:
By the way, you did not mention pressure. It is an open top tank, correct?
Yes
 
  • #6
IN THIS ANALYSIS, THE F'S ARE GOING TO BE THE MASS FLOW RATES. SO THE MASS BALANCE ON THE TANK IS: $$\frac{A}{v}\frac{dl}{dt}=F_{in}-F_{out}$$ where v is the specific volume of the fluid (assumed constant).

If you neglect kinetic energy and potential energy in the tank and assume that the fluid is compressible, then $$E=\frac{Al}{v}\left[e(T_r)+\int_{T_r}^T{C(T')dT'}\right]$$where, for an incompressible fluid, C is both the heat capacity at constant volume and the heat capacity at constant temperature. In addition, if the pressure is constant, $$h_{in}=e_{in}+Pv=e(T_r)+\int_{T_r}^{T_{in}}{C(T')dT'}+Pv$$and $$h_{out}=e_{in}+Pv=e(T_r)+\int_{T_r}^{T_{out}}{C(T')dT'}+Pv$$Furthermore, the open system energy balance should read:
$$\frac{dE}{dt}=F_{in}h_{in}-F_{out}h_{out}-PA\frac{dl}{dt}+Q$$
where the third term on the right hand side represents the work the tank contents are doing in pushing back the surroundings.

If we combine these equations with the mass balance equation, we obtain:
$$\frac{Al}{v}C\frac{dT}{dt}=F_{in}\int_T^{T_{in}}{C(T')dT'}-F_{out}\int_T^{T_{out}}{C(T')dT'}+Pv(F_{in}-F_{out})-PA\frac{dl}{dt}+Q$$
But, from a volume balance, we have that: $$v(F_{in}-F_{out})=A\frac{dl}{dt}$$
Therefore,
$$\frac{Al}{v}C(T)\frac{dT}{dt}=F_{in}\int_T^{T_{in}}{C(T')dT'}-F_{out}\int_T^{T_{out}}{C(T')dT'}+Q$$
 
Last edited:
  • Like
Likes dRic2
  • #7
Thank you @Chestermiller for the very interesting reply.

Chestermiller said:
Furthermore, the open system energy balance should read:
Okay, here I am unprepared... my professors never considered the work done by the tank in this way so I'm a bit shocked (I'm not saying that I don't believe you, I'm just new to this). I tried to derive your formula in my own way... if you please can check it I will be very glad :smile: I will post il later because now I'm very busy.

There are a few more things I'd like to understand:

Chestermiller said:
If we combine these equations with the mass balance equation, we obtain:
Where did ##e(T_r)## go?

Chestermiller said:
Therefore,

In your final formula what is ##T##? Is ##T = T_r##? And how can I find ##T##?
 
  • #8
dRic2 said:
Thank you @Chestermiller for the very interesting reply.Okay, here I am unprepared... my professors never considered the work done by the tank in this way so I'm a bit shocked (I'm not saying that I don't believe you, I'm just new to this). I tried to derive your formula in my own way... if you please can check it I will be very glad :smile: I will post il later because now I'm very busy.

There are a few more things I'd like to understand:Where did ##e(T_r)## go?
It canceled from both sides of the equation as a result of the mass balance.
In your final formula what is ##T##? Is ##T = T_r##? And how can I find ##T##?
T is the temperature in the tank. Tr is gone. You need to go through the math.
 
  • Like
Likes dRic2
  • #9
This problem can also be solved using the usual "closed system" version of the first law of thermodynamics, giving the identical results.
 
  • Like
Likes dRic2
  • #10
Sorry If I'm not replying. I'll be back in a few days
 
  • #11
Okay, sorry for my late reply!

I've been carefully revising balance equations and I made it to the and of your answer. I just have few things I'd like to ask you:

1) When you use ##E## technically you are referring to ##U## (internal energy) but, since for incompressible fluids there is no difference between ##H## and ##U##, you use ##E##: it is just a matter of words, right?

2) Is it safe to assume that ##T_{out} = T## to simplify the equation (assuming perfect mixing)?

3) Just for the sake of it, I was trying to derive the macroscopic energy balance starting from the differential form of balance equations, but I get stuck... If you have time, can you please show me how it should be done?

Thank you,
Ric
 
  • #12
dRic2 said:
Okay, sorry for my late reply!

I've been carefully revising balance equations and I made it to the and of your answer. I just have few things I'd like to ask you:

1) When you use ##E## technically you are referring to ##U## (internal energy) but, since for incompressible fluids there is no difference between ##H## and ##U##, you use ##E##: it is just a matter of words, right?
Even for an incompressible fluid, there is a difference between H and U. Pv is not equal to zero. This has been taken into account in the development I presented. Also, the open system version of the first law determines dU/dt for the control volume, not dH/dt.
2) Is it safe to assume that ##T_{out} = T## to simplify the equation (assuming perfect mixing)?
Yes, if you judge that that is a good approximation, such as if there is adequate stirring in the tank.
3) Just for the sake of it, I was trying to derive the macroscopic energy balance starting from the differential form of balance equations, but I get stuck... If you have time, can you please show me how it should be done?
This development is presented in detail in Transport Phenomena by Bird, Stewart, and Lightfoot
 
  • #13
Chestermiller said:
Even for an incompressible fluid, there is a difference between H and U.

Then why ##C(T) ≈ C_v(T) ≈ C_p(T)## for incompressible fluids ?


Chestermiller said:
This development is presented in detail in Transport Phenomena by Bird, Stewart, and Lightfoot

I don't want to bother you any further, but I'm not finding it. I looked it up and I found the macroscopic energy balance and it differential formulation, but I didn't find how to switch from one to the other by integrating the equation.

Thanks
Ric
 
  • #14
dRic2 said:
Then why ##C(T) ≈ C_v(T) ≈ C_p(T)## for incompressible fluids ?
Those are partial derivates with respect to T. The partial derivative of the Pv with respect to T is zero.
I don't want to bother you any further, but I'm not finding it. I looked it up and I found the macroscopic energy balance and it differential formulation, but I didn't find how to switch from one to the other by integrating the equation.

Thanks
Ric
Are the derivations in Chapters 7 and 15 not adequate for filling the gaps in your derivation? Let's see what you've got so far.
 
  • #15
I still don't understand why you used ##C## instead of ##C_v##...

Chestermiller said:
Are the derivations in Chapters 7 and 15 not adequate for filling the gaps in your derivation? Let's see what you've got so far.

The derivations are very clear, I just have some problems trying to do it backward... I get stuck from the very beginning (I left out the irreversibility):

$$\rho \left[ \frac {\partial \hat U} {\partial t} + \vec v ⋅ \nabla \hat U \right] = - \nabla ⋅ q - p(\nabla ⋅\vec v) $$

The continuity equation yields:

$$ \frac {\partial \rho} {\partial t} + \nabla ⋅(\rho \vec v) = 0 $$

So I can use that result to write:

$$ \rho \left[ \frac {\partial \hat U} {\partial t} + \vec v ⋅ \nabla \hat U \right] + \hat U \left[ \frac{\partial \rho} {\partial t} + \nabla ⋅(\rho \vec v) \right] = - \nabla ⋅ q - p(\nabla ⋅\vec v) $$

Noting that ##\rho \vec v ⋅ \nabla \hat U + \hat U \nabla ⋅ (\rho \vec v) = \nabla ⋅ (\hat U \rho \vec v)## and that ##p(\nabla ⋅\vec v) = \nabla ⋅(\rho \vec v) - \vec v ⋅ \nabla p ## the equation becomes:

$$ \rho \frac {\partial \hat U} {\partial t} + \hat U \frac {\partial \rho} {\partial t} + \nabla ⋅ (\rho \vec v \hat U) = - \nabla ⋅ q - \nabla ⋅(\rho \vec v) - \vec v ⋅ \nabla p $$
$$ \frac {\partial \rho \hat U} {\partial t} = - \nabla ⋅ q - \nabla ⋅ (\rho \vec v \hat U) - \nabla ⋅(\rho \vec v) - \vec v ⋅ \nabla p $$

But here I'm stuck
 
  • #16
Hi, sorry if I revive this old post, but I finally got enough free time to think about it and I still don't get what you did.

The main thing I do not understand is this:

Chestermiller said:
Furthermore, the open system energy balance should read:
$$\frac{dE}{dt}=F_{in}h_{in}−F_{out}h_{out}−PA\frac{dl}{dt}+Q$$​

From page 316 of "Transport Phenomena" I will write the infinitesimal energy energy equation (in the most general form possible):

$$\frac {\partial}{\partial t} {\rho( \hat U + \frac 1 2 v^2)} = - ∇⋅\rho \mathbf v( \hat U + \frac 1 2 v^2) - ∇⋅ \mathbf q + \rho( \mathbf v ⋅ \mathbf g) - ∇⋅(p \mathbf v) - ∇⋅[ \mathbf \tau ⋅ \mathbf v] $$

Let's forget about ##\frac 1 2 v^2##, ## \rho( \mathbf v ⋅ \mathbf g)## and ## ∇⋅[ \mathbf \tau ⋅ \mathbf v]##:

$$\frac {\partial}{\partial t} {\rho( \hat U )} = - ∇⋅\rho \mathbf v( \hat U ) - ∇⋅ \mathbf q - ∇⋅(p \mathbf v) $$

Putting together ##- ∇⋅\rho \mathbf v( \hat U )## and ##- ∇⋅(p \mathbf v) ##:

$$ -∇⋅[ \rho \mathbf v( \hat U ) + (p \mathbf v)] = -∇⋅[ \rho \mathbf v ( \hat U + \frac p {\rho})] = -∇⋅[ \rho \mathbf v \hat H ] $$

And back to the main equation:

$$\frac {\partial}{\partial t} {\rho( \hat U )} = -∇⋅[ \rho \mathbf v \hat H ] - ∇⋅ \mathbf q $$

Integrating over the Volume:

$$ \int_V \frac {\partial}{\partial t} {\rho( \hat U )} dV = - \int_V ∇⋅[ \rho \mathbf v \hat H ] dV - \int_V ∇⋅ \mathbf q dV $$

Now:

$$\int_V \frac {\partial}{\partial t} {\rho( \hat U )} dV = \frac {\partial}{\partial t} \int_V {\rho( \hat U )} dV = \frac {dU}{dt} $$

Using the divergence theorem:

$$ \int_V ∇⋅[ \rho \mathbf v \hat H ] dV = \int_S \rho \mathbf v \hat H ⋅ d \mathbf S = -(H_{in} - H_{out}) $$

Finally:

$$ \frac {dE}{dt} = H_{in} - H_{out} + Q $$
 
  • #17
I don't have it in me to work out every last detail of the mathematics. But, your issue is definitely is related to the term ##\nabla \centerdot (p\mathbf{v})##. The divergence theorem applied to this term definitely includes entering and exiting streams, but it also includes the work done if the boundary of the control volume is moving (in regions where where mass is not entering or leaving) so that the control volume is expanding. If this were a closed system, for example, this term would lead to the familiar pdV/dt term.
 
  • #18
Chestermiller said:
our issue is definitely is related to the term ∇⋅(pv)∇⋅(pv)\nabla \centerdot (p\mathbf{v}). The divergence theorem applied to this term definitely includes entering and exiting streams, but it also includes the work done if the boundary of the control volume is moving (in regions where where mass is not entering or leaving) so that the control volume is expanding.

Oh, now I see it clearly. Thank you very much. But I have no idea how to show it mathematically...
 
  • #19
dRic2 said:
Oh, now I see it clearly. Thank you very much. But I have no idea how to show it mathematically...
I have a suggestion to get you started. Try to do it first for a closed system in which you have a moving boundary like a piston (but no mass entering or leaving). Don't forget to use Reynolds' theorem for differentiation under the integral sign. See if you can derive the usual form of the first law of thermodynamics.
 
  • #20
Okay, I will try as soon as I can, thank you again!
 
  • #21
Sorry to bother you again, this will be the last time. Do you think this will do?

$$ \int_V ∇ \cdot (p \mathbf v) dV = \int_S p \mathbf v d \mathbf S = p_{ext} \int_S \mathbf v d \mathbf S$$

$$\int_S \mathbf v \space d \mathbf S = \int_S \frac {d \mathbf r} {dt} \cdot \mathbf n \space dS = \int_S \frac {d( \mathbf r \cdot \mathbf n)} {dt} \space dS = \int_S \frac {d \mathbf r_{\bot}} {dt} \space dS = \frac d {dt} \int_S r_{\bot} \space dS = \frac {dV} {dt} $$

I'm not super about two things:
1) If I can extract ##p## out of the integral by considering the external pressure
2) If the second integral is correct
 
  • #22
dRic2 said:
Sorry to bother you again, this will be the last time. Do you think this will do?

$$ \int_V ∇ \cdot (p \mathbf v) dV = \int_S p \mathbf v d \mathbf S = p_{ext} \int_S \mathbf v d \mathbf S$$

$$\int_S \mathbf v \space d \mathbf S = \int_S \frac {d \mathbf r} {dt} \cdot \mathbf n \space dS = \int_S \frac {d( \mathbf r \cdot \mathbf n)} {dt} \space dS = \int_S \frac {d \mathbf r_{\bot}} {dt} \space dS = \frac d {dt} \int_S r_{\bot} \space dS = \frac {dV} {dt} $$

I'm not super about two things:
1) If I can extract ##p## out of the integral by considering the external pressure
2) If the second integral is correct
The pressure can't be taken out of the integral unless the pressure is constant over the moving portion of the boundary, such as in your homework example. Otherwise, $$\int_V{\nabla \centerdot (p\mathbf{v})dV}=\int_S{p(\mathbf{v}\centerdot\mathbf{n})dS}$$This is the integral of the rate of doing work at the surface (work on the surroundings). In your homework problem, it is equal to the rate of doing work to push back the piston, plus the rate of work required to push material into and out of the control volume.
 
  • #23
Ok, this is clear. But let's take the example of an ideal gas expanding in a piston against atmospheric pressure: how do I get from ##\int_S p(\mathbf v \cdot n)dS## to ##-P_{ext}\frac{dV}{dt}## ? Is my method wrong ?
 
  • Like
Likes Chestermiller
  • #24
dRic2 said:
Ok, this is clear. But let's take the example of an ideal gas expanding in a piston against atmospheric pressure: how do I get from ##\int_S p(\mathbf v \cdot n)dS## to ##-P_{ext}\frac{dV}{dt}## ? Is my method wrong ?
By Newton's third law, the force exerted by the gas on the inside face of the piston (its surroundings), pA, is equal to the force exerted by the inside face of the piston on the gas, denoted ##P_{ext}##A. So, at the piston face portion of the boundary surrounding the control volume, $$p=P_{ext}$$ assumed uniform on the piston face. So, in this case ##p(=P_{ext})## comes out of the integral. The remainder of the integral represents the rate of volume being swept out by the piston movement (since the tangential component of velocity is zero at the piston surface).
 
  • Like
Likes dRic2
  • #25
Thank you!
 

What is a mass balance equation for a tank filled with H20?

A mass balance equation for a tank filled with H20 is a mathematical representation of the amount of mass entering and leaving the tank. It is based on the principle of conservation of mass, which states that the total mass in a closed system remains constant.

What is an energy balance equation for a tank filled with H20?

An energy balance equation for a tank filled with H20 is a mathematical representation of the amount of energy entering and leaving the tank. It is based on the principle of conservation of energy, which states that energy cannot be created or destroyed, only transferred or converted.

How are mass and energy balance equations related?

Mass and energy balance equations are related because they both describe the behavior of a closed system. In a tank filled with H20, the amount of mass and energy entering and leaving the tank must be equal in order for the system to be in a state of balance.

What factors can affect the mass and energy balance equations in a tank filled with H20?

Factors that can affect the mass and energy balance equations in a tank filled with H20 include the rate of inflow and outflow, changes in temperature and pressure, and any reactions or processes taking place within the tank.

How can the mass and energy balance equations for a tank filled with H20 be solved?

The mass and energy balance equations for a tank filled with H20 can be solved using various mathematical techniques, such as algebraic manipulation, calculus, and numerical methods. These equations can also be solved using computer simulations and models.

Similar threads

  • Introductory Physics Homework Help
Replies
1
Views
725
  • Materials and Chemical Engineering
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
700
  • Materials and Chemical Engineering
Replies
9
Views
6K
  • Introductory Physics Homework Help
Replies
4
Views
815
  • Introductory Physics Homework Help
Replies
5
Views
363
  • Materials and Chemical Engineering
Replies
14
Views
6K
  • Materials and Chemical Engineering
Replies
3
Views
3K
  • Advanced Physics Homework Help
Replies
1
Views
1K
Back
Top