http://www.nd.edu/~gtrggva/cfd-course/ Computational Methods or Domains with Comple Boundaries-I Grétar Trggvason Spring For most engineering problems it is necessar to deal with comple geometries, consisting o arbitraril curved and oriented boundaries Outline Grid Generation How to deal with irregular domains Overview o various strategies Boundar-itted coordinates - Navier-Stokes equations in vorticit orm - Navier-Stokes equations in primitive orm Grid generation or bod-itted coordinates - Algebraic methods - Dierential methods From: www.imr.sandia.gov/4imr/imr4_short_course.ppt Overview Various Strategies or Comple Geometries and to concentrate grid points in speciic regions Staircasing Originall, rectangular staircasing on rectangular Cartesian grids was used to represent comple boundaries This was ollowed b bod itted grids, the grids are still structured but grid lines are not straight. In commercial codes, unstructured grids have now mostl replaced bod itted grids Regular structured grids are still o interest, particularl when coupled with Adaptive Mesh Reinement (AMR and immersed boundaries Approimate a curved boundar b a the nearest grid lines
Unstructured Grids Unstructured versus structured grids structured grids: an ordered laout o grid points. unstructured grids: an arbitrar laout o grid points. Inormation about the laout must be provided Overview Finite Dierence methods on bod itted grids are generall derived b mapping the equations Finite Volume methods are generall derived b using arbitraril shaped control volumes. Boundar-Fitted Coordinates Boundar-Fitted Coordinates Coordinate mapping: transorm the domain into a simpler (usuall rectangular domain. Boundaries are aligned with a constant coordinate line, thus simpliing the treatment o boundar conditions The mathematical equations become more complicated Boundar-Fitted Coordinates (, (, (, (, (, (, First consider the D case: ( (( ( d d d d d d d d d d Boundar-Fitted Coordinates For the irst derivative the change o variables is straightorward using the chain rule: For the second derivative the derivation becomes considerabl more comple:
Boundar-Fitted Coordinates The second derivative is given b d d d d d d d d d d d d d d d d d d d d Where we have used the epression or the ist derivative or the inal step. However, since the equations will be discretized in the new grid sstem, it is important to end up with terms like /, not /. d d d d d d d d d d d d d d + d d d d d d d d d d d d + d d d d d d d d d d + d d d d Boundar-Fitted Coordinates To do so, we look at the second derivative in the new sstem d d d d d d d d d d d d d d d d d d d d d d d d + d d d d d d d d d d d d + d d d d d d d d + d d d d d d Solving or the original derivative (which is the one we need to transorm we get: d d d d d d d d d d d d d d d d d d B the chain rule we have d d d d d d Boundar-Fitted Coordinates Oten we need the derivatives o the transormation itsel: d d d d For the second derivative we dierentiate the above: d d d d d d d d d d + d d d d d d d d d d + d d d d Giving: Boundar-Fitted Coordinates D: First Derivatives Change o variables (, ( (,, (, (, The equations will be discretized in the new grid sstem (,. Thereore, it is important to end up with terms like /, not /. d d d d d d d d d d d d d d d d d d Boundar-Fitted Coordinates We want to derive epressions or /, / in the mapped coordinate sstem. Using the chain rule, as we did or the D case: + + Boundar-Fitted Coordinates Solving or the derivatives + + Subtracting + +
,, Solving or the original derivatives ields: where is the acobian. Boundar-Fitted Coordinates A short-hand notation: Boundar-Fitted Coordinates ( ( Rewriting in short-hand notation where is the acobian. Boundar-Fitted Coordinates These relations can also be written in conservative orm: Boundar-Fitted Coordinates Since: + And similarl or the other equation The second derivatives is ound b repeated application o the rules or the irst derivative Similarl D: Second Derivatives Boundar-Fitted Coordinates Adding and ields an epression or the aplacian: + Boundar-Fitted Coordinates
+ Boundar-Fitted Coordinates ( ( ( ( + where Boundar-Fitted Coordinates + q q q + q + q + + q q + q + q + q q Boundar-Fitted Coordinates Epanding the derivatives ields ( q q + q + ( + ( where [ ( + q + q ] [ ( + + q q ] + + Derivation o i hence similarl Boundar-Fitted Coordinates + ( ( Boundar-Fitted Coordinates Putting them together, it can be shown that (prove it [ q ( + q ( ] q [ q ( + q ( ] q Boundar-Fitted Coordinates We also have, or an unction and g g g ( g g
Boundar-Fitted Coordinates A comple domain can be mapped into a rectangular domain where all grid lines are straight. The equations must, however, be rewritten in the new domain. (, (, (, (, Thus: ( ( And more comple epressions or the higher derivatives Vorticit-Stream Function Formulation Vorticit-Stream Function Formulation Vorticit-Stream Function Formulation The Navier-Stokes equations in vorticit orm are: ω t + ψ ω ψ ω ν ω ψ ω Using the transormation relations obtained earlier, The Navier-Stokes equations in vorticit orm become: ω t + (ψ ω ψ ω ν ( q ω q ω + q ω + ( ω + ( ω ( q ψ q ψ + q ψ + ( ψ + ( ψ ω q + q + q + Boundar Conditions Inlow Vorticit-Stream Function Formulation Δ Δ : Inlow N : Outlow, M : No slip ψ Q ψ Q ud vd Outlow ( dψ ψ ψ ower wall Vorticit-Stream Function Formulation Stream unction: ψ Vorticit: (no-slip ψ (, ψ (, + ψ (, + ψ (, + HOT Using that + ω(, ψ (, We have: ω(, + [ ψ(, ψ(, ]
Upper wall M Vorticit-Stream Function Formulation Stream unction: ψ Q Vorticit: M Q (ud vd dψ ψ M ψ ω(,m + [ ψ(,m ψ(,m ] Inlet low Vorticit-Stream Function Formulation ( Considering a ull-developed parabolic proile u(, C( 6Q + d C C Q C( 6 6Q u u (, ( ω 6Q Q( ( d Q Inlet low Vorticit-Stream Function Formulation ( Considering a ull-developed parabolic proile and assume that M 6Q u(, M M ψ, Q M M Q ω M (, 6 Outlow Vorticit-Stream Function Formulation ( N Tpicall, assuming straight streamlines ψ n I is normal to the outlow boundar, this ields ψ ψ I not, then a proper transormation is needed or n