2015/10/19

Weather forecasting with the help of CFD

In this blog, I am intending to present a basic equation of Fluid Mechanics, then give some related views on weather forecasting science with a help of a useful and versatile website. Finally give some hints about METAR, the meteorological "code" used by pilots.

For the sake of simplicity, let's introduce the following equation to lose 90% of the readers of this blog.

The Navier-Stokes equation for compressible fluid
It this form, the body force f has been decomposed, but the mass conservation, equation of state and equation for the conservation of energy is needed.

To write it in an even more general form:
Which written in an expanded form:
where: 









To solve the above equation, one needs to know initial conditions, such as pressure – p(r,t) , temperature – T(r,t) and velocity – V(r,t), which are usually provided.


(more about the equation in another blog: Navier-Stokes 3D fully expanded form)

Weather forecasting is basically the simulation of time-dependent phenomena, the solution of the N-S equation with the help of the known initial conditions. The initial conditions can be density, temperature, (wind) velocity and pressure. With the help of atmospheric models, one can compute meteorological information for future times at given locations and altitudes. The measures are taken from the meteorological ground stations, weather balloons and satellites as well.
Wind forecasting at surface level (Source: www.windyty.com)
Many websites provide such weather information but probably one of the best looking and advantageous is: windyty.com


The site allows you to display the streamlines of wind, temperature profiles, clouds, waves, snow and pressure information about given altitudes. Even more, by clicking to any location, the one can find detailed forecast for that location. Many more info is displayed, as the site is connected to the latest METAR-s measured at certain airports.





What exactly is METAR and how it is used in aviation?
The first thing which might be new on the above picture, under the 'Warsaw' text, is: 'EPWA', which is the ICAO code for Chopin Airport. (Each airport has such identification code but this may be the topic of another blog.) Coming back to the METAR, which is a line of code, made at each meteorological stations on some airports. This is the code that pilots are receiving and this is set into the flight instruments. Looking at EPWA's METAR code:


EPWA 182130Z 23003KT 200V270 6000 -RA BKN049 08/07 Q1017 NOSIG

  1. EPWA
    It starts with the already defines ICAO code of the airport.
  2. 182130Z
    Then follows the day and time: 18th of the month, at 21:30, Z - "zulu", meaning the local time when the measurement was made.
  3. 23003KT 200V270
    This is the average of the surface winds in 10 minute intervals.
    The first three digits are showing the direction of the wind, which in this case is 230° and the next two digits are the velocity, that is 4 knots (KT). MPS - if given in m/s, KMH - if given in km/h-s. (If the wind velocity is greater than 100 knots, it'll be 3-digits long.)
    If during the 10 minutes interval the direction of the wind has changed 60° or more and the wind's velocity is greater than 6 km/h (3kt), then the two boundary directions has to be displayed, in clockwise direction. The letter V (varied) is used to separate these directions. In our case; the wind has changed direction between 200°and 270°.
  4. 6000
    Horizontal visibility given in meters.
  5. -RA
    This section is for the actual weather conditions, given in codes. RA - rain, the negative sign means light rain.
  6. BKN049
    This field is dedicated to the clouds. The first part is the quantity of clouds, given by the numbering system following it. So 08/07 belongs to the BKN - Broken clouds category. The next three digits: 049 is the cloud base altitude in feet: at 4900feet. (
  7. 08/07
    The first two digits are the temperature, the next two are the dew point 
    in degrees.
  8. Q1017
    QNH - 
    barometric pressure adjusted to sea level, given in hectopascals: 1017hPa.
    (1013 mbar = 29.92 inHg = 760 Hgmm = 14.69 PSI)
  9. NOSIG
    Meaning no significant change is expected.
METARs for a given location (Source: windyty.com)

This code can of course change in any conditions, can have more terms, more information, depending on the weather itself. In this blog, I only wanted to present the idea behind it, of course this simple code "METAR" could be a whole course on how to write, interpret it and so on. The website has the feature that it encodes this METAR into a user friendly code, making it available to read by anyone.



I hope this blog helped to understand the compressible N-S equation and gave a useful link to weather forecasting in a fun way. Start exploring for such beautiful and colorful maps.
Pressure at 10km altitude (Source: windity.com)

Resources:
  • John D. Anderson Jr. - Fundamentals of Aerodynamics, Fourth edition, Chapter 15. pp., 2007
  • https://en.wikipedia.org/wiki/Atmospheric_model
  • https://www.windyty.com
  • CFD lectures - dr Jacek Rokicki

2015/10/17

Difference between solids and liquids

Have you ever been asked to define how solids are different from liquids? Is it the density or rather the pressure difference acting on them? Maybe whether the two matters are compressible? Not quite...

The most important difference between solids and liquids, from fluid mechanical point of view, is in its' stresses
When talking about solids; the stresses are depending on the deformation. If one is applying force to an object, it'll have inner stresses generated inside the molecules. If the same force would be applied to a liquid, it will probably not generate anything, and will not affect much the state. In case of liquids, the different source of stresses are achieved by the velocity of deformation.

One can write the constitutive equation, for a Newtonian fluid:
Where: T - stress tensor, I - identity matrix, μ - viscosity term
D - divergence of velocity / deformation velocity tensor, expressed as:
The reason, why liquids flow lies in the above equation. The stress does not depend on deformation but depends on deformation of  velocity. In all kinds of fluids (except for superfluids), any change in deformation increases the viscous forces within the matter, due to the friction between the adjacent particles. The stress state tensor is describing these stress changes at any point of the fluid domain.


Resources:
  • https://en.wikipedia.org/wiki/Strain_rate_tensor
  • http://www.zmescience.com/research/shear-difference-liquid-solid-0549123/
  • Computational Fluid Dynamics lecture - dr Jacek Rokicki