Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
IBParticlesDEM< dim > Class Template Reference

#include <ib_particles_dem.h>

Classes

struct  ContactInfo
struct  ObjectProperties
struct  BoundaryCellsInfo
struct  DefaultDBL_MAX

Public Member Functions

void initialize (const std::shared_ptr< Parameters::IBParticles< dim > > &p_nsparam, const std::shared_ptr< Parameters::Lagrangian::FloatingWalls< dim > > &floating_walls_parameters, const std::shared_ptr< Parameters::Lagrangian::BCDEM > &boundary_conditions_parameters, const MPI_Comm &mpi_communicator_input, const std::vector< IBParticle< dim > > &particles)
void update_particles (const std::vector< IBParticle< dim > > &particles, double time)
void integrate_particles_motion (const double dt, const double h_max, const double h_min, const double rho, const double mu)
void calculate_pp_contact_force (const double dt_dem, std::vector< Tensor< 1, 3 > > &contact_force, std::vector< Tensor< 1, 3 > > &contact_torque)
void update_contact_candidates ()
void calculate_pw_contact_force (const double dt_dem, std::vector< Tensor< 1, 3 > > &contact_force, std::vector< Tensor< 1, 3 > > &contact_torque)
void calculate_force_model (const double normal_overlap, ContactInfo &contact_info, Point< 3 > &contact_point, Tensor< 1, 3 > &contact_normal, Tensor< 1, 3 > &normal_force, Tensor< 1, 3 > &tangential_force, Tensor< 1, 3 > &rolling_resistance_torque, Point< dim > &particle_one_position, Tensor< 1, 3 > &particle_one_velocity, Tensor< 1, 3 > &particle_one_omega, const ObjectProperties particle_one_properties, Point< dim > &particle_two_position, Tensor< 1, 3 > &particle_two_velocity, Tensor< 1, 3 > &particle_two_omega, const ObjectProperties particle_two_properties, const double dt)
void calculate_pp_lubrication_force (const double dt_dem, const double h_max, const double h_min, const double mu, std::vector< Tensor< 1, 3 > > &lubrication_force, std::vector< Tensor< 1, 3 > > &lubrication_torque)
void calculate_pw_lubrication_force (const double dt_dem, const double h_max, const double h_min, const double mu, std::vector< Tensor< 1, 3 > > &lubrication_force, std::vector< Tensor< 1, 3 > > &lubrication_torque)
void update_particles_boundary_contact (std::vector< IBParticle< dim > > &particles, const DoFHandler< dim > &dof_handler, const Quadrature< dim - 1 > &face_quadrature_formula, const Mapping< dim > &mapping)
const std::map< unsigned int, std::map< unsigned int, ContactInfo > > & get_particle_particle_contact_map () const

Public Attributes

std::vector< IBParticle< dim > > dem_particles

Private Types

enum  lowest_floating_wall_indices { lowest_floating_wall_indices = 1000000 }

Private Member Functions

bool is_boundary_excluded (const types::boundary_id boundary_id) const
void get_wall_motion (const types::boundary_id boundary_id, const Point< dim > &point_on_boundary, Tensor< 1, 3 > &wall_velocity, Tensor< 1, 3 > &wall_angular_velocity, Point< dim > &wall_rotation_axis_point) const

Private Attributes

std::shared_ptr< Parameters::IBParticles< dim > > parameters
std::shared_ptr< Parameters::Lagrangian::FloatingWalls< dim > > floating_walls_parameters
std::shared_ptr< Parameters::Lagrangian::BCDEM > boundary_conditions_parameters
DEMSolverParameters< dim > dem_parameters {}
MPI_Comm mpi_communicator
std::vector< std::set< unsigned int > > particles_contact_candidates
std::map< unsigned int, std::map< unsigned int, Point< dim > > > previous_wall_contact_point
std::map< unsigned int, std::map< unsigned int, Point< dim > > > previous_particle_particle_contact_point
std::map< unsigned int, std::map< unsigned int, ContactInfo > > pp_contact_map
std::map< unsigned int, std::map< types::boundary_id, ContactInfo > > pw_contact_map
std::vector< std::map< types::boundary_id, BoundaryCellsInfo > > boundary_cells
double cfd_time

Detailed Description

template<int dim>
class IBParticlesDEM< dim >

A solver class for the DEM used in conjunction with IB particles and fluid_dynamics_sharp. This class defines and uses some functions of the DEM class that have been modified and simplified to be compatible with IB_particles.

Template Parameters
dimAn integer that denotes the dimension of the space in which the flow is solved

Definition at line 41 of file ib_particles_dem.h.

Member Enumeration Documentation

◆ lowest_floating_wall_indices

