Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a postprocessing function for cfd-dem #1147

Merged
merged 33 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f115704
Improved spouted-bed examples
blaisb May 10, 2024
1d9e21c
Fix documentation
blaisb May 13, 2024
c52dd50
create postprocessing_cfd_dem.h
yashuuzi May 14, 2024
3912dab
edit gls_vans.h, gls_vans.cc
yashuuzi May 14, 2024
8ebd17b
edit CMakeLists.txt
yashuuzi May 14, 2024
f47ca7d
fixed bug on 1st complie
yashuuzi May 14, 2024
793e59e
fix the bug related to postprocessing_cfd_dem file
yashuuzi May 15, 2024
e8a2a84
fixed bug related to "this->"
yashuuzi May 15, 2024
00ba941
Bruno modified something
yashuuzi May 15, 2024
6bd18ca
move postproseccing function file to fem-dem/
yashuuzi May 15, 2024
46c9b6b
Deleted file
yashuuzi May 15, 2024
84da1be
successed in compiling
yashuuzi May 16, 2024
f15d0e0
move everything from gls_vans to cfd_dem_coupling
yashuuzi May 16, 2024
d0c7267
change mapping
yashuuzi May 16, 2024
21117dc
successeded in calculating void fraction
yashuuzi May 17, 2024
e54157a
complete
yashuuzi May 17, 2024
e859d27
fixed conflict
yashuuzi May 17, 2024
16dc08e
Apply suggestions from 1st code review
yashuuzi May 22, 2024
41fac64
change the name of function and description
yashuuzi May 22, 2024
8763aff
fixed paramter issure
yashuuzi May 23, 2024
48fe4d3
fixed include issue
yashuuzi May 23, 2024
6bff7eb
change the expression doxigen and confirm it works properly
yashuuzi May 23, 2024
2d7c533
reindent using vim shortcut
yashuuzi May 29, 2024
748925e
reindent again
yashuuzi May 29, 2024
3796990
add a line at the end of file gls_vans.h
yashuuzi May 29, 2024
d98715c
add the description of function to document, parameter section
yashuuzi May 29, 2024
d3496ae
Add parameter to the document
yashuuzi May 30, 2024
22856ad
change the name of output file on doc
yashuuzi May 30, 2024
718da85
small change
yashuuzi May 30, 2024
2571a70
Apply suggestions from the 2nd review
yashuuzi Jun 4, 2024
6e74378
make application_test
yashuuzi Jun 4, 2024
0a7c2f3
create application test, but ctest fail
yashuuzi Jun 5, 2024
5c77e41
passed the test
yashuuzi Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions applications_tests/lethe-fluid-particles/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ file(COPY dynamic_contact_search_files/dem.triangulation.info DESTINATION "${CMA
file(COPY dynamic_contact_search_files/dem.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/dynamic_contact_search.${_build_type}/mpirun=1/")
file(COPY dynamic_contact_search_files/dem.triangulation_variable.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/dynamic_contact_search.${_build_type}/mpirun=1/")

file(COPY conserve_phase_volumes_files/dem.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.triangulation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.triangulation.info DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")
file(COPY conserve_phase_volumes_files/dem.triangulation_variable.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conserve_phase_volumes.${_build_type}/mpirun=1/")

file(COPY liquid_fluidized_bed_files/dem.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/liquid_fluidized_bed.${_build_type}/mpirun=1/")
file(COPY liquid_fluidized_bed_files/dem.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/liquid_fluidized_bed.${_build_type}/mpirun=1/")
file(COPY liquid_fluidized_bed_files/dem.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/liquid_fluidized_bed.${_build_type}/mpirun=1/")
Expand Down Expand Up @@ -65,4 +73,5 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set_tests_properties(lethe-fluid-particles/restart_particle_sedimentation.mpirun=1.debug PROPERTIES TIMEOUT 1200)
set_tests_properties(lethe-fluid-particles/dynamic_contact_search.mpirun=1.debug PROPERTIES TIMEOUT 1200)
set_tests_properties(lethe-fluid-particles/liquid_fluidized_bed.mpirun=1.debug PROPERTIES TIMEOUT 5000)
set_tests_properties(lethe-fluid-particles/conserve_phase_volumes.mpirun=1.debug PROPERTIES TIMEOUT 5000)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.186842813% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
10000 particles are in the simulation
Number of active cells: 4500
Number of degrees of freedom: 21504
Volume of triangulation: 0.001
---------------------------------------------------------------
Initializing DEM parameters
Warning: expansion of particle-wall contact list is disabled.
This feature is useful in geometries with concave boundaries.
Finished initializing DEM parameters
DEM time-step is 1e-05 s
--------------
Void Fraction
--------------

*********************************************************************************
Transient iteration: 1 Time: 0.0001 Time step: 0.0001 CFL: 0.00104947
*********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 0
Finished 10 DEM iterations
---------------------------------------------------------------
Total volume of fluid: 0.8558614008 m^3
Total volume of particles: 0.1409160992 m^3
Global continuity equation error: -8.247081136e-13 s^-1
Max local continuity error: 2.939360858e-07 s^-1

*********************************************************************************
Transient iteration: 2 Time: 0.0002 Time step: 0.0001 CFL: 0.00467056
*********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 9
Finished 10 DEM iterations
---------------------------------------------------------------
Total volume of fluid: 0.8558614008 m^3
Total volume of particles: 0.1409160992 m^3
Global continuity equation error: -1.170125066e-11 s^-1
Max local continuity error: 2.667651567e-07 s^-1

*********************************************************************************
Transient iteration: 3 Time: 0.0003 Time step: 0.0001 CFL: 0.00426005
*********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 9
Finished 10 DEM iterations
---------------------------------------------------------------
Total volume of fluid: 0.8558614008 m^3
Total volume of particles: 0.1409160992 m^3
Global continuity equation error: -4.68769759e-12 s^-1
Max local continuity error: 2.432011016e-07 s^-1
253 changes: 253 additions & 0 deletions applications_tests/lethe-fluid-particles/conserve_phase_volumes.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
# Listing of Parameters
#----------------------

set dimension = 3

#---------------------------------------------------
# Simulation Control
#---------------------------------------------------

subsection simulation control
set method = bdf1
set number mesh adapt = 0
set output name = result_
set output frequency = 0
set startup time scaling = 0.6
set time end = 0.0003
set time step = 0.0001
set subdivision = 1
set log precision = 10
end

#---------------------------------------------------
# Restart
#---------------------------------------------------

subsection restart
set checkpoint = false
set frequency = 100
set restart = false
set filename = case
end

#---------------------------------------------------
# FEM
#---------------------------------------------------

subsection FEM
set velocity order = 1
set pressure order = 1
end

#---------------------------------------------------
# Physical Properties
#---------------------------------------------------

subsection physical properties
subsection fluid 0
set kinematic viscosity = 0.0000008379
set density = 996.7775
end
end

#---------------------------------------------------
# Mesh
#---------------------------------------------------

subsection mesh
set type = dealii
set grid type = subdivided_hyper_rectangle
set grid arguments = 15,20,15:-0.05,-0.05,-0.05:0.05,0.05,0.05:true
set initial refinement = 0
set expand particle-wall contact search = false
end

#---------------------------------------------------
# Void Fraction
#---------------------------------------------------

subsection void fraction
set mode = pcm
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00000125
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
end

#---------------------------------------------------
# CFD-DEM
#---------------------------------------------------

subsection cfd-dem
set grad div = false
set void fraction time derivative = false
set drag force = true
set buoyancy force = true
set shear force = true
set pressure force = true
set drag model = difelice
set coupling frequency = 10
set vans model = modelB
set particle statistics = false
end

#---------------------------------------------------
# Post-processing
#---------------------------------------------------

subsection post-processing

set output frequency = 1

set verbosity = verbose

set calculate phase volumes = true
end

#---------------------------------------------------
# Boundary Conditions
#---------------------------------------------------

subsection boundary conditions
set time dependent = true
set number = 5
subsection bc 0
set id = 0
set type = slip
end
subsection bc 1
set id = 1
set type = slip
end
subsection bc 2
set id = 4
set type = slip
end
subsection bc 3
set id = 5
set type = slip
end
subsection bc 4
set id = 2
set type = function
subsection u
set Function expression = 0
end
subsection v
set Function expression = 0.1
end
subsection w
set Function expression = 0
end
end
end

#---------------------------------------------------
# Timer
#---------------------------------------------------

subsection timer
set type = none
end

#---------------------------------------------------
# Model parameters
#---------------------------------------------------

subsection model parameters
subsection contact detection
set contact detection method = dynamic
set dynamic contact search size coefficient = 0.9
set neighborhood threshold = 1.8
end
subsection load balancing
set load balance method = dynamic
set threshold = 0.5
set dynamic check frequency = 10000
end
set particle particle contact force method = hertz_mindlin_limit_overlap
set particle wall contact force method = nonlinear
set integration method = velocity_verlet
set rolling resistance torque method = no_resistance
end

#---------------------------------------------------
# Physical Properties
#---------------------------------------------------

subsection lagrangian physical properties
set gx = 0
set gy = -9.81
set gz = 0
set number of particle types = 1
subsection particle type 0
set size distribution type = uniform
set diameter = 0.003
set number of particles = 10000
set density particles = 2505
set young modulus particles = 1000000
set poisson ratio particles = 0.3
set restitution coefficient particles = 0.97
set friction coefficient particles = 0.1
set rolling friction particles = 0.2
end
set young modulus wall = 1000000
set poisson ratio wall = 0.3
set restitution coefficient wall = 0.33
set friction coefficient wall = 0.3
set rolling friction wall = 0.3
end

#---------------------------------------------------
# Floating walls
#---------------------------------------------------

subsection floating walls
set number of floating walls = 1
subsection wall 0
subsection point on wall
set x = 0
set y = -0.04
set z = 0
end
subsection normal vector
set nx = 0
set ny = 1
set nz = 0
end
set start time = 0
set end time = 50
end
end

#---------------------------------------------------
# Non-Linear Solver Control
#---------------------------------------------------

subsection non-linear solver
subsection fluid dynamics
set tolerance = 1e-9
set max iterations = 10
set verbosity = quiet
end
end

#---------------------------------------------------
# Linear Solver Control
#---------------------------------------------------

subsection linear solver
subsection fluid dynamics
set method = gmres
set max iters = 5000
set relative residual = 1e-3
set minimum residual = 1e-12
set preconditioner = ilu
set ilu preconditioner fill = 0
set ilu preconditioner absolute tolerance = 1e-14
set ilu preconditioner relative tolerance = 1
set verbosity = quiet
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0 0 10000 14 10000
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
8
Time File
0.05 out.1000.pvtu
0.1 out.2000.pvtu
0.15 out.3000.pvtu
0.2 out.4000.pvtu
0.25 out.5000.pvtu
0.3 out.6000.pvtu
0.35 out.7000.pvtu
0.4 out.8000.pvtu
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Simulation control
dt_0 5e-05
dt_1 5e-05
dt_2 5e-05
dt_3 5e-05
CFL 0
Time 0.4
Iter 8000
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version nproc n_attached_fixed_size_objs n_attached_variable_size_objs n_coarse_cells
5 1 0 1 4500
Binary file not shown.
Binary file not shown.
Loading
Loading