regularWaveModel.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-2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::waveModels::regularWaveModel
29 
30 Description
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef waveModels_regularWaveModel_H
35 #define waveModels_regularWaveModel_H
36 
37 #include "irregularWaveModel.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 namespace waveModels
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class regularWaveModel Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class regularWaveModel
51 :
52  public irregularWaveModel
53 {
54  // Private Member Functions
55 
56  //- No copy construct
57  regularWaveModel(const regularWaveModel&) = delete;
58 
59  //- No copy assignment
60  void operator=(const regularWaveModel&) = delete;
61 
62 
63 protected:
64 
65  // Protected data
66 
67  //- Wave height / [m]
68  scalar waveHeight_;
69 
70  //- Wave angle / [rad] (read in degrees)
71  scalar waveAngle_;
72 
73  //- Wave period
74  scalar wavePeriod_;
75 
76  //- Wavelength
77  scalar waveLength_;
78 
79  //- Wave phase
80  scalar wavePhase_;
81 
82 
83  // Protected Member Functions
84 
85  //- Return word description of wave type
86  virtual word waveType() const;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("regularWaveModel");
93 
94 
95  //- Constructor
97  (
98  const dictionary& dict,
99  const fvMesh& mesh,
100  const polyPatch& patch,
101  const bool readFields = true
102  );
103 
104  //- Destructor
105  virtual ~regularWaveModel() = default;
106 
107 
108  // Public Member Functions
109 
110  //- Read from dictionary
111  virtual bool readDict(const dictionary& overrideDict);
112 
113  //- Info
114  virtual void info(Ostream& os) const;
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace waveModels
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
Foam::waveModels::irregularWaveModel
Definition: irregularWaveModel.H:49
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::waveModels::regularWaveModel::readDict
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
Definition: regularWaveModel.C:92
Foam::waveModels::regularWaveModel::waveHeight_
scalar waveHeight_
Wave height / [m].
Definition: regularWaveModel.H:67
Foam::IOobject::info
InfoProxy< IOobject > info() const
Return info proxy.
Definition: IOobject.H:689
Foam::waveModels::regularWaveModel::waveLength_
scalar waveLength_
Wavelength.
Definition: regularWaveModel.H:76
Foam::waveModels::regularWaveModel::waveType
virtual word waveType() const
Return word description of wave type.
Definition: regularWaveModel.C:47
Foam::waveModels::regularWaveModel::wavePeriod_
scalar wavePeriod_
Wave period.
Definition: regularWaveModel.H:73
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::waveModels::regularWaveModel::TypeName
TypeName("regularWaveModel")
Runtime type information.
os
OBJstream os(runTime.globalPath()/outputName)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::readFields
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Definition: ReadFieldsTemplates.C:312
irregularWaveModel.H
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::waveModels::regularWaveModel::wavePhase_
scalar wavePhase_
Wave phase.
Definition: regularWaveModel.H:79
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::waveModels::regularWaveModel
Definition: regularWaveModel.H:49
Foam::waveModels::regularWaveModel::~regularWaveModel
virtual ~regularWaveModel()=default
Destructor.
Foam::waveModels::regularWaveModel::waveAngle_
scalar waveAngle_
Wave angle / [rad] (read in degrees)
Definition: regularWaveModel.H:70