Skip to content

Commit

Permalink
Merge branch 'master' into update_rayleigh_benard_exemple
Browse files Browse the repository at this point in the history
  • Loading branch information
OresteMarquis authored Jan 14, 2025
2 parents 96fb993 + 2f5f4c4 commit bbf9234
Showing 181 changed files with 4,183 additions and 2,510 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).

## [Master] - 2024-01-10

### Changed

- MAJOR The index of properties in the DEM and CFD-DEM simulations are now indexed using a template (PropertiesIndex) instead of using an hardcoded enum. This enables the different solvers to have different number of properties and different properties index. For large simulations, this gives minor performance gain for DEM simulations (e.g. around 5-10%), but this makes the solver significantly more flexible. This is a major change since it breaks DEM and CFD-DEM restart files from previous versions. [#1399](https://github.com/chaos-polymtl/lethe/pull/1399)

## [Master] - 2024-01-02

### Changed
42 changes: 37 additions & 5 deletions applications/lethe-particles/dem.cc
Original file line number Diff line number Diff line change
@@ -32,9 +32,25 @@ main(int argc, char *argv[])
// Parsing of the file
prm.parse_input(argv[1]);
dem_parameters.parse(prm);
const DEM::SolverType solver_type =
dem_parameters.model_parameters.solver_type;

DEMSolver<2> problem(dem_parameters);
problem.solve();
if (solver_type == DEM::SolverType::dem)
{
DEMSolver<2, DEM::DEMProperties::PropertiesIndex> problem(
dem_parameters);
problem.solve();
}
else
{
AssertThrow(
false,
dealii::ExcMessage(
"While reading the solver type from the input file, "
"Lethe found a value different than \"dem\". As of January 2025, "
"the lethe-particles application requires the uses of "
"\"solver type = dem\", which is the default value."));
}
}

else if (dim == 3)
@@ -46,9 +62,25 @@ main(int argc, char *argv[])
// Parsing of the file
prm.parse_input(argv[1]);
dem_parameters.parse(prm);

DEMSolver<3> problem(dem_parameters);
problem.solve();
// const DEM::SolverType solver_type =
// dem_parameters.model_parameters.solver_type;
const DEM::SolverType solver_type = DEM::SolverType::dem;
if (solver_type == DEM::SolverType::dem)
{
DEMSolver<3, DEM::DEMProperties::PropertiesIndex> problem(
dem_parameters);
problem.solve();
}
else
{
AssertThrow(
false,
dealii::ExcMessage(
"While reading the solver type from the input file, "
"Lethe found a value different than \"dem\". As of January 2025, "
"the lethe-particles application requires the uses of "
"\"solver type = dem\", which is the default value."));
}
}

else
37 changes: 14 additions & 23 deletions applications_tests/lethe-fluid-particles/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@ set(TEST_TARGET lethe-fluid-particles)
string(TOLOWER ${CMAKE_BUILD_TYPE} _build_type)

file(COPY particle_sedimentation_files/dem.checkpoint_controller DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.triangulation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.triangulation.info DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_0.triangulation_variable.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.simulationcontrol DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.triangulation DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.triangulation.info DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.triangulation_fixed.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY particle_sedimentation_files/dem_1.triangulation_variable.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/particle_sedimentation.${_build_type}/mpirun=1/")

file(COPY restart_particle_sedimentation_files/case.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/restart_particle_sedimentation.${_build_type}/mpirun=1/")
file(COPY restart_particle_sedimentation_files/case.pvdhandler DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/restart_particle_sedimentation.${_build_type}/mpirun=1/")
@@ -21,21 +21,13 @@ file(COPY restart_particle_sedimentation_files/case.triangulation_fixed.data DES
file(COPY restart_particle_sedimentation_files/case.triangulation_variable.data DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/restart_particle_sedimentation.${_build_type}/mpirun=1/")

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

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

file(COPY liquid_fluidized_bed_files/dem.checkpoint_controller DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/liquid_fluidized_bed.${_build_type}/mpirun=1/")
file(COPY liquid_fluidized_bed_files/dem_0.particles DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/liquid_fluidized_bed.${_build_type}/mpirun=1/")
@@ -99,5 +91,4 @@ 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
@@ -33,11 +33,11 @@ DEM contact search at dem step 1
DEM contact search at dem step 49
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: 2.803e-09 s^-1
Max local continuity error: 7.07295e-08 s^-1
Global continuity equation error: 2.76979e-09 s^-1
Max local continuity error: 6.88735e-08 s^-1

**********************************************************************************
Transient iteration: 2 Time: 0.002 Time step: 0.001 CFL: 7.48857e-05
Transient iteration: 2 Time: 0.002 Time step: 0.001 CFL: 7.47614e-05
**********************************************************************************
--------------
Void Fraction
@@ -54,7 +54,7 @@ print_from_processor_0
0 1
0
1 8
4 4 4 4 4 4 4 4
3 3 3 3 3 3 3 3


[deal.II intermediate Patch<3,3>]
@@ -64,7 +64,7 @@ print_from_processor_0
1 1
0
1 8
4 4 4 4 4 4 4 4
2 2 2 2 2 2 2 2


[deal.II intermediate Patch<3,3>]
@@ -74,7 +74,7 @@ print_from_processor_0
2 1
0
1 8
3 3 3 3 3 3 3 3
2 2 2 2 2 2 2 2


[deal.II intermediate Patch<3,3>]
@@ -136,5 +136,5 @@ DEM contact search at dem step 1
DEM contact search at dem step 49
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: -2.28117e-09 s^-1
Max local continuity error: 6.96484e-07 s^-1
Global continuity equation error: 2.16995e-09 s^-1
Max local continuity error: 6.35415e-07 s^-1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 0 350 78 350
0 0 350 75 350
Binary file not shown.
Binary file not shown.

This file was deleted.

Loading

0 comments on commit bbf9234

Please sign in to comment.