ib-lbm coding session: brief introductionlbmworkshop.com/wp-content/uploads/2011/08/2011-08... ·...
TRANSCRIPT
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
IB-LBM coding session: brief introduction
Timm Kruger
Department of Microstructure Physics and Metal Forming40237 Dusseldorf, [email protected]
LBM Workshop (Edmonton, Canada), August 22–26, 2011
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 1 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Outline
1 General comments
2 Part 1: rigid cylinder in external flow
3 Part 2: deformable cylinder in external flow
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 2 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Outline
1 General comments
2 Part 1: rigid cylinder in external flow
3 Part 2: deformable cylinder in external flow
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 3 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
IB-LBM coding sessions
part 1: rigid cylinder in external shear flow
Karman vortex streetstreamline penetration
part 2: deformable cylinder in external shear flowlateral migrationtank-treading
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 4 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Model properties (1)
D2Q9 BGK lattice Boltzmann modelLadd/Guo forcingimmersed boundary method with bi-linear interpolationforcing via constitutive model (no direct forcing)
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 5 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Model properties (2)
rigid cylinder
elastic penalty force for each node, F i ∝ −(x i − x0i )
fixed in space =⇒ no translation/rotation
deformable cylinderelastic springs between neighboring nodesfreely moving in space
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 6 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Algorithm structure
simulation initialization
specify simulation parameters (user)
allocate memory and initialize variables
simulation loop
1 compute node forces from deformation via constitutive model2 spread node forces to fluid lattice3 perform LBM including external forcing4 interpolate fluid velocity to nodes5 update node positions6 write data to disk if desired7 go back to first step
finalize simulation
return
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 7 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Algorithm structure
simulation initialization
specify simulation parameters (user)
allocate memory and initialize variables
simulation loop
1 compute node forces from deformation via constitutive model2 spread node forces to fluid lattice3 perform LBM including external forcing4 interpolate fluid velocity to nodes5 update node positions6 write data to disk if desired7 go back to first step
finalize simulation
return
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 7 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Algorithm structure
simulation initialization
specify simulation parameters (user)
allocate memory and initialize variables
simulation loop
1 compute node forces from deformation via constitutive model2 spread node forces to fluid lattice3 perform LBM including external forcing4 interpolate fluid velocity to nodes5 update node positions6 write data to disk if desired7 go back to first step
finalize simulation
return
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 7 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Remarks
code and compiler
single file, parameters hard-coded =⇒ compile after change
compiler call:g++ -O3 IBLBM_2D_example.cc -o binary
execute without parameters: ./binary
folders and files
write VTK data into folders
vtk_fluidvtk_particle
=⇒ ParaView
write ASCII data for force, position, velocity into data.dat=⇒ gnuplot, Tecplot
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 8 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Outline
1 General comments
2 Part 1: rigid cylinder in external flow
3 Part 2: deformable cylinder in external flow
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 9 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Karman vortex street
aspects to studyfind valid parameters for vortex streetidentify & investigate numerical problemsobtain lift & drag forcesvisually inspect results with ParaView
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 10 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Steady flow around cylinder
aspects to studyfind valid parameters for stready flowvisually inspect results with ParaView
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 11 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Hints
compile with preprocessor command#define RIGID_CYLINDER
large system size recommended, e.g., 300× 60 (morestable)use high particle rigidity (rigidity important)for vortex street
zero wall velocityfinite gravityposition particle close to but not on centerline
for steady flowzero wall velocityfinite gravityposition particle on centerlinee
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 12 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Outline
1 General comments
2 Part 1: rigid cylinder in external flow
3 Part 2: deformable cylinder in external flow
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 13 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Lateral migration in Poiseuille flow
aspects to studyfind valid parameters for lateral migrationobserve migration velocityvisually inspect results with ParaView
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 14 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Tank-treading in shear flow
aspects to studyfind valid parameters for tank-treadingobserve tank-treading rotation and streamlinesvisually inspect results with ParaView
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 15 / 16
General comments Part 1: rigid cylinder in external flow Part 2: deformable cylinder in external flow
Hints
compile with preprocessor command#define DEFORMABLE_CYLINDER
small system size recommended, e.g., 30× 30 (faster)use small particle rigidity (deformability important)for lateral migration
zero wall velocityfinite gravityposition particle close to one wall
for tank-treadingfinite wall velocityzero gravityposition particle on centerline
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 16 / 16