irregularWaveModel.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::irregularWaveModel
29 
30 Description
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef waveModels_irregularWaveModel_H
35 #define waveModels_irregularWaveModel_H
36 
37 #include "waveGenerationModel.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 namespace waveModels
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class irregularWaveModel Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public waveGenerationModel
53 {
54  //- No copy construct
55  irregularWaveModel(const irregularWaveModel&) = delete;
56 
57  //- No copy assignment
58  void operator=(const irregularWaveModel&) = delete;
59 
60 
61 protected:
62 
63  // Protected data
64 
65  //- Ramp time
66  scalar rampTime_;
67 
68  // Protected Member Functions
69 
70  //- Return the time scaling coefficient
71  virtual scalar timeCoeff(const scalar t) const;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("irregularWaveModel");
78 
79 
80  //- Constructor
82  (
83  const dictionary& dict,
84  const fvMesh& mesh,
85  const polyPatch& patch,
86  const bool readFields = true
87  );
88 
89  //- Destructor
90  virtual ~irregularWaveModel() = default;
91 
92 
93  // Public Member Functions
94 
95  //- Read from dictionary
96  virtual bool readDict(const dictionary& overrideDict);
97 
98  //- Info
99  virtual void info(Ostream& os) const;
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace waveModels
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #endif
111 
112 // ************************************************************************* //
Foam::waveModels::irregularWaveModel
Definition: irregularWaveModel.H:49
Foam::waveModels::irregularWaveModel::TypeName
TypeName("irregularWaveModel")
Runtime type information.
Foam::IOobject::info
InfoProxy< IOobject > info() const
Return info proxy.
Definition: IOobject.H:689
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::waveModels::irregularWaveModel::readDict
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
Definition: irregularWaveModel.C:76
Foam::waveModels::irregularWaveModel::~irregularWaveModel
virtual ~irregularWaveModel()=default
Destructor.
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
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
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::waveModels::waveGenerationModel
Definition: waveGenerationModel.H:49
Foam::waveModels::irregularWaveModel::rampTime_
scalar rampTime_
Ramp time.
Definition: irregularWaveModel.H:65
waveGenerationModel.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::waveModels::irregularWaveModel::timeCoeff
virtual scalar timeCoeff(const scalar t) const
Return the time scaling coefficient.
Definition: irregularWaveModel.C:45