template<int dim>
enum IBParticlesDEM::lowest_floating_wall_indices
private
Enumerator
lowest_floating_wall_indices 

Definition at line 333 of file ib_particles_dem.h.

Member Function Documentation

◆ calculate_force_model()

template<int dim>
void IBParticlesDEM< dim >::calculate_force_model ( const double normal_overlap,
ContactInfo & contact_info,
Point< 3 > & contact_point,
Tensor< 1, 3 > & contact_normal,
Tensor< 1, 3 > & normal_force,
Tensor< 1, 3 > & tangential_force,
Tensor< 1, 3 > & rolling_resistance_torque,
Point< dim > & particle_one_position,
Tensor< 1, 3 > & particle_one_velocity,
Tensor< 1, 3 > & particle_one_omega,
const ObjectProperties particle_one_properties,
Point< dim > & particle_two_position,
Tensor< 1, 3 > & particle_two_velocity,
Tensor< 1, 3 > & particle_two_omega,
const ObjectProperties particle_two_properties,
const double dt )

Calculates non-linear (Hertzian) force between two objects. Take into input the physical properties and contact state of the two objects.

Parameters
normal_overlapContact normal overlap
contact_infoA container that contains the required information for calculation of the contact force for a particle pair in contact
contact_pointThe contact point between the two objects
contact_normalContact normal unit vector
normal_forceContact normal force
tangential_forceContact tangential force
rolling_resistance_torqueContact rolling resistance torque
particle_one_positionthe position of particle one
particle_one_velocitythe velocity of particle one
particle_one_omegathe angular velocity of particle one
particle_one_propertiesthe physical properties of particle one
particle_two_positionthe position of particle two
particle_two_velocitythe velocity of particle two
particle_two_omegathe angular velocity of particle two
particle_two_propertiesthe physical properties of particle two
dtthe dem time step.

Definition at line 1064 of file ib_particles_dem.cc.

References harmonic_mean(), IBParticlesDEM< dim >::ObjectProperties::object_friction_coefficient, IBParticlesDEM< dim >::ObjectProperties::object_mass, IBParticlesDEM< dim >::ObjectProperties::object_poisson_ratio, IBParticlesDEM< dim >::ObjectProperties::object_radius, IBParticlesDEM< dim >::ObjectProperties::object_restitution_coefficient, IBParticlesDEM< dim >::ObjectProperties::object_rolling_friction_coefficient, IBParticlesDEM< dim >::ObjectProperties::object_youngs_modulus, point_nd_to_3d(), IBParticlesDEM< dim >::ContactInfo::tangential_displacement, and IBParticlesDEM< dim >::ContactInfo::tangential_relative_velocity.

◆ calculate_pp_contact_force()

template<int dim>
void IBParticlesDEM< dim >::calculate_pp_contact_force ( const double dt_dem,
std::vector< Tensor< 1, 3 > > & contact_force,
std::vector< Tensor< 1, 3 > > & contact_torque )

◆ calculate_pp_lubrication_force()

template<int dim>
void IBParticlesDEM< dim >::calculate_pp_lubrication_force ( const double dt_dem,
const double h_max,
const double h_min,
const double mu,
std::vector< Tensor< 1, 3 > > & lubrication_force,
std::vector< Tensor< 1, 3 > > & lubrication_torque )

Calculates particle-particle lubrication force. The force is based on the formula from Microhydrodynamics: Principles and Selected Applications by Kim, Sangtae; Karrila, Seppo J. ISBN 13: 9780750691734.

Parameters
dt_demThe sub time stepping time step.
h_maxThe gap between the two particle.
h_minThe minimal gap distance considered in the force calculation to avoid the singularity of the model.
muThe fluid viscosity.
lubrication_forcea vector containing the lubrication force on the particles.
lubrication_torquea vector containing the lubrication torques on the particles.

Definition at line 421 of file ib_particles_dem.cc.

References dem_particles, particles_contact_candidates, and tensor_nd_to_3d().

◆ calculate_pw_contact_force()

template<int dim>
void IBParticlesDEM< dim >::calculate_pw_contact_force ( const double dt_dem,
std::vector< Tensor< 1, 3 > > & contact_force,
std::vector< Tensor< 1, 3 > > & contact_torque )

◆ calculate_pw_lubrication_force()

template<int dim>
void IBParticlesDEM< dim >::calculate_pw_lubrication_force ( const double dt_dem,
const double h_max,
const double h_min,
const double mu,
std::vector< Tensor< 1, 3 > > & lubrication_force,
std::vector< Tensor< 1, 3 > > & lubrication_torque )

Calculates particle-wall lubrication force.

