ObstacleGravitationalForce< dim, number, ObstacleType > Struct Template Reference

Developer Documentation: MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType > Struct Template Reference
Developer Documentation
MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType > Struct Template Reference

Computes the gravitational force acting on an obstacle. More...

#include <obstacle_forces.hpp>

Public Member Functions

 ObstacleGravitationalForce (const number gravitational_constant)
 Constructs the gravitational force object with a given gravitational constant.
 
void add_load_to_obstacles (ObstacleField< dim, number, ObstacleType > &obstacle_field) const
 Computes the gravitational force acting on all obstacles in the given obstacle field and adds the force contribution to the corresponding obstacle force property.
 

Private Attributes

const number gravitational_constant
 

Detailed Description

template<int dim, typename number, typename ObstacleType>
struct MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType >

Computes the gravitational force acting on an obstacle.

Note
The obstacle type must define a static method get_property(...) and an enum member Properties::mass for retrieving the mass of the obstacle.

Constructor & Destructor Documentation

◆ ObstacleGravitationalForce()

template<int dim, typename number , typename ObstacleType >
MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType >::ObstacleGravitationalForce ( const number  gravitational_constant)
inlineexplicit

Constructs the gravitational force object with a given gravitational constant.

Parameters
gravitational_constantThe gravitational constant to use in force computation.

Member Function Documentation

◆ add_load_to_obstacles()

template<int dim, typename number , typename ObstacleType >
void MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType >::add_load_to_obstacles ( ObstacleField< dim, number, ObstacleType > &  obstacle_field) const
inline

Computes the gravitational force acting on all obstacles in the given obstacle field and adds the force contribution to the corresponding obstacle force property.

The force is computed as: [ F = -g * m ] where is the gravitational constant and is the mass of the obstacle. The force is applied in the negative direction of the last axis.

Parameters
obstacle_fieldThe obstacle field containing all particles on which the gravitational forces are to be computed.

Member Data Documentation

◆ gravitational_constant

template<int dim, typename number , typename ObstacleType >
const number MeltPoolDG::ObstacleGravitationalForce< dim, number, ObstacleType >::gravitational_constant
private

The documentation for this struct was generated from the following file: