LCS::VelocityFunction::DoubleGyreModel< T > Struct Template Reference

Double-gyre model. More...

#include <velocity_function.hpp>

Public Member Functions

 DoubleGyreModel ()
 
 DoubleGyreModel (std::vector< T > &p)
 
auto operator() (const T x, const T y, const T t) const
 

Public Attributes

epsilon_
 
a_
 
omega_
 

Detailed Description

template<typename T>
struct LCS::VelocityFunction::DoubleGyreModel< T >

Double-gyre model.

The velocity function of the double-gyre model is implemented here. The model consists of a pair of counter-rotating gyres. [2]

The velocity for a given point $(x,y)$ at time $t$ is given by

\[ u = -\pi A\sin(\pi f)\cos(\pi y), \]

and

\[ v = \pi A\cos(\pi f)\sin(\pi y)\frac{\partial f}{\partial x}, \]

where $f(x,t)=ax^2+bx$, $a(t)=\epsilon\sin(\omega t)$ and $b(t)=1-2\epsilon\sin(\omega t)$.

Template Parameters
TNumeric data type of the values.

Constructor & Destructor Documentation

template<typename T >
LCS::VelocityFunction::DoubleGyreModel< T >::DoubleGyreModel ( )
inline

Constructor with default parameters.

template<typename T >
LCS::VelocityFunction::DoubleGyreModel< T >::DoubleGyreModel ( std::vector< T > &  p)
inline

Constructor with customized parameters.

Parameters
pA vector of parameters.

Member Function Documentation

template<typename T >
auto LCS::VelocityFunction::DoubleGyreModel< T >::operator() ( const T  x,
const T  y,
const T  t 
) const
inline

Get the velocity for a given point at a given time

Parameters
x$x$-coordinate of the point.
y$y$-coordinate of the point.
tTime for velocity.

Member Data Documentation

template<typename T >
T LCS::VelocityFunction::DoubleGyreModel< T >::a_

Parameter $A$ for the model.

template<typename T >
T LCS::VelocityFunction::DoubleGyreModel< T >::epsilon_

Parameter $\epsilon$ for the model.

template<typename T >
T LCS::VelocityFunction::DoubleGyreModel< T >::omega_

Parameter $\omega$ for the model.


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