Parameters
dt_demThe sub time stepping time step.
h_maxThe gap between particle and the wall below which we evaluate the force.
h_minThe minimal gap distance considered in the force calculation to avoid the singularity of the model.
muThe fluid viscosity.
lubrication_forcea vector containing the lubrication force on the particles.
lubrication_torquea vector containing the lubrication torques on the particles.

Definition at line 909 of file ib_particles_dem.cc.

References boundary_cells, IBParticlesDEM< dim >::BoundaryCellsInfo::boundary_index, cfd_time, dem_particles, floating_walls_parameters, get_wall_motion(), IBParticlesDEM< dim >::BoundaryCellsInfo::normal_vector, point_nd_to_3d(), IBParticlesDEM< dim >::BoundaryCellsInfo::point_on_boundary, and tensor_nd_to_3d().

◆ get_particle_particle_contact_map()

template<int dim>
const std::map< unsigned int, std::map< unsigned int, ContactInfo > > & IBParticlesDEM< dim >::get_particle_particle_contact_map ( ) const
inline

Return the particle-particle contact map built for the IB DEM coupling.

Definition at line 264 of file ib_particles_dem.h.

References pp_contact_map.

◆ get_wall_motion()

template<int dim>
void IBParticlesDEM< dim >::get_wall_motion ( const types::boundary_id boundary_id,
const Point< dim > & point_on_boundary,
Tensor< 1, 3 > & wall_velocity,
Tensor< 1, 3 > & wall_angular_velocity,
Point< dim > & wall_rotation_axis_point ) const
private

Get the DEM wall motion prescribed on a boundary.

This converts the DEM boundary-condition parameters into the translational and angular wall velocities used by Sharp-IB particle-wall interaction models.

Parameters
boundary_idBoundary id under consideration.
point_on_boundaryContact point on the boundary.
wall_velocityTranslational wall velocity.
wall_angular_velocityAngular wall velocity.
wall_rotation_axis_pointPoint on the rotation axis used for rotational wall motion.

Definition at line 66 of file ib_particles_dem.cc.

References boundary_conditions_parameters.

◆ initialize()

template<int dim>
void IBParticlesDEM< dim >::initialize ( const std::shared_ptr< Parameters::IBParticles< dim > > & p_nsparam,
const std::shared_ptr< Parameters::Lagrangian::FloatingWalls< dim > > & floating_walls_parameters,
const std::shared_ptr< Parameters::Lagrangian::BCDEM > & boundary_conditions_parameters,
const MPI_Comm & mpi_communicator_input,
const std::vector< IBParticle< dim > > & particles )

Initialize the IBParticlesDEM object with the parameters, the mpi communicator and the particles.

Parameters
p_nsparamThe parameters for the immersed boundary particles
floating_walls_parametersThe parameters for the floating walls.
boundary_conditions_parametersThe parameters for the DEM boundary conditions.
mpi_communicator_inputThe mpi communicator of the simulation.
particlesThe particles vector containing all the IB particles.

Definition at line 22 of file ib_particles_dem.cc.

References boundary_cells, boundary_conditions_parameters, dem_particles, floating_walls_parameters, mpi_communicator, and parameters.

◆ integrate_particles_motion()

template<int dim>
void IBParticlesDEM< dim >::integrate_particles_motion ( const double dt,
const double h_max,
const double h_min,
const double rho,
const double mu )

Integrates the dynamics of the IB_particle taking into account the contact between particles and between particles and walls.

Parameters
dtThe CFD time step.
h_maxThe gap between the two particle.
h_minThe minimal gap distance considered in the force calculation to avoid the singularity of the model.
rhoThe fluid density.
muThe fluid viscosity.

Definition at line 1256 of file ib_particles_dem.cc.

References calculate_pp_contact_force(), calculate_pp_lubrication_force(), calculate_pw_contact_force(), calculate_pw_lubrication_force(), cfd_time, dem_particles, parameters, pp_contact_map, previous_particle_particle_contact_point, previous_wall_contact_point, pw_contact_map, and DEM::velocity.

◆ is_boundary_excluded()

template<int dim>
bool IBParticlesDEM< dim >::is_boundary_excluded ( const types::boundary_id boundary_id) const
private

Check whether a boundary should be ignored for Sharp-IB particle wall interactions.

Outlet and periodic DEM boundaries do not represent colliding walls and are therefore excluded from the wall-contact search.

Parameters
boundary_idBoundary id under consideration.
Returns
true if the boundary must be excluded from contact handling.

Definition at line 41 of file ib_particles_dem.cc.

References boundary_conditions_parameters.

◆ update_contact_candidates()

template<int dim>
void IBParticlesDEM< dim >::update_contact_candidates ( )

Updates the contact candidates of all the particles.

