File kernel/src/modelingTools/HarmonicBC.hpp#

Go to the source code of this file

class HarmonicBC : public BoundaryCondition
#include <HarmonicBC.hpp>

This class models a simple harmonic boundary conditions for prescribing the velocities in a Dynamical System.

A simple boundary condition is considered to fix a component \( j \) of the velocity vector, i.e., \( v_j(t) = a + b cos( \omega t+ \phi) \).

Public Functions

HarmonicBC(SP::UnsignedIntVector newVelocityIndices, double a, double b, double omega, double phi)

Constructor.

Parameters:
  • newVelocityIndices – the indices of the velocity subjected to prescribed velocities

  • a – constant value for additive term of the prescribed velocity

  • b – constant value for multiplicative term of the prescribed velocity

  • omega – frequency

  • phi – phase

HarmonicBC(SP::UnsignedIntVector newVelocityIndices, SP::SiconosVector a, SP::SiconosVector b, SP::SiconosVector omega, SP::SiconosVector phi)#
virtual ~HarmonicBC()

destructor

virtual void computePrescribedVelocity(double time)

default function to compute the precribed velocities

Parameters:

time – : the current time

Protected Functions

ACCEPT_SERIALIZATION(HarmonicBC)#
inline HarmonicBC()#

protected default constructor

Protected Attributes

double _a#

Constant additive term of the prescribed velocity

double _b#

Constant multiplicative term of the prescribed velocity

double _omega#

Constant frequency

double _phi#

Constant phase

SP::SiconosVector _aV#

Constant additive term of the prescribed velocity

SP::SiconosVector _bV#

Constant multiplicative term of the prescribed velocity

SP::SiconosVector _omegaV#

Constant frequency

SP::SiconosVector _phiV#

Constant phase