Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model > Class Template Reference

#include <force_chains_visualization.h>

Inheritance diagram for ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >:
[legend]

Public Member Functions

 ParticlesForceChains (const DEMSolverParameters< dim > &dem_parameters)
virtual ~ParticlesForceChains ()=default
void write_force_chains (const DEMSolverParameters< dim > &dem_parameters, PVDHandler &pvd_handler, const MPI_Comm mpi_communicator, const std::string folder, const unsigned int iter, const double time, typename dem_data_structures< dim >::adjacent_particle_pairs &local_adjacent_particles, typename dem_data_structures< dim >::adjacent_particle_pairs &ghost_adjacent_particles) override
Public Member Functions inherited from ParticlesForceChainsBase< dim, PropertiesIndex >
virtual ~ParticlesForceChainsBase ()=default
Public Member Functions inherited from ParticleParticleContactForce< dim, PropertiesIndex, force_model, rolling_friction_model >
 ParticleParticleContactForce (const DEMSolverParameters< dim > &dem_parameters)
virtual ~ParticleParticleContactForce ()=default
virtual void calculate_particle_particle_contact (typename DEM::dem_data_structures< dim >::adjacent_particle_pairs &local_adjacent_particles, typename DEM::dem_data_structures< dim >::adjacent_particle_pairs &ghost_adjacent_particles, typename DEM::dem_data_structures< dim >::periodic_adjacent_particle_pairs &local_local_periodic_adjacent_particles, typename DEM::dem_data_structures< dim >::periodic_adjacent_particle_pairs &local_ghost_periodic_adjacent_particles, typename DEM::dem_data_structures< dim >::periodic_adjacent_particle_pairs &ghost_local_periodic_adjacent_particles, const double dt, ParticleInteractionOutcomes< PropertiesIndex > &contact_outcome) override
Public Member Functions inherited from ParticleParticleContactForceBase< dim, PropertiesIndex >
void set_periodic_offset (const Tensor< 1, dim > &offset, const types::boundary_id boundary_id)
unsigned int get_number_of_contacts () const
void reset_number_of_contacts ()

Private Member Functions

void calculate_force_chains (typename dem_data_structures< dim >::adjacent_particle_pairs &local_adjacent_particles, typename dem_data_structures< dim >::adjacent_particle_pairs &ghost_adjacent_particles, std::vector< Point< 3 > > &vertices, std::vector< double > &normal_forces_vector) override
template<ContactType contact_type, typename ContactInfoContainer>
void execute_contact_calculation (ContactInfoContainer &adjacent_particles_list, std::vector< Point< 3 > > &vertices, std::vector< double > &normal_forces_vector)
void update_contact_information (Tensor< 1, 3 > &tangential_relative_velocity, double &normal_relative_velocity_value, Tensor< 1, 3 > &normal_unit_vector, const ArrayView< const double > &particle_one_properties, const ArrayView< const double > &particle_two_properties, const Point< 3 > &particle_one_location, const Point< 3 > &particle_two_location)
void multi_general_cell (Triangulation< 1, 3 > &tria, const std::vector< Point< 3 > > &vertices)

Additional Inherited Members

Protected Member Functions inherited from ParticleParticleContactForce< dim, PropertiesIndex, force_model, rolling_friction_model >
void update_contact_information (particle_particle_contact_info< dim > &contact_info, Tensor< 1, 3 > &tangential_relative_velocity, double &normal_relative_velocity_value, Tensor< 1, 3 > &normal_unit_vector, const ArrayView< const double > &particle_one_properties, const ArrayView< const double > &particle_two_properties, const Point< 3 > &particle_one_location, const Point< 3 > &particle_two_location, const double dt)
Point< 3 > get_location (const Particles::ParticleIterator< dim > &particle) &
Point< 3 > get_periodic_location (const Particles::ParticleIterator< dim > &particle, const Tensor< 1, dim > &periodic_offset) &
void calculate_contact (particle_particle_contact_info< dim > &contact_info, const Tensor< 1, 3 > &tangential_relative_velocity, const double normal_relative_velocity_value, const Tensor< 1, 3 > &normal_unit_vector, const double normal_overlap, const double dt, const ArrayView< const double > &particle_one_properties, const ArrayView< const double > &particle_two_properties, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &particle_one_tangential_torque, Tensor< 1, 3 > &particle_two_tangential_torque, Tensor< 1, 3 > &rolling_resistance_torque)
double get_force_calculation_threshold_distance ()
Protected Attributes inherited from ParticleParticleContactForceBase< dim, PropertiesIndex >
unsigned int n_contacts = 0
std::unordered_map< types::boundary_id, Tensor< 1, dim > > periodic_offsets

