ib-lbm coding session: brief...
TRANSCRIPT
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Outline
1 General comments
2 Part 1: deformable particle (sphere/RBC)
3 Part 2: quasi-rigid cylinder
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 2 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Outline
1 General comments
2 Part 1: deformable particle (sphere/RBC)
3 Part 2: quasi-rigid cylinder
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 3 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
IB-LBM coding sessions
part 1: deformable particle (sphere/RBC) in simple shear flowtank-treading/tumblinglateral migration
part 2: rigid cylinder in Poiseuille flowstreamline penetrationKarman vortex street
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 4 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Model properties (1)
D2Q9 BGK lattice Boltzmann modelLadd/Guo forcingimmersed boundary method with bi-linear interpolationelastic forcing model
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 5 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Model properties (2)
deformable cylinderelastic springs between neighboring nodeselastic ‘bending springs’ between neighboring linksfreely moving in space
rigid cylinder
elastic penalty force for each node, F i ∝ −(x i − x0i )
fixed in space =⇒ no translation/rotation
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 6 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 7 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 7 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Outline
1 General comments
2 Part 1: deformable particle (sphere/RBC)
3 Part 2: quasi-rigid cylinder
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 9 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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 10 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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 11 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Hints
compile with preprocessor command#define DEFORMABLE_CYLINDER or#define DEFORMABLE_RBC
small system size recommended, e.g., 30× 30 (faster)use small particle rigidities (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 12 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Outline
1 General comments
2 Part 1: deformable particle (sphere/RBC)
3 Part 2: quasi-rigid cylinder
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 13 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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 14 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
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 15 / 16
General comments Part 1: deformable particle (sphere/RBC) Part 2: quasi-rigid cylinder
Hints
compile with preprocessor command#define RIGID_CYLINDER
large system size recommended, e.g., 300× 60 (morestable)use higher 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 centerline
Max-Planck-Institut fur Eisenforschung, Dusseldorf, Germany IB-LBM coding session 16 / 16