tag:blogger.com,1999:blog-7729093380675162051.post2391293044205979614..comments2024-03-28T13:56:47.604+11:00Comments on moyhu: A ramble on GCMs Navier-Stokes equations.Nick Stokeshttp://www.blogger.com/profile/06377413236983002873noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-7729093380675162051.post-71990503085862417072010-10-28T21:04:49.794+11:002010-10-28T21:04:49.794+11:00Leonard,
I included momentum and continuity, and a...Leonard,<br />I included momentum and continuity, and an equation of state, which Lucia said would be more conventionally called a constitutive equation - anyway, it relates pressure and density.<br /><br />Energy wasn't in the original N-S equations, and I wanted to separate them here to concentrate on the pressure-velocity time scale (acoustic wave equation). However, as Al said, the GCM's do couple the energy equation in the semi-implicit solution, so it probably should be considered part of the system.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-19833330460628394452010-10-28T15:16:31.781+11:002010-10-28T15:16:31.781+11:00Nick,
NSE are only the momentum equations. You nee...Nick,<br />NSE are only the momentum equations. You need separate continuity, energy, and eq of state, as well as some thermo to get there from here. In fact, a time varying 3-D high Reynolds number flow is not solvable for useful time scales in the real world even with the best computer. When you include limited initial and boundary data and inadequate grid you have what is known as a joke.Leonard Weinsteinhttps://www.blogger.com/profile/02125857972902059097noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-20243018258476854012010-10-24T11:14:43.358+11:002010-10-24T11:14:43.358+11:00Nick---
Of course the sound is real. Yes. there ...Nick--- <br />Of course the sound is real. Yes. there are numerical issues. Few will cite a blog ramble-- especially if it's a ramble. (Though citing a blog doesn't technically violate any offcial rules of academia. It may violate <i>IPCC</i> rules for what to include in their reports-- but that's a bit different.)<br /><br />I guess I still don't know what you are trying to show others. Yes. You can sometimes separate stuff.....Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-89805492027902838052010-10-24T10:30:36.650+11:002010-10-24T10:30:36.650+11:00Lucia,
I'm allowing just enough compressibilit...Lucia,<br />I'm allowing just enough compressibility to get sound - basically to show how the PPE comes in to then eliminate acoustics.<br /><br />A general theme is the handling of disparate time scales. A GCM is faced with picosecind IR upwards, and trying to cover centuries. The E/M timescale goes out with ray theory (plus scattering models etc). But the sound is real, and requires PPE semi-implicitness. That's heavy computing. That gets us to about the 20-min scale; then the passage to centuries is just big computers.<br /><br />Actually handling pressure needs further investigation, because a lot of it is done with a hydrostatic assumption. But I do think it's implicitly there in the Poisson equation.<br /><br />I think condensation may have a role in the inclusion of temperature in the semi-implicit phase. It must be because of something fast, and my firsat thought was E/M. But with rays, that's not really PDE at all. So then I thought that pressure waves might interact with vapor, in effect propagating heat at high speed. That's probably equivalent to your idea of an effect on sound speed.<br /><br />I have the Handbook of Heat Transfer Fundamentals by Rosenow, , with plenty of P-v diagrams.<br /><br />I'm hoping no-one would want to cite a blog ramble for heat transfer problems :). But I'm also hoping that all will become clearer (to me, anyway) getting more specifically into the CAM3 document.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-76704681803813932402010-10-24T02:09:27.947+11:002010-10-24T02:09:27.947+11:00Nick
>> Normally for the dynamics of atmosph...Nick<br />>> Normally for the dynamics of atmospherics, incompressible flow is a useful approximation<br />Of course to leading order, flow is incompressible. The assumption will be useful in many cases. (Since you aren't setting divV=0, I assume by incompressible, you probably mean barotropic or baroclinic, not literally incompressible? )<br /><br />>>So with this slightly compressible gas, dynamic and acoustic fluctuations satisfy<br /><br />This is where you are inserting an assumption-- which can be important in special cases. So, if your intention is to build on this to explain how things are generalized, you need to reveal t this or risk giving people the impression what you are doing applies in the later special case.<br /><br /> If there is heat transport or phase change (evaporation or condensation) then, variations in temperature, pressure and density will not vary as we see for sound waves in an idea gas. That's where you need a different relation for ∂P/∂ρ at constant entropy. Or, if you prefer, this equation you substitute into your system doesn't necessarily apply:<br />P-P0 = (γP0/ρ0)(ρ-ρ0).<br /><br />(Temperature will also not vary according to the corresponding equation for temperature variations. You need to do the thermo! )<br /><br />Now, I might not be yammering about this if I meant that equation might only apply *approximately*. But the problem is *it might not even be close*.<br /><br /> Look at a P-v diagram (i.e P-&1/ρ) for steam/water and find the lines at constant "s". The acoustic relation you are substituting <i>right from the start</i> is fine at temperatures high or pressures low enough to get you away from the "hill". Condensation isn't one of those cases. It's not even close. (I can't find a good P-v diagram on line.)<br /><br />>> But it does contain the relation between pressure and velocity, and you don't have to put in extra relations to cover that.<br />But the Navier Stokes equations *don't* contain that relation betwen pressure and velocity in many flows. To get that, you need to provide a *real* equation of state, and sometimes use the first and 2nd law of thermo. You are using constitutive equation that has made quite a few assumptions. <br /><br />So, if you start where you did and don't reveal your assumptions, you can't "generalize" to special cases that might violate those assumptions. So, I think to meet your goal of going forward, you need to reveal your assumption and explain why they apply to some case that interests you -- or better all cases that could possibly affect the accuracy of a GMC. <br /><br /><br />The assumptions made to come up with the equations coded in a GCM must be routinely document in development of climate models, right? We do that in engineering-- routinely. (Otherwise, people would screw up and think they can the stuff you wrote down when solving heat transfer problems. BIG MISTAKE!)<br /><br />So, even if you don't normally do that sort of thing yourself, the development must be *somewhere*. (Mind you, I haven't seen it... but then, I don't develop or run GCM codes.)<br /><br />(I won't double post if this seems not to show up because of length this time. It seems they do show up.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-73767325319548591822010-10-23T20:16:53.468+11:002010-10-23T20:16:53.468+11:00Lucia,
"I'm not sure where this is going....Lucia,<br /><i>"I'm not sure where this is going."</i><br />Me either. I did call it a ramble :)<br /><br />But your query has helped me to clarify that in my mind. I really want here to lay out some computational structure of the N-S in GCM's. That's why the emphasis on the wave eqn and the transition to the PPE - semi-implicitness.<br /><br />There is a large section of code where they do fnncy numerical stuff on this subset of variables (pressure, velocity, temp). Spectral transformation etc. And I suspect it's where they chew up the computer time.<br /><br />Then there's the loosely attached code where they catch up with all of what I've called "slow" processes. I'm not so interested in the detail here, at this stage, because you can study each in isolation. And I think condensation is in that category.<br /><br />So my next post will probably try to describe the actual CAM3 semi-implicit part. Then maybe another on the parts treated specially - plumes etc. Although I'm reasonably familiar with CFD, I'm just learning about all this.<br /><br />So on your specific q's: <br /><br />Yes, constitutive relation might have been a better term. Normally for the dynamics of atmospherics, incompressible flow is a useful approximation. It's not that you don't get density variations - obviously with altitude, but also with humidity etc - but rather that the dynamic pressure variation associated with flow velocities is small, and so it's dependence on density can be linearized.<br /><br />If heat transfer is assumed slow, then the right invariant expression for adiabatic fluctuations is<br />ρ^-γ P=const. ρ=density, γ=cp/cv, P=pressure<br />So with this slightly compressible gas, dynamic and acoustic fluctuations satisfy<br />P-P0 = (γP0/ρ0)(ρ-ρ0) = c^2 (ρ-ρ0)<br />which if you then set equilibrium pressure P0 to be zero (which I forgot to spell out) becomes<br />P = c^2 (ρ-ρ0)<br />So that's the sense in which it's the equation of state. But I'm happy to call it the constitutive relation - it sounds better.<br /><br />I'm not too concerned about what the speed of sound actually is, because the point of writing this out is to eliminate acoustics. We need to know that they are there, and to identify the wave equation sitting in the N-S equations, just so they can be eliminated.<br /><br />In saying "the N-S eqn solver handles this" I'm touching on two points<br />1. There is a subset of the GCM system which is N-S. It may have source terms in the continuity equation, say, and lots of extra things in the momentum equation. But it does contain the relation between pressure and velocity, and you don't have to put in extra relations to cover that.<br />2. The N-S solver is a distinct part of the code (semi-implicit (with energy eqn)). Some effects go into it, some not, and it's necessary to track which is which.<br /><br />The condensation effect on ss would then go into the RHS of the Pressure PE.<br /><br />The issue of condensed water mass/weight was discussed in Jeff's threads eg <a href="http://noconsensus.wordpress.com/2010/10/19/momentary-lapse-of-reason/#comment-39128" rel="nofollow">here</a>. Much discussed was the question of whether condensation increased or decreased pressure.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-8699002032407317592010-10-23T14:44:57.397+11:002010-10-23T14:44:57.397+11:00Nick--
Ok. I thought you were dealing with condens...Nick--<br />Ok. I thought you were dealing with condensation. I'm not sure where this is going. <br /><br />Condensation induced by temperature variations arising from flow should affect the speed of sound. If you recall the derivation for idea gases, and think of a multi-phase media, you'll see it has to do so. The speed of sound will vary spatially for this reason.<br /><br />I think if you want to use this going forward, you need to elaborate how you got what you call an "equation of state". I'd call it a constitutive relation because the *real* equation of state for gas is the idea gas law, which differs from the one you show. You'll need to explain the assumptions restricting your substitution so people can understand when and why it holds in the cases you think "matter". <br /><br />Oh.. btw. Droplets in air can change the speed of sound. I doubt it's much. Do you happen to know the upper bound on mass loading of something like raindrops in air? Or water drops in clouds?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-76270426748133948362010-10-23T14:38:10.920+11:002010-10-23T14:38:10.920+11:00Nick--
Ok. Because I the first two sentences of th...Nick--<br />Ok. Because I the first two sentences of the post gave me the impression this had something to do with the question of whether or not GCM's address condensation properly. Obviously, this discussion falls pretty short of the mark if we want to talk about how effects of condensation would be included or incorporated. <br /><br />>> The equation of state isn't just gases - but it is linearised.<br /><br />Even your 'equation of state' isn't a linearized form of the real equation of state, is it? The ideal gas law is a real, honest to goodness equation of state and that differs from the one you give. If you wanted to derive the expression for "c" in your 'equation of state', you would need to identify the *real* *honest to goodness* equation of state, add some thermo and also reveal the assumptions required to use your constitute relation connecting pressure to density. (Sorry. I can't bear to call that your third equation "equation of state" without including scare quotes.)<br /><br /><br />>>when the N-S equation solver handles that.<br />Ok... but I don't get where you are going with this. <br /><br />The N-S solver can only handle things that can be handled by the NS. And the set of equations you provide can work in cases where you certain assumptions hold and you can replace the *real* equation of state with the one you suggest-- which only holds under special circumstances. (Maybe they hold under all the cases you care about? Clearly not shock waves though-- but you probably aren't concerned about those.)<br /><br /><br /><br />>>I hadn't seen an allowance for condensation coming into the speed of sound particularly. I'm envisaging a more complex eqn of state, of which the ss is a derivative, but with that complexity, the derivative (ss) isn't constant.<br /><br />Condensation and evaporation *caused by pressure changes due to flow* should affect the speed of sound-- no doubt. So, it ought to matter when the relative humidity is high enough to anticipate condensation when temperatures drop. <br /><br />I don't know how much condensation would change the speed of sound, but it should change it some. <br /><br />Another pesky issue: I don't know the upper range of mass loading of water drops in air, but their presence may also affect the speed of sound. (Maybe not much though-- I'd guess an upper bound of 10% if we can assume drops are at the same temperature as surrounding air. More if we can't. But I'm guessing mass loading of water. If you know, I could swag that better. )Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-90752899476172932572010-10-23T12:32:48.358+11:002010-10-23T12:32:48.358+11:00Lucia,
No, it's de-emphasising things like con...Lucia,<br />No, it's de-emphasising things like condensation. The CAM3 documentation that I cited has a long string of equations, and I'm trying to focus on the ones that require close coupling, so they go into the semi-implicit solver. Others are then solved as a catch-up process.<br /><br />I've used a linear equation of state, mentioning that there are others. Condensation could be included there. I also restricted at this stage to slightly compressible fluids, which excludes condensation.<br /><br /><br />Still, as Al points out, it's a real issue in the models, because they use special models for upward plumes etc, which rather bypasses the N-S solver. And of course it's the Issue Jeff is trying to get at.<br /><br />The equation of state isn't just gases - but it is linearised. That's enough to bring out the acoustic wave equation, which is the reason for tight coupling (semi-implicit).<br /><br />Other issues - yes, there'll be lots. I'm not trying to do a whole GCM in one post. The motivation is really to have something to say when people ask for all sorts of special cases to be included, when the N-S equation solver handles that.<br /><br />I hadn't seen an allowance for condensation coming into the speed of sound particularly. I'm envisaging a more complex eqn of state, of which the ss is a derivative, but with that complexity, the derivative (ss) isn't constant.<br /><br />Here my main reason for introducing ss is to show which terms divided by it become small, and drop out to provide the Pressire Poisson Equation.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-42780912708472935182010-10-23T09:29:15.547+11:002010-10-23T09:29:15.547+11:00"...account for water vapor evaporating?"..."...account for water vapor evaporating?"<br />Water evaporating or condensing.... (I'm sure I'll see other issues later. :) )Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-6871993861863725232010-10-23T09:27:00.329+11:002010-10-23T09:27:00.329+11:00Nick--
Is this discussion for cases with condensat...Nick--<br />Is this discussion for cases with condensation? Or without?<br /><br /> I'm trying to figure out which questions to ask. Are these equations for the mixture of (gas + liquid water + ice) with gas being (air + water vapor)? Or are they for the gas (i.e. air+water vapor) only? <br /><br />If it's for the gas only, why doesn't your first continuity equation include a source term to account for water vapor evaporating?<br /><br />Regardless of whether these are for gas only or mixture, wouldn't the condensation issue relate to the questions like, "what is the mathematical formulation for "c" in your equation of state:<br />ρ'=P'c-2<br />(I switched to primes...)<br /><br />That equation is only the equation of state is based on of sound being "c2 = ∂p/∂&ρo|s<br /><br />For an ideal gas , that's going to be root(gamma R T), but for a mixture of gas and a condensing fluid, additional terms likely (as in almost certainly) appear.<br /><br />Anyway, if you can tell me whether these equations are for the gas (i.e. water vapor + air) or mixture (gas + liquid water + ice) that will help me understand what you are trying to say.<br /><br />Which is fine. But doesn't that just push Jeff's question back to: And do you know the equation for "c"? That needs to be coded. And if it's a gas/liquid mixture undergoing condensation, do GCM's contain the correct formulation for the speed of sound?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-41179159741132086442010-10-22T10:10:07.324+11:002010-10-22T10:10:07.324+11:00Re Al #2, if the GCM's are based on 2D layers...Re Al #2, if the GCM's are based on 2D layers and they are "artificially" held stable by adjustments to maintain mass balance etc, then the issue of mass balance re the missing H2O in the rain-out problem being discussed at TAV is likely to be even more significant I would have thought.Terrynoreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-83086364442493940932010-10-21T18:17:12.132+11:002010-10-21T18:17:12.132+11:00Actually, it just dawned on me why they have to co...Actually, it just dawned on me why they have to couple the energy equation. Radiation is even faster than sound, and has to be treated implicitly. It can't really then be separated from other slower heat transfer processes. D'oh.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-44943047037616030072010-10-21T18:09:07.729+11:002010-10-21T18:09:07.729+11:00Carrick,
Yes, indeed you do. N-S equations are oft...Carrick,<br />Yes, indeed you do. N-S equations are often considered now to have a coupled energy equation, which covers transport of heat, and picks up viscous work etc. Yes, that's wasn't there in 1854.<br /><br />In my discussion above I had thought of this as one of the slow processes that could be decoupled. But I see CAM3 thinks it is worth including in the semi-implicit step.<br /><br />Euler's equations, which I guess I'm really talking about (as Al says, I think) were characterised by Feynman as what you need to describe the flow of dry water. It's the essence of fluidity (fast interchange of pressure velocity). N-S gives you wet water. Most other things you can just add on.<br /><br />Thanks for the kind comments. Despite my occasional cantankerousness, I do appreciate the core of scientific interest around.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-86209186660770931362010-10-21T17:53:10.738+11:002010-10-21T17:53:10.738+11:00Al,
Yes, there are obvious adaptions of N-S. Horiz...Al,<br />Yes, there are obvious adaptions of N-S. Horizontal momentum diffusion (viscosity) is ignored, which makes them rather Euler-like. And as you say, special things are done for vertical plumes.<br /><br />But the pressure-velocity coupling is still central. In CAM3, this is described in 3.1.4. I pointed to one set of equations there, but a better complete set is 3.33-3.42. Then as they say, the N-S (or Euler) equations are 3.33,3.34 and 3.37 (they include the energy equation in T as a core equation).<br /><br /><br />The semi-implicit solution in CAM3 is interesting - I learnt a lot by re-reading. They do a lot of manilulations on the variables, set up time-splitting, and transform to a spectral space using spherical harmonics (3.12 etc) as a basis. Still, it's a Poisson solver, and is the core step. I hadn't expected them to couple in temperature - that means that they have identified temp transport (probably vertical) as the next fastest process, and are prepared to wear the cost of a larger matrix inversion to get a longet timestep.<br /><br />The special treatment of plumes is presumably also time-step related. When the atmosphere is stable processes where layers affect one another are relatively slow. So even though the layers are rather thin, a fairly long timestep can be managed. But instability (storms, hurricanes etc) would destroy this. So if it can be taken out of the process by special treatment, the time step can be extended, though I suspect not too far. I'm trying to figure out more about what CAM3 is doing in sec 4, which is relevant to Jeff's inquiry. I;d be glad of any observations that you have.<br /><br />You're right about the removal of viscosity and the introduction of dissipation. But that really means they have an anisotropic viscosity tensor, mainly diagonal, but with two zeroes on the diagonal.<br /><br />Thanks for your comment - I think you are more familiar with practice than I am. I'd be grateful for any more interpretations etc that you have,Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-59304161191624332822010-10-21T16:52:45.053+11:002010-10-21T16:52:45.053+11:00Don't you need thermodynamics equations to pro...Don't you need thermodynamics equations to properly describe condensation? Also, even in the context of the hydrodynamic equations, you need additional terms. <a href="http://www.nwra.com/resumes/schecter/pubs/schecter10_jamc.pdf" rel="nofollow">see for example this</a>.<br /><br />I also don't think these harken back to Stoke's day, do they?<br /><br />Thanks for an interesting post, and I echo Charles A's comment.Carrickhttps://www.blogger.com/profile/03476050886656768837noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-59771173237810247902010-10-21T07:55:45.843+11:002010-10-21T07:55:45.843+11:00Al,
I'm unfortunately off to an early dentist ...Al,<br />I'm unfortunately off to an early dentist appointment - hope to reply in suitable detail in a few hours.Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-21959023334351903612010-10-21T07:54:40.189+11:002010-10-21T07:54:40.189+11:00Charlie,
Thanks. Actually, I must say it is great ...Charlie,<br />Thanks. Actually, I must say it is great to have an audience for talking about science :)Nick Stokeshttps://www.blogger.com/profile/06377413236983002873noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-42229972801472819912010-10-21T03:21:18.769+11:002010-10-21T03:21:18.769+11:00Nick, NSE equations have nearly nothing to do with...Nick, NSE equations have nearly nothing to do with GSMs. This is not only the "funny" terrain-following coordinates, there is much more.<br /><br />The "dynamical core" of GSMs is built on _ideal_ (Eulerian) fluid approximations developed in Meteorology 40 years ago when no reasonable commuters existed. As far I understand, the atmosphere is eventually presented as several 2D layers ("levels") of ideal fluid. The core equations do not have the native molecular viscosity of NSE (there is not single reference to "viscosity"), and therefore the initial motion would be sustained forever, which, combined with inevitable errors of discretization (in physical or spectral domains) would lead to divergent solutions. They avoid this blowing up ("divergence") by re-introducing an artificial dissipation between atmospheric layers, so the models would run "stable" (sometimes), see "initial divergence damping". <br /><br />Another drawback of this approach is that the vertical component of dynamics does not naturally arise in this scheme, and must be modeled parametrically (see "physics of deep convection"). All this require various tricks/adjustments to maintain various laws of conservation across layers.<br /><br />The other caveat of all this is that the initial inviscous equations have different, reduced set of solutions due to truncation of the term with highest spatial derivative. Re-introduction of effective viscosity at different level does not restore the broken original topology of solutions, so that the long-term behavior of GSM has nothing to do with NSE, and therefore cannot be trusted, no matter how good your solver is or could ever be.Al Tekhasskihttp://www.amazon.com/gp/pdp/profile/A2JLNJXCNFTN97noreply@blogger.comtag:blogger.com,1999:blog-7729093380675162051.post-91458049228175264772010-10-21T02:11:15.436+11:002010-10-21T02:11:15.436+11:00Thanks for participating at The Air Vent, WUWT, an...Thanks for participating at The Air Vent, WUWT, and other skeptical sites. <br /><br />Too many people approach climate blogs with an attitude of "let's win the debate" rather than "let's figure out the science". <br /><br />Your posts (and the responses to them) move the blogs more towards science discussions and away from echo chambers endlessly repeating conspiracy theories.<br /><br />Charlie A.Charliehttps://www.blogger.com/profile/17751567362228199326noreply@blogger.com