Detailed Description

template<int dim, typename PropertiesIndex, Parameters::Lagrangian::ParticleParticleContactForceModel force_model, Parameters::Lagrangian::RollingResistanceMethod rolling_friction_model>
class ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >

Class that carries out the calculation of particle-particle contact force and the visualization of force chains by writing vtu files, pvtu files and a pvd file. Instead of using an inheritance hierarchy to distinguish between the contact model, the class is templated with the type of force model and rolling friction model. Consequently, the code for each combination of force model is generated at compile time.

Template Parameters
dimThe dimension of the problem
force_modelThe particle-particle contact force model
rolling_friction_modelThe rolling resistance model

Definition at line 110 of file force_chains_visualization.h.

Constructor & Destructor Documentation

◆ ParticlesForceChains()

template<int dim, typename PropertiesIndex, ParticleParticleContactForceModel contact_model, RollingResistanceMethod rolling_friction_model>
ParticlesForceChains< dim, PropertiesIndex, contact_model, rolling_friction_model >::ParticlesForceChains ( const DEMSolverParameters< dim > & dem_parameters)

◆ ~ParticlesForceChains()

template<int dim, typename PropertiesIndex, Parameters::Lagrangian::ParticleParticleContactForceModel force_model, Parameters::Lagrangian::RollingResistanceMethod rolling_friction_model>
virtual ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >::~ParticlesForceChains ( )
virtualdefault

Member Function Documentation

◆ calculate_force_chains()

template<int dim, typename PropertiesIndex, Parameters::Lagrangian::ParticleParticleContactForceModel force_model, Parameters::Lagrangian::RollingResistanceMethod rolling_friction_model>
void ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >::calculate_force_chains ( typename dem_data_structures< dim >::adjacent_particle_pairs & local_adjacent_particles,
typename dem_data_structures< dim >::adjacent_particle_pairs & ghost_adjacent_particles,
std::vector< Point< 3 > > & vertices,
std::vector< double > & normal_forces_vector )
overrideprivatevirtual

Calculate normal forces between all touching particles with ParticleParticleContactForce class' methods. Stock normal forces and particles position in vectors.

Parameters
[in]local_adjacent_particlesContainer of the contact pair candidates information for calculation of the local particle-particle contact forces.
[in]ghost_adjacent_particlesContainer of the contact pair candidates information for calculation of the local-ghost particle-particle contact forces.
[out]verticesthe vector of positions of touching particles.
[out]normal_forces_vectorthe vector of normal forces between each touching particles.

Implements ParticlesForceChainsBase< dim, PropertiesIndex >.

Definition at line 66 of file force_chains_visualization.cc.

References execute_contact_calculation().

◆ execute_contact_calculation()

template<int dim, typename PropertiesIndex, Parameters::Lagrangian::ParticleParticleContactForceModel force_model, Parameters::Lagrangian::RollingResistanceMethod rolling_friction_model>
template<ContactType contact_type, typename ContactInfoContainer>
void ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >::execute_contact_calculation ( ContactInfoContainer & adjacent_particles_list,
std::vector< Point< 3 > > & vertices,
std::vector< double > & normal_forces_vector )
inlineprivate

Execute the contact calculation step for the particle-particle contact only for local-local and local-ghost contacts with no periodicity. This is a simplified version of the contact calculation of the particle-particle contact forces class, without the other contact types and the update of the particles forces, torques and tangential displacement.

Template Parameters
contact_typeThe type of contact to be calculated.
Parameters
[in]adjacent_particles_listContainer of the adjacent particles of a particles.
[out]verticesthe vector of positions of touching particles.
[out]normal_forces_vectorthe vector of normal forces between each touching particles.

