Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

33
Setting and Usage of OpenFOAM multiphase solver(SCLSVOF) Graduate school of Engineering Science Osaka Univ. D1 Takuya Yamamoto 30 th OpenCAE study mee2ng @ Kansai, Japan 2014/05/31

description

 

Transcript of Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Page 1: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Setting  and  Usage  of  OpenFOAM  multiphase  solver(S-‐‑‒CLSVOF)

Graduate  school  of  Engineering  Science  Osaka  Univ.  

D1Takuya  Yamamoto

30th  OpenCAE  study  mee2ng  @  Kansai,  Japan  2014/05/31

Page 2: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Improved  solver  of  OpenFOAM  interFoam(VOF)  •  Improved  surface  tension  model(CSF  model)  by  using  re-­‐ini2aliza2on  equa2on  (Level-­‐Set  func2on)  

•  Please  refer  the  previous  presenta2on  (In  Japanese)  

25th  OpenCAE  study  mee2ng  @  Kansai,  Japan 26th  OpenCAE  study  mee2ng  @  Kansai,  Japan

J. U. Brackbill, D. B. Kothe, C. Zemach, J. Comput. Phys. 100 (1992) 335–354. CSF  model VOF C. W. Hirt, B. D. Nichols, J. Comput. Phys. 39 (1981) 201–225.

S-­‐CLSVOF(Simple  Coupled  Volume  Of  Fluid  with  Level  Set)  method

What  is  S-‐‑‒CLSVOF  solver  (sclsVOFFoam)?

Page 3: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Generally Level-­‐Set  method  •  low  volume  preserva2ve  quality  •  Normal  unit  vector  (high  accuracy)

VOF  method  •  high  volume  preserva2ve  quality  •  Normal  unit  vector  (low  accuracy)  

M. Sussman, P. Smereka, S. Osher, J. Comput. Phys. 114 (1994) 146–159.

CLSVOF(Coupled  Volume  Of  Fluid  with  Level  Set)  method

S-­‐CLSVOF(Simple  Coupled  Volume  Of  Fluid  with  Level  Set)  method Simple  coupling

High  accuracy,  however,  slightly-­‐low  volume  preserva2ve  quality

BeWer  than  VOF  method,  High  volume  preserving  quality

What  is  S-‐‑‒CLSVOF  solver  (sclsVOFFoam)?

Page 4: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Specifically    

In  A.  Albadawi  et  al.,  Int.  J.  Mul2phase  Flow,  53,  11-­‐28  (2013).  Implemented  the  S-­‐CLSVOF  method  

What  is  S-‐‑‒CLSVOF  solver  (sclsVOFFoam)?

Page 5: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

0 0 0 0 0

0 0 0 0.1 0.3

0 0 0.5 0.95 1.0

0 0.4 1.0 1.0 1.0

0 0.7 1.0 1.0 1.0

VOF

What  is  S-‐‑‒CLSVOF  solver  (sclsVOFFoam)?

re-­‐ini2aliza2on  Eq. Level-­‐Set  func2on

Page 6: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Version  in  OpenFOAM

•  OpenFOAM-‐‑‒2.0.x•  OpenFOAM-‐‑‒2.1.1•  OpenFOAM-‐‑‒2.1.x

Validated  only  above  versions

Released  site  (solver) hWp://o^kansai.sakura.ne.jp/data/sclsVOFFoam21.tar.gz  

Released  site  (tutorial  case) hWp://o^kansai.sakura.ne.jp/data/sta2c_VOF.tar.gz

hWp://o^kansai.sakura.ne.jp/data/sta2c_SCLSVOF.tar.gz

Page 7: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Usage  (Solver  compilation)

1.  Copy  sclsVOFFoam  solver  to  applica2ons/solvers  (cp  -­‐r  sclsVOFFoam  applica2ons/solvers)  

2.  Change  directory  to  sclsVOFFoam  (cd  sclsVOFFoam)  

3.  Compile(wmake)  4.  Finish  solver  compila2on

Please  type  sclsVOFFoam

Page 8: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Usage  (dam  break)

