NLMech  0.1.0
model::FDModel< T > Class Template Reference

A class for finite difference approximation of Peridynamics More...

#include <fDModel.h>

Inheritance diagram for model::FDModel< T >:
Inheritance graph
Collaboration diagram for model::FDModel< T >:
Collaboration graph

Public Member Functions

 FDModel (inp::Input *deck)
 Constructor. More...
 
- Public Member Functions inherited from model::Model
 Model ()
 Constructor.
 

Private Member Functions

void computeDampingForces ()
 Computes damping force in absorbing layers.
 
std::pair< double, util::Point3computeForce (const size_t &i)
 Computes peridynamic force on node. More...
 
void computeForces ()
 Computes peridynamic forces.
 
void computePostProcFields ()
 Computes postprocessing quantities.
 
bool is_reaction_force (size_t i, size_t j)
 Validates if there is a reaction force between node i and node j. More...
 
void restart (inp::Input *deck)
 Restarts the simulation from previous state. More...
 
void run (inp::Input *deck)
 Main driver to simulate. More...
 
Methods to initialize the data
void initHObjects ()
 Initialize high level data members.
 
void init ()
 Initialize remaining data members.
 
Methods to implement explicit time integration
void integrate ()
 Perform time integration.
 
void integrateCD ()
 Perform time integration using central-difference scheme. More...
 
void integrateVerlet ()
 Perform time integration using velocity-verlet scheme. More...
 
Methods to handle output and debug
void checkOutputCriteria ()
 Checks if output frequency is to be modified. More...
 

Private Attributes

inp::AbsorbingCondDeckd_absorbingCondDeck_p
 Absorbing condition deck.
 
inp::ModelDeckd_modelDeck_p
 Model deck.
 
inp::OutputDeckd_outputDeck_p
 Output deck.
 
inp::RestartDeckd_restartDeck_p
 Restart deck.
 
bool d_stop
 flag to stop the simulation midway
 
Data: High level objects
inp::Inputd_input_p
 Pointer to Input object.
 
inp::Policyd_policy_p
 Pointer to Policy object.
 
loading::InitialConditiond_initialCondition_p
 Pointer to InitialCondition object.
 
T * d_material_p
 Pointer to Material object.
 
geometry::DampingGeomd_dampingGeom_p
 Pointer to Material object.
 
data::DataManagerd_dataManager_p
 Data Manager.
 

Detailed Description

template<class T>
class model::FDModel< T >

A class for finite difference approximation of Peridynamics

We consider explicit schemes such as central difference and velocity verlet for time integration.

This class acts as a holder of lower rank classes, such as Mesh, Loading, InitialCondition, Fracture, etc, and uses the methods and data of the lower rank classes to perform calculation.

Note
1. We can run finite difference on any finite element mesh as long as the mesh consists of only one type of elements. We can mesh the domain using Gmsh and use its **.msh** file to run the finite difference approximation.
2. Currently only dimension 2 is supported.
3. Either triangle or quadrangle elements are supported.

Constructor & Destructor Documentation

◆ FDModel()

template<class T >
model::FDModel< T >::FDModel ( inp::Input deck)
explicit

Constructor.

Parameters
deckThe input deck
Here is the call graph for this function:

Member Function Documentation

◆ checkOutputCriteria()

template<class T >
void model::FDModel< T >::checkOutputCriteria
private

Checks if output frequency is to be modified.

  1. If valid criteria is specified, this method modifies the current output interval to new output interval.
  2. This is useful when we require snapshot of simulation at small intervals only when results are interesting. For example, for crack propagation problem, we need more snapshots of simulation during time when the crack is propagating. We do not need many snapshots of time when crack is not growing or moving.
  3. Currently we have implemented max_Z criteria which checks the maximum value of damage at nodes. If maximum value exceeds the user specified value, we change the output interval to small value as specified by user . Until maximum of damage touches value given by user, the code produces output at larger interval.
  4. We next discuss the naming of output files. We will take the smaller output interval as a basis for naming the output files. Let us look at simple example:
    • Suppose total number of time steps N=1500,
    • dt_out_large = 150 when the criteria max_Z is not met
    • dt_out_small = 50 when criteria is met
    • Suppose max_Z criteria is not met till 1200th step, then upto 1200th step, output files will be:
      • output_0.vtu, output_3.vtu, output_6.vtu, ... output_21.vtu, output_24.vtu
      • Files above correspond to time steps 0, 3*dt_out_small = 150, 6*dt_out_small = 300, ..., 1050, 1200
    • From 1200 step onwards output files will be:
      • output_25.vtu, output_26.vtu, output_27.vtu, ..., output_30.vtu
      • Files above correspond to time steps 25*dt_out_small = 1250, 26*dt_out_small = 1300, ..., 1500
    • So in brief, we consider dt_out_small to get the tag for output file . Output intervals however depend on the criteria, and can be at dt_out_large, or it can be at the same interval as dt_out_small.
Here is the call graph for this function:

◆ computeForce()

template<class T >
std::pair< double, util::Point3 > model::FDModel< T >::computeForce ( const size_t &  i)
private

Computes peridynamic force on node.

Parameters
iId of node
Returns
pair Pair of energy and force

◆ integrateCD()

template<class T >
void model::FDModel< T >::integrateCD
private

Perform time integration using central-difference scheme.

Central difference scheme

\[ u_{new} = \Delta t^2 (f_{int} + f_{ext}) / \rho + \Delta t v_{old} + u_{old} \]

\[ v_{new} = \frac{u_{new} - u_{old}}{\Delta t}. \]

◆ integrateVerlet()

template<class T >
void model::FDModel< T >::integrateVerlet
private

Perform time integration using velocity-verlet scheme.

Velocity verlet scheme

  1. $ v_{mid} = v_{old} + \frac{\Delta t}{2} (f_{int,old} + f_{ext, old}) / \rho $
  2. $ u_{new} = u_{old} + \Delta t * v_{mid} $
  3. $ v_{new} = v_{mid} + \frac{\Delta t}{2} (f_{int,new} + f_{ext, new}) / \rho $

◆ is_reaction_force()

template<class T >
bool model::FDModel< T >::is_reaction_force ( size_t  i,
size_t  j 
)
private

Validates if there is a reaction force between node i and node j.

Parameters
iid of node i
jid of node j
Returns
is reaction force
Here is the call graph for this function:

◆ restart()

template<class T >
void model::FDModel< T >::restart ( inp::Input deck)
private

Restarts the simulation from previous state.

Parameters
deckInput deck

Referenced by model::FDModel< T >::FDModel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

template<class T >
void model::FDModel< T >::run ( inp::Input deck)
private

Main driver to simulate.

Parameters
deckInput deck

Referenced by model::FDModel< T >::FDModel().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: