FSILBM3D: Fluid-structure interaction solver based on Lattice Boltzmann method
- Installation
- Run solver
- Input file description
- Simulation control parameters
- Output file description
- License
Clone FSIBLM3D to a local machine,
git clone git@github.com:gaoak/FSILBM3D.git
cd FSILBM3D
To compile FSILBM3D in linux system, run
make
The executable file is FSILBM3D
The default compiler is intel fortran. To use a GNU gfortran compiler gcc, you need to change the first line in the Makefile
CMP = intel# intel,gcc
to
CMP = gcc# intel,gcc
Copy input parameter file (inFlow.dat in examples), body mesh file (plate.dat in examples) and create or clean directories bash script (cleanfiles.sh in examples) to the work directory.
Create data folders in the work directory by running bash script (cleanfiles.sh)
for folder in DatBodySpan DatInfo DatBody DatFlow
do
if [[ -d $folder ]]; then
rm -r $folder
mkdir $folder
echo Clear $folder
else
mkdir $folder
echo Create $folder
fi
done
for file in check.dat continue.dat log.* *.txt
do
if [[ -e $file ]]; then
rm $file
echo Delete $file
fi
done
Run the solve using bash script
nohup /your/local/path/FSILBM3D/FSILBM3D &>log
Submit the PBS script (2 threads for example)
#!/bin/sh
#PBS -N LBM3D-Test
#PBS -e stderr.txt
#PBS -o stdout.txt
#PBS -l nodes=1:ppn=2
#PBS -l walltime=1:59:00
#PBS -q CPU_Small
PBS_WDIR=`pwd`/FSILBM3D/FSILBM3D
PBS_ENAME=FSILBM3D
#########################################
echo Working directory is $PBS_O_WORKDIR
echo test is $PBS_O_HOST
echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
echo This jobs runs on the following processors:
echo `cat $PBS_NODEFILE`
NPROCS=`wc -l < $PBS_NODEFILE`
echo This job has allocated $NPROCS nodes
cd $PBS_O_WORKDIR
$PBS_WDIR/$PBS_ENAME
- inFlow.dat Simulation control parameters
- plate.dat Body mesh file
- cleanfiles.sh Bash script to create/clean output directories
(A line starting with # indicates a comment)
-
Parallel
- npsize : The core number used in the simulaion
-
FlowCondition
-
isConCmpt : Determining new simulation or continue simulaion
- 0 : Calculate from the beginning
- 1: Calculate from last time output
-
numsubstep: Number of sub-steps for solid time-stepping solution
-
timeSimTotal: Dimensionless total simulation time (time/Tref <= timeSimTotl)
-
timeContiDelta: Dimensionless time interval for writing continue (continue.dat) which used for continue simulation
-
timeWriteBegin: Dimensionless time to start fluid mesh (in DatFlow) and body mesh (in DatBody) writing
-
timeWriteEnd: Dimensionless time to end fluid mesh (in DatFlow) and body mesh (in DatBody) writing (timeOutBegin should less than timeOutEnd)
-
timeWriteFlow: Dimensionless time interval for fluid mesh (in DatFlow) writing
-
timeWriteBody : Dimensionless time interval for body mesh (in DatBody) writing
-
timeWriteInfo : Dimensionless time interval for post procesing information (such as force, velocity et. al. in DatInfo)
-
Re: Dimensionless Reynolds Number
-
denIn: Fluid density (Usually it's 1 )
-
uvwIn: The given incoming Velocity
$(U_\infty, V_\infty, W_\infty)$ (determined by the velocity control parameters velocityKind)
-
shearRateIn, velocityKind : the velocity control parameters
-
0 : if velocityKind equals 0 , shearRateIn are the shear rate for incoming flow
$U_\infty = U_{in} + 0 * shearRate(1) + y * shearRate(2) + z * shearRate(3)$ $V_\infty = V_{in} + x * shearRate(1) + 0 * shearRate(2) + z * shearRate(3)$ $W_\infty = W_{in} + x * shearRate(1) + y * shearRate(2) + 0 * shearRate(3)$ -
1 : if velocityKind equals 2 , shearRateIn are the oscillatory parameter for incoming flow
$U_\infty = U_{in} + shearRate(1) * cos(2 * pi * shearRate(2) * time + shearRate(3) * pi / 180)$ $V_\infty = V_{in}$ $W_\infty = W_{in}$
-
VolumeForceIn,VolumeForceAmp,VolumeForceFreq,VolumeForcePhi : Parameters for Volume Force
According to the NS equation :
$rho * Du/Dt = rho * f_x - dp/dx$ The volume force is calculated as following:
$volumeForce(1) = VolumeForceIn(1) + VolumeForceAmp * sin(2 * pi * VolumeForceFreq * time + VolumeForcePhi)$ $volumeForce(2) = VolumeForceIn(2)$ $volumeForce(3) = VolumeForceIn(3)$ -
TrefType: Determining the definition of reference time
-
0 : Caculated by referece length and reference velocity
$Tref = Lref / Uref$ -
1 : Caculated by the maximum frequency of the bodies
$Tref = 1 / max(frequency)$ -
else : The input value Tref in parameter file inflow.dat
-
-
UrefType: Determining the definition of reference velocity
-
0 : X-incoming flow velocity :
$U_\infty$ -
1 : Y-incoming flow velocity :
$V_\infty$ -
2 : Z-incoming flow velocity :
$W_\infty$ -
3 : Incoming flow velocity magnitude :
$\sqrt{U_\infty^2 + V_\infty^2}$ -
4 : The velocity amplitude only for velocityKind 2 :
$|shearRateIn(1)|$ -
5 : Flapping frequency velocity :
$L f$
-
6 : Maximum plunging velocity :
$2\pi f a$ -
7 : Twice maximum plunging velocity used by Park et al. (2017) PoF :
$2\pi f a * 2$ -
else : The input value Uref in parameter file inflow.dat
-
-
ntolLBM: Maximum number of iterations for the LBM method
-
dtolLBM: Error tolerance for the LBM method
-
interpolateScheme: Interpolate Scheme for multi-block communication.
-
1 : Linear interpolation.
-
2 : Third-(boundary) and fourth-order(inner) mix interpolation.
-
-
-
FluidBlocks
- nblock: Number of fluid grid partitions
- ID: The ID of fluid grid
-
iCollideModel: Determines the LBM model used in simualtion
- 1 : SRT : Single Relaxation Time
- 2 : TRT : Double Relaxation Time
- 3 : MRT : Multiple Relaxation Time
- 11 : SMAG-SRT: Single Relaxation Time With Smagorinsky Model
- 12 : Regular-SRT: Regularised Single Relaxation Time
- 13 : ELBM-SRT: Single Relaxation Time In ELBM
- 14 : WALE-SRT: WALE Single Relaxation Time
- 15 : Vremann-SRT: Vremann Single Relaxation Time
- offsetOutput: The computation domain moves with first body if this equals 1
- isoutput: Outputting the relative flow grid and body, i.e. in the moving frame of reference, if this equals 1
- xDim,yDim,zDim: Number of nodes in the x, y, and z directions of the fluid block
- dh: For uniform grid dh=dx=dy=dz
- xmin,ymin,zmin: Starting position of the fluid block
-
boundaryConditions(1:6) (xmin,xmax,ymin,ymax,zmin,zmax): Boundary conditions parameters on six directions
- 0: Fluid boundary conditions
- 101: Dirichlet boundary condition (velocity equal to a specified value)
- 102: Dirichlet boundary condition (The value of velocity at the boundary is not a fixed constant, but a non-uniform distribution of function values)
- 103: First order extrapolation boundary conditions
- 104: Second-order extrapolation boundary conditions
- 201: Fixed wall(full way bounce back)
- 202: Moving wall, only for the top and bottom boundaries
$(ymin, ymax)$ - 203: Fixed wall(half way bounce back, good choice for turbulent in LES compute)
- 301: Periodic Boundary(For the son block, the xDim/yDim/zDim should have have one more layer than the father block)
- 302: Symmetric boundary
- params: Pending Parameters
-
SolidBody
-
IBPenaltyalpha : Velocity correction parameter of the penalty function in the IBM method
-
alphaf : Parameter for correcting torsion in the mass matrix
-
NewmarkGamma, NewmarkBeta: Parameters of the Newmark method
-
dampK, dampM : Stiffness damping K, mass damping M
-
dtolFEM, ntolFEM : Maximum number of iterations and error tolerance for the FEM method
-
nFish : Total number of the solid bodies
-
nfishGroup : Numbers of the solid bodies type
-
isKB : Determining the kind of parameters of the flexible bodies
- 0 : KB, KS(Bending Stiffness, Stretching Stiffness)
- 1 : EmR, TcR (Elastic Modulus Ratio, Characteristic Time Ratio)
-
fishnum (fishGroup) : The number of the solid bodies in the specific type
-
numX,numY,numZ : Number of arrangements of multiple bodies in the x, y, and z directions
-
FEmeshName(iFish) : The name of the body mesh file in the specific type
-
iBodyModel(iFish) : Choose for the body models
- 1: rigid body
- 2: flexible body
-
iBodyType(iFish) : Type of virtual object
-
isMotionGiven : Degrees of freedom in six directions
-
denR(iFish) : Density ratio
$(rho_b * h / rho_f * L)$ , where$L$ is the virtual plate thickness -
psR(iFish) : Poisson ratio
-
Freq(iFish) : The flapping frequence for flexible bodies
-
firstXYZ : The initial position of the first point of the bodies
-
deltaXYZ : If there are more than one bodies in a type, deltaXYZ determines the interval between front and rear solids
-
initXYZVel : The given initial translatory velocity for the flexible body and the given translational velocity for the rigid body.
-
XYZAmpl, XYZPhi : Parameters for body flapping
$XYZ = XYZAmpl * dcos(2.0 * pi * Freq * time + XYZPhi)$
-
AoAo, AoAAmpl, AoAPhi : Parameters for body rotation
$Theta = AoAo + AoAAmpl * dcos(2.0 * pi * Freq * time + AoAPhi)$
-
-
ProbingFluid
- fluidProbingNum: The number of data detection points in flow field
- fluidProbingCoords : The coordinates of detection points
-
ProbingSolid
- solidProbingNum: The number of data detection points in bodies
- solidProbingNode: The serial number of each detection points in the specific body
- Output files and directories
- DatBody : Folder of body results
- DatBodySpan : Folder of spanwise-extension body results
- DatFlow : Floder of flow field results
- DatInfo : Floder of force and power et. al. results
- Check.dat : Parameters record file for checking
- continue.dat : Results record file for continue calculating
- Files in DatInfo description
-
FishAngular.plt
-
AoA : The deflection angle of the body
$(y2-y1)/(x2-x1)$ ; -
Ty-TH : Height difference between the first and last points
$(y2 - y1)$ -
Hy : y Coordinate of the first point
$(y1)$ -
Ty : y Coordinate of the last point
$(y2)$
-
AoA : The deflection angle of the body
-
FishPower.plt : The power information of the bodies
- Ptot : Px + Py + Pz
-
Px,Py,Pz : Output power calculated by (
$force * velcity$ )
-
FishEnergy.plt : The energy of the bodies
- E_s : Streching strain energy
- E_b : Bending strain energy
- E_p : Total strain energy calculated by (E_s + E_b)
- E_w : Kinetic energy
- E_t : total energy calculated by (E_p + E_w)
-
E_k : Output energy calculated by (
$E_k = E_k + t * ptot$ )
- FishForce.plt :The forces exerted on the bodies
- FishNodeBegin.plt : The information of the first point of the bodies
- FishNodeCenter.plt : The information of the center point of the bodies
- FishNoEnd.plt : The information of the last point of the bodies
- FishNodeMean.plt : The average information of the all points of the bodies