cp  -­‐r  $FOAM_TUTORIALS/mul2phase/interFoam/laminar/damBreak  .

copy  damBreak  folder

edit  damBreak  folder

1.  Edit  constant/transportProper2es  Add  the  following  commnts  in  transportProper2es  deltaX                    deltaX  [  0  0  0  0  0  0  0  ]  0.01;    2.  Add  psi(Level-­‐Set  func2on)  in  0  folder  (ini2al  condi2on)  (Based  on  alpha1)  cp  -­‐r  0/alpha1  0/psi        3.  Execute  sclsVOFFoam

(deltaX  value  is  the  cell  width  near  interface  posi2on)

Edit  psi(Non-­‐dimension,  Boundary  condi2ons  are  zeroGradient)

Page 9: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Usage  (dam  break)

Change  based  on  interFoam  tutorial  case  1.  In  transportProper2es,  you  must  write  grid  spacing  

(DeltaX).  2.  You  must  define  ini2al  condi2ons  and  boundary  

condi2ons  of  Level-­‐Set  func2on(psi).

Cau;on  •  Boundary  condi2on  for  Level-­‐Set  func2on  have  not  

been  implemented.  (You  can’t  use  fixed  contact  angle.  )  •  You  can  use  only  zero  gradient  for  level  set  func2on.  

Page 10: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Summary

•  Advance  boundary  conditions  of  Level-‐‑‒Set  function  have  not  been  implemented.

•  By  changing  a  tutorial  of  interFoam,  one  can  easily  execute  the  solver.

Page 11: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  If  there  are  something  wrong,  please  send  e-‐‑‒mail  to  me.• Please  correct  my  English!!  • Please  teach  me!!

[email protected]

E-­‐mail  address

Page 12: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

References

1.  G. Tryggvason, R. Scardovelli and S. Zaleski, Direct Numerical Simulations of Gas-Liquid Multiphase Flows, Cambridge University Press, Cambridge 2011.

2.  C. W. Hirt, B. D. Nichols, J. Comput. Phys. 39 (1981) 201–225.

3.  J. U. Brackbill, D. B. Kothe and C. Zemach, J. Comput. Phys. 100 (1992) 335–354.

4.  A. Albadawi et al., Int. J. Multiphase Flow 53 (2013) 11-28. 5.  M. Sussman, P. Smereka and S. Osher, J. Comput. Phys. 114

(1994) 146–159.

Page 13: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Page 14: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Support  Documentation

Page 15: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Governing  EquationsNavier-‐‑‒Stokes  Eq.

Advection  of  α

interFoam  (VOF)

sk

gPt

δσ

ρν

σ

σ

nF

Fvvvv

=

++∇+−∇=∇⋅+∂

∂ 2

::  liquid  phase  ::  interface  ::  gas  phase

1=α

0=α10 <<α

Fluid  phase    Gas  phase

( ) 0=⋅∇+∂

∂ltvαα

( ) 0=⋅∇+∂

∂ vααt

( )( ) 01 =−⋅∇+∂

∂gtvα

α

Subscripts  l,  g  represent  liquid  and  gas  phase

( )

glr

gl

vvv

vvv

−=

−+= αα 1Defini;on

ρ =αρl + (1−α)ρgµ =αµl + (1−α)µg

( ) 0=⋅∇+∂

∂ vααt

CSF  model

Page 16: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

sk

gPt

δσ

ρν

σ

σ

nF

Fvvvv

=

++∇+−∇=∇⋅+∂

∂ 2

::  liquid  phase  ::  interface  ::  gas  phase

1=α

0=α10 <<α

( ) ( )( ) 01 =−⋅∇+⋅∇+∂

∂rtvv ααα

α

In  alphaEqn.H,  the  defini2on  is  wriWen.  

∂α∂t

+∇⋅ αv( ) = 0 This  term  works  only  interface  area  because  (1-­‐α)α is  included.

ρ =αρl + (1−α)ρgµ =αµl + (1−α)µg

interFoam  (VOF)

•  Governing  EquationsNavier-‐‑‒Stokes  Eq.

