![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#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 |
Define the behavior of a specific particle for the sharp interface IB solver.
Each particle defined will have these values used in the solver.
| dim | An integer that denotes the number of spatial dimensions. |
Definition at line 25 of file ib_particle.h.
| 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.
| void IBParticle< dim >::closest_surface_point | ( | const Point< dim > & | p, |
| Point< dim > & | closest_point ) |
| 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.
| [in] | p | Point at which the evaluation is performed. |
| [out] | closest_point | Reference to the closest point. This point will be modified by the function. |
| [in] | cell_guess | A 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.
|
inline |
|
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
| [in] | p | Point at which the evaluation is performed. |
| [in] | cell_guess | Guess of the cell containing the evaluation point, which is useful to reduce computation time. |
Definition at line 75 of file ib_particle.h.
References shape.
|
inline |
Return the number of DEM properties, for visualization.
Definition at line 56 of file ib_particle.h.
References DEM::CFDDEMProperties::n_properties.
| std::vector< double > IBParticle< dim >::get_properties | ( | ) |
Return the value of the DEM properties, for visualization.
Definition at line 133 of file ib_particle.cc.
References DEM::CFDDEMProperties::dp, DEM::CFDDEMProperties::fem_force_two_way_coupling_x, DEM::CFDDEMProperties::fem_force_two_way_coupling_y, DEM::CFDDEMProperties::fem_force_two_way_coupling_z, DEM::CFDDEMProperties::fem_torque_x, DEM::CFDDEMProperties::fem_torque_y, DEM::CFDDEMProperties::fem_torque_z, fluid_forces, fluid_torque, get_number_properties(), DEM::CFDDEMProperties::mass, mass, omega, DEM::CFDDEMProperties::omega_x, DEM::CFDDEMProperties::omega_y, DEM::CFDDEMProperties::omega_z, particle_id, radius, DEM::CFDDEMProperties::type, DEM::CFDDEMProperties::v_x, DEM::CFDDEMProperties::v_y, DEM::CFDDEMProperties::v_z, and velocity.
| 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.
| void IBParticle< dim >::initialize_all | ( | ) |
Initialize all particles.
Definition at line 9 of file ib_particle.cc.
References contact_impulsion, f_omega, f_orientation, f_position, f_velocity, fluid_forces, fluid_torque, impulsion, impulsion_iter, inertia, omega, omega_impulsion, omega_impulsion_iter, omega_iter, orientation, particle_id, position, previous_fluid_forces, previous_fluid_torque, previous_omega, previous_orientation, previous_positions, previous_velocity, radius, rotation_matrix, velocity, and velocity_iter.
| void IBParticle< dim >::initialize_previous_solution | ( | ) |
Initialize the value of the last state of the particle.
Definition at line 97 of file ib_particle.cc.
References fluid_forces, impulsion, impulsion_iter, omega, omega_impulsion, omega_impulsion_iter, omega_iter, orientation, position, previous_fluid_forces, previous_omega, previous_orientation, previous_positions, previous_velocity, velocity, and velocity_iter.
| 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.
| [in] | type | Type of shape to be initialized. |
| [in] | raw_arguments | Untreated arguments of the shape. |
Definition at line 269 of file ib_particle.cc.
References ShapeGenerator::initialize_shape(), orientation, position, and shape.
| 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.
| [in] | type | Type of the shape to be initialized. |
| [in] | shape_arguments | Arguments 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.
| bool IBParticle< dim >::is_inside_crown | ( | const Point< dim > & | evaluation_point, |
| const double | outer_radius, | ||
| const double | inside_radius, | ||
| const bool | absolute_distance ) |
| 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.
| [in] | evaluation_point | Point at which the evaluation is performed. |
| [in] | outer_radius | Relative or absolute distance to check if the evaluation point is inside the outer limits. |
| [in] | inside_radius | Relative or absolute distance to check if the evaluation point is outside the inner limits. |
| [in] | absolute_distance | Boolean 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_guess | Guess of the cell containing the evaluation point, which is useful to reduce computation time. |
Definition at line 195 of file ib_particle.cc.
References shape.
| 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.
| 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.
| [in,out] | updated_dof_handler | Reference to the new dof_handler. |
| [in] | mesh_based_precalculations | Define if mesh-based precalculations are used (if type=RBF). |
Definition at line 310 of file ib_particle.cc.
References remove_superfluous_data(), and shape.
|
inline |
Set the layer thickening value (positive or negative) of the shape.
| [in] | layer_thickening | Thickness 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.
| void IBParticle< dim >::set_orientation | ( | const Tensor< 1, 3 > & | orientation | ) |
Set the orientation and dependent members to the given orientation.
| [in] | orientation | New orientation to set the particle at. |
Definition at line 280 of file ib_particle.cc.
References orientation, rotation_matrix, and shape.
|
inline |
Set the position and dependent members to the position for one component only.
| [in] | position_component | Component of the new position to set the particle at. |
| [in] | component | Component index for which the position will be updated. |
Definition at line 209 of file ib_particle.h.
|
inline |
Set the position and dependent members to the argument.
| [in] | position | New position to use. |
Definition at line 161 of file ib_particle.h.
| 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.
| [in,out] | updated_dof_handler | Reference to the new dof_handler. |
| [in] | mesh_based_precalculations | Define 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.
| Tensor<1, 3> IBParticle< dim >::contact_impulsion |
Contact-generated impulsion felt by the particle.
Definition at line 436 of file ib_particle.h.
| 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.
| 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.
| 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.
| 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.
| Tensor<1, 3> IBParticle< dim >::fluid_forces |
Total fluid force applied on the particle.
Definition at line 341 of file ib_particle.h.
| 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.
| Tensor<1, 3> IBParticle< dim >::fluid_torque |
Fluid torque applied on the particle.
Definition at line 372 of file ib_particle.h.
| 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.
| double IBParticle< dim >::friction_coefficient |
Friction coefficient used for contact force calculations.
Definition at line 301 of file ib_particle.h.
| 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.
| 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.
| Tensor<2, 3> IBParticle< dim >::inertia |
Inertia matrix in the particle frame of reference.
Definition at line 326 of file ib_particle.h.
| 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.
| double IBParticle< dim >::mass |
Particle's mass.
Definition at line 311 of file ib_particle.h.
| 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.
| Tensor<1, 3> IBParticle< dim >::omega |
Angular velocity.
Definition at line 411 of file ib_particle.h.
| 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.
| 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.
| 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.
| 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.
| 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.
| unsigned int IBParticle< dim >::particle_id |
Unique identification number.
Definition at line 271 of file ib_particle.h.
| double IBParticle< dim >::poisson_ratio |
Poisson's ratio used for contact force calculations.
Definition at line 296 of file ib_particle.h.
| Point<dim> IBParticle< dim >::position |
Position, which corresponds to the centroid for most implemented shapes.
Definition at line 331 of file ib_particle.h.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| std::vector<Tensor<1, 3> > IBParticle< dim >::previous_omega |
Previous time step's angular velocity.
Definition at line 416 of file ib_particle.h.
| 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.
| std::vector<Tensor<1, 3> > IBParticle< dim >::previous_orientation |
Previous time step's orientation.
Definition at line 406 of file ib_particle.h.
| 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.
| std::vector<Tensor<1, 3> > IBParticle< dim >::previous_velocity |
Previous time step's translational velocity.
Definition at line 386 of file ib_particle.h.
| 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.
| double IBParticle< dim >::radius |
Effective radius, which is the actual radius for spheres.
Definition at line 281 of file ib_particle.h.
| double IBParticle< dim >::residual_omega |
Current residual of the particle angular velocity.
Definition at line 515 of file ib_particle.h.
| double IBParticle< dim >::residual_velocity |
Current residual of the particle velocity.
Definition at line 510 of file ib_particle.h.
| double IBParticle< dim >::restitution_coefficient |
Restitution coefficient used for contact force calculations.
Definition at line 291 of file ib_particle.h.
| double IBParticle< dim >::rolling_friction_coefficient |
Rolling friction coefficient used for contact force calculations.
Definition at line 306 of file ib_particle.h.
| Tensor<2, 3> IBParticle< dim >::rotation_matrix |
Rotation matrix in the global space.
Definition at line 538 of file ib_particle.h.
| std::shared_ptr<Shape<dim> > IBParticle< dim >::shape |
Geometrical information for IB application.
Definition at line 276 of file ib_particle.h.
| double IBParticle< dim >::surface_energy |
Surface energy.
Definition at line 321 of file ib_particle.h.
| Tensor<1, 3> IBParticle< dim >::velocity |
Translational velocity.
Definition at line 381 of file ib_particle.h.
| 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.
| double IBParticle< dim >::volume |
Particle's volume.
Definition at line 316 of file ib_particle.h.
| double IBParticle< dim >::youngs_modulus |
Young's modulus used for contact force calculations.
Definition at line 286 of file ib_particle.h.