You are on page 1of 10

CERN Intensive Course on CFD

1st, March 2007

Hands on computer session:

5. Back facing step


[Time: 1 h 30] Objects
choice of computational domine; accuracy of low order scheme on ne grids; steady and unsteady approach for steady-state solution; 2D and 3D model comparison.

Physical problem
Flow over a backward facing step; isothermal and stratied mixed convection problem; tree dimensional ow structures.

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

Case 1: 2D isothermal ow over backword facing step


channel height step height channel lenght average inlet velocity Reynolds number uid adimensional density uid adimensional viscosity Nondimensional data H=1 s = 0.5 L = 15 and L = 30 u=1 Re = 800 (ref ) = 1 = 1/Re

Worksheet
Mesh generation mesh.7a: uniform mesh 90x16x1 cells for domine with L=15 mesh.7b: uniform mesh 180x16x1 cells for domine with L=30 mesh.7c: uniform mesh 180x32x1 cells for domine with L=15 use symmetry B.C. to set up a bidimensional simulation use of BCDEFI user subroutine to dene the fully developed velocity prole at the inlet u = 24y(0.5 y) use Wall B.C.(no-slip and adiabatic option) at the top and bottom walls steady state simulation at Ra=800 (UD,MARS) verify that a transient simulation is necessary to reach the steady state solution at Ra=800 with MARS ccalculation of the reattachement lenth for the two dierent domine lenght for variation of dierencing scheme for dierent renement grid Computational domain choice, with particular regard to outlet boundary position, mai be a critical point for the open boundary ow accuracy

Boundary conditions

Solution method

Results

Comments

Case 2: 3D isothermal ow over backword facing step


channel height channel with step height channel lenght average inlet velocity Reynolds number uid adimensional density uid adimensional viscosity Nondimensional data H=1 W =5 s = 0.5 L = 15 u=1 Re = 800 (ref ) = 1 = 1/Re

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

Worksheet
Mesh generation Boundary conditions use symmetry on midplane y=0 to reduce the computational domain uniform mesh 90x16x20 cells use symmetry B.C. on plane y=0 use of BCDEFI user subroutine to dene the fully developed velocity prole at the inlet u = 1.61(1(|Y 0.25|/o.25) 2 )(1Z/2.5)1???????? 3.6) use Wall B.C.(no-slip) at bounding walls verify that a transient simulation is necessary to reach the steady state solution at Re-800 uses traces to represent streamlines analisys of the three dimensional structures calculation of the reattachment lenght along the domine width 2D trasverse vortices, in wall bounded ow, always induce secondary vortices at sidewalls In transverse vortices, ow curvature at sidewalls increases. Otherwise, in th boundary layer, the pressure gadient would not be balanced by centrifugal acceleration (which decreases, due to velocity reduction in the boundary layer)

Solution method Results

Comments

Case 3: 2D stratied ow over backward facing step


bottom wall tamperature top wall temperature Reynolds number Froude number uid density Ref. Reynolds number uid adimensional viscosity specic heat conducivity Dimensional data Th = 263.15K Tc = 323.15K Re = 800 F r = Re2 /Gr = 16/9 (ref ) = 1.19Kg/m 3 Re = 800 = 1/Re cp = 1003.63J/KgK k = 0.02637W/mK

Worksheet
Mesh generation Boundary conditions use nest mesh from Case1 (mesh.5c): uniform mesh 90x16x1 cells for domain with L=15; use symmetry B.C. to setup a bidimensional simulation use Wall B.C. (no slip) and xed temperature at the top and bottom walls use of BCDEFI user subroutine to dene the fully developed velocity prole at the inlet u = 24y(0.5 y) and T = 263.15 + 120.0y use Bousinesque approximation (isobaric density option) and T = 263.15 + 120.0y choice of the reference temperature (T ref = (Tc = Th )/2) and volumet1 ric expansion coecient /beta (/beta = T ref )

Therm. model

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD 1st, March 2007 Solution method transient solution at Re-800 with MARS Attention in order to have Fr=16/9 , a new value of gravity acceleration can be calculated to obtain the correct Gr number (g = 232.77m/s 2 ) in order to mantain Re=800 using the same mesh in such dimensional problem you may scale the dimension unit (scale factor 0.012) Results analysis of ow and thermal eld and comparison to the isothermal ow calculation and comparison of the reattachment length Comments Even n apparently quiet and stable conguration, such as stratied ow with cold air at the bottom and hot air at the top, natural convection eect can have a signicant impact in mixed convection ow Stratied backward facing step ow shows a more dened wavy streamline pattern, with respect to isothermal ow

References
Garting, D.K., (1990), A test problem for outow boundary conditions-ow over a backward-facing step, Int. J. Numer. Meth. Fluids, 90, 953-967. Nonino, C., and Croce G., (1997), An equal-order velocity-pressure algorithm for incompressible thermal ows, part 2: validation, Number. Heat Tranfer, 35, 17-35. Nonino, C., Comini, G., Croce G., (1999), Three-dimensional ow over backward facing steps, Int. J. Number. Meth. Heat & Fluds Flow, 24, 322-333.

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

Reference results

Figure 1: Isothermal ow, primary reatachement length. Nonino and Croce (1999)

Figure 2: Isothermal ow, stream lines. Nonino and Croce (1999)

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

Some results

Figure 3: Flow eld stratied step, Re=800

Figure 4: Example of shear force component in X direction vs. X coordinate in 2D

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

BCDEFI user subroutine: Isothermal cases 2D and 3D


