CFDm 2.5.Boundary Conditions

From KratosWiki
Revision as of 17:48, 3 October 2013 by Pablo (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Since there are two different variables in the fluid simulation problem, we can group them as follows:

  • Velocity Boundary Conditions
  • Pressure Boundary Conditions


Velocity Boundary Conditions

To clarify the possible boundary conditions in a fluid problem, a typical example is analized. A rigid body inside a fluid domain is simulated with an input current on the left wall as in the folllowing picture.

Domain streamlines.png

Slip Boundary Conditions

An critical point, both in real experiments (wind tunnels) and in CFD is measuring effectively the desired variable (such as aerodynamic drag) without the influence of surrounding bodies. Therefore it is important the the upper and lower walls distort the flow as little as possible. If the velocity was imposed to zero in these walls, the flow would be modified severily and therefore the forces obtained would not represent the body in a free current. Therefore a different condition must be selected. The most common BC for these cases is imposing the impeneatrability condition, that is, the fluid cannot pass through a wall. Mathematically speaking, that is:

Domain slip.png  v . \hat n = 0

where  \hat n is the normal to the surface

This allows for the flow to be undisrupted when it is flowing parallel to the wall but also mantains the solution stable by not creating artificial fluid inlets or outlets.

Applying Slip BC in GiD

In the menu Fluid -> Boundary Conditions -> Is Slip select the correct group. Notice that they must be lines in 2D or surfaces in 3D

Is slip menu.png

Dirichlet Conditions

If the value of the velocity is imposed on the selected boundaries to have a fixed value, the condition is known as Dirichlet Boundary Condition . Based on this definition, they can be applied in the following scenarios:

  • Inlet Velocity : By setting a fixed velocity in a boundary, it is possible to create conditions inside the domain as if it was a wind tunnel with an exact inlet velocity. Supposing the figure below is a body surrounded in a fluid domain Ω , the inlet velocity would be set in ΓD

Domain inlet2.png v = V(x,t)     \forall x   \in   \Gamma_D

  • Fixed Wall velocities : The velocity of a viscous fluid in a point that is infinitesimally close to a wall, must be the same the one in the wall. This phenomena is known as the no slip condition and could be, at a first glance, the most realistic condition to apply on solids walls since it follows experimental observations. Notice that despite the imposed velocity is zero, it is simply a particular case of the previous condition. So actually all Dirichlet Velocity condition can be merged into the same group and just changing the function v = V(x,t)

Domain noslip.png v = 0     \forall x   \in   \Gamma_{D0}

Applying No Slip BC in GiD

In the menu Fluid -> Boundary Conditions -> select the option Inlet velocity or No Slip . Then write the 3 components of the velocity. Notice that they must be lines in 2D or surfaces in 3D

Fixed velocity menu.png

Limitations of the no slip BC

Despite this condition matches the behaviour of fluids in the real world, its direct application in the discretized domain would lead to inaccurate results when an exact computation of the forces of a body inside a fluid is required; In most practical applications it is not possible to simulate the geometry with enough detail to capture the strong velocity gradients in the boundary layer and therefore an important amount of information is lost. The following example is the result obtained when a coarse mesh is used (two linear elements are visible). Notice that the shear stress depends on the gradient of the velocity respect to y.

Boundary layer2.png  \tau = \mu \left.\frac{\partial u}{\partial y}\right|_{y = 0}~~.

In the picture above it is clear that both the gradient of the velocity (difference between the blue and red lines) and the mass flow (difference in light blue) are not correctly represented due to the coarse discretization. This means that the forces on the body and the fluid behaviour would be strongly mesh dependant, leading to estimations that cannot be trusted. Since it is normally not possible to run examples with a mesh sufficiently fine enough to capture all the complex phenomena happening inside the boundary layer, an alternative approach has to be taken to obtain better results.

Wall Law

To overcome the shortcomings of the no slip BC in the simulation of bodies whose boundary layer cannot be captured by the mesh, the Law of the wall provides an alternative that leads to more accurate results. By supposing an velocity profile in the scale that is below the size of the elements, a shear stress is calculated and added to the momentum equation and the system is solved this way. The obtained velocity at the boundary nodes is not zero but the result of the energy loss due to the viscosity.

Wall law.png

Applying the Wall Law BC in Gid

Go to the menu Fluid -> Boundary Conditions -> Wall Law. Select the desired boundary of the domain and the wall law value.

Wall law menu.png

Pressure domain.png

Pressure Boundary Conditions

Due to the structure of the coupled velocity-pressure system of the Navier-Stokes equations, in principle pressure boundary conditions are not needed, since they are weakly imposed as Neumann BC at the boundaries.

However, there is a different scenario when a segregated pressure-velocity scheme is used such as the Fractional Step. This method consists on solving separately (staggered) the velocity unknonwns and the pressure, leading to system of equations that are better conditioned for the solvers. An intereseting feature of the pressure system is that its shape is similar to the one of heat diffusion (a laplacian):

\nabla \cdot (K \nabla p )= \nabla . \hat V  \qquad \text{where} \qquad \hat V \qquad \text{is known}

Just as it happens in the diffusion problem, the new pressure equation obtained in the fractional step formulation requires the pressure to be fixed at least in one point of the domain. Therefore a wise choice is to choose the outlet of the flow as a Dirichlet Boundary Condition for the pressure, fixing it in all the nodes that are part of the outflow surface. (On the other hand, imposing the pressure even when a monolitic solver is used, does not affect the convergence of the solution)

Applying the Pressure BC in Gid

Go to the menu Fluid -> Boundary Conditions -> Outlet pressure.

Pressure menu.png

Personal tools