shallowWaterAbsorption.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015 IH-Cantabria
9 Copyright (C) 2016-2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::shallowWaterAbsorption
29
30Description
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef waveModels_shallowWaterAbsorption_H
35#define waveModels_shallowWaterAbsorption_H
36
37#include "waveAbsorptionModel.H"
38
39// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40
41namespace Foam
42{
43namespace waveModels
44{
45
46/*---------------------------------------------------------------------------*\
47 Class shallowWaterAbsorption Declaration
48\*---------------------------------------------------------------------------*/
51:
53{
54protected:
55
56 // Protected Member Functions
57
58
59 //- Set the water level
60 virtual void setLevel
61 (
62 const scalar t,
63 const scalar tCoeff,
64 scalarField& level
65 ) const;
66
67 //- Calculate the wave model velocity
68 virtual void setVelocity
69 (
70 const scalar t,
71 const scalar tCoeff,
72 const scalarField& level
73 );
74
75 //- Set the alpha field based on the water level
76 virtual void setAlpha(const scalarField& level);
77
78
79public:
80
81 //- Runtime type information
82 TypeName("shallowWaterAbsorption");
83
84 //- Constructor
86 (
87 const dictionary& dict,
88 const fvMesh& mesh,
89 const polyPatch& patch,
90 const bool readFields = true
91 );
92
93 //- Destructor
94 virtual ~shallowWaterAbsorption() = default;
95
96
97 // Public Member Functions
98
99 //- Read from dictionary
100 virtual bool readDict(const dictionary& overrideDict);
101};
102
103
104// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105
106} // End namespace waveModels
107} // End namespace Foam
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111#endif
112
113// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)
Calculate the wave model velocity.
TypeName("shallowWaterAbsorption")
Runtime type information.
virtual ~shallowWaterAbsorption()=default
Destructor.
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const
Set the water level.
virtual void setAlpha(const scalarField &level)
Set the alpha field based on the water level.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73