waveModel Class Referenceabstract

Generic base class for waves. Derived classes must implement field functions which return the elevation above the wave surface and the velocity field, both as a function of position. More...

Inheritance diagram for waveModel:

Public Member Functions

 TypeName ("waveModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, waveModel, objectRegistry,(const objectRegistry &db, const dictionary &dict),(db, dict))
 
 waveModel (const waveModel &wave)
 Construct a copy. More...
 
 waveModel (const objectRegistry &db, const dictionary &dict)
 Construct from a database and a dictionary. More...
 
virtual autoPtr< waveModelclone () const =0
 Construct a clone. More...
 
virtual ~waveModel ()
 Destructor. More...
 
scalar amplitude (const scalar t) const
 Get the amplitude. More...
 
scalar g () const
 Get the (scalar) value of gravity. More...
 
virtual tmp< scalarFieldelevation (const scalar t, const scalarField &x) const =0
 Get the wave elevation at a given time and local coordinates. Local. More...
 
virtual tmp< vector2DFieldvelocity (const scalar t, const vector2DField &xz) const =0
 Get the wave velocity at a given time and local coordinates. Local. More...
 
virtual tmp< scalarFieldpressure (const scalar t, const vector2DField &xz) const =0
 Get the wave pressure at a given time and local coordinates. Local. More...
 
virtual void write (Ostream &os) const
 Write. More...
 

Static Public Member Functions

static autoPtr< waveModelNew (const objectRegistry &db, const dictionary &dict)
 Select. More...
 
static autoPtr< waveModelNew (const word &type, const objectRegistry &db, const dictionary &dict)
 Select. More...
 

Detailed Description

Generic base class for waves. Derived classes must implement field functions which return the elevation above the wave surface and the velocity field, both as a function of position.

Source files

Definition at line 55 of file waveModel.H.

Constructor & Destructor Documentation

◆ waveModel() [1/2]

waveModel ( const waveModel wave)

Construct a copy.

Definition at line 41 of file waveModel.C.

◆ waveModel() [2/2]

waveModel ( const objectRegistry db,
const dictionary dict 
)

Construct from a database and a dictionary.

Definition at line 49 of file waveModel.C.

◆ ~waveModel()

~waveModel ( )
virtual

Destructor.

Definition at line 61 of file waveModel.C.

Member Function Documentation

◆ TypeName()

TypeName ( "waveModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
waveModel  ,
objectRegistry  ,
(const objectRegistry &db, const dictionary &dict ,
(db, dict  
)

◆ clone()

virtual autoPtr<waveModel> clone ( ) const
pure virtual

Construct a clone.

Implemented in Airy, solitary, Stokes2, and Stokes5.

◆ New() [1/2]

Foam::autoPtr< Foam::waveModel > New ( const objectRegistry db,
const dictionary dict 
)
static

Select.

Definition at line 31 of file newWaveModel.C.

References dict, dictionary::lookup(), and Foam::New().

Referenced by waveSuperposition::waveSuperposition().

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

◆ New() [2/2]

Foam::autoPtr< Foam::waveModel > New ( const word type,
const objectRegistry db,
const dictionary dict 
)
static

Select.

Definition at line 41 of file newWaveModel.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::nl.

Here is the call graph for this function:

◆ amplitude()

scalar amplitude ( const scalar  t) const
inline

Get the amplitude.

Definition at line 122 of file waveModel.H.

References waveModel::elevation(), waveModel::g(), waveModel::pressure(), waveModel::velocity(), waveModel::write(), and x.

Referenced by solitary::elevation(), Airy::elevation(), and Airy::velocity().

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

◆ g()

Foam::scalar g ( ) const

Get the (scalar) value of gravity.

Definition at line 67 of file waveModel.C.

References objectRegistry::lookupObject(), Foam::mag(), and dimensioned< Type >::value().

Referenced by waveModel::amplitude().

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

◆ elevation()

virtual tmp<scalarField> elevation ( const scalar  t,
const scalarField x 
) const
pure virtual

Get the wave elevation at a given time and local coordinates. Local.

x is aligned with the direction of propagation.

Implemented in Airy, solitary, Stokes2, and Stokes5.

Referenced by waveModel::amplitude().

Here is the caller graph for this function:

◆ velocity()

virtual tmp<vector2DField> velocity ( const scalar  t,
const vector2DField xz 
) const
pure virtual

Get the wave velocity at a given time and local coordinates. Local.

x is aligned with the direction of propagation, and z with negative gravity.

Implemented in Airy, solitary, Stokes2, and Stokes5.

Referenced by waveModel::amplitude().

Here is the caller graph for this function:

◆ pressure()

virtual tmp<scalarField> pressure ( const scalar  t,
const vector2DField xz 
) const
pure virtual

Get the wave pressure at a given time and local coordinates. Local.

x is aligned with the direction of propagation, and z with negative gravity.

Implemented in Airy, and solitary.

Referenced by waveModel::amplitude().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in Airy, and solitary.

Definition at line 73 of file waveModel.C.

References Foam::writeEntry().

Referenced by waveModel::amplitude(), solitary::write(), and Airy::write().

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

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