Loading...
Searching...
No Matches
solitaryWaveModel.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-2021 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::waveModels::solitaryWaveModel
29
30Description
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef waveModels_solitaryWaveModel_H
35#define waveModels_solitaryWaveModel_H
36
37#include "waveGenerationModel.H"
38
39// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40
41namespace Foam
42{
43namespace waveModels
44{
45
46/*---------------------------------------------------------------------------*\
47 Class solitaryWaveModel Declaration
48\*---------------------------------------------------------------------------*/
49
51:
53{
54
55protected:
56
57 // Protected data
58
59 //- Wave height / [m]
61
62 //- Wave angle / [rad] (read in degrees)
63 scalar waveAngle_;
64
65 //-
66 const scalarField x_;
68 const scalar x0_;
69
70
71 // Protected Member Functions
72
73 //- Return the time scaling coefficient
74 virtual scalar timeCoeff(const scalar t) const;
75
76
77public:
78
79 //- Runtime type information
80 TypeName("solitaryWaveModel");
81
82
83 //- Constructor
85 (
86 const dictionary& dict,
87 const fvMesh& mesh,
88 const polyPatch& patch,
89 const bool readFields = true
90 );
91
92 //- Destructor
93 virtual ~solitaryWaveModel() = default;
94
95
96 // Public Member Functions
97
98 //- Read from dictionary
99 virtual bool readDict(const dictionary& overrideDict);
101 //- Info
102 virtual void info(Ostream& os) const;
103};
104
105
106// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108} // End namespace waveModels
109} // End namespace Foam
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113#endif
114
115// ************************************************************************* //
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
Definition IOobject.H:1041
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
TypeName("solitaryWaveModel")
Runtime type information.
solitaryWaveModel(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
scalar waveHeight_
Wave height / [m].
virtual ~solitaryWaveModel()=default
Destructor.
virtual scalar timeCoeff(const scalar t) const
Return the time scaling coefficient.
scalar waveAngle_
Wave angle / [rad] (read in degrees).
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
waveGenerationModel(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68