Definition at line 195 of file force_chains_visualization.h.

References ParticleParticleContactForce< dim, PropertiesIndex, force_model, rolling_friction_model >::calculate_contact(), ParticleParticleContactForce< dim, PropertiesIndex, force_model, rolling_friction_model >::get_force_calculation_threshold_distance(), ParticleParticleContactForce< dim, PropertiesIndex, force_model, rolling_friction_model >::get_location(), ghost_particle_particle, and update_contact_information().

◆ multi_general_cell()

template<int dim, typename PropertiesIndex, ParticleParticleContactForceModel contact_model, RollingResistanceMethod rolling_friction_model>
void ParticlesForceChains< dim, PropertiesIndex, contact_model, rolling_friction_model >::multi_general_cell ( Triangulation< 1, 3 > & tria,
const std::vector< Point< 3 > > & vertices )
private

Create a triangulation with a unique cell (represented by a line) for each normal force between two particles.

Parameters
[out]triaEmpty triangulation used to create a triangulation with all the vertices needed.
[in]verticesVector of points used to create a triangulation

Definition at line 42 of file force_chains_visualization.cc.

◆ update_contact_information()

template<int dim, typename PropertiesIndex, Parameters::Lagrangian::ParticleParticleContactForceModel force_model, Parameters::Lagrangian::RollingResistanceMethod rolling_friction_model>
void ParticlesForceChains< dim, PropertiesIndex, force_model, rolling_friction_model >::update_contact_information ( Tensor< 1, 3 > & tangential_relative_velocity,
double & normal_relative_velocity_value,
Tensor< 1, 3 > & normal_unit_vector,
const ArrayView< const double > & particle_one_properties,
const ArrayView< const double > & particle_two_properties,
const Point< 3 > & particle_one_location,
const Point< 3 > & particle_two_location )
inlineprivate

Update the contact pair information for all contact force calculations.

Parameters
[out]tangential_relative_velocityTangential relative velocity.
[out]normal_relative_velocity_valueNormal relative velocity.
[out]normal_unit_vectorNormal vector of the contact.
[in]particle_one_propertiesProperties of particle one in contact.
[in]particle_two_propertiesProperties of particle two in contact.
[in]particle_one_locationLocation of particle one in contact.
[in]particle_two_locationLocation of particle two in contact.

Definition at line 296 of file force_chains_visualization.h.

◆ write_force_chains()

template<int dim, typename PropertiesIndex, ParticleParticleContactForceModel contact_model, RollingResistanceMethod rolling_friction_model>
void ParticlesForceChains< dim, PropertiesIndex, contact_model, rolling_friction_model >::write_force_chains ( const DEMSolverParameters< dim > & dem_parameters,
PVDHandler & pvd_handler,
const MPI_Comm mpi_communicator,
const std::string folder,
const unsigned int iter,
const double time,
typename dem_data_structures< dim >::adjacent_particle_pairs & local_adjacent_particles,
typename dem_data_structures< dim >::adjacent_particle_pairs & ghost_adjacent_particles )
overridevirtual

Output the force chains in VTU and PVTU files for each iteration and a PVD file.

Parameters
[in]dem_parametersDEM parameters declared in the .prm file.
[in]pvd_handlera PVDHandler to store the information about the file name and time associated with it.
[in]mpi_communicatorThe mpi communicator.
[in]foldera string that contains the path where the results are to be saved.
[in]iterthe iteration number associated with the file.
[in]timethe time associated with the file.
[in]local_adjacent_particlesContainer of the contact pair candidates information for calculation of the local particle-particle contact forces.
[in]ghost_adjacent_particlesContainer of the contact pair candidates information for calculation of the local-ghost particle-particle contact forces.

Implements ParticlesForceChainsBase< dim, PropertiesIndex >.

Definition at line 101 of file force_chains_visualization.cc.

References PVDHandler::append(), calculate_force_chains(), multi_general_cell(), Parameters::SimulationControl::output_name, DEMSolverParameters< dim >::simulation_control, and PVDHandler::times_and_names.


The documentation for this class was generated from the following files: