SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
Customiza*on	
  of	
  LES	
  turbulence	
  	
  model	
  
in	
  OpenFOAM	
yotakagi77	
  
Open	
  CAE	
  Local	
  User	
  Groups	
  in	
  Japan	
  
@Kansai	
  
June	
  13,	
  2015,	
  Osaka	
  University
Agenda	
•  Basic	
  informa*on	
  on	
  turbulence	
  model	
  
•  Tensor	
  mathema*cs	
  
•  Exercise	
  1:	
  Compiling	
  and	
  execu*on	
  of	
  WALE	
  
model	
  
•  Exercise	
  2:	
  Implementa*on	
  of	
  coherent	
  
structure	
  Smagorisky	
  model	
  
•  Addi*onal	
  works	
  
Basic	
  informa*on	
  on	
  turbulence	
  model	
  
Turbulent	
  flow	
  simula*on	
DNS	
 LES	
 RANS	
Modeling	
 No	
 Subgrid	
  scale	
 Reynolds	
  average	
Accuracy	
 ◎	
 ○	
 △	
Cost	
 ×	
 ○	
 ◎	
Vortex	
  (eddy)	
  field	
 Reynolds	
  average	
 4
Turbulent	
  flow	
  simula*on	
DNS	
 LES	
 RANS	
Modeling	
 No	
 Subgrid	
  scale	
 Reynolds	
  average	
Accuracy	
 ◎	
 ○	
 △	
Cost	
 ×	
 ○	
 ◎	
DNS	
  grid,	
  u	
 Reynolds	
  average	
 5
Turbulent	
  flow	
  simula*on	
DNS	
 LES	
 RANS	
Modeling	
 No	
 Subgrid	
  scale	
 Reynolds	
  average	
Accuracy	
 ◎	
 ○	
 △	
Cost	
 ×	
 ○	
 ◎	
LES	
  grid,	
  u	
  =	
  u	
  –	
  u’	
 Reynolds	
  average	
 6
Turbulent	
  flow	
  simula*on	
DNS	
 LES	
 RANS	
Modeling	
 No	
 Subgrid	
  scale	
 Reynolds	
  average	
Accuracy	
 ◎	
 ○	
 △	
Cost	
 ×	
 ○	
 ◎	
Filtering	
  approach	
 Reynolds	
  average	
 7
Detached-­‐eddy	
  simula*on	
  (DES)	
•  P.	
  R.	
  Spalart	
  (1997):	
  
–  We	
  name	
  the	
  new	
  approach	
  “Detached-­‐Eddy	
  
Simula8on”	
  (DES)	
  to	
  emphasize	
  its	
  dis8nct	
  treatments	
  of	
  
a?ached	
  and	
  separated	
  regions.	
Super-­‐Region	
 Region	
Euler	
  (ER)	
RANS	
  (RR)	
 Viscous	
  (VR)	
Outer	
  (OR)	
LES	
  (LR)	
 Viscous	
  (VR)	
Focus	
  (FR)	
Departure	
  (DR)	
8	
Spalart	
  (2001)
Detached-­‐eddy	
  simula*on	
  (DES)	
•  P.	
  R.	
  Spalart	
  (1997):	
  
–  We	
  name	
  the	
  new	
  approach	
  “Detached-­‐Eddy	
  
Simula8on”	
  (DES)	
  to	
  emphasize	
  its	
  dis8nct	
  treatments	
  of	
  
a?ached	
  and	
  separated	
  regions.	
Super-­‐Region	
 Region	
Euler	
  (ER)	
RANS	
  (RR)	
 Viscous	
  (VR)	
Outer	
  (OR)	
LES	
  (LR)	
 Viscous	
  (VR)	
Focus	
  (FR)	
Departure	
  (DR)	
Spalart	
  (2001)	
9
Coupling	
  with	
  momentum	
  equa*on	
  
through	
  viscosity	
•  RANS	
  
	
  
•  LES	
∂U
∂t
+ ∇⋅ UU( )− ∇⋅ ν+ νt( ) ∇U + (∇U)T
( )( )= ∇p
∂U
∂t
+ ∇⋅ UU( )− ∇⋅ ν+ νSGS( ) ∇U + (∇U)T
( )( )= ∇p
Turbulent viscosity	
Sub-grid scale viscosity	
Only	
  change	
  viscosity!	
10
Significant	
  problem:	
  	
  
difference	
  of	
  filtering	
  (average)	
  approaches	
LES	
  Filtering	
 Reynolds	
  average	
Spa*al	
 Temporal	
Inconsistency	
  at	
  the	
  interface	
  between	
  LES	
  and	
  RANS	
  regions	
11
Standard	
  SGS	
  model	
  in	
  OpenFOAM	
Library	
  name	
 Note	
Smagorinksy	
 Smagorinsky	
  model	
Smagorinksy2	
 Smagorinsky	
  model	
  with	
  3-­‐D	
  filter	
homogeneousDynSmagor
insky	
Homogeneous	
  dynamic	
  Smagorinsky	
  model	
dynLagragian	
 Lagrangian	
  two	
  equa*on	
  eddy-­‐viscosity	
  model	
scaleSimilarity	
 Scale	
  similarity	
  model	
mixedSmagorinsky	
 Mixed	
  Smagorinsky	
  /	
  scale	
  similarity	
  model	
homogeneousDynOneEqE
ddy	
One	
  Equa*on	
  Eddy	
  Viscosity	
  Model	
  for	
  incompressible	
  
flows	
laminar	
 Simply	
  returns	
  laminar	
  proper*es	
kOmegaSSTSAS	
 k-­‐ω	
  SST	
  scale	
  adap*ve	
  simula*on	
  (SAS)	
  model
Standard	
  SGS	
  model	
  in	
  OpenFOAM	
Library	
  name	
 Note	
oneEqEddy	
 k-­‐equa*on	
  eddy-­‐viscosity	
  model	
dynOneEqEddy	
 Dynamic	
  k-­‐equa*on	
  eddy-­‐viscosity	
  model	
spectEddyVisc	
 Spectral	
  eddy	
  viscosity	
  model	
LRDDiffStress	
 LRR	
  differen*al	
  stress	
  model	
DeardorffDiffStress	
 Deardorff	
  differen*al	
  stress	
  model	
SpalartAllmaras	
 Spalart-­‐Allmaras	
  model	
SpalartAllmarasDDES	
 Spalart-­‐Allmaras	
  delayed	
  detached	
  eddy	
  simula*on	
  
(DDES)	
  model	
SpalartAllmarasIDDES	
 Spalart-­‐Allmaras	
  improved	
  DDES	
  (IDDES)	
  model	
vanDriestDelta	
   Simple	
  cube-­‐root	
  of	
  cell	
  volume	
  delta	
  used	
  in	
  
incompressible	
  LES	
  models
Tensor	
  mathema*cs
Tensor	
•  Rank	
  0:	
  ‘scalar’,	
  e.g.	
  volume	
  V,	
  pressure	
  p.	
  
•  Rank	
  1:	
  ‘vector’,	
  e.g.	
  velocity	
  vector	
  u,	
  surface	
  
vector	
  S.	
  Descrip*on:	
  a	
  =	
  ai	
  =	
  (a1,	
  a2,	
  a3).	
  
•  Rank	
  2:	
  ‘tensor’,	
  e.g.	
  strain	
  rate	
  tensor	
  Sij,	
  
rota*on	
  tensor	
  Ωij.	
  	
  
	
  	
  	
  	
  Descrip*on:	
  
	
  	
  
	
T = Tij =
T11 T12 T13
T21 T22 T23
T31 T32 T33
!
"
#
#
#
$
%
&
&
&
Symmetric/an*symmetric	
  tensor	
  	
•  Velocity	
  gradient	
  tensor	
  is	
  decomposed	
  into	
  
strain	
  rate	
  tensor	
  (symmetric)	
  and	
  vor*city	
  
tensor	
  (an*symmetric,	
  skew).	
  	
  
•  In	
  turbulence	
  modeling,	
  Sij	
  and	
  Ωij	
  are	
  usually	
  
used.	
Dij =
∂ui
∂xj
, Sij =
1
2
∂ui
∂xj
+
∂uj
∂xi
"
#
$$
%
&
'', Ωij =
1
2
∂ui
∂xj
−
∂uj
∂xi
"
#
$$
%
&
''
Dij = Sij +Ωij
Opera*ons	
  exclusive	
  to	
  tensors	
  of	
  rank	
  2	
T =
1
2
(T+ TT
)+
1
2
(T− TT
) = symmT+skewT,
trT = T11 +T22 +T33,
diagT = (T11,T22,T33),
T = T−
1
3
(trT)I+
1
3
(trT)I = devT+ hydT,
detT =
T11 T12 T13
T21 T22 T23
T31 T32 T33
OpenFOAM	
  tensor	
  classes	
Opera2on	
 Mathema2cal	
 Class	
