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

Fix the critical rayleigh time step calculation in cfd-dem #1203

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-07-20

### Fixed

- MINOR The ratio of the critical Rayleigh time step was wrong in CFD-DEM and was modified as done in DEM. [#1203](https://github.com/chaos-polymtl/lethe/pull/1203)

## [Master] - 2024-07-14

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.34951% of Rayleigh time step
DEM time-step is 2.61468% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
350 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.186842813% of Rayleigh time step
DEM time-step is 2.433653979% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
10000 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
1 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.186842813% of Rayleigh time step
DEM time-step is 2.433653979% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
10000 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
1 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 4.74073% of Rayleigh time step
DEM time-step is 5.13612% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
2 particles are in the simulation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 2 MPI rank(s)...
DEM time-step is 3.28354% of Rayleigh time step
DEM time-step is 3.65413% of Rayleigh time step
Number of active cells: 40
Number of degrees of freedom: 656
Volume of triangulation: 0.00108
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Number of active cells: 25
Number of degrees of freedom: 192
Volume of triangulation: 0.001
Expand Down
41 changes: 20 additions & 21 deletions source/fem-dem/cfd_dem_coupling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1504,27 +1504,26 @@ CFDDEMSolver<dim>::dem_setup_contact_parameters()
dem_time_step =
this->simulation_control->get_time_step() / coupling_frequency;

double rayleigh_time_step = 0;

for (unsigned int i = 0;
i < dem_parameters.lagrangian_physical_properties.particle_type_number;
++i)
rayleigh_time_step = std::max(
M_PI_2 *
dem_parameters.lagrangian_physical_properties
.particle_average_diameter[i] *
sqrt(2 *
dem_parameters.lagrangian_physical_properties.density_particle[i] *
(2 + dem_parameters.lagrangian_physical_properties
.poisson_ratio_particle[i]) *
(1 - dem_parameters.lagrangian_physical_properties
.poisson_ratio_particle[i]) /
dem_parameters.lagrangian_physical_properties
.youngs_modulus_particle[i]) /
(0.1631 * dem_parameters.lagrangian_physical_properties
.poisson_ratio_particle[i] +
0.8766),
rayleigh_time_step);
double rayleigh_time_step = 1. / DBL_MIN;

Parameters::Lagrangian::LagrangianPhysicalProperties &physical_properties =
dem_parameters.lagrangian_physical_properties;

for (unsigned int i = 0; i < physical_properties.particle_type_number; ++i)
{
double shear_modulus =
physical_properties.youngs_modulus_particle[i] /
(2.0 * (1.0 + physical_properties.poisson_ratio_particle[i]));

double min_diameter =
size_distribution_object_container.at(i)->find_min_diameter();

rayleigh_time_step = std::min(
M_PI_2 * min_diameter *
sqrt(physical_properties.density_particle[i] / shear_modulus) /
(0.1631 * physical_properties.poisson_ratio_particle[i] + 0.8766),
rayleigh_time_step);
}

const double time_step_rayleigh_ratio = dem_time_step / rayleigh_time_step;
this->pcout << "DEM time-step is " << time_step_rayleigh_ratio * 100
Expand Down
Loading