Presentation is loading. Please wait.

Presentation is loading. Please wait.

Supplement to I. Theoretical background of CFD

Similar presentations


Presentation on theme: "Supplement to I. Theoretical background of CFD"— Presentation transcript:

1 Supplement to I. Theoretical background of CFD
MN74465: Computational multi-phase flow Supplement to I. Theoretical background of CFD Autumn, 2017 June Kee Min

2 Uniform velocity field (skewed)
(Practice#01) Advection skew to the mesh (1/2) (Problem) Transport equation with convection only UDS (User Defined Scalar) in FLUENT For an arbitrary scalar φk, FLUENT solves the equation Convection term Source term Diffusion term Let k = 1 (one UDS), Гk = 0 (no diffusion), Sφk = 0, to solve the equation. Sample case and data file Uniform velocity field (skewed) Φ=0 θ=45o Φ=1 10x10 uniform grid

3 (Practice#01) Advection skew to the mesh (2/2)
(Result) Distribution of φ for θ = 45o 1st order upwind 2nd order upwind False diffusion

4 (Practice#02) Momentum source term(1/4)
(Problem) Basic idea of IBM* and Topology Optimization (Momentum equation in IBM) * IBM : Immersed Boundary Method Source terms solid (Momentum equation in Topology Optimization) (Inverse permeability) Fluid (γ = 1) Solid (γ = 0)

5 DEFINE_SOURCE( name, c, t, dS, eqn)
(Practice#02) Momentum source term(2/4) Source tern using UDF (User Defined Function) in FLUENT DEFINE_SOURCE( name, c, t, dS, eqn) Argument Type Description symbol name UDF name. cell_t c Index that identifies cell on which the source term is to be applied. Thread *t Pointer to cell thread. real dS[] Array that contains the derivative of the source term with respect to the dependent variable of the transport equation. int eqn Equation number. Function returns real (Source term linearization) Channel flow with obstacle inside (using momentum source term) Wall Outlet Inlet Wall

6 (Practice#02) Momentum source term(3/4)
Rectangular obstacle #include "udf.h" #define LARGE 1.e20 real xmin = -0.5, xmax = 0.5, ymin = -0.5, ymax = 0.5; real udesired = 0., vdesired = 0.; DEFINE_SOURCE(source_u,c,t,dS,eqn) { real source; real uu = C_U(c,t); real xc[ND_ND],xx,yy; C_CENTROID(xc,c,t); xx = xc[0]; yy=xc[1]; if((xx >= xmin && xx <= xmax) &&(yy >= xmin && yy <= xmax)){ source = -LARGE * (uu - udesired); dS[eqn] = -LARGE; } else{ source = 0.; dS[eqn] = 0.; return source; DEFINE_SOURCE(source_v,c,t,dS,eqn) real vv = C_V(c,t); C_CENTROID(xc,c,t); xx = xc[0]; yy = xc[0]; source = -LARGE * (vv - vdesired); (Streamline) (Velocity vector)

7 (Practice#02) Momentum source term(4/4)
Circular obstacle #include "udf.h" #define LARGE 1.e20 real radi = 0.5, rx = 0., ry = 0.; real udesired = 0., vdesired = 0.; DEFINE_SOURCE(source_u,c,t,dS,eqn) { real source; real uu = C_U(c,t); real xc[ND_ND],xx,yy,rr; C_CENTROID(xc,c,t); xx = xc[0]-rx; yy=xc[1]-ry; rr = sqrt(xx*xx+yy*yy); if(rr<=radi){ source = -LARGE * (uu - udesired); dS[eqn] = -LARGE; } else{ source = 0.; dS[eqn] = 0.; return source; DEFINE_SOURCE(source_v,c,t,dS,eqn) real vv = C_V(c,t); if(rr<radi){ source = -LARGE * (vv - vdesired); (Streamline) (Velocity vector)

8 References for Ch 01 (Classics)
FVM fundamentals S.V. Patankar, Numerical heat transfer and fluid flow, McGraw-Hill, 1980. J.H. Ferziger, M. Peric, Computational methods for fluid dynamics, 3rd ed. Springer, 2002.  SIMPLE  Collocated grid Others D.B. Spalding, “A novel finite difference formulation for differential expressions involving both first and second derivatives,” International Journal for Numerical Methods in Engineering, Vol 4, pp , 1972. C.M. Rhie and W.L. Chow, “A numerical study of the turbulent flow past an isolated airfoil with trailing edge separation,” AIAA J., Vol 21, pp , 1983. B.E. Launder and D.B. Spalding, “The numerical computation of turbulent flows,” Computer Methods in Applied Mechanics and Engineering,” Vol. 3, pp , 1974. M. Lesieur and O. Metais, “New trends in large eddy simulations of turbulence, Ann. Review Fluid Mech., Vol. 28, pp , 1996. P. Moin and K. Mahesh, “Direct numerical simulation: A tool in turbulence research,” Ann. Review Fluid Mech., Vol. 30, pp , 1998.  Upwind scheme  Momentum averaging  Turbulence modeling  LES  DNS

9 8/8 Thank you!


Download ppt "Supplement to I. Theoretical background of CFD"

Similar presentations


Ads by Google