Addi*on	
 a	
  +	
  b	
 a	
  +	
  b	
Subtrac*on	
 a	
  –	
  b	
 a	
  –	
  b	
Scalar	
  mul*plica*on	
 sa	
 s	
  *	
  a	
Scalar	
  division	
 a	
  /	
  s	
 a	
  /	
  s	
Outer	
  product	
 a	
  b	
 a	
  *	
  b	
Inner	
  product	
 a	
  ·∙	
  b	
 a	
  &	
  b	
Double	
  inner	
  product	
 a	
  :	
  b	
 a	
  &&	
  b	
Cross	
  product	
 a	
  ×	
  b	
 a	
  ^	
  b	
Square	
 a2	
 sqr(a)	
Magnitude	
  squared	
 |a|2	
 magSqr(a)	
Magnitude	
 |a|	
 mag(a)	
Power	
 an	
 pow(a,	
  n)
OpenFOAM	
  tensor	
  classes	
Opera2on	
 Mathema2cal	
 Class	
Transpose	
 TT	
 T.T()	
Diagonal	
 diag	
  T	
 diag(T)	
Trace	
 tr	
  T	
 tr(T)	
Deviatoric	
  component	
 dev	
  T	
 dev(T)	
Symmetric	
  component	
 symm	
  T	
 symm(T)	
Skew-­‐symmetric	
  
component	
skew	
  T	
 skew(T)	
Determinant	
 det	
  T	
 det(T)	
Cofactors	
 cof	
  T	
 cof(T)	
Inverse	
 inv	
  T	
 inv(T)
Exercise	
  1:	
  Compiling	
  and	
  execu*on	
  of	
  
WALE	
  model	
  
Governing	
  equa*on	
  for	
  incompressible	
  LES	
•  Filtered	
  con*nuity	
  and	
  Navier-­‐Stokes	
  equa*ons	
  
	
  	
  	
  	
  	
  	
  where	
∂ui
∂xi
= 0,
∂ui
∂t
+uj
∂ui
∂xj
= −
1
ρ
∂p
∂xi
+
∂
∂xi
(−τij + 2νSij )
τij = uiuj −uiuj
SGS	
  eddy	
  viscosity	
  model	
•  Decomposi*on	
  of	
  kine*c	
  energy	
  	
  
•  Conserva*on	
  of	
  GS	
  energy	
  kGS	
  
•  Conserva*on	
  of	
  SGS	
  energy	
  kSGS	
  
