![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <sub_simulation_control.h>
Public Types | |
| enum class | DEMSubIterationLogic { fixed_number_of_iterations = 0 , fixed_fraction_of_rayleigh_time_step = 1 } |
Public Member Functions | |
| SubSimulationControlDEM (const DEMSubIterationLogic iteration_logic, const double time_interval, const unsigned int coupling_frequency, const double rayleigh_characteristic_time, const double fraction_of_rayleigh_characteristic_time) | |
| bool | iterate () |
| unsigned int | get_iteration () const |
| double | get_time_step () const |
| bool | is_first_iteration () const |
| bool | is_last_iteration () const |
Private Attributes | |
| const DEMSubIterationLogic | iteration_logic |
| const double | time_interval |
| const unsigned int | coupling_frequency |
| const double | rayleigh_characteristic_time |
| const double | fraction_of_rayleigh_characteristic_time |
| unsigned int | iteration_number |
| unsigned int | total_number_of_iterations |
| double | time_step |
Controls DEM sub iteration logic.
The SubSimulationControlDEM class is responsible for managing the progression of the DEM component of a CFD-DEM simulation.
This class supports two approaches for the DEM iteration:
Definition at line 44 of file sub_simulation_control.h.
|
strong |
Type of iteration method for DEM sub simulation control.
Declares the types of sub simulation control that are available for CFD-DEM simulations.
| Enumerator | |
|---|---|
| fixed_number_of_iterations | Fixed number of DEM iterations per CFD time step. |
| fixed_fraction_of_rayleigh_time_step | DEM time step is fixed at a constant fraction of the Rayleigh time step. |
Definition at line 54 of file sub_simulation_control.h.
| SubSimulationControlDEM::SubSimulationControlDEM | ( | const DEMSubIterationLogic | iteration_logic, |
| const double | time_interval, | ||
| const unsigned int | coupling_frequency, | ||
| const double | rayleigh_characteristic_time, | ||
| const double | fraction_of_rayleigh_characteristic_time ) |
Construct a SubSimulationControlDEM object.
Depending on the iteration logic, the constructor calculates the total number of DEM iterations and the DEM time step. When using a fixed number of iterations, the time step is derived from the time interval and the coupling frequency. When using a fixed fraction of the Rayleigh characteristic time, the time step is set to the specified fraction and the number of iterations is derived accordingly.
| [in] | iteration_logic | The logic used to determine the DEM sub iteration time step and number of iterations. |
| [in] | time_interval | The time interval over which the DEM sub iterations are to be carried out. This corresponds to the CFD time step. |
| [in] | coupling_frequency | The number of DEM iterations per CFD time step. Only used when iteration_logic is DEMSubIterationLogic::fixed_number_of_iterations. |
| [in] | rayleigh_characteristic_time | The Rayleigh characteristic time step of the particles. |
| [in] | fraction_of_rayleigh_characteristic_time | The target fraction of the Rayleigh characteristic time to use as the DEM time step. Only used when iteration_logic is DEMSubIterationLogic::fixed_fraction_of_rayleigh_time_step. |
Definition at line 9 of file sub_simulation_control.cc.
References coupling_frequency, fixed_number_of_iterations, fraction_of_rayleigh_characteristic_time, iteration_logic, iteration_number, rayleigh_characteristic_time, time_interval, time_step, and total_number_of_iterations.
|
inline |
Get the current DEM sub iteration number.
Definition at line 114 of file sub_simulation_control.h.
References iteration_number.
|
inline |
Get the DEM sub simulation time step.
Definition at line 125 of file sub_simulation_control.h.
References time_step.
|
inline |
Check if this is the first DEM sub iteration.
The first iteration corresponds to either the state before the sub simulation control has started iterating (iteration_number == 0) or the first iteration it is actually carrying out (iteration_number == 1).
Definition at line 140 of file sub_simulation_control.h.
References iteration_number.
|
inline |
Check if this is the last DEM sub iteration.
The last iteration is reached when the iteration number equals the total number of iterations required to complete the DEM sub simulation within the current CFD time step.
Definition at line 155 of file sub_simulation_control.h.
References iteration_number, and total_number_of_iterations.
| bool SubSimulationControlDEM::iterate | ( | ) |
Advance the DEM sub simulation by one iteration.
Increments the iteration counter by one and checks whether additional iterations are required to complete the DEM sub simulation within the current CFD time step. As long as this method returns true, the DEM simulation should continue iterating.
Definition at line 74 of file sub_simulation_control.cc.
References iteration_number, and total_number_of_iterations.
|
private |
Coupling frequency. This is only used when iteration_logic=fixed_number_of_iterations
Definition at line 169 of file sub_simulation_control.h.
|
private |
Targeted fraction of the Rayleigh characteristic time. This is only used when iteration_logic=fixed_fraction_of_rayleigh_time_step
Definition at line 176 of file sub_simulation_control.h.
|
private |
Logic used for the DEM iterations.
Definition at line 162 of file sub_simulation_control.h.
|
private |
Current value of the sub iteration number. This is initialized to zero.
Definition at line 179 of file sub_simulation_control.h.
|
private |
Rayleigh characteristic time for the particles.
Definition at line 172 of file sub_simulation_control.h.
|
private |
Time interval over which the time integration is to be carried out.
Definition at line 165 of file sub_simulation_control.h.
|
private |
Time step value of the sub time stepping.
Definition at line 186 of file sub_simulation_control.h.
|
private |
Total number of iterations. This is the number of iterations that is required until the completion of the sub simulation control
Definition at line 183 of file sub_simulation_control.h.