Advection  of  α

Page 17: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

S-‐‑‒CLSVOF  method

∂v∂t+v ⋅∇v = −∇P +ν∇2v +Fσ + ρg

::  liquid  phase  ::  interface  ::  gas  phase

1=α

0=α10 <<α

Level-­‐Set  func2on  φ φ0 = (2α −1) ⋅ΓΓ  ;  non-­‐dimension  number

Γ = 0.75ΔxΔx  ;  non-­‐dimension  number

∂φ∂τ

= S(φ0 ) 1− ∇φ( )φ x, 0( ) = φ0 x( )

Re-­‐ini2aliza2on  equa2on ∂α∂t

+∇⋅ αv( ) = 0

∇φ

Itera2on  number  φcorr φcorr =

εΔτ

ε =1.5ΔxInterface  width  ε

ρ =αρl + (1−α)ρgµ =αµl + (1−α)µg

α∇

Schema2c

•  Governing  EquationsNavier-‐‑‒Stokes  Eq.

Advection  of  α

Page 18: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

∂v∂t+v ⋅∇v = −∇P +ν∇2v +Fσ + ρg

::  liquid  phase  ::  interface  ::  gas  phase

1=α

0=α10 <<α

Fσ =σ kδ∇φCSF  model

k = −∇⋅n f = −∇⋅∇φ( ) f

∇φ( ) f +δ

$

%&&

'

())

∂α∂t

+∇⋅ αv( ) = 0

Dirac  func;on  δ

δ φ( ) = 0

δ φ( ) = 12ε

1+ cos πφε

!

"#

$

%&

!

"#

$

%&

φ > ε

φ ≤ ε

Heaviside  func;on  H H φ( ) = 0

H φ( ) = 121+ φ

ε+1πsin πφ

ε

!

"#

$

%&

!

"#

$

%&

H φ( ) =1

Curvature

ρ =αρl + (1−α)ρgµ =αµl + (1−α)µg

•  Governing  EquationsNavier-‐‑‒Stokes  Eq.

Advection  of  α

S-‐‑‒CLSVOF  method

Page 19: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Governing  EquationsNavier-‐‑‒Stokes  Eq.

Advection  of  α

∂v∂t+v ⋅∇v = −∇P +ν∇2v +Fσ + ρg

::  liquid  phase  ::  interface  ::  gas  phase

1=α

0=α10 <<α

∂α∂t

+∇⋅ αv( ) = 0

H φ( ) = 0

H φ( ) = 121+ φ

ε+1πsin πφ

ε

!

"#

$

%&

!

"#

$

%&

H φ( ) =1

ρ =αρl + (1−α)ρgµ =αµl + (1−α)µg

ρ = Hρl + (1−H )ρgµ = Hµl + (1−H )µg

In  A. Albadawi et al. (2013), no  physical  proper2es  are  updated.

φ < −ε

φ ≤ ε

φ > ε

Heaviside  func;on  H

S-‐‑‒CLSVOF  method

Page 20: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Ex.1(Bubble  in  Cavity)

0.1  m

0.1  m

0.5  m/s

0.02  m

liquid  1

liquid  2

Physical  Proper;es  Dynamic  viscosity 1.0  x  10-­‐3  m2/s  Surface  tension  10  mN/m 

Purpose  Deforma2on  by  shear  stress  (No  Buoyancy  flow  Same  physical  proper2es  area  used  in  both    liquid  1  and  liquid  2)

Calc.1  interFoam  (VOF)  Calc.  2  sclsVOFFoam(S-­‐CLSVOF)

Numerical  Grid  200  x  200  (x,  y  direc2on)

x

y

Page 21: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Calc.1(Bubble  in  Cavity)

VOF S-­‐CLSVOF Ini;al  condi;on

Page 22: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Calc.1(Bubble  in  Cavity)VOF S-­‐CLSVOF

Page 23: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Calc.  2(Dam  Break)0.584  m

0.584  m

0.048  m

0.292  m

0.292  m

0.1461  m

phase  1  Dynamic  viscosity 1  x  10-­‐6  m2/s  Density  1000  kg/m3

