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

#include <ib_particle.h>

Public Member Functions

void initialize_all ()
void initialize_previous_solution ()
std::vector< std::pair< std::string, int > > get_properties_name ()
std::vector< double > get_properties ()
unsigned int get_number_properties ()
double get_levelset (const Point< dim > &p, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
double get_levelset (const Point< dim > &p)
void closest_surface_point (const Point< dim > &p, Point< dim > &closest_point, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
void closest_surface_point (const Point< dim > &p, Point< dim > &closest_point)
bool is_inside_crown (const Point< dim > &evaluation_point, const double outer_radius, const double inside_radius, const bool absolute_distance, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
bool is_inside_crown (const Point< dim > &evaluation_point, const double outer_radius, const double inside_radius, const bool absolute_distance)
void set_position (const Point< dim > position)
void clear_shape_cache ()
void initialize_shape (const std::string &type, const std::vector< double > &shape_arguments)
void initialize_shape (const std::string &type, const std::string &raw_arguments)
void set_position (const double position_component, const unsigned int component=0)
void set_orientation (const Tensor< 1, 3 > &orientation)
void set_layer_thickening (const double layer_thickening)
void update_precalculations (DoFHandler< dim > &updated_dof_handler, const bool mesh_based_precalculations)
void remove_superfluous_data (DoFHandler< dim > &updated_dof_handler, const bool mesh_based_precalculations)
void load_data_from_file ()

Public Attributes

unsigned int particle_id
std::shared_ptr< Shape< dim > > shape
double radius
double youngs_modulus
double restitution_coefficient
double poisson_ratio
double friction_coefficient
double rolling_friction_coefficient
double mass
double volume
double surface_energy
Tensor< 2, 3 > inertia
Point< dim > position
std::vector< Point< dim > > previous_positions
Tensor< 1, 3 > fluid_forces
Tensor< 1, 3 > fluid_viscous_forces
Tensor< 1, 3 > fluid_pressure_forces
Tensor< 1, 3 > previous_fluid_forces
Tensor< 1, 3 > previous_fluid_viscous_forces
Tensor< 1, 3 > previous_fluid_pressure_forces
Tensor< 1, 3 > fluid_torque
Tensor< 1, 3 > previous_fluid_torque
Tensor< 1, 3 > velocity
std::vector< Tensor< 1, 3 > > previous_velocity
Tensor< 1, 3 > velocity_iter
Tensor< 1, 3 > previous_velocity_residual
Tensor< 1, 3 > orientation
std::vector< Tensor< 1, 3 > > previous_orientation
Tensor< 1, 3 > omega
std::vector< Tensor< 1, 3 > > previous_omega
Tensor< 1, 3 > omega_iter
Tensor< 1, 3 > previous_omega_residual
Tensor< 1, 3 > impulsion
Tensor< 1, 3 > contact_impulsion
Tensor< 1, 3 > impulsion_iter
Tensor< 1, 3 > omega_impulsion
Tensor< 1, 3 > omega_contact_impulsion
Tensor< 1, 3 > omega_impulsion_iter
std::shared_ptr< Functions::ParsedFunction< dim > > f_velocity
std::shared_ptr< Functions::ParsedFunction< dim > > f_position
std::shared_ptr< Functions::ParsedFunction< dim > > f_omega
std::shared_ptr< Functions::ParsedFunction< dim > > f_orientation
bool integrate_motion
bool mesh_based_precalculations
double residual_velocity
double residual_omega
double previous_local_alpha_velocity
double previous_local_alpha_omega
Point< dim > pressure_location
Tensor< 2, 3 > rotation_matrix

Detailed Description

template<int dim>
class IBParticle< dim >

Define the behavior of a specific particle for the sharp interface IB solver.

Each particle defined will have these values used in the solver.

Template Parameters
dimAn integer that denotes the number of spatial dimensions.

Definition at line 25 of file ib_particle.h.

Member Function Documentation

◆ clear_shape_cache()

template<int dim>
void IBParticle< dim >::clear_shape_cache ( )

Clear the cache used to evaluate the value and vector defining the signed distance function.

Definition at line 251 of file ib_particle.cc.

References shape.

◆ closest_surface_point() [1/2]

template<int dim>
void IBParticle< dim >::closest_surface_point ( const Point< dim > & p,
Point< dim > & closest_point )

See overloaded function.

Definition at line 187 of file ib_particle.cc.

References shape.

◆ closest_surface_point() [2/2]

template<int dim>
void IBParticle< dim >::closest_surface_point ( const Point< dim > & p,
Point< dim > & closest_point,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )

Find the closest surface point on the shape.

This point has the minimal absolute distance from the given point p.

Parameters
[in]pPoint at which the evaluation is performed.
[out]closest_pointReference to the closest point. This point will be modified by the function.
[in]cell_guessA guess of the cell containing the evaluation point, which is useful to reduce computation time.

Definition at line 177 of file ib_particle.cc.

References shape.

◆ get_levelset() [1/2]

template<int dim>
double IBParticle< dim >::get_levelset ( const Point< dim > & p)
inline

See overloaded function.

Definition at line 85 of file ib_particle.h.

References shape.

◆ get_levelset() [2/2]

template<int dim>
double IBParticle< dim >::get_levelset ( const Point< dim > & p,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )
inline

Compute the evaluation of the signed distance function of this shape.

Most level set functions used here come from Inigo Quilez: iquilezles.org/articles/distfunctions

Parameters
[in]pPoint at which the evaluation is performed.
[in]cell_guessGuess of the cell containing the evaluation point, which is useful to reduce computation time.
Returns
Signed distance function at evaluation point.

Definition at line 75 of file ib_particle.h.

References shape.

◆ get_number_properties()

template<int dim>
unsigned int IBParticle< dim >::get_number_properties ( )
inline

Return the number of DEM properties, for visualization.

Definition at line 56 of file ib_particle.h.

References DEM::CFDDEMProperties::n_properties.

◆ get_properties()

◆ get_properties_name()

template<int dim>
std::vector< std::pair< std::string, int > > IBParticle< dim >::get_properties_name ( )

Return the names of the DEM properties, for visualization.

Definition at line 117 of file ib_particle.cc.

References DEM::ParticleProperties< dim, PropertiesIndex >::get_properties_name(), DEM::CFDDEMProperties::n_properties, and DEM::CFDDEMProperties::type.

◆ initialize_all()

◆ initialize_previous_solution()

template<int dim>
void IBParticle< dim >::initialize_previous_solution ( )

◆ initialize_shape() [1/2]

template<int dim>
void IBParticle< dim >::initialize_shape ( const std::string & type,
const std::string & raw_arguments )

Set up a shape in accordance with the given type and raw text argument.

The raw text argument is typically a file name.

Parameters
[in]typeType of shape to be initialized.
[in]raw_argumentsUntreated arguments of the shape.

Definition at line 269 of file ib_particle.cc.

References ShapeGenerator::initialize_shape(), orientation, position, and shape.

◆ initialize_shape() [2/2]

template<int dim>
void IBParticle< dim >::initialize_shape ( const std::string & type,
const std::vector< double > & shape_arguments )

Set up a shape in accordance with the given type and arguments.

Parameters
[in]typeType of the shape to be initialized.
[in]shape_argumentsArguments to be used for shape initialization.

Definition at line 258 of file ib_particle.cc.

References ShapeGenerator::initialize_shape_from_vector(), orientation, position, and shape.

◆ is_inside_crown() [1/2]

template<int dim>
bool IBParticle< dim >::is_inside_crown ( const Point< dim > & evaluation_point,
const double outer_radius,
const double inside_radius,
const bool absolute_distance )

See overloaded function.

Definition at line 224 of file ib_particle.cc.

References shape.

◆ is_inside_crown() [2/2]

template<int dim>
bool IBParticle< dim >::is_inside_crown ( const Point< dim > & evaluation_point,
const double outer_radius,
const double inside_radius,
const bool absolute_distance,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )

Determine if the given point is inside the crown for which the limits are defined by inner and outer radius factors. An effective radius is used for non spherical shapes.

Parameters
[in]evaluation_pointPoint at which the evaluation is performed.
[in]outer_radiusRelative or absolute distance to check if the evaluation point is inside the outer limits.
[in]inside_radiusRelative or absolute distance to check if the evaluation point is outside the inner limits.
[in]absolute_distanceBoolean for whether the radii are defined as absolute or relative to radius. If the value is false, the outer and inner radii are multiplied by the effective radius to construct the absolute distances to be used.
[in]cell_guessGuess of the cell containing the evaluation point, which is useful to reduce computation time.
Returns
true if the evaluation point is inside the crown.

Definition at line 195 of file ib_particle.cc.

References shape.

◆ load_data_from_file()

template<int dim>
void IBParticle< dim >::load_data_from_file ( )

Load data from the files (for file-based Shapes).

Definition at line 323 of file ib_particle.cc.

References load_data_from_file(), and shape.

◆ remove_superfluous_data()

template<int dim>
void IBParticle< dim >::remove_superfluous_data ( DoFHandler< dim > & updated_dof_handler,
const bool mesh_based_precalculations )

Update precalculations if needed, then compute and remove superfluous data.

Parameters
[in,out]updated_dof_handlerReference to the new dof_handler.
[in]mesh_based_precalculationsDefine if mesh-based precalculations are used (if type=RBF).

Definition at line 310 of file ib_particle.cc.

References remove_superfluous_data(), and shape.

◆ set_layer_thickening()

template<int dim>
void IBParticle< dim >::set_layer_thickening ( const double layer_thickening)
inline

Set the layer thickening value (positive or negative) of the shape.

Parameters
[in]layer_thickeningThickness to be artificially added to the particle. A negative value will decrease the particle's thickness by subtracting a layer of specified width.

Definition at line 232 of file ib_particle.h.

References shape.

◆ set_orientation()

template<int dim>
void IBParticle< dim >::set_orientation ( const Tensor< 1, 3 > & orientation)

Set the orientation and dependent members to the given orientation.

Parameters
[in]orientationNew orientation to set the particle at.

Definition at line 280 of file ib_particle.cc.

References orientation, rotation_matrix, and shape.

◆ set_position() [1/2]

template<int dim>
void IBParticle< dim >::set_position ( const double position_component,
const unsigned int component = 0 )
inline

Set the position and dependent members to the position for one component only.

Parameters
[in]position_componentComponent of the new position to set the particle at.
[in]componentComponent index for which the position will be updated.

Definition at line 209 of file ib_particle.h.

References position, and shape.

◆ set_position() [2/2]

template<int dim>
void IBParticle< dim >::set_position ( const Point< dim > position)
inline

Set the position and dependent members to the argument.

Parameters
[in]positionNew position to use.

Definition at line 161 of file ib_particle.h.

References position, and shape.

◆ update_precalculations()

template<int dim>
void IBParticle< dim >::update_precalculations ( DoFHandler< dim > & updated_dof_handler,
const bool mesh_based_precalculations )

Set the proper DOF handler, then compute/update the map of cells and their likely non-null nodes.

Parameters
[in,out]updated_dof_handlerReference to the new dof_handler.
[in]mesh_based_precalculationsDefine if mesh-based precalculations are used (if type=RBF).

Definition at line 289 of file ib_particle.cc.

References integrate_motion, load_data_from_file(), omega, shape, update_precalculations(), and velocity.

Member Data Documentation

◆ contact_impulsion

template<int dim>
Tensor<1, 3> IBParticle< dim >::contact_impulsion

Contact-generated impulsion felt by the particle.

Definition at line 436 of file ib_particle.h.

◆ f_omega

template<int dim>
std::shared_ptr<Functions::ParsedFunction<dim> > IBParticle< dim >::f_omega

Function that determines the angular velocity.

If the particle dynamics is solved, this function determines the value only at the initial state.

Definition at line 480 of file ib_particle.h.

◆ f_orientation

template<int dim>
std::shared_ptr<Functions::ParsedFunction<dim> > IBParticle< dim >::f_orientation

Function that determines the orientation.

If the particle dynamics is solved, this function determines the value only at the initial state.

Definition at line 488 of file ib_particle.h.

◆ f_position

template<int dim>
std::shared_ptr<Functions::ParsedFunction<dim> > IBParticle< dim >::f_position

Function that determines the position.

If the particle dynamics is solved, this function determines the value only at the initial state.

Definition at line 472 of file ib_particle.h.

◆ f_velocity

template<int dim>
std::shared_ptr<Functions::ParsedFunction<dim> > IBParticle< dim >::f_velocity

Function that determines the velocity.

If the particle dynamics is solved, this function determines the value only at the initial state.

Definition at line 464 of file ib_particle.h.

◆ fluid_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::fluid_forces

Total fluid force applied on the particle.

Definition at line 341 of file ib_particle.h.

◆ fluid_pressure_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::fluid_pressure_forces

Pressure contribution to the fluid force applied on the particle.

Definition at line 351 of file ib_particle.h.

◆ fluid_torque

template<int dim>
Tensor<1, 3> IBParticle< dim >::fluid_torque

Fluid torque applied on the particle.

Definition at line 372 of file ib_particle.h.

◆ fluid_viscous_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::fluid_viscous_forces

Viscous contribution to the fluid force applied on the particle.

Definition at line 346 of file ib_particle.h.

◆ friction_coefficient

template<int dim>
double IBParticle< dim >::friction_coefficient

Friction coefficient used for contact force calculations.

Definition at line 301 of file ib_particle.h.

◆ impulsion

template<int dim>
Tensor<1, 3> IBParticle< dim >::impulsion

Total impulsion felt by the particle during the current time step.

Definition at line 431 of file ib_particle.h.

◆ impulsion_iter

template<int dim>
Tensor<1, 3> IBParticle< dim >::impulsion_iter

Last non-linear iteration's total impulsion on the particle.

Definition at line 441 of file ib_particle.h.

◆ inertia

template<int dim>
Tensor<2, 3> IBParticle< dim >::inertia

Inertia matrix in the particle frame of reference.

Definition at line 326 of file ib_particle.h.

◆ integrate_motion

template<int dim>
bool IBParticle< dim >::integrate_motion

Indicate if the particle dynamics are solved.

If not, functions are used to define position, velocity, orientation and angular velocity.

Definition at line 496 of file ib_particle.h.

◆ mass

template<int dim>
double IBParticle< dim >::mass

Particle's mass.

Definition at line 311 of file ib_particle.h.

◆ mesh_based_precalculations

template<int dim>
bool IBParticle< dim >::mesh_based_precalculations

Indicate if mesh-based precalculations are performed.

For RBF shapes with nodes outside the background mesh, slight deformations can happen near the boundary when mesh-based precalculations are enabled (due to the RBF nodes partitioning algorithm).

Definition at line 505 of file ib_particle.h.

◆ omega

template<int dim>
Tensor<1, 3> IBParticle< dim >::omega

Angular velocity.

Definition at line 411 of file ib_particle.h.

◆ omega_contact_impulsion

template<int dim>
Tensor<1, 3> IBParticle< dim >::omega_contact_impulsion

Contact-generated angular impulsion felt by the particle.

Definition at line 451 of file ib_particle.h.

◆ omega_impulsion

template<int dim>
Tensor<1, 3> IBParticle< dim >::omega_impulsion

Total angular impulsion felt by the particle during the current time step.

Definition at line 446 of file ib_particle.h.

◆ omega_impulsion_iter

template<int dim>
Tensor<1, 3> IBParticle< dim >::omega_impulsion_iter

Last non-linear iteration's total angular impulsion on the particle.

Definition at line 456 of file ib_particle.h.

◆ omega_iter

template<int dim>
Tensor<1, 3> IBParticle< dim >::omega_iter

Last non-linear iteration's angular velocity for CFD-DEM coupling.

Definition at line 421 of file ib_particle.h.

◆ orientation

template<int dim>
Tensor<1, 3> IBParticle< dim >::orientation

Orientation, with 0 angular position by default on every axis.

Definition at line 401 of file ib_particle.h.

◆ particle_id

template<int dim>
unsigned int IBParticle< dim >::particle_id

Unique identification number.

Definition at line 271 of file ib_particle.h.

◆ poisson_ratio

template<int dim>
double IBParticle< dim >::poisson_ratio

Poisson's ratio used for contact force calculations.

Definition at line 296 of file ib_particle.h.

◆ position

template<int dim>
Point<dim> IBParticle< dim >::position

Position, which corresponds to the centroid for most implemented shapes.

Definition at line 331 of file ib_particle.h.

◆ pressure_location

template<int dim>
Point<dim> IBParticle< dim >::pressure_location

Position of the pressure reference point in the particle's referential. This point is used to define a constant on the pressure.

Definition at line 533 of file ib_particle.h.

◆ previous_fluid_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_fluid_forces

Previous time step's total fluid force applied on the particle.

Definition at line 356 of file ib_particle.h.

◆ previous_fluid_pressure_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_fluid_pressure_forces

Previous time step's pressure contribution to the fluid force.

Definition at line 367 of file ib_particle.h.

◆ previous_fluid_torque

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_fluid_torque

Previous time step's fluid torque applied on the particle.

Definition at line 377 of file ib_particle.h.

◆ previous_fluid_viscous_forces

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_fluid_viscous_forces

Previous time step's viscous contribution to the fluid force applied on the particle.

Definition at line 362 of file ib_particle.h.

◆ previous_local_alpha_omega

template<int dim>
double IBParticle< dim >::previous_local_alpha_omega

Previous iteration's relaxation parameter used for the angular velocity iteration.

Definition at line 527 of file ib_particle.h.

◆ previous_local_alpha_velocity

template<int dim>
double IBParticle< dim >::previous_local_alpha_velocity

Previous iteration's relaxation parameter used for the translational velocity iteration.

Definition at line 521 of file ib_particle.h.

◆ previous_omega

template<int dim>
std::vector<Tensor<1, 3> > IBParticle< dim >::previous_omega

Previous time step's angular velocity.

Definition at line 416 of file ib_particle.h.

◆ previous_omega_residual

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_omega_residual

Last non-linear correction (without relaxation) to the angular velocity.

Definition at line 426 of file ib_particle.h.

◆ previous_orientation

template<int dim>
std::vector<Tensor<1, 3> > IBParticle< dim >::previous_orientation

Previous time step's orientation.

Definition at line 406 of file ib_particle.h.

◆ previous_positions

template<int dim>
std::vector<Point<dim> > IBParticle< dim >::previous_positions

Positions at the last n time steps. n depends on the time integration scheme.

Definition at line 336 of file ib_particle.h.

◆ previous_velocity

template<int dim>
std::vector<Tensor<1, 3> > IBParticle< dim >::previous_velocity

Previous time step's translational velocity.

Definition at line 386 of file ib_particle.h.

◆ previous_velocity_residual

template<int dim>
Tensor<1, 3> IBParticle< dim >::previous_velocity_residual

Last non-linear correction (without relaxation) to the velocity.

Definition at line 396 of file ib_particle.h.

◆ radius

template<int dim>
double IBParticle< dim >::radius

Effective radius, which is the actual radius for spheres.

Definition at line 281 of file ib_particle.h.

◆ residual_omega

template<int dim>
double IBParticle< dim >::residual_omega

Current residual of the particle angular velocity.

Definition at line 515 of file ib_particle.h.

◆ residual_velocity

template<int dim>
double IBParticle< dim >::residual_velocity

Current residual of the particle velocity.

Definition at line 510 of file ib_particle.h.

◆ restitution_coefficient

template<int dim>
double IBParticle< dim >::restitution_coefficient

Restitution coefficient used for contact force calculations.

Definition at line 291 of file ib_particle.h.

◆ rolling_friction_coefficient

template<int dim>
double IBParticle< dim >::rolling_friction_coefficient

Rolling friction coefficient used for contact force calculations.

Definition at line 306 of file ib_particle.h.

◆ rotation_matrix

template<int dim>
Tensor<2, 3> IBParticle< dim >::rotation_matrix

Rotation matrix in the global space.

Definition at line 538 of file ib_particle.h.

◆ shape

template<int dim>
std::shared_ptr<Shape<dim> > IBParticle< dim >::shape

Geometrical information for IB application.

Definition at line 276 of file ib_particle.h.

◆ surface_energy

template<int dim>
double IBParticle< dim >::surface_energy

Surface energy.

Definition at line 321 of file ib_particle.h.

◆ velocity

template<int dim>
Tensor<1, 3> IBParticle< dim >::velocity

Translational velocity.

Definition at line 381 of file ib_particle.h.

◆ velocity_iter

template<int dim>
Tensor<1, 3> IBParticle< dim >::velocity_iter

Last non-linear iteration's velocity for CFD-DEM coupling.

Definition at line 391 of file ib_particle.h.

◆ volume

template<int dim>
double IBParticle< dim >::volume

Particle's volume.

Definition at line 316 of file ib_particle.h.

◆ youngs_modulus

template<int dim>
double IBParticle< dim >::youngs_modulus

Young's modulus used for contact force calculations.

Definition at line 286 of file ib_particle.h.


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