4#ifndef lethe_ib_particle_h
5#define lethe_ib_particle_h
10#include <deal.II/base/parsed_function.h>
11#include <deal.II/base/point.h>
43 std::vector<std::pair<std::string, int>>
76 const typename DoFHandler<dim>::active_cell_iterator &cell_guess)
78 return shape->value_with_cell_guess(p, cell_guess);
87 return shape->value(p);
106 Point<dim> &closest_point,
107 const typename DoFHandler<dim>::active_cell_iterator &cell_guess);
140 const Point<dim> &evaluation_point,
141 const double outer_radius,
142 const double inside_radius,
143 const bool absolute_distance,
144 const typename DoFHandler<dim>::active_cell_iterator &cell_guess);
151 const double outer_radius,
152 const double inside_radius,
153 const bool absolute_distance);
164 this->
shape->set_position(this->position);
184 const std::vector<double> &shape_arguments);
196 initialize_shape(
const std::string &type,
const std::string &raw_arguments);
210 const unsigned int component = 0)
212 this->
position[component] = position_component;
234 shape->set_layer_thickening(layer_thickening);
480 std::shared_ptr<Functions::ParsedFunction<dim>>
f_omega;
Define the behavior of a specific particle for the sharp interface IB solver.
std::vector< Tensor< 1, 3 > > previous_orientation
Previous time step's orientation.
Tensor< 1, 3 > fluid_viscous_forces
Viscous contribution to the fluid force applied on the particle.
double previous_local_alpha_velocity
Previous iteration's relaxation parameter used for the translational velocity iteration.
Tensor< 1, 3 > orientation
Orientation, with 0 angular position by default on every axis.
double residual_omega
Current residual of the particle angular velocity.
std::vector< double > get_properties()
Return the value of the DEM properties, for visualization.
double radius
Effective radius, which is the actual radius for spheres.
Tensor< 1, 3 > omega
Angular velocity.
std::shared_ptr< Functions::ParsedFunction< dim > > f_omega
Function that determines the angular velocity.
Tensor< 1, 3 > previous_velocity_residual
Last non-linear correction (without relaxation) to the velocity.
Tensor< 1, 3 > fluid_forces
Total fluid force applied on the particle.
std::vector< Point< dim > > previous_positions
Positions at the last n time steps. n depends on the time integration scheme.
bool integrate_motion
Indicate if the particle dynamics are solved.
void set_orientation(const Tensor< 1, 3 > &orientation)
Set the orientation and dependent members to the given orientation.
void load_data_from_file()
Load data from the files (for file-based Shapes).
Tensor< 1, 3 > contact_impulsion
Contact-generated impulsion felt by the particle.
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)
Determine if the given point is inside the crown for which the limits are defined by inner and outer ...
double mass
Particle's mass.
double poisson_ratio
Poisson's ratio used for contact force calculations.
Tensor< 1, 3 > fluid_pressure_forces
Pressure contribution to the fluid force applied on the particle.
void clear_shape_cache()
Clear the cache used to evaluate the value and vector defining the signed distance function.
unsigned int get_number_properties()
Return the number of DEM properties, for visualization.
Tensor< 1, 3 > previous_fluid_viscous_forces
Previous time step's viscous contribution to the fluid force applied on the particle.
Tensor< 2, 3 > rotation_matrix
Rotation matrix in the global space.
Tensor< 2, 3 > inertia
Inertia matrix in the particle frame of reference.
void 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.
void remove_superfluous_data(DoFHandler< dim > &updated_dof_handler, const bool mesh_based_precalculations)
Update precalculations if needed, then compute and remove superfluous data.
Tensor< 1, 3 > velocity
Translational velocity.
Tensor< 1, 3 > previous_fluid_torque
Previous time step's fluid torque applied on the particle.
void 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.
void set_position(const double position_component, const unsigned int component=0)
Set the position and dependent members to the position for one component only.
void initialize_all()
Initialize all particles.
double volume
Particle's volume.
Tensor< 1, 3 > previous_fluid_pressure_forces
Previous time step's pressure contribution to the fluid force.
double previous_local_alpha_omega
Previous iteration's relaxation parameter used for the angular velocity iteration.
double restitution_coefficient
Restitution coefficient used for contact force calculations.
Tensor< 1, 3 > impulsion
Total impulsion felt by the particle during the current time step.
void initialize_previous_solution()
Initialize the value of the last state of the particle.
double residual_velocity
Current residual of the particle velocity.
unsigned int particle_id
Unique identification number.
std::vector< std::pair< std::string, int > > get_properties_name()
Return the names of the DEM properties, for visualization.
void set_layer_thickening(const double layer_thickening)
Set the layer thickening value (positive or negative) of the shape.
void set_position(const Point< dim > position)
Set the position and dependent members to the argument.
Tensor< 1, 3 > previous_omega_residual
Last non-linear correction (without relaxation) to the angular velocity.
void initialize_shape(const std::string &type, const std::vector< double > &shape_arguments)
Set up a shape in accordance with the given type and arguments.
std::shared_ptr< Functions::ParsedFunction< dim > > f_velocity
Function that determines the velocity.
double get_levelset(const Point< dim > &p, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
Compute the evaluation of the signed distance function of this shape.
Point< dim > pressure_location
Position of the pressure reference point in the particle's referential. This point is used to define ...
Tensor< 1, 3 > omega_iter
Last non-linear iteration's angular velocity for CFD-DEM coupling.
Tensor< 1, 3 > omega_impulsion_iter
Last non-linear iteration's total angular impulsion on the particle.
double get_levelset(const Point< dim > &p)
See overloaded function.
Tensor< 1, 3 > fluid_torque
Fluid torque applied on the particle.
std::shared_ptr< Functions::ParsedFunction< dim > > f_position
Function that determines the position.
std::shared_ptr< Functions::ParsedFunction< dim > > f_orientation
Function that determines the orientation.
double friction_coefficient
Friction coefficient used for contact force calculations.
Tensor< 1, 3 > impulsion_iter
Last non-linear iteration's total impulsion on the particle.
Tensor< 1, 3 > velocity_iter
Last non-linear iteration's velocity for CFD-DEM coupling.
double surface_energy
Surface energy.
bool mesh_based_precalculations
Indicate if mesh-based precalculations are performed.
double youngs_modulus
Young's modulus used for contact force calculations.
std::shared_ptr< Shape< dim > > shape
Geometrical information for IB application.
double rolling_friction_coefficient
Rolling friction coefficient used for contact force calculations.
Tensor< 1, 3 > omega_contact_impulsion
Contact-generated angular impulsion felt by the particle.
Tensor< 1, 3 > omega_impulsion
Total angular impulsion felt by the particle during the current time step.
Tensor< 1, 3 > previous_fluid_forces
Previous time step's total fluid force applied on the particle.
std::vector< Tensor< 1, 3 > > previous_omega
Previous time step's angular velocity.
Point< dim > position
Position, which corresponds to the centroid for most implemented shapes.
std::vector< Tensor< 1, 3 > > previous_velocity
Previous time step's translational velocity.
DEM particle property definitions and output name management.
@ n_properties
Number of properties.