suanPan
Amplitude Class Reference

An Amplitude class that can generate Amplitude pattern. More...

#include <Amplitude.h>

Inheritance diagram for Amplitude:
Collaboration diagram for Amplitude:

Public Member Functions

 Amplitude (unsigned=0, unsigned=0)
 
 ~Amplitude () override=default
 
virtual void initialize (const shared_ptr< DomainBase > &)
 
virtual double get_amplitude (double)
 
void set_start_step (unsigned)
 
unsigned get_start_step () const
 
void set_start_time (double)
 
double set_start_time () const
 
- Public Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&)=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 

Protected Attributes

unsigned start_step
 
double start_time = 0.
 

Detailed Description

An Amplitude class that can generate Amplitude pattern.

Similar to the strategy used in ABAQUS, the load pattern and the magnitude of that load can be separated. The Amplitude class is designed to generate different Amplitude patterns. The time and amplitude are stored in two different vectors: TIME and AMP. By calling the method

double get_amplitude(const double& NEW_TIME_POINT);

The Amplitude is interpolated. If the given NEW_TIME_POINT is beyond the right bound, the Amplitude will be set to the maximum one. Such a case may happen to the auto step size control scheme, in which the (pseudo) time may exceed the given bound due to the machine error.

Currently, there are five predefined amplitude patterns.

  • Tabular
  • Linear/Ramp

    \begin{gather}a=A_0+A\left(t-t_0\right)/t_s\end{gather}

  • Periodic

    \begin{gather}a=A_0+\sum_{n=1}^N\left(A_n\cos{}n\omega\left(t-t_0\right)+B_n\sin{}n\omega\left(t-t_0\right)\right)\end{gather}

  • Modulated

    \begin{gather}a=A_0+A\sin\omega_1\left(t-t_0\right)\sin\omega_2\left(t-t_0\right)\end{gather}

  • Decay

    \begin{gather}a=A_0+A\exp\left(-\left(t-t_0\right)/t_d\right)\end{gather}

Author
tlc
Date
17/09/2017
Version
0.1.0

Constructor & Destructor Documentation

◆ Amplitude()

Amplitude::Amplitude ( unsigned  T = 0,
unsigned  ST = 0 
)
explicit

◆ ~Amplitude()

Amplitude::~Amplitude ( )
overridedefault

Member Function Documentation

◆ get_amplitude()

double Amplitude::get_amplitude ( double  )
virtual

◆ get_start_step()

unsigned Amplitude::get_start_step ( ) const

◆ initialize()

void Amplitude::initialize ( const shared_ptr< DomainBase > &  )
virtual

◆ set_start_step()

void Amplitude::set_start_step ( unsigned  T)

◆ set_start_time() [1/2]

double Amplitude::set_start_time ( ) const

◆ set_start_time() [2/2]

void Amplitude::set_start_time ( double  T)

Member Data Documentation

◆ start_step

unsigned Amplitude::start_step
protected

◆ start_time

double Amplitude::start_time = 0.
protected

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