User manual for CFD-DEM simulation
Examples & tutorials
Some preliminary examples are located under directory examples/
, which can be run with, e.g., (in the example directory)
./Allrun
Note if the pynetdem
package cannot be imported into python, one might need to exiplictly add the path (e.g., sys.path.append("/Users/lzhshou/Documents/Research/myProjects/apaam/repo/netdem/build/lib/")
) of the netdem
python library in createDEM.py
.
Run water entry example
-
Copy the example folder to a local directory
cd cfddem cp -rf examples/interIBdem/water_entry local/interIBdem/
-
Run the example
- Please note that
system/fvSolution
->coupling
specifies the DEM file and function that will be invoked for the coupling.cd local/interIBdem/water_entry ./Allclean ./Allrun-parallel
- Please note that
-
In case the run fails, please check the lib path has been correctly set in
createDEM.py
, where the path is the directory of netdem libs.
Paraview Rendering
-
Render CFD results
- Open
interIBdem.foam
to paraview - Change the properties
Type Case
toDecomposed Case
and uncheckSkip Zero Time
(optional) - Play with the result fields
- Optinal: for viaulizeing interal filed results, one can use the
Clip
orSlice
filter - Optinal: to construct the interface of the water and air, one can add
Contour
filter tointerIBdem.foam
, setContour by
toalpha.water
and change the contour value to0.5
- Open
-
Render DEM results
- Open dem/particle_mesh_xxx.vtk.serries to paraview
- Optional: select all particle_mesh_xxx.vtk.serries and add a
Group Datesets
filter - Optional: add a
Caculator
filter after theGroup Datesets
filter, setResult Array Name
toU
, and input formulationvel
. This will add aU
field to the particles, wihch can be linked with the CFD fieldU
- Optional: for probing the evolution of a property value with time, one can add a
Plot Data Over Time
filter to theGroup Datesets
, and change theField Associates
toCells
. Then, one can play with the property to show in the newly openedLine Chart View
Modify the water entry parameters
- Fuild properties such as viscosity and density is specified in file
constant/transportProperties
.- Please note that fuilds being used are speficied in
phases
.
- Please note that fuilds being used are speficied in
- Geometries are determined by the
system/blockMeshDict
. Please note that whenscale
exist, the coordinates of the vertices with be multiplied by the scale when creating the real mesh.- Mesh size are govened by the three values before
simpleGrading
in theblocks
->hex
entry. It is suggested to use cubic elements.
- Mesh size are govened by the three values before
- The inital volume fraction of the fuilds are specifed in
system/setFiledsDict
.- Please not that the
scale
parameter insystem/blockMeshDict
will not work here, thus the vertices here are their exact values. - Entry
box (-0.05 -0.05 -0.15) (0.05 0.05 0.03)
specifies the lower-left-front and upper-right-back coordicates of the box - Please note that the field entry
alpha.glycerol
should be consistent with that specified inconstant/transportProperties
->phases
- Please not that the
- File
system/controlDict
specifies the simulation time, timestep and writing interval, etc. - In
createDEM.py
->oneSphere()
funciton, one can modify the DEM domain geometries and particle properties.- Please note that in the present funciton, the parameter
scale
varies the size of the DEM domain, wall box and particle intertion region, whereas thep_size
is the exact value of particle diameter.
- Please note that in the present funciton, the parameter