C************************************************************************* SUBROUTINE BCDEFI(SCALAR,U,V,W,TE,ED,T,DEN,TURINT,RSU,V2P,F2P) C Boundary conditions at inlets C************************************************************************* C* C STAR VERSION 3.24.000 * C* INCLUDE comdb.inc COMMON/USR001/INTFLG(100) DIMENSION SCALAR(50),RSU(6) LOGICAL TURINT INCLUDE usrdat.inc DIMENSION SCALC(50) EQUIVALENCE( UDAT12(001), ICTID ) EQUIVALENCE( UDAT04(002), DENC ) EQUIVALENCE( UDAT04(003), EDC ) EQUIVALENCE( UDAT02(005), PR ) EQUIVALENCE( UDAT04(005), PRC ) EQUIVALENCE( UDAT04(009), SCALC(01) ) EQUIVALENCE( UDAT04(007), TC ) EQUIVALENCE( UDAT04(008), TEC ) EQUIVALENCE( UDAT04(059), UC ) EQUIVALENCE( UDAT04(060), VC ) EQUIVALENCE( UDAT04(061), WC ) EQUIVALENCE( UDAT04(064), UCL ) EQUIVALENCE( UDAT04(065), VCL ) EQUIVALENCE( UDAT04(066), WCL ) EQUIVALENCE( UDAT02(070), X ) EQUIVALENCE( UDAT02(071), Y ) EQUIVALENCE( UDAT02(072), Z ) C C C This subroutine enables the user to specify INLET boundary C conditions for U,V,W,TE,ED,T and SCALAR. C C Set TURINT=.TRUE. if turbulence intensity and length scale are C specied as TE and ED respectively C Set TURINT=.FALSE. if k and epsilon are specied as TE and C ED respectively C C ** Parameters to be returned to STAR: U,V,W,TE,ED,T, C SCALAR, DEN, TURINT C C NB U,V and W are in the local coordinate-system of the C inlet boundary. C C Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD C C Sample coding: To specify inlet values for region 1 C IF(IREG.EQ.1) THEN TURINT=.FALSE. U=24*y*(0.5-y) !2D C U=1.61*(1-(abs(Y-0.25)/0.25)**2)*(1-(abs(Z)/2.5)**13.6) !3D V=0.0 W=0.0 C TE=0.0 C ED=0.0 C T=0.0 C SCALAR(1)=0.0 DEN=1.0 ENDIF CRETURN END

1st, March 2007

BCDEFI user subroutine: Stretiedow, scale factor for model unit 0.012
C************************************************************************* SUBROUTINE BCDEFI(SCALAR,U,V,W,TE,ED,T,DEN,TURINT,RSU,V2P,F2P) C Boundary conditions at inlets C************************************************************************* C* C STAR VERSION 3.24.000 * C* INCLUDE comdb.inc COMMON/USR001/INTFLG(100) DIMENSION SCALAR(50),RSU(6) LOGICAL TURINT INCLUDE usrdat.inc DIMENSION SCALC(50) EQUIVALENCE( UDAT12(001), ICTID ) EQUIVALENCE( UDAT04(002), DENC ) EQUIVALENCE( UDAT04(003), EDC ) EQUIVALENCE( UDAT02(005), PR ) EQUIVALENCE( UDAT04(005), PRC ) EQUIVALENCE( UDAT04(009), SCALC(01) ) EQUIVALENCE( UDAT04(007), TC ) EQUIVALENCE( UDAT04(008), TEC ) EQUIVALENCE( UDAT04(059), UC ) EQUIVALENCE( UDAT04(060), VC ) EQUIVALENCE( UDAT04(061), WC ) EQUIVALENCE( UDAT04(064), UCL ) EQUIVALENCE( UDAT04(065), VCL ) EQUIVALENCE( UDAT04(066), WCL ) EQUIVALENCE( UDAT02(070), X ) EQUIVALENCE( UDAT02(071), Y ) Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD EQUIVALENCE( UDAT02(072), Z ) C C C This subroutine enables the user to specify INLET boundary C conditions for U,V,W,TE,ED,T and SCALAR. C C Set TURINT=.TRUE. if turbulence intensity and length scale are C specied as TE and ED respectively C Set TURINT=.FALSE. if k and epsilon are specied as TE and C ED respectively C C ** Parameters to be returned to STAR: U,V,W,TE,ED,T, C SCALAR, DEN, TURINT C C NB U,V and W are in the local coordinate-system of the C inlet boundary. C C C C Sample coding: To specify inlet values for region 1 C IF(IREG.EQ.1) THEN TURINT=.FALSE. C U=166666.67*y*(0.006-y) U=24*y/0.012*(0.5-y/0.012) V=0.0 W=0.0 C TE=0.0 C ED=0.0 T=263.0+120.0*(y/.012) !T of bottom wall 263.15K, 120K=2(Ttop-Tbottom) C SCALAR(1)=0.0 DEN=1.0 ENDIF CRETURN END

1st, March 2007

Centro Interdipartimentale di Fluidodinamica e Idraulica

CERN Intensive Course on CFD

1st, March 2007

MACROS
!****************** !shear-step-2D.MAC* !****************** ! !***extraction of X componet of the shear force on the bottom wall for reattachement lenght evaluation ! csys 1 sens dele all memo maxprb 1000 greset y getw,SFX cave, all gpost,points,nomap,180,1,0,-0.5,0,15.0,-0.5,0 frame,1,xreg,init,2 frame,1,xtitle,4.3,1.5 X LOCATION frame,1,yreg,init,9 frame,1,ytitle,0.5,5.5 SFX term,,X gdraw,1

Centro Interdipartimentale di Fluidodinamica e Idraulica

10

You might also like