Definition at line 137 of file ib_particles_dem.cc.

References dem_particles, parameters, particles_contact_candidates, and point_nd_to_3d().

◆ update_particles()

template<int dim>
void IBParticlesDEM< dim >::update_particles ( const std::vector< IBParticle< dim > > & particles,
double time )

Updates the boundary cells that are contact candidates for each of the particles.

Parameters
particlesThe particles vector containing all the IB particles.
timeThe current CFD time.

Definition at line 127 of file ib_particles_dem.cc.

References cfd_time, and dem_particles.

◆ update_particles_boundary_contact()

template<int dim>
void IBParticlesDEM< dim >::update_particles_boundary_contact ( std::vector< IBParticle< dim > > & particles,
const DoFHandler< dim > & dof_handler,
const Quadrature< dim - 1 > & face_quadrature_formula,
const Mapping< dim > & mapping )

Update the boundary cells that are contact candidates for each particle.

The wall-contact search relies on the lubrication/contact model described in Microhydrodynamics: Principles and Selected Applications by Kim, Sangtae and Karrila, Seppo J. ISBN 13: 9780750691734.

Parameters
particlesThe particles vector containing all the IB particles.
dof_handlerThe dof handler of the mesh used for the fluid simulation.
face_quadrature_formulaThe face quadrature formula used in the elements.
mappingThe FEM mapping of the face element.

Definition at line 498 of file ib_particles_dem.cc.

References boundary_cells, IBParticlesDEM< dim >::BoundaryCellsInfo::boundary_index, LetheGridTools::find_boundary_cells_in_sphere(), is_boundary_excluded(), mpi_communicator, IBParticlesDEM< dim >::BoundaryCellsInfo::normal_vector, parameters, and IBParticlesDEM< dim >::BoundaryCellsInfo::point_on_boundary.

Member Data Documentation

◆ boundary_cells

template<int dim>
std::vector<std::map<types::boundary_id, BoundaryCellsInfo> > IBParticlesDEM< dim >::boundary_cells
private

Definition at line 359 of file ib_particles_dem.h.

◆ boundary_conditions_parameters

template<int dim>
std::shared_ptr<Parameters::Lagrangian::BCDEM> IBParticlesDEM< dim >::boundary_conditions_parameters
private

Definition at line 341 of file ib_particles_dem.h.

◆ cfd_time

template<int dim>
double IBParticlesDEM< dim >::cfd_time
private

Definition at line 361 of file ib_particles_dem.h.

◆ dem_parameters

template<int dim>
DEMSolverParameters<dim> IBParticlesDEM< dim >::dem_parameters {}
private

Definition at line 342 of file ib_particles_dem.h.

◆ dem_particles

template<int dim>
std::vector<IBParticle<dim> > IBParticlesDEM< dim >::dem_particles

Definition at line 257 of file ib_particles_dem.h.

◆ floating_walls_parameters

template<int dim>
std::shared_ptr<Parameters::Lagrangian::FloatingWalls<dim> > IBParticlesDEM< dim >::floating_walls_parameters
private

Definition at line 340 of file ib_particles_dem.h.

◆ mpi_communicator

template<int dim>
MPI_Comm IBParticlesDEM< dim >::mpi_communicator
private

Definition at line 343 of file ib_particles_dem.h.

◆ parameters

template<int dim>
std::shared_ptr<Parameters::IBParticles<dim> > IBParticlesDEM< dim >::parameters
private

Definition at line 338 of file ib_particles_dem.h.

◆ particles_contact_candidates

template<int dim>
std::vector<std::set<unsigned int> > IBParticlesDEM< dim >::particles_contact_candidates
private

Definition at line 345 of file ib_particles_dem.h.

◆ pp_contact_map

template<int dim>
std::map<unsigned int, std::map<unsigned int, ContactInfo> > IBParticlesDEM< dim >::pp_contact_map
private

Definition at line 354 of file ib_particles_dem.h.

◆ previous_particle_particle_contact_point

template<int dim>
std::map<unsigned int, std::map<unsigned int, Point<dim> > > IBParticlesDEM< dim >::previous_particle_particle_contact_point
private

Definition at line 351 of file ib_particles_dem.h.

◆ previous_wall_contact_point

template<int dim>
std::map<unsigned int, std::map<unsigned int, Point<dim> > > IBParticlesDEM< dim >::previous_wall_contact_point
private

Definition at line 349 of file ib_particles_dem.h.

◆ pw_contact_map

template<int dim>
std::map<unsigned int, std::map<types::boundary_id, ContactInfo> > IBParticlesDEM< dim >::pw_contact_map
private

Definition at line 356 of file ib_particles_dem.h.


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