∂kGS
∂t
+uj
∂kGS
∂xj
= τijSij −εGS +
∂
∂xi
−uiτij −
puj
ρ
+ν
∂kGS
∂xj
#
$
%%
&
'
((
k =
1
2
ukuk =
1
2
ukuk +
1
2
(ukuk −ukuk )
kGS
kSGS
∂kSGS
∂t
+uj
∂kSGS
∂xj
= −τijSij −εSGS +
∂
∂xi
uiτij −
1
2
(uiuiuj +uj uiui )−
puj − puj
ρ
+ν
∂kSGS
∂xj
#
$
%
%
&
'
(
(
Smagorinsky	
  model	
•  Local	
  equilibrium	
  between	
  SGS	
  produc*on	
  
rate	
  and	
  SGS	
  energy	
  dissipa*on:	
  
•  Eddy	
  viscosity	
  approxima*on:	
  
•  Aper	
  dimensional	
  analysis	
  and	
  scaling,	
  
εSGS ≡ν
∂ui
∂xj
∂ui
∂uj
−ν
∂ui
∂xj
∂ui
∂xj
$
%
&&
'
(
)) = −τijSij
τij
a
= −2vSGS Sij
νSGS = (CS Δ)2
| S |, | S |= 2SijSij , CS : Smagorinsky	
  constant
WALE	
  model	
•  Traceless	
  symmetric	
  part	
  of	
  the	
  square	
  of	
  the	
  
velocity	
  gradient	
  tensor:	
  
•  Eddy	
  viscosity	
  of	
  WALE	
  model:	
  
Sij
d
=
1
2
(Dij
2
+ Dji
2
)−
1
3
δijDkk
2
= SikSkj +ΩikΩkj −
1
3
δij SmnSmn −ΩmnΩmn
#$ %&
Sij
d
Sij
d
=
1
6
(S2
S2
+Ω2
Ω2
)+
2
3
S2
Ω2
+ 2IVSΩ,
S2
= SijSij, Ω2
= ΩijΩij, IVSΩ = SikSkjΩjlΩli
νSGS = (CwΔ)2
(Sij
d
Sij
d
)3/ 2
(SijSij )5/ 2
+ (Sij
d
Sij
d
)5/ 4
(Nicoud	
  and	
  Ducros,	
  1999)
Model	
  parameters	
  of	
  WALE	
  model	
Field	
  a	
 Field	
  b	
 Field	
  c	
 Field	
  d	
 Field	
  e	
 Field	
  f	
Cw
2/Cs
2	
 10.81	
 10.52	
 10.84	
 10.55	
 10.70	
 11.27	
If CS = 0.18, 0.55 ≤ CW ≤ 0.6.
If CS = 0.1, 0.32 ≤ CW ≤ 0.34.
Model	
  parameter	
  Cw	
  is	
  dependent	
  on	
  Smagorinsky	
  
constant	
  CS.	
(Nicoud	
  and	
  Ducros,	
  1999)
Source	
  code	
  of	
  WALE	
  model	
•  V&V	
  working	
  group,	
  Open	
  CAE	
  Society	
  of	
  Japan	
  
	
  	
  	
  	
  	
  hsps://github.com/opencae/VandV/tree/master/
OpenFOAM/2.2.x/src/libraries/incompressibleWALE	
  
	
  
•  OpenFOAM-­‐dev	
  
	
  	
  	
  	
  	
  hsps://github.com/OpenFOAM/OpenFOAM-­‐dev/tree/
master/src/TurbulenceModels/turbulenceModels/LES/WALE	
  
	
  
Download	
  and	
  compile	
$  mkdir	
  –p	
  $FOAM_RUN	
  
$  cd	
  
$  git	
  clone	
  https://github.com/opencae/VandV	
  
$  cd	
  VandV/OpenFOAM/OpenFOAM-­‐BenchmarkTest/
channelReTau110	
  
$  cp	
  –r	
  src	
  $FOAM_RUN/..	
  
$  run	
  
$  cd	
  ../src/libraries/incompressibleWALE	
  
$  wmake	
  libso	
  
$  ls	
  $FOAM_USER_LIBBIN	
  
1.  Download	
  the	
  source	
  code	
  of	
  WALE	
  model	
  from	
  the	
  V&V	
  
repository,	
  and	
  compile	
  the	
  WALE	
  model	
  library.
Simula*on	
  of	
  channel	
  flow	
  	
$  run	
  
$  cp	
  –r	
  $FOAM_TUTORIALS/incompressible/pimpleFoam/
channel395/	
  ./ReTau395WALE	
  
$  cd	
  ReTau395WALE	
  
2.  The	
  standard	
  tutorial	
  case	
  of	
  channel	
  flow	
  at	
  Reτ	
  =	
  395:	
  	
  	
  
copy	
  the	
  tutorial	
  case	
  file	
  into	
  your	
  run	
  directory.	
3.  Edit	
  constant/LESProper*es	
  and	
  system/controlDict	
$  gedit	
  constant/LESProperties	
  
LESModel	
  	
  	
  	
  	
  	
  	
  	
  WALE;	
  
printCoeffs	
  	
  	
  	
  	
  on;	
  
delta	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  cubeRootVol;	
  
...
Simula*on	
  of	
  channel	
  flow	
  	
$  gedit	
  system/controlDict	
...	
  
libs 	
  ("libincompressibleWALE.so");	
  	
This	
  line	
  is	
  necessary	
  to	
  call	
  the	
  new	
  WALE	
  library	
  in	
  solver.	
$  ./Allrun	
  
4.  Aper	
  checking	
  other	
  numerical	
  condi*ons	
  and	
  parameter,	
  
run	
  the	
  solver.	
5.  If	
  the	
  solver	
  calcula*on	
  is	
  normally	
  finished,	
  you	
  check	
  the	
  
logs	
  and	
  visualize	
  the	
  flow	
  field	
  with	
  ParaView,	
  and	
  plot	
  the	
  
fields	
  profile	
  generated	
  by	
  postChannel.
Simula*on	
  of	
  channel	
  flow	
  at	
  Reτ	
  =	
  110	
$  run	
  
$  cp	
  –r	
  ~/VandV/OpenFOAM/OpenFOAM-­‐BenchmarkTest/
channelReTau110/template	
  $FOAM_RUN/ReTau110WALE	
  
$  cd	
  ReTau110WALE	
  
$  gedit	
  caseSettings	
  
6.  If	
  you	
  use	
  the	
  test	
  case	
  of	
  channel	
  flow	
  supplied	
  in	
  the	
  V&V	
  
repository,	
  copy	
  the	
  template	
  case	
  and	
  edit	
  the	
  seung.	
controlDict	
  
{	
  
	
  	
  deltaT	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.002;	
  
	
  	
  endTime	
  	
  	
  	
  	
  	
  	
  	
  	
  0.022;	
  
	
  	
  libs	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "libincompressibleWALE.so";	
  
}	
  
Simula*on	
  of	
  channel	
  flow	
  at	
  Reτ	
  =	
  110	
turbulenceProperties	
  
{	
  
	
  	
  simulationType	
  LESModel;	
  
}	
  
	
  
LESProperties	
  
{	
  
	
  	
  LESModel	
  WALE;	
  
	
  	
  delta	
  cubeRootVol;	
  
}	
  
The	
  original	
  caseSeungs	
  is	
  for	
  DNS	
  simula*on	
  on	
  large	
  parallel	
  
machine.	
  You	
  had	
  beser	
  to	
  change	
  other	
  parameters	
  in	
  
blockMeshDict	
  and	
  decomposeParDict.
Simula*on	
  of	
  channel	
  flow	
  at	
  Reτ	
  =	
  110	
  	
$  ./Allrun	
  
7.  Aper	
  checking	
  other	
  numerical	
  condi*ons	
  and	
  parameter,	
  
run	
  the	
  solver.	
8.  If	
  the	
  solver	
  calcula*on	
  is	
  normally	
  finished,	
  you	
  check	
  the	
  
logs	
  and	
  visualize	
  the	
  flow	
  field	
  with	
  ParaView.	
  If	
  the	
  
integra*on	
  *me	
  is	
  not	
  sufficient	
  for	
  the	
  flow	
  field	
  to	
  become	
  
fully	
  developed	
  state,	
  run	
  longer	
  simula*ons.
Exercise	
  2:	
  Implementa*on	
  of	
  coherent	
  
structure	
  Smagorisky	
  model
Original	
  source	
  codes	
  for	
  SGS	
  model	
$  src	
  
$  cd	
  turbulenceModels/incompressible/LES/	
  
$  ls	
  
1.  Check	
  the	
  original	
  source	
  code	
  for	
  SGS	
  model.	
2.  Glance	
  the	
  codes	
  of	
  Smagorinsky	
  model.	
  
$  gedit	
  Smagorinsky/Smagorinsky.*	
  
3.  In	
  this	
  exercise,	
  we	
  look	
  the	
  codes	
  of	
  dynamic	
  models.	
  
$  ls	
  *[Dd]yn*	
  
4.  Compare	
  the	
  structures	
  and	
  statements	
  of	
  the	
  related	
  codes	
  
(*.C	
  and	
  *.H).	
  
Private	
  member	
  func*ons:	
  
updateSubGridScaleFields	
  	
  	
void	
  Smagorinsky::updateSubGridScaleFields	
  
(const	
  volTensorField&	
  gradU)	
  
{	
  	
  	
  nuSgs_	
  =	
  ck_*delta()*sqrt(k(gradU));	
  
	
  	
  	
  	
  nuSgs_.correctBoundaryConditions(); 	
   	
  }	
  
void	
  dynLagrangian::updateSubGridScaleFields	
  
(const	
  tmp<volTensorField>&	
  gradU)	
  
{	
  	
  	
  nuSgs_	
  =	
  (flm_/fmm_)*sqr(delta())*mag(dev(symm(gradU)));	
  
	
  	
  	
  	
  nuSgs_.correctBoundaryConditions(); 	
   	
  }	
  
void	
  dynOneEqEddy::updateSubGridScaleFields	
  
(	
  	
  	
  const	
  volSymmTensorField&	
  D,	
  
	
  	
  	
  	
  const	
  volScalarField&	
  KK	
   	
  )	
  
{	
  	
  	
  nuSgs_	
  =	
  ck(D,	
  KK)*sqrt(k_)*delta();	
  
	
  	
  	
  	
  nuSgs_.correctBoundaryConditions(); 	
   	
  }	
  
In	
  Smagorinsky.C	
In	
  dynLagrangian.C	
In	
  dynOneEqEddy.C
Understanding	
  formula*on	
  with	
  codes	
•  What	
  calcula*on,	
  mathema*cal	
  opera*on,	
  and	
  variable	
  are	
  
necessary	
  for	
  coherent	
  structure	
  Smagosinsky	
  model	
  (CSM)?	
  
Compare	
  the	
  formula*on	
  of	
  models	
  with	
  the	
  related	
  source	
  
codes.	
  
•  In	
  CSM,	
  the	
  second	
  invariant	
  of	
  velocity	
  gradient	
  is	
  used:	
  
	
  	
  	
  	
  	
  where	
  
€
Q =
1
2
ΩijΩij − SijSij( )= −
1
2
∂uj
∂xi
∂ui
∂xj
Sij =
1
2
∂ui
∂xj
+
∂uj
∂xi
#
$
%%
&
'
((, Ωij =
1
2
∂ui
∂xj
−
∂uj
∂xi
#
$
%%
&
'
((
Coherent	
  structure	
  Smagorinsky	
  model	
  for	
  non-­‐
rota*ng	
  flow	
  (NRCSM)	
•  Smagorinsky	
  model	
  (SM)	
  based	
  on	
  an	
  eddy-­‐viscosity,	
  
•  The	
  model	
  parameter	
  C	
  is	
  determined	
  as	
  follows:	
  
	
  with	
  
	
  where	
  
	
  
	
  
	
  	
  	
  	
  	
  NRCSM	
  model	
  is	
  invalid	
  for	
  rota*ng	
  flow.	
  
	
  
€
C = C1 | FCS |3/ 2
€
C1 =
1
20
, FCS =
Q
E
€
τij
a
= −2CΔ2
| S | Sij
(τij
a
= −2νt Sij, νt = CΔ2
| S |)
E =
1
2
ΩijΩij + SijSij( )=
1
2
∂ui
∂xj
$
%
&&
'
(
))
2
Coherent	
  structure	
  Smagorinsky	
  model	
  (CSM)	
•  Smagorinsky	
  model	
  (SM)	
  based	
  on	
  an	
  eddy-­‐viscosity,	
  
•  The	
  model	
  parameter	
  C	
  is	
  determined	
  as	
  follows:	
  
	
  with	
  
	
  where	
  
	
  
	
  
	
  Improved	
  CSM	
  model	
  is	
  valid	
  for	
  rota*ng	
  flow.	
  
	
  
€
C = C2 | FCS |3/ 2
FΩ
€
C2 =
1
22
, FCS =
Q
E
, FΩ =1− FCS
€
τij
a
= −2CΔ2
| S | Sij
(τij
a
= −2νt Sij, νt = CΔ2
| S |)
E =
1
2
ΩijΩij + SijSij( )=
1
2
∂ui
∂xj
$
%
&&
'
(
))
2
Seung	
  for	
  making	
  new	
  library	
$  run	
  
$  cd	
  ../src/libraries	
  
$  cp	
  -­‐r	
  incompressibleWALE/WALE/	
  ./NRCSM	
  
$  cp	
  –r	
  incompressibleWALE/Make	
  ./NRCSM	
  
$  cd	
  NRCSM	
  
$  rename	
  WALE	
  NRCSM	
  *	
  
$  rm	
  –r	
  NRCSM.dep	
  
$  rm	
  –rf	
  Make/linux64Gcc47DPOpt	
  
$  gedit	
  Make/files	
  
1.  Copy	
  the	
  source	
  code	
  of	
  	
  WALE	
  model.	
  Compile	
  them.	
NRCSM.C	
  
LIB	
  =	
  $(FOAM_USER_LIBBIN)/libNRCSM	
  
$  sed	
  –i	
  ‘s/WALE/NRCSM/g’	
  NRCSM.C	
  	
  
$  sed	
  –i	
  ‘s/WALE/NRCSM/g’	
  NRCSM.H	
  
Seung	
  for	
  making	
  new	
  library	
$  wmake	
  libso	
  
$  ls	
  $FOAM_USER_LIBBIN	
  
If	
  you	
  find	
  the	
  renamed	
  and	
  recompiled	
  library	
  (libNRCSM.so),	
  
you	
  are	
  ready	
  to	
  make	
  a	
  new	
  library	
  for	
  the	
  NRCSM.	
  
	
  
2. You	
  can	
  easily	
  learn	
  the	
  codes	
  for	
  calcula*ng	
  the	
  Q	
  and	
  E	
  
terms	
  from	
  the	
  postProcessing	
  u*li*es.	
  
	
  
	
  
	
  
	
  
There	
  are	
  two	
  ways	
  of	
  calcula*ng	
  Q,	
  that	
  is,	
  with	
  velocity	
  
gradient	
  tensor	
  and	
  with	
  SS	
  and	
  ΩΩ terms.	
$  util	
  
$  cd	
  postProcessing/velocityField/Q	
  
$  gedit	
  Q.C	
  &	
  
Introducing	
  model	
  coefficient	
  C1	
$  run	
  
$  cd	
  ../src/libraries/NRCSM/	
  
$  gedit	
  NRCSM.C	
  NRCSM.H	
  
3.  Replace	
  all	
  ‘cw’	
  with	
  ‘c1’	
  (gedit	
  or	
  sed),	
  and	
  change	
  the	
  value	
  
to	
  0.05.	
  
	
  	
  	
  	
  c1_	
  
	
  	
  	
  	
  (	
  
	
  	
  	
  	
  	
  	
  	
  	
  dimensioned<scalar>::lookupOrAddToDict	
  
	
  	
  	
  	
  	
  	
  	
  	
  (	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  "c1",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  coeffDict_,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.05	
  
	
  	
  	
  	
  	
  	
  	
  	
  )	
  
	
  	
  	
  	
  )	
  
NRCSM.C	
  
$  wmake	
  libso	
  
Q	
  and	
  E	
  calcula*ons	
4.  In	
  NRCSM.C,	
  insert	
  the	
  calcula*on	
  of	
  Q	
  and	
  E.	
  Copy&Paste	
  
the	
  corresponding	
  sec*on	
  from	
  Q.C.	
  Save	
  and	
  Compile	
  them.	
  
volScalarField	
  Q	
  
(	
  
	
  0.5*(sqr(tr(gradU))	
  -­‐	
  tr(((gradU)&(gradU))))	
  
);	
  
volScalarField	
  E	
  
(	
  
	
  0.5*(gradU	
  &&	
  gradU)	
  
);	
  
NRCSM.C	
  
$  gedit	
  NRCSM.C	
  
$  wmake	
  libso	
  
FCS	
  and	
  C	
  calcula*ons	
5.  In	
  NRCSM.C,	
  insert	
  the	
  calcula*on	
  of	
  FCS	
  and	
  C	
  (coefficient	
  
of	
  eddy	
  viscosity	
  model).	
  Save	
  and	
  Compile	
  them.	
  
volScalarField	
  Fcs	
  
(	
  
	
  Q/
max(E,dimensionedScalar("SMALL",E.dimensions(),SMALL))	
  
);	
  
volScalarField	
  ccsm_	
  
(	
  
	
  	
  	
  c1_*pow(mag(Fcs),1.5)	
  
);	
  
NRCSM.C	
  
$  gedit	
  NRCSM.C	
  
$  wmake	
  libso	
  
νSGS	
  calcula*on	
6.  In	
  NRCSM.C,	
  modify	
  the	
  nuSGS_	
  calcula*on.	
  Look	
  the	
  other	
  
updateSubGridScaleFields	
  func*ons	
  in	
  the	
  dynamic	
  models.	
  
nuSgs_	
  =	
  ccsm_*sqr(delta())*mag(dev(symm(gradU)));	
  
NRCSM.C	
  
Save	
  and	
  compile	
  them.	
  
$  wmake	
  libso	
  
7.  Finally,	
  comment	
  out	
  or	
  delete	
  unnecessary	
  statements	
  (the	
  
calcula*ons	
  for	
  WALE	
  model).	
  Save	
  and	
  compile	
  them.	
  
$  wmake	
  libso	
  
$  gedit	
  NRCSM.C	
  
kSGS	
  calcula*on	
//-­‐	
  Return	
  SGS	
  kinetic	
  energy	
  
//	
  	
  calculated	
  from	
  the	
  given	
  velocity	
  gradient	
  
tmp<volScalarField>	
  k(const	
  tmp<volTensorField>&	
  gradU)	
  const	
  
{	
  
	
  return	
  (2.0*c1_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));	
  
}	
  
NRCSM.H	
  
8.  The	
  calcula*on	
  of	
  kSGS	
  is	
  invalid,	
  but	
  the	
  value	
  of	
  kSGS	
  is	
  not	
  
actually	
  used	
  in	
  LES	
  with	
  NRCSM	
  model.	
  If	
  you	
  requires	
  a	
  
proper	
  kSGS,	
  consult	
  the	
  paper	
  of	
  Kobayashi	
  (PoF,	
  2005).	
  
Valida*on	
  with	
  channel	
  flow	
$  run	
  
$  cp	
  –r	
  $FOAM_TUTORIALS/incompressible/pimpleFoam/
channel395/	
  ./ReTau395NRCSM	
  
$  cd	
  ReTau395NRCSM	
  
9.  The	
  standard	
  tutorial	
  case	
  of	
  channel	
  flow	
  at	
  Reτ	
  =	
  395:	
  	
  	
  
copy	
  the	
  tutorial	
  case	
  file	
  into	
  your	
  run	
  directory.	
10. Edit	
  constant/LESProper*es	
  and	
  system/controlDict	
$  gedit	
  constant/LESProperties	
  
LESModel	
  	
  	
  	
  	
  	
  	
  	
  NRCSM;	
  
printCoeffs	
  	
  	
  	
  	
  on;	
  
delta	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  cubeRootVol;	
  
...
Valida*on	
  with	
  channel	
  flow	
$  gedit	
  system/controlDict	
...	
  
libs 	
  ("libNRCSM.so");	
  	
This	
  line	
  is	
  necessary	
  to	
  call	
  the	
  new	
  NRCSM	
  library	
  in	
  solver.	
$  ./Allrun	
  
11. Aper	
  checking	
  other	
  numerical	
  condi*ons	
  and	
  parameter,	
  
run	
  the	
  solver.	
12. If	
  the	
  solver	
  calcula*on	
  is	
  normally	
  finished,	
  you	
  check	
  the	
  
logs	
  and	
  visualize	
  the	
  flow	
  field	
  with	
  ParaView,	
  and	
  plot	
  the	
  
fields	
  profile	
  generated	
  by	
  postChannel.
Addi*onal	
  works	
1.  Compile	
  and	
  test	
  the	
  WALE	
  model	
  supplied	
  from	
  
openfoam-­‐dev.	
  Prepare	
  a	
  Make	
  directory	
  by	
  
yourself.	
  
2.  Implementa*on	
  of	
  CSM	
  model.	
  Add	
  FΩ	
  term	
  and	
  C2	
  
coefficient.	
  
3.  Calcula*on	
  of	
  Q	
  and	
  E	
  terms	
  with	
  SS	
  and	
  ΩΩ	
  terms.	
  
Compare	
  the	
  results	
  with	
  the	
  solu*on	
  of	
  Exercise	
  2.	
  
4.  Valida*on	
  of	
  customized	
  model	
  with	
  other	
  flow	
  
fields	
  such	
  pipe,	
  backstep,	
  cylinder,	
  and	
  rota*ng	
  
flow.	
  
References	
•  OpenFOAM	
  User	
  Guide	
  
•  OpenFOAM	
  Programmer’s	
  Guide	
  
•  梶島,	
  乱流の数値シミュレーション 改訂版,	
  養賢堂	
  (2014).	
  
•  P.	
  R.	
  Spalart	
  et	
  al.,	
  “Comments	
  on	
  the	
  Feasibility	
  of	
  LES	
  for	
  
Wings,	
  and	
  on	
  a	
  Hybrid	
  RANS/LES	
  Approach”,	
  1st	
  ASOSR	
  
CONFERENCE	
  on	
  DNS/LES	
  (1997).	
  
•  P.	
  R.	
  Spalart,	
  “Young-­‐Person’s	
  Guide	
  to	
  Detached-­‐Eddy	
  
Simula*on	
  Grids”,	
  NASA	
  CR-­‐2001-­‐211032	
  (2001).	
  
•  F.	
  Nicoud	
  and	
  F.	
  Ducros,	
  “Subgrid-­‐scale	
  modelling	
  based	
  on	
  
the	
  square	
  of	
  velocity	
  gradient	
  tensor”,	
  Flow,	
  Turbulence	
  and	
  
Combus*on,	
  62,	
  pp.183-­‐200	
  (1999).	
  
References	
•  小林,	
  “乱流構造に基づくサブグリッドスケールモデルの開
発”,	
  ながれ,	
  29,	
  pp.157-­‐160	
  (2010).	
  
•  H.	
  Kobayashi,	
  “The	
  subgrid-­‐scale	
  models	
  based	
  on	
  coherent	
  
structures	
  for	
  rota*ng	
  homogeneous	
  turbulence	
  and	
  
turbulent	
  channel	
  flow”,	
  Phys.	
  Fluids,	
  17,	
  045104	
  (2005).	
  
•  H.	
  Kobayashi,	
  F.	
  Ham	
  and	
  X.	
  Wu,	
  “Applica*on	
  of	
  a	
  local	
  SGS	
  
model	
  based	
  on	
  coherent	
  structures	
  to	
  complex	
  geometries”,	
  
Int.	
  J.	
  Heat	
  Fluid	
  Flow,	
  29,	
  pp.640-­‐653	
  (2008).	
  

Contenu connexe

Tendances

OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例takuyayamamoto1800
 
Turbulence Models in OpenFOAM
Turbulence Models in OpenFOAMTurbulence Models in OpenFOAM
Turbulence Models in OpenFOAMFumiya Nozaki
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming TipsFumiya Nozaki
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてFumiya Nozaki
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMFumiya Nozaki
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)takuyayamamoto1800
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMFumiya Nozaki
 
Boundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAMBoundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAMFumiya Nozaki
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてFumiya Nozaki
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!Fumiya Nozaki
 
ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化takuyayamamoto1800
 
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)takuyayamamoto1800
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析takuyayamamoto1800
 
OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算takuyayamamoto1800
 
About multiphaseEulerFoam
About multiphaseEulerFoamAbout multiphaseEulerFoam
About multiphaseEulerFoam守淑 田村
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』Fumiya Nozaki
 
Introdcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwareIntrodcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwarepengding2
 
buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoamMilad Sm
 

Tendances (20)

OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例
 
Turbulence Models in OpenFOAM
Turbulence Models in OpenFOAMTurbulence Models in OpenFOAM
Turbulence Models in OpenFOAM
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能について
 
CFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAMCFD for Rotating Machinery using OpenFOAM
CFD for Rotating Machinery using OpenFOAM
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAM
 
Boundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAMBoundary Conditions in OpenFOAM
Boundary Conditions in OpenFOAM
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
 
ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化
 
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析
 
OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算
 
About multiphaseEulerFoam
About multiphaseEulerFoamAbout multiphaseEulerFoam
About multiphaseEulerFoam
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
 
Introdcution to Openfoam--working with free software
Introdcution to Openfoam--working with free softwareIntrodcution to Openfoam--working with free software
Introdcution to Openfoam--working with free software
 
interFoamの検証
interFoamの検証interFoamの検証
interFoamの検証
 
OpenFOAM Training v5-1-en
OpenFOAM Training v5-1-enOpenFOAM Training v5-1-en
OpenFOAM Training v5-1-en
 
buoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoambuoyantBousinessqSimpleFoam
buoyantBousinessqSimpleFoam
 

Similaire à Customization of LES turbulence model in OpenFOAM

Platoon Control of Nonholonomic Robots using Quintic Bezier Splines
Platoon Control of Nonholonomic Robots using Quintic Bezier SplinesPlatoon Control of Nonholonomic Robots using Quintic Bezier Splines
Platoon Control of Nonholonomic Robots using Quintic Bezier SplinesKaustav Mondal
 
Eda solutions tutorials_applications_notes_acm_examples
Eda solutions tutorials_applications_notes_acm_examplesEda solutions tutorials_applications_notes_acm_examples
Eda solutions tutorials_applications_notes_acm_examplescintia costa
 
Design of Flexible Pavement Using AASHTO.pptx
Design of Flexible Pavement Using AASHTO.pptxDesign of Flexible Pavement Using AASHTO.pptx
Design of Flexible Pavement Using AASHTO.pptxmohammeed3
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfRTEFGDFGJU
 
A two equation VLES turbulence model with near-wall delayed behaviour
A two equation VLES turbulence model with near-wall delayed behaviourA two equation VLES turbulence model with near-wall delayed behaviour
A two equation VLES turbulence model with near-wall delayed behaviourApplied CCM Pty Ltd
 
Lecture12.fm5
Lecture12.fm5Lecture12.fm5
Lecture12.fm5tuanbk1
 
STAQ based Matrix estimation - initial concept (presented at hEART conference...
STAQ based Matrix estimation - initial concept (presented at hEART conference...STAQ based Matrix estimation - initial concept (presented at hEART conference...
STAQ based Matrix estimation - initial concept (presented at hEART conference...Luuk Brederode
 
Nucleation and avalanches in film with labyrintine magnetic domains
Nucleation and avalanches in film with labyrintine magnetic domainsNucleation and avalanches in film with labyrintine magnetic domains
Nucleation and avalanches in film with labyrintine magnetic domainsAndrea Benassi
 
Simulation and validation of turbulent gas flow in a cyclone using Caelus
Simulation and validation of turbulent gas flow in a cyclone using CaelusSimulation and validation of turbulent gas flow in a cyclone using Caelus
Simulation and validation of turbulent gas flow in a cyclone using CaelusApplied CCM Pty Ltd
 
Research Project Presentation_Michael Li
Research Project Presentation_Michael LiResearch Project Presentation_Michael Li
Research Project Presentation_Michael LiMichael Li
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptxrediet43
 
STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD Slobodan Cuk
 
1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engine1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engineJuan Manzanero Torrico
 
CFD Cornell Energy Workshop - M.F. Campuzano Ochoa
CFD Cornell Energy Workshop - M.F. Campuzano OchoaCFD Cornell Energy Workshop - M.F. Campuzano Ochoa
CFD Cornell Energy Workshop - M.F. Campuzano OchoaMario Felipe Campuzano Ochoa
 
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudsko
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudskoCHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudsko
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudskoSydneyJaydeanKhanyil
 
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigation
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical InvestigationAerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigation
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigationdrboon
 
EAMTA keynote 2014
EAMTA keynote 2014EAMTA keynote 2014
EAMTA keynote 2014Ariel Cedola
 

Similaire à Customization of LES turbulence model in OpenFOAM (20)

Platoon Control of Nonholonomic Robots using Quintic Bezier Splines
Platoon Control of Nonholonomic Robots using Quintic Bezier SplinesPlatoon Control of Nonholonomic Robots using Quintic Bezier Splines
Platoon Control of Nonholonomic Robots using Quintic Bezier Splines
 
Eda solutions tutorials_applications_notes_acm_examples
Eda solutions tutorials_applications_notes_acm_examplesEda solutions tutorials_applications_notes_acm_examples
Eda solutions tutorials_applications_notes_acm_examples
 
Design of Flexible Pavement Using AASHTO.pptx
Design of Flexible Pavement Using AASHTO.pptxDesign of Flexible Pavement Using AASHTO.pptx
Design of Flexible Pavement Using AASHTO.pptx
 
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
 
A two equation VLES turbulence model with near-wall delayed behaviour
A two equation VLES turbulence model with near-wall delayed behaviourA two equation VLES turbulence model with near-wall delayed behaviour
A two equation VLES turbulence model with near-wall delayed behaviour
 
Lifting 1
Lifting 1Lifting 1
Lifting 1
 
Lecture12.fm5
Lecture12.fm5Lecture12.fm5
Lecture12.fm5
 
STAQ based Matrix estimation - initial concept (presented at hEART conference...
STAQ based Matrix estimation - initial concept (presented at hEART conference...STAQ based Matrix estimation - initial concept (presented at hEART conference...
STAQ based Matrix estimation - initial concept (presented at hEART conference...
 
Nucleation and avalanches in film with labyrintine magnetic domains
Nucleation and avalanches in film with labyrintine magnetic domainsNucleation and avalanches in film with labyrintine magnetic domains
Nucleation and avalanches in film with labyrintine magnetic domains
 
MLMM_16_08_2022.pdf
MLMM_16_08_2022.pdfMLMM_16_08_2022.pdf
MLMM_16_08_2022.pdf
 
Simulation and validation of turbulent gas flow in a cyclone using Caelus
Simulation and validation of turbulent gas flow in a cyclone using CaelusSimulation and validation of turbulent gas flow in a cyclone using Caelus
Simulation and validation of turbulent gas flow in a cyclone using Caelus
 
Research Project Presentation_Michael Li
Research Project Presentation_Michael LiResearch Project Presentation_Michael Li
Research Project Presentation_Michael Li
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptx
 
STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD STATE-SPACE AVERAGING METHOD
STATE-SPACE AVERAGING METHOD
 
1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engine1D Simulation of intake manifolds in single-cylinder reciprocating engine
1D Simulation of intake manifolds in single-cylinder reciprocating engine
 
CFD Cornell Energy Workshop - M.F. Campuzano Ochoa
CFD Cornell Energy Workshop - M.F. Campuzano OchoaCFD Cornell Energy Workshop - M.F. Campuzano Ochoa
CFD Cornell Energy Workshop - M.F. Campuzano Ochoa
 
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudsko
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudskoCHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudsko
CHAPTER 7.pdfdjdjdjdjdjdjdjsjsjddhhdudsko
 
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigation
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical InvestigationAerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigation
Aerodynamic and Acoustic Parameters of a Coandã Flow – a Numerical Investigation
 
EAMTA keynote 2014
EAMTA keynote 2014EAMTA keynote 2014
EAMTA keynote 2014
 

Plus de mmer547

Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化mmer547
 
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAMmmer547
 
4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本mmer547
 
オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015mmer547
 
オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015mmer547
 
Source pack installation of OpenFOAM.4.0 into RHL
Source pack installation of OpenFOAM.4.0 into RHLSource pack installation of OpenFOAM.4.0 into RHL
Source pack installation of OpenFOAM.4.0 into RHLmmer547
 
XYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみたXYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみたmmer547
 
MinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成するMinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成するmmer547
 
オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編mmer547
 
IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料mmer547
 
Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料mmer547
 
Install code saturne
Install code saturneInstall code saturne
Install code saturnemmer547
 
流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会mmer547
 

Plus de mmer547 (13)

Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化Acer MRヘッドセットで計算結果の可視化
Acer MRヘッドセットで計算結果の可視化
 
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
2019年 これからの人向け 超速習!流体解析ツールボックスOpenFOAM
 
4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本4月からCAEをはじめる人におすすめする本
4月からCAEをはじめる人におすすめする本
 
オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015オープンCAEをはじめよう! 環境構築編 ver.2015
オープンCAEをはじめよう! 環境構築編 ver.2015
 
オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015オープンCAEをはじめよう!入門編 ver.2015
オープンCAEをはじめよう!入門編 ver.2015
 
Source pack installation of OpenFOAM.4.0 into RHL
Source pack installation of OpenFOAM.4.0 into RHLSource pack installation of OpenFOAM.4.0 into RHL
Source pack installation of OpenFOAM.4.0 into RHL
 
XYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみたXYZMaker(ベータ版)を使ってみた
XYZMaker(ベータ版)を使ってみた
 
MinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成するMinecraftでOpenFOAM計算用メッシュを作成する
MinecraftでOpenFOAM計算用メッシュを作成する
 
オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編オープンCAEをはじめよう!構造解析編
オープンCAEをはじめよう!構造解析編
 
IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料IPython notebookでOpenFOAMを使う!講習会準備資料
IPython notebookでOpenFOAMを使う!講習会準備資料
 
Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料Code_Saturne流体解析入門講習会 講習会資料
Code_Saturne流体解析入門講習会 講習会資料
 
Install code saturne
Install code saturneInstall code saturne
Install code saturne
 
流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会流体解析入門者向け超初級講習会
流体解析入門者向け超初級講習会
 

Dernier

home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 

Dernier (20)

home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 

Customization of LES turbulence model in OpenFOAM

  • 1. Customiza*on  of  LES  turbulence    model   in  OpenFOAM yotakagi77   Open  CAE  Local  User  Groups  in  Japan   @Kansai   June  13,  2015,  Osaka  University
  • 2. Agenda •  Basic  informa*on  on  turbulence  model   •  Tensor  mathema*cs   •  Exercise  1:  Compiling  and  execu*on  of  WALE   model   •  Exercise  2:  Implementa*on  of  coherent   structure  Smagorisky  model   •  Addi*onal  works  
  • 3. Basic  informa*on  on  turbulence  model  
  • 4. Turbulent  flow  simula*on DNS LES RANS Modeling No Subgrid  scale Reynolds  average Accuracy ◎ ○ △ Cost × ○ ◎ Vortex  (eddy)  field Reynolds  average 4
  • 5. Turbulent  flow  simula*on DNS LES RANS Modeling No Subgrid  scale Reynolds  average Accuracy ◎ ○ △ Cost × ○ ◎ DNS  grid,  u Reynolds  average 5
  • 6. Turbulent  flow  simula*on DNS LES RANS Modeling No Subgrid  scale Reynolds  average Accuracy ◎ ○ △ Cost × ○ ◎ LES  grid,  u  =  u  –  u’ Reynolds  average 6
  • 7. Turbulent  flow  simula*on DNS LES RANS Modeling No Subgrid  scale Reynolds  average Accuracy ◎ ○ △ Cost × ○ ◎ Filtering  approach Reynolds  average 7
  • 8. Detached-­‐eddy  simula*on  (DES) •  P.  R.  Spalart  (1997):   –  We  name  the  new  approach  “Detached-­‐Eddy   Simula8on”  (DES)  to  emphasize  its  dis8nct  treatments  of   a?ached  and  separated  regions. Super-­‐Region Region Euler  (ER) RANS  (RR) Viscous  (VR) Outer  (OR) LES  (LR) Viscous  (VR) Focus  (FR) Departure  (DR) 8 Spalart  (2001)
  • 9. Detached-­‐eddy  simula*on  (DES) •  P.  R.  Spalart  (1997):   –  We  name  the  new  approach  “Detached-­‐Eddy   Simula8on”  (DES)  to  emphasize  its  dis8nct  treatments  of   a?ached  and  separated  regions. Super-­‐Region Region Euler  (ER) RANS  (RR) Viscous  (VR) Outer  (OR) LES  (LR) Viscous  (VR) Focus  (FR) Departure  (DR) Spalart  (2001) 9
  • 10. Coupling  with  momentum  equa*on   through  viscosity •  RANS     •  LES ∂U ∂t + ∇⋅ UU( )− ∇⋅ ν+ νt( ) ∇U + (∇U)T ( )( )= ∇p ∂U ∂t + ∇⋅ UU( )− ∇⋅ ν+ νSGS( ) ∇U + (∇U)T ( )( )= ∇p Turbulent viscosity Sub-grid scale viscosity Only  change  viscosity! 10
  • 11. Significant  problem:     difference  of  filtering  (average)  approaches LES  Filtering Reynolds  average Spa*al Temporal Inconsistency  at  the  interface  between  LES  and  RANS  regions 11
  • 12. Standard  SGS  model  in  OpenFOAM Library  name Note Smagorinksy Smagorinsky  model Smagorinksy2 Smagorinsky  model  with  3-­‐D  filter homogeneousDynSmagor insky Homogeneous  dynamic  Smagorinsky  model dynLagragian Lagrangian  two  equa*on  eddy-­‐viscosity  model scaleSimilarity Scale  similarity  model mixedSmagorinsky Mixed  Smagorinsky  /  scale  similarity  model homogeneousDynOneEqE ddy One  Equa*on  Eddy  Viscosity  Model  for  incompressible   flows laminar Simply  returns  laminar  proper*es kOmegaSSTSAS k-­‐ω  SST  scale  adap*ve  simula*on  (SAS)  model
  • 13. Standard  SGS  model  in  OpenFOAM Library  name Note oneEqEddy k-­‐equa*on  eddy-­‐viscosity  model dynOneEqEddy Dynamic  k-­‐equa*on  eddy-­‐viscosity  model spectEddyVisc Spectral  eddy  viscosity  model LRDDiffStress LRR  differen*al  stress  model DeardorffDiffStress Deardorff  differen*al  stress  model SpalartAllmaras Spalart-­‐Allmaras  model SpalartAllmarasDDES Spalart-­‐Allmaras  delayed  detached  eddy  simula*on   (DDES)  model SpalartAllmarasIDDES Spalart-­‐Allmaras  improved  DDES  (IDDES)  model vanDriestDelta   Simple  cube-­‐root  of  cell  volume  delta  used  in   incompressible  LES  models
  • 15. Tensor •  Rank  0:  ‘scalar’,  e.g.  volume  V,  pressure  p.   •  Rank  1:  ‘vector’,  e.g.  velocity  vector  u,  surface   vector  S.  Descrip*on:  a  =  ai  =  (a1,  a2,  a3).   •  Rank  2:  ‘tensor’,  e.g.  strain  rate  tensor  Sij,   rota*on  tensor  Ωij.            Descrip*on:       T = Tij = T11 T12 T13 T21 T22 T23 T31 T32 T33 ! " # # # $ % & & &
  • 16. Symmetric/an*symmetric  tensor   •  Velocity  gradient  tensor  is  decomposed  into   strain  rate  tensor  (symmetric)  and  vor*city   tensor  (an*symmetric,  skew).     •  In  turbulence  modeling,  Sij  and  Ωij  are  usually   used. Dij = ∂ui ∂xj , Sij = 1 2 ∂ui ∂xj + ∂uj ∂xi " # $$ % & '', Ωij = 1 2 ∂ui ∂xj − ∂uj ∂xi " # $$ % & '' Dij = Sij +Ωij
  • 17. Opera*ons  exclusive  to  tensors  of  rank  2 T = 1 2 (T+ TT )+ 1 2 (T− TT ) = symmT+skewT, trT = T11 +T22 +T33, diagT = (T11,T22,T33), T = T− 1 3 (trT)I+ 1 3 (trT)I = devT+ hydT, detT = T11 T12 T13 T21 T22 T23 T31 T32 T33
  • 18. OpenFOAM  tensor  classes Opera2on Mathema2cal Class Addi*on a  +  b a  +  b Subtrac*on a  –  b a  –  b Scalar  mul*plica*on sa s  *  a Scalar  division a  /  s a  /  s Outer  product a  b a  *  b Inner  product a  ·∙  b a  &  b Double  inner  product a  :  b a  &&  b Cross  product a  ×  b a  ^  b Square a2 sqr(a) Magnitude  squared |a|2 magSqr(a) Magnitude |a| mag(a) Power an pow(a,  n)
  • 19. OpenFOAM  tensor  classes Opera2on Mathema2cal Class Transpose TT T.T() Diagonal diag  T diag(T) Trace tr  T tr(T) Deviatoric  component dev  T dev(T) Symmetric  component symm  T symm(T) Skew-­‐symmetric   component skew  T skew(T) Determinant det  T det(T) Cofactors cof  T cof(T) Inverse inv  T inv(T)
  • 20. Exercise  1:  Compiling  and  execu*on  of   WALE  model  
  • 21. Governing  equa*on  for  incompressible  LES •  Filtered  con*nuity  and  Navier-­‐Stokes  equa*ons              where ∂ui ∂xi = 0, ∂ui ∂t +uj ∂ui ∂xj = − 1 ρ ∂p ∂xi + ∂ ∂xi (−τij + 2νSij ) τij = uiuj −uiuj
  • 22. SGS  eddy  viscosity  model •  Decomposi*on  of  kine*c  energy     •  Conserva*on  of  GS  energy  kGS   •  Conserva*on  of  SGS  energy  kSGS   ∂kGS ∂t +uj ∂kGS ∂xj = τijSij −εGS + ∂ ∂xi −uiτij − puj ρ +ν ∂kGS ∂xj # $ %% & ' (( k = 1 2 ukuk = 1 2 ukuk + 1 2 (ukuk −ukuk ) kGS kSGS ∂kSGS ∂t +uj ∂kSGS ∂xj = −τijSij −εSGS + ∂ ∂xi uiτij − 1 2 (uiuiuj +uj uiui )− puj − puj ρ +ν ∂kSGS ∂xj # $ % % & ' ( (
  • 23. Smagorinsky  model •  Local  equilibrium  between  SGS  produc*on   rate  and  SGS  energy  dissipa*on:   •  Eddy  viscosity  approxima*on:   •  Aper  dimensional  analysis  and  scaling,   εSGS ≡ν ∂ui ∂xj ∂ui ∂uj −ν ∂ui ∂xj ∂ui ∂xj $ % && ' ( )) = −τijSij τij a = −2vSGS Sij νSGS = (CS Δ)2 | S |, | S |= 2SijSij , CS : Smagorinsky  constant
  • 24. WALE  model •  Traceless  symmetric  part  of  the  square  of  the   velocity  gradient  tensor:   •  Eddy  viscosity  of  WALE  model:   Sij d = 1 2 (Dij 2 + Dji 2 )− 1 3 δijDkk 2 = SikSkj +ΩikΩkj − 1 3 δij SmnSmn −ΩmnΩmn #$ %& Sij d Sij d = 1 6 (S2 S2 +Ω2 Ω2 )+ 2 3 S2 Ω2 + 2IVSΩ, S2 = SijSij, Ω2 = ΩijΩij, IVSΩ = SikSkjΩjlΩli νSGS = (CwΔ)2 (Sij d Sij d )3/ 2 (SijSij )5/ 2 + (Sij d Sij d )5/ 4 (Nicoud  and  Ducros,  1999)
  • 25. Model  parameters  of  WALE  model Field  a Field  b Field  c Field  d Field  e Field  f Cw 2/Cs 2 10.81 10.52 10.84 10.55 10.70 11.27 If CS = 0.18, 0.55 ≤ CW ≤ 0.6. If CS = 0.1, 0.32 ≤ CW ≤ 0.34. Model  parameter  Cw  is  dependent  on  Smagorinsky   constant  CS. (Nicoud  and  Ducros,  1999)
  • 26. Source  code  of  WALE  model •  V&V  working  group,  Open  CAE  Society  of  Japan            hsps://github.com/opencae/VandV/tree/master/ OpenFOAM/2.2.x/src/libraries/incompressibleWALE     •  OpenFOAM-­‐dev            hsps://github.com/OpenFOAM/OpenFOAM-­‐dev/tree/ master/src/TurbulenceModels/turbulenceModels/LES/WALE    
  • 27. Download  and  compile $  mkdir  –p  $FOAM_RUN   $  cd   $  git  clone  https://github.com/opencae/VandV   $  cd  VandV/OpenFOAM/OpenFOAM-­‐BenchmarkTest/ channelReTau110   $  cp  –r  src  $FOAM_RUN/..   $  run   $  cd  ../src/libraries/incompressibleWALE   $  wmake  libso   $  ls  $FOAM_USER_LIBBIN   1.  Download  the  source  code  of  WALE  model  from  the  V&V   repository,  and  compile  the  WALE  model  library.
  • 28. Simula*on  of  channel  flow   $  run   $  cp  –r  $FOAM_TUTORIALS/incompressible/pimpleFoam/ channel395/  ./ReTau395WALE   $  cd  ReTau395WALE   2.  The  standard  tutorial  case  of  channel  flow  at  Reτ  =  395:       copy  the  tutorial  case  file  into  your  run  directory. 3.  Edit  constant/LESProper*es  and  system/controlDict $  gedit  constant/LESProperties   LESModel                WALE;   printCoeffs          on;   delta                      cubeRootVol;   ...
  • 29. Simula*on  of  channel  flow   $  gedit  system/controlDict ...   libs  ("libincompressibleWALE.so");   This  line  is  necessary  to  call  the  new  WALE  library  in  solver. $  ./Allrun   4.  Aper  checking  other  numerical  condi*ons  and  parameter,   run  the  solver. 5.  If  the  solver  calcula*on  is  normally  finished,  you  check  the   logs  and  visualize  the  flow  field  with  ParaView,  and  plot  the   fields  profile  generated  by  postChannel.
  • 30. Simula*on  of  channel  flow  at  Reτ  =  110 $  run   $  cp  –r  ~/VandV/OpenFOAM/OpenFOAM-­‐BenchmarkTest/ channelReTau110/template  $FOAM_RUN/ReTau110WALE   $  cd  ReTau110WALE   $  gedit  caseSettings   6.  If  you  use  the  test  case  of  channel  flow  supplied  in  the  V&V   repository,  copy  the  template  case  and  edit  the  seung. controlDict   {      deltaT                    0.002;      endTime                  0.022;      libs                        "libincompressibleWALE.so";   }  
  • 31. Simula*on  of  channel  flow  at  Reτ  =  110 turbulenceProperties   {      simulationType  LESModel;   }     LESProperties   {      LESModel  WALE;      delta  cubeRootVol;   }   The  original  caseSeungs  is  for  DNS  simula*on  on  large  parallel   machine.  You  had  beser  to  change  other  parameters  in   blockMeshDict  and  decomposeParDict.
  • 32. Simula*on  of  channel  flow  at  Reτ  =  110   $  ./Allrun   7.  Aper  checking  other  numerical  condi*ons  and  parameter,   run  the  solver. 8.  If  the  solver  calcula*on  is  normally  finished,  you  check  the   logs  and  visualize  the  flow  field  with  ParaView.  If  the   integra*on  *me  is  not  sufficient  for  the  flow  field  to  become   fully  developed  state,  run  longer  simula*ons.
  • 33. Exercise  2:  Implementa*on  of  coherent   structure  Smagorisky  model
  • 34. Original  source  codes  for  SGS  model $  src   $  cd  turbulenceModels/incompressible/LES/   $  ls   1.  Check  the  original  source  code  for  SGS  model. 2.  Glance  the  codes  of  Smagorinsky  model.   $  gedit  Smagorinsky/Smagorinsky.*   3.  In  this  exercise,  we  look  the  codes  of  dynamic  models.   $  ls  *[Dd]yn*   4.  Compare  the  structures  and  statements  of  the  related  codes   (*.C  and  *.H).  
  • 35. Private  member  func*ons:   updateSubGridScaleFields     void  Smagorinsky::updateSubGridScaleFields   (const  volTensorField&  gradU)   {      nuSgs_  =  ck_*delta()*sqrt(k(gradU));          nuSgs_.correctBoundaryConditions();    }   void  dynLagrangian::updateSubGridScaleFields   (const  tmp<volTensorField>&  gradU)   {      nuSgs_  =  (flm_/fmm_)*sqr(delta())*mag(dev(symm(gradU)));          nuSgs_.correctBoundaryConditions();    }   void  dynOneEqEddy::updateSubGridScaleFields   (      const  volSymmTensorField&  D,          const  volScalarField&  KK    )   {      nuSgs_  =  ck(D,  KK)*sqrt(k_)*delta();          nuSgs_.correctBoundaryConditions();    }   In  Smagorinsky.C In  dynLagrangian.C In  dynOneEqEddy.C
  • 36. Understanding  formula*on  with  codes •  What  calcula*on,  mathema*cal  opera*on,  and  variable  are   necessary  for  coherent  structure  Smagosinsky  model  (CSM)?   Compare  the  formula*on  of  models  with  the  related  source   codes.   •  In  CSM,  the  second  invariant  of  velocity  gradient  is  used:            where   € Q = 1 2 ΩijΩij − SijSij( )= − 1 2 ∂uj ∂xi ∂ui ∂xj Sij = 1 2 ∂ui ∂xj + ∂uj ∂xi # $ %% & ' ((, Ωij = 1 2 ∂ui ∂xj − ∂uj ∂xi # $ %% & ' ((
  • 37. Coherent  structure  Smagorinsky  model  for  non-­‐ rota*ng  flow  (NRCSM) •  Smagorinsky  model  (SM)  based  on  an  eddy-­‐viscosity,   •  The  model  parameter  C  is  determined  as  follows:    with    where                NRCSM  model  is  invalid  for  rota*ng  flow.     € C = C1 | FCS |3/ 2 € C1 = 1 20 , FCS = Q E € τij a = −2CΔ2 | S | Sij (τij a = −2νt Sij, νt = CΔ2 | S |) E = 1 2 ΩijΩij + SijSij( )= 1 2 ∂ui ∂xj $ % && ' ( )) 2
  • 38. Coherent  structure  Smagorinsky  model  (CSM) •  Smagorinsky  model  (SM)  based  on  an  eddy-­‐viscosity,   •  The  model  parameter  C  is  determined  as  follows:    with    where        Improved  CSM  model  is  valid  for  rota*ng  flow.     € C = C2 | FCS |3/ 2 FΩ € C2 = 1 22 , FCS = Q E , FΩ =1− FCS € τij a = −2CΔ2 | S | Sij (τij a = −2νt Sij, νt = CΔ2 | S |) E = 1 2 ΩijΩij + SijSij( )= 1 2 ∂ui ∂xj $ % && ' ( )) 2
  • 39. Seung  for  making  new  library $  run   $  cd  ../src/libraries   $  cp  -­‐r  incompressibleWALE/WALE/  ./NRCSM   $  cp  –r  incompressibleWALE/Make  ./NRCSM   $  cd  NRCSM   $  rename  WALE  NRCSM  *   $  rm  –r  NRCSM.dep   $  rm  –rf  Make/linux64Gcc47DPOpt   $  gedit  Make/files   1.  Copy  the  source  code  of    WALE  model.  Compile  them. NRCSM.C   LIB  =  $(FOAM_USER_LIBBIN)/libNRCSM   $  sed  –i  ‘s/WALE/NRCSM/g’  NRCSM.C     $  sed  –i  ‘s/WALE/NRCSM/g’  NRCSM.H  
  • 40. Seung  for  making  new  library $  wmake  libso   $  ls  $FOAM_USER_LIBBIN   If  you  find  the  renamed  and  recompiled  library  (libNRCSM.so),   you  are  ready  to  make  a  new  library  for  the  NRCSM.     2. You  can  easily  learn  the  codes  for  calcula*ng  the  Q  and  E   terms  from  the  postProcessing  u*li*es.           There  are  two  ways  of  calcula*ng  Q,  that  is,  with  velocity   gradient  tensor  and  with  SS  and  ΩΩ terms. $  util   $  cd  postProcessing/velocityField/Q   $  gedit  Q.C  &  
  • 41. Introducing  model  coefficient  C1 $  run   $  cd  ../src/libraries/NRCSM/   $  gedit  NRCSM.C  NRCSM.H   3.  Replace  all  ‘cw’  with  ‘c1’  (gedit  or  sed),  and  change  the  value   to  0.05.          c1_          (                  dimensioned<scalar>::lookupOrAddToDict                  (                          "c1",                          coeffDict_,                          0.05                  )          )   NRCSM.C   $  wmake  libso  
  • 42. Q  and  E  calcula*ons 4.  In  NRCSM.C,  insert  the  calcula*on  of  Q  and  E.  Copy&Paste   the  corresponding  sec*on  from  Q.C.  Save  and  Compile  them.   volScalarField  Q   (    0.5*(sqr(tr(gradU))  -­‐  tr(((gradU)&(gradU))))   );   volScalarField  E   (    0.5*(gradU  &&  gradU)   );   NRCSM.C   $  gedit  NRCSM.C   $  wmake  libso  
  • 43. FCS  and  C  calcula*ons 5.  In  NRCSM.C,  insert  the  calcula*on  of  FCS  and  C  (coefficient   of  eddy  viscosity  model).  Save  and  Compile  them.   volScalarField  Fcs   (    Q/ max(E,dimensionedScalar("SMALL",E.dimensions(),SMALL))   );   volScalarField  ccsm_   (        c1_*pow(mag(Fcs),1.5)   );   NRCSM.C   $  gedit  NRCSM.C   $  wmake  libso  
  • 44. νSGS  calcula*on 6.  In  NRCSM.C,  modify  the  nuSGS_  calcula*on.  Look  the  other   updateSubGridScaleFields  func*ons  in  the  dynamic  models.   nuSgs_  =  ccsm_*sqr(delta())*mag(dev(symm(gradU)));   NRCSM.C   Save  and  compile  them.   $  wmake  libso   7.  Finally,  comment  out  or  delete  unnecessary  statements  (the   calcula*ons  for  WALE  model).  Save  and  compile  them.   $  wmake  libso   $  gedit  NRCSM.C  
  • 45. kSGS  calcula*on //-­‐  Return  SGS  kinetic  energy   //    calculated  from  the  given  velocity  gradient   tmp<volScalarField>  k(const  tmp<volTensorField>&  gradU)  const   {    return  (2.0*c1_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));   }   NRCSM.H   8.  The  calcula*on  of  kSGS  is  invalid,  but  the  value  of  kSGS  is  not   actually  used  in  LES  with  NRCSM  model.  If  you  requires  a   proper  kSGS,  consult  the  paper  of  Kobayashi  (PoF,  2005).  
  • 46. Valida*on  with  channel  flow $  run   $  cp  –r  $FOAM_TUTORIALS/incompressible/pimpleFoam/ channel395/  ./ReTau395NRCSM   $  cd  ReTau395NRCSM   9.  The  standard  tutorial  case  of  channel  flow  at  Reτ  =  395:       copy  the  tutorial  case  file  into  your  run  directory. 10. Edit  constant/LESProper*es  and  system/controlDict $  gedit  constant/LESProperties   LESModel                NRCSM;   printCoeffs          on;   delta                      cubeRootVol;   ...
  • 47. Valida*on  with  channel  flow $  gedit  system/controlDict ...   libs  ("libNRCSM.so");   This  line  is  necessary  to  call  the  new  NRCSM  library  in  solver. $  ./Allrun   11. Aper  checking  other  numerical  condi*ons  and  parameter,   run  the  solver. 12. If  the  solver  calcula*on  is  normally  finished,  you  check  the   logs  and  visualize  the  flow  field  with  ParaView,  and  plot  the   fields  profile  generated  by  postChannel.
  • 48. Addi*onal  works 1.  Compile  and  test  the  WALE  model  supplied  from   openfoam-­‐dev.  Prepare  a  Make  directory  by   yourself.   2.  Implementa*on  of  CSM  model.  Add  FΩ  term  and  C2   coefficient.   3.  Calcula*on  of  Q  and  E  terms  with  SS  and  ΩΩ  terms.   Compare  the  results  with  the  solu*on  of  Exercise  2.   4.  Valida*on  of  customized  model  with  other  flow   fields  such  pipe,  backstep,  cylinder,  and  rota*ng   flow.  
  • 49. References •  OpenFOAM  User  Guide   •  OpenFOAM  Programmer’s  Guide   •  梶島,  乱流の数値シミュレーション 改訂版,  養賢堂  (2014).   •  P.  R.  Spalart  et  al.,  “Comments  on  the  Feasibility  of  LES  for   Wings,  and  on  a  Hybrid  RANS/LES  Approach”,  1st  ASOSR   CONFERENCE  on  DNS/LES  (1997).   •  P.  R.  Spalart,  “Young-­‐Person’s  Guide  to  Detached-­‐Eddy   Simula*on  Grids”,  NASA  CR-­‐2001-­‐211032  (2001).   •  F.  Nicoud  and  F.  Ducros,  “Subgrid-­‐scale  modelling  based  on   the  square  of  velocity  gradient  tensor”,  Flow,  Turbulence  and   Combus*on,  62,  pp.183-­‐200  (1999).  
  • 50. References •  小林,  “乱流構造に基づくサブグリッドスケールモデルの開 発”,  ながれ,  29,  pp.157-­‐160  (2010).   •  H.  Kobayashi,  “The  subgrid-­‐scale  models  based  on  coherent   structures  for  rota*ng  homogeneous  turbulence  and   turbulent  channel  flow”,  Phys.  Fluids,  17,  045104  (2005).   •  H.  Kobayashi,  F.  Ham  and  X.  Wu,  “Applica*on  of  a  local  SGS   model  based  on  coherent  structures  to  complex  geometries”,   Int.  J.  Heat  Fluid  Flow,  29,  pp.640-­‐653  (2008).