SphericalParticle< dim, number > Class Template Reference
|
Developer Documentation
|
Class representing a finite-sized spherical particle, intended for use with the obstacle field class. More...
#include <particle.hpp>
Public Types | |
| enum | Properties { velocity = 0 , acceleration = dim , angular_velocity = acceleration + dim , angular_acceleration = angular_velocity + size_angular_velocity , force = angular_acceleration + size_angular_velocity , torque = force + dim , radius = torque + size_angular_velocity , volume , density , mass , moment_of_inertia , particle_id } |
| Enum to define the index of each property in the particle's property vector. More... | |
Public Member Functions | |
| template<typename VectorizedArrayType > | |
| auto | vector_to_center_of_gravity (const dealii::Point< dim, VectorizedArrayType > &loc, dealii::Particles::PropertyPool< dim > &property_pool, const typename dealii::Particles::PropertyPool< dim >::Handle handle) -> dealii::Tensor< 1, dim, VectorizedArrayType > |
| template<typename VectorizedArrayType > | |
| auto | vector_to_surface (const dealii::Point< dim, VectorizedArrayType > &loc, const dealii::Particles::ParticleAccessor< dim > &particle) -> dealii::Tensor< 1, dim, VectorizedArrayType > |
Static Public Member Functions | |
| static std::pair< std::vector< std::string >, std::vector< dealii::DataComponentInterpretation::DataComponentInterpretation > > | get_property_names_and_component_interpretation () |
| Provides the names and component interpretations of particle properties for output. | |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | vector_to_center_of_gravity (const dealii::Point< dim, VectorizedArrayType > &loc, dealii::Particles::PropertyPool< dim > &property_pool, const typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | vector_to_surface (const dealii::Point< dim, VectorizedArrayType > &loc, const dealii::Particles::ParticleAccessor< dim > &particle) |
| static dealii::Tensor< 1, size_angular_velocity, number > | get_torque (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the torque vector acting on the given particle. | |
| static dealii::Tensor< 1, size_angular_velocity, number > | get_torque (dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| static void | set_torque (const dealii::Tensor< 1, size_angular_velocity, number > &torque, dealii::Particles::ParticleAccessor< dim > &particle) |
| Assigns the specified torque vector to the particle by writing its components into the particle's property array. | |
| static void | set_torque (const dealii::Tensor< 1, size_angular_velocity, number > &torque, dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| static void | accumulate_torque (const dealii::Tensor< 1, size_angular_velocity, number > &torque, dealii::Particles::ParticleAccessor< dim > &particle) |
| Accumulates the specified torque vector to the particle by adding its components into the particle's property array. | |
| static void | accumulate_torque (const dealii::Tensor< 1, size_angular_velocity, number > &torque, dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| static dealii::Tensor< 1, dim, number > | get_force (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the force vector acting on the given particle. | |
| static dealii::Tensor< 1, dim, number > | get_force (dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| static void | set_force (const dealii::Tensor< 1, dim, number > &force, dealii::Particles::ParticleAccessor< dim > &particle) |
| Assigns the specified force vector to the particle by writing its components into the particle's property array. | |
| static void | set_force (const dealii::Tensor< 1, dim, number > &force, dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| static void | accumulate_force (const dealii::Tensor< 1, dim, number > &force, dealii::Particles::ParticleAccessor< dim > &particle) |
| Accumulates the specified force vector to the particle by adding its components into the particle's property array. | |
| static void | accumulate_force (const dealii::Tensor< 1, dim, number > &force, dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | get_velocity (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the translational velocity vector of the specified particle, i.e., the velocity at the particle center. | |
| static void | set_velocity (dealii::Particles::ParticleAccessor< dim > &particle, const dealii::Tensor< 1, dim, number > &velocity) |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | get_velocity (const dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| Retrieves the translational velocity of a specific particle from a property pool. | |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | get_velocity (const dealii::Particles::ParticleAccessor< dim > &particle, const dealii::Point< dim, VectorizedArrayType > &location) |
| Computes the velocity of a particle at a user-defined location. | |
| template<typename VectorizedArrayType > | |
| static dealii::Tensor< 1, dim, VectorizedArrayType > | get_velocity (const dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle, const dealii::Point< dim, VectorizedArrayType > &location) |
| Computes the velocity of a particle at a specified location using a property pool. | |
| static dealii::Tensor< 1, dim, number > | get_acceleration (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the translational acceleration of the specified particle. | |
| static dealii::Tensor< 1, dim, number > | get_acceleration (const dealii::Particles::ParticleAccessor< dim > &particle, const dealii::Point< dim, number > &location) |
| Returns the acceleration of a particle at a specified location. | |
| static void | set_acceleration (dealii::Particles::ParticleAccessor< dim > &particle, const dealii::Tensor< 1, dim, number > &acceleration) |
| Sets the translational acceleration of the specified particle. | |
| static dealii::Tensor< 1, size_angular_velocity, number > | get_angular_velocity (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the angular velocity of the given particle. | |
| static dealii::Tensor< 1, size_angular_velocity, number > | get_angular_velocity (const dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle) |
| Returns the angular velocity of a particle identified by a handle in a property pool. | |
| static dealii::Tensor< 1, size_angular_velocity, number > | get_angular_acceleration (const dealii::Particles::ParticleAccessor< dim > &particle) |
| Returns the angular acceleration of a given particle. | |
| static void | set_angular_acceleration (dealii::Particles::ParticleAccessor< dim > &particle, const dealii::Tensor< 1, size_angular_velocity, number > &acceleration) |
| Sets the angular acceleration of the specified particle. | |
| static number | get_property (const dealii::Particles::ParticleAccessor< dim > &particle, Properties property) |
| Provides access to a specific single-valued property of a given particle. | |
| static number | get_property (const dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle, const Properties property) |
| Provides access to a specific single-valued property using a property pool and a corresponding property handle. | |
| static bool | is_in_cell (const dealii::Particles::ParticleAccessor< dim > &particle, const dealii::CellAccessor< dim > &cell) |
| Estimates whether a particle likely intersects or encloses a given cell. | |
| static bool | is_in_cell (dealii::Particles::PropertyPool< dim > &property_pool, typename dealii::Particles::PropertyPool< dim >::Handle handle, const dealii::CellAccessor< dim > &cell) |
| Estimates whether a particle identified in a property pool likely intersects a cell. | |
| static number | get_characteristic_length (const dealii::Particles::ParticleAccessor< dim > &particle) |
Static Public Attributes | |
| static constexpr unsigned int | size_angular_velocity = dim - 3 % dim |
| static constexpr unsigned int | n_obstacle_properties |
Detailed Description
class MeltPoolDG::SphericalParticle< dim, number >
Class representing a finite-sized spherical particle, intended for use with the obstacle field class.
Unlike point particles, this class models particles with a physical extent (non-zero radius, mass etc.), allowing them to behave as rigid spherical bodies. It integrates with the deal.II ParticleHandler infrastructure.
Member Enumeration Documentation
◆ Properties
| enum MeltPoolDG::SphericalParticle::Properties |
Member Function Documentation
◆ accumulate_force() [1/2]
|
static |
Accumulates the specified force vector to the particle by adding its components into the particle's property array.
- Parameters
-
force The force vector to assign to the particle. particle The particle to which the force will be applied.
◆ accumulate_force() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to add the force to.
◆ accumulate_torque() [1/2]
|
static |
Accumulates the specified torque vector to the particle by adding its components into the particle's property array.
- Parameters
-
torque The torque vector to assign to the particle. particle The particle to which the torque will be applied.
◆ accumulate_torque() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to add the torque to.
◆ get_acceleration() [1/2]
|
static |
Returns the translational acceleration of the specified particle.
This function retrieves the translational acceleration vector at the center of the given particle particle.
- Parameters
-
particle The particle whose center acceleration is to be returned.
- Returns
- A tensor representing the translational acceleration at the particle center.
◆ get_acceleration() [2/2]
|
static |
Returns the acceleration of a particle at a specified location.
This function computes the particle's acceleration at a user-defined point location, which may differ from the particle center. It includes both translational and rotational contributions using the formula:
a + α × r
where:
ais the translational acceleration at the particle center,αis the angular acceleration,ris the vector from the particle center to the evaluation point.
- Parameters
-
particle The particle whose acceleration is to be computed. location The point at which to evaluate the acceleration.
- Returns
- A tensor representing the total acceleration at the specified location.
◆ get_angular_acceleration()
|
static |
Returns the angular acceleration of a given particle.
- Parameters
-
particle The particle whose angular acceleration is to be returned.
- Returns
- A tensor representing the angular acceleration of the particle.
◆ get_angular_velocity() [1/2]
|
static |
Returns the angular velocity of the given particle.
- Parameters
-
particle The particle whose angular velocity is to be returned.
- Returns
- A tensor representing the angular velocity of the particle.
◆ get_angular_velocity() [2/2]
|
static |
Returns the angular velocity of a particle identified by a handle in a property pool.
- Parameters
-
property_pool The pool containing properties of one or more particles. handle The handle identifying the specific particle within the property pool.
- Returns
- A tensor representing the angular velocity of the specified particle.
◆ get_characteristic_length()
|
static |
Return the characteristic length (i.e. the radius) of the specified particle
- Parameters
-
particle.
◆ get_force() [1/2]
|
static |
Returns the force vector acting on the given particle.
- Parameters
-
particle The particle of interest.
- Returns
- A dealii::Tensor representing the force vector acting on the particle.
◆ get_force() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to get force from.
◆ get_property() [1/2]
|
static |
Provides access to a specific single-valued property of a given particle.
This function returns the value of a single-valued property stored in the given particle. It should be used only for scalar properties.
- Parameters
-
particle The particle from which to retrieve the property. property The property to retrieve.
- Returns
- The value of the specified property.
- Note
- This function should be used only for scalar properties. For vector-valued properties such as translational or angular velocity, use the functions
get_velocity()andget_angular_velocity(). The same applies to translational and angular acceleration.
◆ get_property() [2/2]
|
static |
Provides access to a specific single-valued property using a property pool and a corresponding property handle.
This function retrieves the value of a single-valued property for a particle identified by the given handle within the provided property pool. Unlike the other overload, this version does not require direct access to a particle object.
- Parameters
-
property_pool The property pool containing data for multiple particles. handle A handle identifying the specific particle within the property pool. property The property to retrieve.
- Returns
- The value of the specified property.
- Note
- This function should be used only for scalar properties. For vector-valued properties such as translational or angular velocity, use the functions
get_velocity()andget_angular_velocity(). The same applies to translational and angular acceleration.
◆ get_property_names_and_component_interpretation()
|
inlinestatic |
Provides the names and component interpretations of particle properties for output.
This function returns a pair consisting of:
- A list of property names corresponding to physical attributes associated with particles.
- A list of
DataComponentInterpretationvalues indicating whether each property should be interpreted as part of a vector field or as a scalar.
- Returns
- A pair of vectors:
std::vector<std::string>: property names (withdimcopies for vector fields),std::vector<DataComponentInterpretation>: corresponding component interpretations.
◆ get_torque() [1/2]
|
static |
Returns the torque vector acting on the given particle.
- Parameters
-
particle The particle of interest.
- Returns
- A dealii::Tensor representing the torque vector acting on the particle.
◆ get_torque() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to get torque from.
◆ get_velocity() [1/4]
|
static |
Returns the translational velocity vector of the specified particle, i.e., the velocity at the particle center.
- Parameters
-
particle The particle of interest.
- Returns
- The translational velocity vector at the particle center.
◆ get_velocity() [2/4]
|
static |
Computes the velocity of a particle at a user-defined location.
Given a specific particle particle, this function calculates its velocity at a specified point location, which does not necessarily have to be the particle center. The velocity at the location is computed using the formula:
v + ω × r
where:
vis the translational velocity at the particle center,ωis the angular velocity,ris the vector from the particle center to the location of interest.
- Parameters
-
particle The particle whose velocity is to be computed. location The point at which to evaluate the velocity.
- Returns
- A tensor representing the velocity of the particle at the given location.
◆ get_velocity() [3/4]
|
static |
Retrieves the translational velocity of a specific particle from a property pool.
This function returns the translational velocity of a particle, similar to the overload above. However, instead of accessing properties of a single particle directly, it requires a PropertyPool containing the properties of one or more particles. A handle must also be provided to identify the specific particle within this pool.
- Parameters
-
property_pool A reference to the property pool containing particle data. handle A handle used to identify the particle of interest within the pool.
- Returns
- The translational velocity vector at the particle center.
◆ get_velocity() [4/4]
|
static |
Computes the velocity of a particle at a specified location using a property pool.
This function performs the same computation as the overload above, but instead of directly accessing a particle object, it uses a PropertyPool and a corresponding handle to identify the particle of interest. The velocity is evaluated at a user-defined location location, not necessarily at the particle center.
The velocity is computed as:
v + ω × r
where:
vis the translational velocity obtained from the property pool,ωis the angular velocity,ris the vector from the particle center to the evaluation point.
- Parameters
-
property_pool The property pool containing the particle data. handle The handle identifying the specific particle within the property pool. location The point at which to evaluate the particle's velocity.
- Returns
- A tensor representing the velocity of the particle at the specified location.
◆ is_in_cell() [1/2]
|
inlinestatic |
Estimates whether a particle likely intersects or encloses a given cell.
This function heuristically determines whether the specified particle particle at least partially overlaps the given cell cell. Note that a return value of true does not definitively confirm overlap but indicates a high likelihood based on the following logic:
- If the center of the cell lies within the particle's radius, the function returns
true. - Otherwise, the function checks whether the distance between the particle center and the cell center is less than the sum of the particle radius and half the cell's diameter. If so, the function also returns
true, though this is a conservative approximation.
- Parameters
-
particle The particle accessor providing access to the particle's properties. cell The finite element cell to be tested against the particle.
- Returns
trueif the particle likely overlaps the cell; otherwise,false.
◆ is_in_cell() [2/2]
|
inlinestatic |
Estimates whether a particle identified in a property pool likely intersects a cell.
This overload performs the same overlap estimation as the version above, but accesses the particle's data indirectly via a property pool and a corresponding handle. The same heuristic strategy is used:
Check if the distance between the particle center and cell center is less than the sum of the particle radius and half the cell's diameter.
- Parameters
-
property_pool The property pool containing particle data. handle The handle identifying the particle in the property pool. cell The finite element cell to test for potential overlap.
- Returns
trueif the particle likely overlaps the cell; otherwise,false.
◆ set_acceleration()
|
static |
Sets the translational acceleration of the specified particle.
- Parameters
-
particle The particle to which the translational acceleration will be assigned. acceleration The translational acceleration vector to assign to the particle.
◆ set_angular_acceleration()
|
static |
Sets the angular acceleration of the specified particle.
- Parameters
-
particle The particle to which the angular acceleration will be assigned. acceleration The angular acceleration vector to assign to the particle.
◆ set_force() [1/2]
|
static |
Assigns the specified force vector to the particle by writing its components into the particle's property array.
- Parameters
-
force The force vector to assign to the particle. particle The particle to which the force will be applied.
◆ set_force() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to set the corresponding force.
◆ set_torque() [1/2]
|
static |
Assigns the specified torque vector to the particle by writing its components into the particle's property array.
- Parameters
-
torque The torque vector to assign to the particle. particle The particle to which the torque will be applied.
◆ set_torque() [2/2]
|
static |
As above but operates on a property pool with a specified handle to identify where to set the corresponding torque.
◆ set_velocity()
|
static |
◆ vector_to_center_of_gravity() [1/2]
|
static |
This function returns a vector from the given point, towards the particle's center of gravity, i.e., the center of the particle.
- Parameters
-
loc Starting point of the vector. property_pool The property pool containing the particle data. handle The handle identifying the specific particle within the property pool.
◆ vector_to_center_of_gravity() [2/2]
| auto MeltPoolDG::SphericalParticle< dim, number >::vector_to_center_of_gravity | ( | const dealii::Point< dim, VectorizedArrayType > & | loc, |
| dealii::Particles::PropertyPool< dim > & | property_pool, | ||
| const typename dealii::Particles::PropertyPool< dim >::Handle | handle | ||
| ) | -> dealii::Tensor<1, dim, VectorizedArrayType> |
◆ vector_to_surface() [1/2]
|
static |
This function returns a vector from the given point, towards the nearest point on the particles surface.
- Parameters
-
loc Starting point of the vector. property_pool The property pool containing the particle data. handle The handle identifying the specific particle within the property pool.
◆ vector_to_surface() [2/2]
| auto MeltPoolDG::SphericalParticle< dim, number >::vector_to_surface | ( | const dealii::Point< dim, VectorizedArrayType > & | loc, |
| const dealii::Particles::ParticleAccessor< dim > & | particle | ||
| ) | -> dealii::Tensor<1, dim, VectorizedArrayType> |
Member Data Documentation
◆ n_obstacle_properties
|
staticconstexpr |
◆ size_angular_velocity
|
staticconstexpr |
The documentation for this class was generated from the following file:
- include/meltpooldg/particles/particle.hpp
Generated by