IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
IBAMR::StokesWaveGeneratorStrategy Class Referenceabstract

Strategy class for generating Stokes wave. More...

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/StokesWaveGeneratorStrategy.h>

Inheritance diagram for IBAMR::StokesWaveGeneratorStrategy:
Inheritance graph
[legend]

Public Member Functions

 StokesWaveGeneratorStrategy (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Constructor of the class.
 
virtual ~StokesWaveGeneratorStrategy ()=default
 Destructor of the class.
 
virtual double getSurfaceElevation (double x, double time) const =0
 
virtual double getVelocity (double x, double z_plus_d, double time, int comp_idx) const =0
 
double getWaterDepth () const
 
double getWaveAngularFrequency () const
 
double getWaveNumber () const
 
double getWaveAmplitude () const
 
double getGravity () const
 

Public Attributes

WaveGenerationData d_wave_gen_data
 

Protected Member Functions

void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db)
 

Protected Attributes

std::string d_object_name
 
double d_depth
 Wave parameters. More...
 
double d_omega
 
double d_wave_number
 
double d_amplitude
 
double d_gravity
 
bool d_deep_water_limit = false
 

Detailed Description

Strategy class for generating Stokes wave.

Member Function Documentation

◆ getFromInput()

void IBAMR::StokesWaveGeneratorStrategy::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
protected

Get wave parameters from input db.

◆ getSurfaceElevation()

virtual double IBAMR::StokesWaveGeneratorStrategy::getSurfaceElevation ( double  x,
double  time 
) const
pure virtual

Get surface elevation at a specified horizontal position and time.

Implemented in IBAMR::IrregularWaveGenerator, IBAMR::FirstOrderStokesWaveGenerator, and IBAMR::FifthOrderStokesWaveGenerator.

◆ getVelocity()

virtual double IBAMR::StokesWaveGeneratorStrategy::getVelocity ( double  x,
double  z_plus_d,
double  time,
int  comp_idx 
) const
pure virtual

Get velocity component at a specified position and time.

Note
We assume that the bottom left corner of the numerical wave tank is at (0,0) in 2D or at (0,0,0) in 3D. The
Parameters
z_plus_dis the $ y $ (in 2D) or the $ z $ (in 3D) coordinate of a point in the numerical wave tank. In partcular
z_plus_dis not with respect to free-surface as generally taken in some textbooks.

Implemented in IBAMR::IrregularWaveGenerator, IBAMR::FirstOrderStokesWaveGenerator, and IBAMR::FifthOrderStokesWaveGenerator.

Member Data Documentation

◆ d_deep_water_limit

bool IBAMR::StokesWaveGeneratorStrategy::d_deep_water_limit = false
protected

If we are calculating in deep water limit.

◆ d_depth

double IBAMR::StokesWaveGeneratorStrategy::d_depth
protected

Wave parameters.

Parameters
d_wave_number: Wave number of dominant wave component [$2\pi/m$]
d_amplitude: Amplitude of the dominant wave component [m]
d_depth: Depth of water, from sea bed to still water level [m]
d_gravity: Acceleration due to gravity [$m/s^2$]
d_omega: Angular frequency [$2 \pi/s$] (optional)

\NOTE The class calculates a more accurate value of omega from the expansion coefficients and the provided value in not used.

◆ d_object_name

std::string IBAMR::StokesWaveGeneratorStrategy::d_object_name
protected

Book-keeping.


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