4#ifndef lethe_cfd_dem_coupling_matrix_free_h
5#define lethe_cfd_dem_coupling_matrix_free_h
42template <
int dim,
typename PropertiesIndex>
97 std::shared_ptr<Integrator<dim, PropertiesIndex>>
132 const bool restart =
false)
override
134 unsigned int ref_iter = 0;
163 std::vector<OutputStructTableHandler>
332 "You are trying to use the DEMSubSimulationControl when it has not been allocated yet."));
334 const double time_step_rayleigh_ratio =
336 this->
pcout <<
"DEM time step is " << time_step_rayleigh_ratio * 100
337 <<
"% of Rayleigh time step" << std::endl;
414 std::shared_ptr<ParticleParticleContactForceBase<dim, PropertiesIndex>>
418 std::shared_ptr<ParticleWallContactForceBase<dim, PropertiesIndex>>
void particle_wall_contact_force()
Calculate contact forces between particles and walls.
double smallest_contact_search_criterion
Smallest criterion used for contact search algorithms.
void write_checkpoint() override
Write CFD-DEM simulation checkpoint files.
unsigned int contact_search_counter
Counter for contact searches performed in the current CFD iteration.
void postprocess_fd(bool first_iteration) override
Perform fluid dynamics post-processing after each iteration.
PVDHandler particles_pvdhandler
PVD handler for particle visualization output.
DEM::dem_data_structures< dim >::periodic_boundaries_cells_info periodic_boundaries_cells_information
Information about cells involved in periodic boundary conditions.
ParticleInteractionOutcomes< PropertiesIndex > contact_outcome
Container for particle interaction outcomes (forces and torques).
void read_dem() override
Read DEM restart files from a previous simulation.
std::shared_ptr< ParticleParticleContactForceBase< dim, PropertiesIndex > > particle_particle_contact_force_object
Contact force model for particle-particle interactions.
void add_fluid_particle_interaction()
Calculate and add fluid-particle interaction forces and torques.
void set_initial_condition(const Parameters::FluidDynamicsInitialConditionType initial_condition_type, const bool restart=false) override
Set the initial condition. The version in this class does not output the solution,...
double rayleigh_time_step
Rayleigh time step.
std::vector< double > MOI
Moment of inertia values for all particles.
void postprocess_cfd_dem()
Perform CFD-DEM coupled post-processing after each iteration.
void load_balance()
Check if load balancing is required and perform it if necessary.
std::shared_ptr< SubSimulationControlDEM > dem_simulation_control
DEMSolverParameters< dim > dem_parameters
DEM simulation parameters container.
dem_data_structures< dim >::solid_surfaces_mesh_information solid_surfaces_mesh_info
Mesh information for solid surfaces in contact with particles.
void report_rayleigh_time_ratio()
Reports the ratio between the DEM time step and the Rayleigh time.
double maximum_particle_diameter
Maximum diameter among all particles in the simulation.
dem_data_structures< dim >::boundary_points_and_normal_vectors updated_boundary_points_and_normal_vectors
Updated boundary points and their corresponding normal vectors.
std::vector< double > displacement
Displacement vector for particle motion calculations.
AdaptiveSparseContacts< dim, PropertiesIndex > sparse_contacts_object
Object for handling adaptive sparse contact detection algorithms.
void read_checkpoint() override
Read CFD-DEM simulation checkpoint files.
void dynamic_flow_control() override
Calculate dynamic flow control accounting for void fraction.
std::vector< std::shared_ptr< Distribution > > size_distribution_object_container
Container for particle size distribution objects.
std::shared_ptr< Insertion< dim, PropertiesIndex > > insertion_object
Particle insertion method handler.
double neighborhood_threshold_squared
Squared threshold distance for neighborhood particle detection.
statistics contact_list
Statistics container for timing and contact list information.
void solve() override
Engine of the CFD-DEM solver. Calls all the necessary functions to set parameters,...
Visualization< dim, PropertiesIndex > visualization_object
Visualization handler for DEM output generation.
unsigned int contact_search_total_number
Total number of contact searches since simulation start.
void setup_distribution_type()
Initialize the particle size distribution and related parameters.
void report_particle_statistics()
Calculate and report particle statistics to the terminal.
TableHandler table_phase_volumes
PeriodicBoundariesManipulator< dim > periodic_boundaries_object
Handler for periodic boundary condition manipulations.
void insert_particles()
Check if particles need to be inserted and perform insertion.
void synchronize_particle_velocities()
Carry out the closing half velocity step of a staggered integration scheme at the end of the DEM sub-...
std::shared_ptr< Integrator< dim, PropertiesIndex > > integrator_object
Time integration scheme for particle motion equations.
void dem_setup_parameters()
Set up the various parameters related to the DEM simulation.
void check_contact_detection_method(unsigned int counter)
Check if contact detection is required and execute it if necessary.
void sort_particles_into_subdomains_and_cells()
Sort particles into subdomains and cells for efficient processing.
DEMContactManager< dim, PropertiesIndex > contact_manager
dem_data_structures< dim >::vector_on_boundary forces_boundary_information
Force information stored on boundary elements.
LagrangianLoadBalancing< dim, PropertiesIndex > load_balancing
Load balancing handler for distributing particles across MPI processes.
CFDDEMMatrixFree(CFDDEMSimulationParameters< dim > ¶m)
Constructor for the CFD-DEM matrix-free solver.
DEMActionManager * dem_action_manager
Pointer to DEM action manager for handling DEM-specific operations.
OngoingCollisionLog< dim > ongoing_collision_log
Object to store ongoing collision information.
CompletedCollisionLog< dim > collision_event_log
Object to store completed collision events.
ParticlePointLineForce< dim, PropertiesIndex > particle_point_line_contact_force_object
Handler for point and line contact forces between particles.
std::vector< OutputStructTableHandler > gather_tables() override
Gather TableHandler objects for serialization during checkpointing.
void dem_iterator()
Execute a DEM time step.
std::shared_ptr< ParticleWallContactForceBase< dim, PropertiesIndex > > particle_wall_contact_force_object
Contact force model for particle-wall interactions.
void initialize_dem_parameters()
Initialize fundamental DEM simulation parameters.
BoundaryCellsInformation< dim > boundary_cell_object
Information about boundary cells for contact detection.
Tensor< 1, 3 > g
Gravitational acceleration vector.
std::shared_ptr< Integrator< dim, PropertiesIndex > > set_integrator_type()
Set up the time integration method for particle motion.
PVDHandler grid_pvdhandler
PVD handler for grid visualization output.
DEM::ParticleProperties< dim, PropertiesIndex > properties_class
Particle properties handler for DEM simulation.
dem_data_structures< dim >::vector_on_boundary torques_boundary_information
Torque information stored on boundary elements.
void dem_contact_build()
Perform contact detection and build contact lists.
void write_dem_output_results()
Write DEM simulation results to output files.
Class that stores all the completed collision events.
Manage the actions to be performed in the DEM solver and on the DEM part of the coupling CFD-DEM solv...
Handles all the parameters declared in the parameter handler file.
Controls the name of output variables for the vtu.
virtual void set_initial_condition_fd(Parameters::FluidDynamicsInitialConditionType initial_condition_type, bool restart=false) override
FluidDynamicsVANSMatrixFree(CFDDEMSimulationParameters< dim > ¶m)
Constructor that sets the finite element degree and system operator according to simulation parameter...
Manages the load balancing (repartitioning), of the domain according to the computational load of the...
virtual void refine_mesh()
SimulationParameters< dim > simulation_parameters
std::shared_ptr< MultiphysicsInterface< dim > > multiphysics
Class managing the ongoing collisions.
The PVDHandler class manages the storage of the information required to write pvd file....
Class where the outcomes of particle-particle interactions are stored.
Calculate the non-linear particle-point and particle-line contact force using the information obtaine...
Building patches of particle properties for visualization. This function is taken from Aspect and dea...
A simple container for storing basic statistical values.
FluidDynamicsInitialConditionType
std::vector< std::vector< std::pair< typename Triangulation< dim >::active_cell_iterator, typename Triangulation< dim - 1, dim >::active_cell_iterator > > > solid_surfaces_mesh_information
ankerl::unordered_dense::map< unsigned int, std::map< types::boundary_id, Tensor< 1, 3 > > > vector_on_boundary
ankerl::unordered_dense::map< global_face_id, std::pair< Tensor< 1, 3 >, Point< 3 > > > boundary_points_and_normal_vectors
std::unordered_multimap< types::global_cell_index, periodic_boundaries_cells_info_struct< dim > > periodic_boundaries_cells_info