71 for (
unsigned int i = 0; i < 3; ++i)
79 f_position = std::make_shared<Functions::ParsedFunction<dim>>(dim);
80 f_velocity = std::make_shared<Functions::ParsedFunction<dim>>(dim);
81 f_omega = std::make_shared<Functions::ParsedFunction<dim>>(3);
82 f_orientation = std::make_shared<Functions::ParsedFunction<dim>>(3);
106 for (
unsigned int i = 0; i < 3; ++i)
116std::vector<std::pair<std::string, int>>
119 std::vector<std::pair<std::string, int>> particle_properties(
121 particle_properties =
128 return particle_properties;
179 Point<dim> &closest_point,
180 const typename DoFHandler<dim>::active_cell_iterator &cell_guess)
182 shape->closest_surface_point(p, closest_point, cell_guess);
188 Point<dim> &closest_point)
190 shape->closest_surface_point(p, closest_point);
196 const Point<dim> &evaluation_point,
197 const double outer_radius,
198 const double inside_radius,
199 const bool absolute_distance,
200 const typename DoFHandler<dim>::active_cell_iterator &cell_guess)
202 const double effective_radius =
shape->effective_radius;
204 double distance =
shape->value_with_cell_guess(evaluation_point, cell_guess);
205 bool is_inside_outer_ring;
206 bool is_outside_inner_ring;
207 if (absolute_distance)
209 is_inside_outer_ring = distance <= outer_radius;
210 is_outside_inner_ring = distance >= inside_radius;
214 is_inside_outer_ring = distance <= effective_radius * (outer_radius - 1);
215 is_outside_inner_ring =
216 distance >= effective_radius * (inside_radius - 1);
219 return is_inside_outer_ring && is_outside_inner_ring;
225 const double outer_radius,
226 const double inside_radius,
227 const bool absolute_distance)
229 const double effective_radius =
shape->effective_radius;
231 double distance =
shape->value(evaluation_point);
232 bool is_inside_outer_ring;
233 bool is_outside_inner_ring;
234 if (absolute_distance)
236 is_inside_outer_ring = distance <= outer_radius;
237 is_outside_inner_ring = distance >= inside_radius;
241 is_inside_outer_ring = distance <= effective_radius * (outer_radius - 1);
242 is_outside_inner_ring =
243 distance >= effective_radius * (inside_radius - 1);
246 return is_inside_outer_ring && is_outside_inner_ring;
253 this->
shape->clear_cache();
259 const std::vector<double> &shape_arguments)
270 const std::string &raw_arguments)
283 this->
shape->set_orientation(new_orientation);
290 const bool precalculations)
299 updated_dof_handler, precalculations);
303 std::static_pointer_cast<CompositeShape<dim>>(
shape)
311 const bool precalculations)
315 updated_dof_handler, precalculations);
317 std::static_pointer_cast<CompositeShape<dim>>(
shape)
This class was designed so that specific composite shapes could be defined through the parameter file...
static std::vector< std::pair< std::string, int > > get_properties_name()
Return the names of each DEM property. Used to properly generate output files.
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 > orientation
Orientation, with 0 angular position by default on every axis.
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 > 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.
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< 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 initialize_all()
Initialize all particles.
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.
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 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.
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.
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.
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.
std::shared_ptr< Shape< dim > > shape
Geometrical information for IB application.
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.
RBF Shapes express the signed distance function as a linear combination of Radial Basis Functions (RB...
@ fem_torque_x
FEM torque - x component.
@ n_properties
Number of properties.
@ fem_force_two_way_coupling_y
FEM force which is applied on both fluid and particles - y component.
@ fem_force_two_way_coupling_z
FEM force which is applied on both fluid and particles - z component.
@ v_y
Velocity - y component.
@ fem_torque_z
FEM torque - z component.
@ fem_force_two_way_coupling_x
FEM force which is applied on both fluid and particles - x component.
@ v_x
Velocity - x component.
@ v_z
Velocity - z component.
@ omega_z
Angular velocity - z component.
@ omega_x
Angular velocity - x component.
@ omega_y
Angular velocity - y component.
@ fem_torque_y
FEM torque - y component.
std::shared_ptr< Shape< dim > > initialize_shape_from_vector(const std::string &type, const std::vector< double > &shape_arguments, const Point< dim > &position, const Tensor< 1, 3 > &orientation)
std::shared_ptr< Shape< dim > > initialize_shape(const std::string &type, const std::string &shape_arguments_str, const Point< dim > &position, const Tensor< 1, 3 > &orientation)