Showing posts with label Fluid mechanics. Show all posts
Showing posts with label Fluid mechanics. Show all posts

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

2015/06/22

Navier-Stokes equation for 3D compressible and incompressible flows

In this blog I would like to present the general form of the Navier-Stokes equation for both incompressible and compressible flows. As in most textbooks you may not find the fully expanded forms in 3D, here you have them all collected. For the first look, it might scare you but after breaking it down, it’s all simple. 

Incompressible flow:
  • Frame invariant form:
  • Dimensional form:
The subscripts imply differentiation with respect to the variables. Primes (‘) indicate that the unknowns are dimensional. The system of equations are solvable, since there are 4 equations and 4 unknowns: 

Fully expanded form to 3D coordinates:

Compressible flow:


  • Frame invariant form:

  • Fully expanded form to 3D coordinates:


Resource:
  • Aerodynamics for Engineering Students, Sixth Edition, E.L. Houghton, (etc.)

The equations were typed into Microsoft Office, unfortunately blogger.com does not have a possibility to type equations so I had to make screenshots of them. You may use them freely as you wish. Beware of the fact that there might be minor mistakes in the formulas, although I checked them several times.

2014/04/20

Detached curvilinear shock wave

I would like to first introduce the concept of homoenergetic flow (stationary). In such flows, we have.
Similarly, the flow is homoentropic if. Thus when the flow is homoentropic then the entropy is uniformly distributed in the flow domain. (see in yellow on the figure)

If the flow is homoenergetic and homoentropic, it is automatically barotropic and the Bernoulli constant CB in global. (In 2D flows, it implies that the velocity field is potential, since , they are perpendicular to each other, therefore.

Now, having all these, we can write the Crocco equation:
According to the Crocco equation, any inhomogeneity in the spatial distribution of entropy in the homoenergetic flow immediately leads to vorticity generation.

In the figure you may see the detached shock wave generated at the wedge. The flow in the neighborhood of a nose tip is subsonic (M<1) and then after the intersection of the dashed lines it become supersonic (M>1). 

The value of θmax is an increasing function of Mach number M1. Hence, at the flow around a concave fixed angle θ or the wedge with a fixed apex angle , a detached shock wave with increasing free-stream Mach number at critical M1* will arise. (Detached shock wave arising in a supersonic gas flow.) Further increasing M1, the distance between the detached shock wave and the body as well as the subsonic flow region will increase.

In the region where the shock wave is strong, the constant entropy curves have a larger value than further distance from the apex of the wedge, where the shock is weak. (this assumption is given on the figure)


Reference: Foundations of Fluid Mechanics with Applications - Sergey P. Kiselev, Evgenii Vorozhtsov, Vasily M. Fomin

Peter Deak

2014/03/21

Question - Law of Archimedes

Imagine you have an elevator and we place a bucket filled with water in it. On the surface of the water there is a floating cork, which is in some portion inside the water. What would happen to the cork if the elevator moves up or down? Would it submerge more when moving up, or less when moving down? Or nothing will happen to it's position?
To answer the question we need to consider the Law of Archimedes. If we calculate the total hydrostatic force acting on an immersed body, which is in fact the surface force, we will see that it equals to -G, so it is directed against the gravity force. As a result, its value is equal to the weight of the displaced liquid.
Once the lift generates an increase/decrease in the water's weight, by the acceleration, the displacement force will also be increased/decreased by the same amount. Therefore our body (cork) will stay at the same level in the water.

Archimedes' principle also states that when a body is immersed in a fluid it experiences an upthrust, or apparent loss of weight, equal to the weight of the fluid displaced by the body. Fluid pressure is increasing with depth, which means that there is a greater pressure pushing up on the body from underneath than there is pushing down on it from on top.


Peter Deak


Reference: A.C.Kermode, Mechanics of Flight, 10th edition, pp.25.