Saturday, November 13, 2010

Condensation - the Eulerian View

In the previous post I analysed the effect of expansion in a cylinder on condensation. As the pressure reduces, of course, the volume increases. The key question was whether it increases more or less than if the air had been unsaturated.

This is supposed to help with what might happen in atmospheric uplift, as in a hurricane. The pressure reduces and the gas expands in the same way. If you focus on the moving air, in fluid mechanics that is the Lagrangian view.

It's better for intuition - the boundaries of the volume travel with the fluid, and by assumption in the atmosphere, heat and other species like water vapor travel with it too, and remain in the boundaries.. That is because diffusion over the large distances is relatively small, although thermal radiation could be an issue.

But there are problems when you want to think about the processes in relation to other things that are not moving with that fluid. Fixed boundaries are one issue - not so common in the atmosphere. But in the ongoing argument about Anastassia Makarieva's contraction theories (TaV1, JC and TaV2, Lucia1, Lucia2),  AM prefers the Eulerian frame, a fixed volume in space.

The good thing there is that you can assume steady conditions. At every point the velocity, temperature etc will remain steady, even though as you follow it in the flow, it changes. The bad thing is that the boundaries are no longer material boundaries, and you have to account for whatever is crossing it. Not so intuitive.

Scientists tend to talk Lagrangian to students, but Eulerian to their computers.

Here I'll take the Eulerian view of expansion and condensation.

A 1D (vertical) problem

In accounting for boundaries, it helps to have only two (upper and lower). I'll look at a 1 m thick slice, assuming zero horizontal gradients. The notation is generally as in the previous post. We'll say z goes from 0 to 1, and I'll suffix accordingly (but if suffix is missing, assume zero). So T,V,P, ρ are assumed known at z=0. The incoming air is saturated.

I'll also assume, as is conventional, hydrostatic pressure. So P1 =P0 -ρ g

Then each incoming packet of air changes according to the cylinder analysis, with this pressure increment:

T1 =T0 -ρ g dT/dP
where dT/dP = (T/P) DT/DP = (T/P) (1+c+c/b)/(3.5+b+b*c), b=L/(R*T), c = b*nw/n
In the previous post, n, nw were moles in a volume V. Here I'll take V=1, so they are molar densities.

nw1 =nw0 -ρ g dnw/dP
where dnw/dP = (nw/P) Dnw/DP = (nw/P) (1+c+c/b)/(3.5+b+b*c)

Density is calculated from dV. The mass change in the unit volume element Mw*dnw,  ( Mw = molar mass of water) so the density change is
d ρ /dP = Mw*dnw /dP + ρ/P DV/DP
= (Mw*nw /P *(b-3.5)+ ρ/P (2.5+b*c+2.5*c/b-c))/(3.5+c+b*c)

Velocity and precipitation reconciliation

The molar mass flux of dry air through z0 is    v0*Nd
The number of moles is conserved; in the notation of the previous post, Nd varies inversely as V, ie DNd/DP=-DV/DP.
So with v=1 m/s,
dv/dP=(v/P)Dv/DP = (v/P)DV/DP=(v/P)a4/a3
Velocity v increases with z.

The precipitation rate r moles/m3/s is
r=v dnw/dz= vρ g (nw/P) (1+c+c/b)/(3.5+b+b*c)


Again the meaningful test is to compare saturated air with unsaturated air under the same conditions. With z in km:
dT/dz   dnw/dz   dρ/dz   dv/dz  
Dry   -9.75   0   -0.0937   0.0818  
The results are much as expected. dT/dz is the lapse rate. dnw/dz is numerically (withv=1) the precipitation rate in moles/km/m2/sec . 0.147 is equivalent to 9.5 mm/hr from a 1 km column - but remember the 1m/s velocity is arbitrary. The density reduces with height, but more rapidly for the saturated flow. And the velocity also increases more rapidly.