phase  1

phase  2

phase  2  Dynamic  viscosity 1.48  x  10-­‐5  m2/s  Density  1  kg/m3

Surface  tension 70  mN/m  

Page 24: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

VOF S-­‐CLSVOF

Calc.  Time  about  1.3  2mes  longer  in  S-­‐CLSVOF

Calc.  2(Dam  Break)

Page 25: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

VOF S-­‐CLSVOF

0.2  s 0.2  s 0.3  s 0.3  s

0.4  s 0.4  s 0.5  s 0.5  s

Calc.  2(Dam  Break)

Page 26: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Laplace  Pressure

•  Verification (A. Albadawi et al.(2013))

Laplace  PressureLaplace  Pressure  is  shown  as  following  equation.

Δp = γ 1R+1R '

!

"#

$

%&

Δp = p0in − p∞

out p0in

p∞out

Pressure  in  bubble

Pressure  at  outside  of  bubble

Compare  the  numerical  and  analy2cal  pressures

M. M. Francois et al., J. Comput. Phys., 213, 141-173 (2006).

Page 27: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Verification  problem  1

•  Numerical  domain

Δpexact = γ1R+1R '

!

"#

$

%&= 2

Δp = p0in − p∞

out

p0in

p∞out

Pressure  at  the  bubble  center

Pressure  at  wall

uniform  spacing  grid  DX  =  0.001  m  (Fine)              =  0.0005  m  (Coarse)

0.05  m

0.05  m

0.01  m

Laplace  pressure(Theory)

Physical  Proper;es  γ  0.01  N/m  

Laplace  pressure  (Calc.)

ρg  1  kg/m3  

µg  10-­‐5  kg/(ms)  ρl  1000  kg/m3  

µl  10-­‐3  kg/(ms)  

gas

liquid zero  gravity  condi;on  

calc.  ;me  0.1  sec.    (Δt  =  1x10-­‐5  sec.  (Coarse))  (Δt  =  5x10-­‐6  sec.  (Fine))  

rela;ve  pressure  error  E0  

E0 =Δp−ΔpexactΔpexact

Page 28: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Laplace  Pressure  (VOF)  

•  Result  (VOF(Coarse))

black  line  (alpha  =  0.5)

Page 29: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Result  (VOF(Fine))

Laplace  Pressure  (VOF)  

black  line  (alpha  =  0.5)

Page 30: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Results  (E0,  VOF)

CAlpha 0 1 2

VOF  (Coarse) 25.17 25.23 25.38

VOF  (Fine) 19.34 19.29 19.05

Δpexact = γ1R+1R '

!

"#

$

%&= 2

Δp = p0in − p∞

out

p0in

p∞out

E0 =Δp−ΔpexactΔpexact

E0  depending  on  CAlpha

Laplace  pressure(Theory)

Laplace  pressure  (Calc.)

Pressure  at  the  bubble  center

Pressure  at  wall

rela;ve  pressure  error  E0  

Page 31: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Result  (SCLSVOF(Coarse))

Laplace  Pressure  (S-‐‑‒CLSVOF)  

black  line  (alpha  =  0.5)

Page 32: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

•  Result  (SCLSVOF(Fine))

Laplace  Pressure  (S-‐‑‒CLSVOF)  

black  line  (alpha  =  0.5)

Page 33: Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)

Results  (E0,  S-‐‑‒CLSVOF)

E0  depending  on  CAlpha CAalpha 0 1 2

VOF  (Coarse) 25.17 25.23 25.38

VOF  (Fine) 19.34 19.29 19.05

SCLSVOF  (Coarse) 1.557 0.1749 1.752

SCLSVOF  (Fine) 1.496 1.210 0.9390

Δpexact = γ1R+1R '

!

"#

$

%&= 2

Δp = p0in − p∞

out

p0in

p∞out

E0 =Δp−ΔpexactΔpexact

Laplace  pressure(Theory)

Laplace  pressure  (Calc.)

Pressure  at  the  bubble  center

Pressure  at  wall

rela;ve  pressure  error  E0