It is a steady flow. But also expanding. The upward velocity would have increased just because of the hydrostatic density gradient, but it increases more because of the condensation. This is due to the release of latent heat, which dominates the contraction due to mass loss.

The same expansion is seen in the density gradient (reducing faster). and the warming is seen in the well-known reduction of lapse rate with condensation.

Further note

 I mentioned in the previous post that the formula for DT/DP could be found, with slight modification, in the Phys Met notes of Dr Caballero. I realised then that it is just the formula for the saturated adiabatic lapse rate, which has a much longer history.

As explained in that earlier post, my form isn't quite the same. There is a discrepancy due to the mole concentration I made in the Ideal Gas Law. I've kept with it, because it does seem to be the irght thing to do.

R Code

rho = N*Ma
a4= -(2.5*a1+c*a2)
dp[3]=drhodP  = (Mw*(Nw/P)*a2 - (rho/P)*a4)/a3
# print(dp); print(c(a1,a2,a3,a4))


  1. Good job....

    But since it's a rule we must always disagree in at least some small regard, I'm going to disagree on an utterly unimportant nit. :)

    Scientists tend to talk Lagrangian to students, but Eulerian to their computers.
    Well... some scientists computers talk both Lagrangian and Eularian. :)

    But fluid/thermo is often easier to deal with using Eularian frames and control volumes. (Lagrangian is convenient for detailed studies of diffusion of passive scalars in turbulent flows. So, the fluid/thermo is done in Eularian-- where it is convenient. Then, if you are worried about where smoke from an army smoke generator might go, or cyanide released from a railway car... or.... Well, it can sometimes be convenient to figure that out in a Lagrangian framework.)

    BTW: I'm not sure someone (and I don't mean you) is comfortable moving from Lagrangian to Eularian, or they always know which they framework they are "in".

  2. If I read your code correctly you are neglecting the lower density of moist air. It's not going to change the conclusion, though.

  3. Check my math please. My calculation show that the pressure at any altitude in the moist column will be higher than at any altitude in a dry column. Therefore the pressure gradient would be for flow outward, not inward, except where the flow is inward to replace the volume lost by the vertical flow.

  4. Lucia,
    Thanks. Yes, some computers speak Lagrangian. In fact, I spent a lot of time recently with a particle method - smoothed particle hydrodynamics. It's inherently Lagrangian - you follow particles, treating them as nodes for N-S. It was popular with astrophysicists, who don't have boundaries much. Also with nuclear explosion folk - they get rid of their boundaries.

    Our task to use it for real-world stuff was mainly to work boundaries in the Lagrangian context. Then we could do things like this. (well, not so real-world).

  5. DeWitt,
    Yes, lower density, and also the difference in specific heat with changing moisture. I notice that the standard expression for moist lapse rate includes that but ignores the mass adjustment I made (if I'm right there).

    Not sure about the pressure issue you mentioned. Yes, as a 1-D solution, condensation pushes everything up, so at every level there's more mass of gas above. And when you relax the no horizontal gradients restriction, that produces outward flow.

    That's the flip side of AM's proposal. She's right that if, say, the LH was a lot lower, then there would be work done on the hurricane pushing fluid inward. But it goes the other way.

  6. 1. you might avoid "c" as a variable name since its reserved.

    2. Tool for posting code is here

  7. Thanks, Steven,
    I put the code through pretty-r. It's quite good, tho' this code is probably a bit simple to show the merits of the tool.

    Yes, I probably shouldn't use c, though it doesn't seem to cause a problem.

  8. Thats weird, sometimes when I've used "c" I've gotten messed up. or maybe I tried to use 't'

    I really dont like that aspect of R. I know from reading some of jeff's code where he used t() I would totally miss it in trying to understand what was happening.

    Hey at some point I'm going to look at refactoring benestads work (clim.pact) on empirical downscaling and EOF in the raster package so I may hit you up on some of the math details.