multiphaseMangrovesSource.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) 2017 IH-Cantabria
9 Copyright (C) 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::fv::multiphaseMangrovesSource
29
30Group
31 grpFvOptionsSources
32
33Description
34
35Usage
36
37SourceFiles
38 multiphaseMangrovesSource.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef multiphaseMangrovesSource_H
43#define multiphaseMangrovesSource_H
44
45#include "fvOption.H"
46#include "volFields.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53// Forward Declarations
54class MangrovesModel;
55
56namespace fv
57{
58
59/*---------------------------------------------------------------------------*\
60 Class multiphaseMangrovesSource Declaration
61\*---------------------------------------------------------------------------*/
64:
65 public fv::option
66{
67 // Private Member Functions
68
69 //- No copy construct
71
72 //- No copy assignment
73 void operator=(const multiphaseMangrovesSource&) = delete;
74
75
76protected:
77
78 // Protected data
79
80 // Coefficients per cell zone
81
82 //- Width of the vegetation element
84
85 //- Number of plants per unit of area
87
88 //- Inertia coefficient
90
91 //- Drag coefficient
93
94 //- Porosity coefficient
95 //scalarList MangrovesZone_;
96
97 //- Zone indices
99
100
101 // Protected Member Functions
102
103 //- Return the drag force coefficient
105
106 //- Return the inertia force coefficient
108
109
110public:
111
112 //- Runtime type information
113 TypeName("multiphaseMangrovesSource");
114
115
116 // Constructors
117
118 //- Construct from components
120 (
121 const word& name,
122 const word& modelType,
123 const dictionary& dict,
124 const fvMesh& mesh
125 );
126
127
128 //- Destructor
129 virtual ~multiphaseMangrovesSource() = default;
130
131
132 // Member Functions
133
134 // Add explicit and implicit contributions
135
136 //- Add implicit contribution to momentum equation
137 virtual void addSup
138 (
139 fvMatrix<vector>& eqn,
140 const label fieldi
141 );
142
143 //- Add implicit contribution to phase momentum equation
144 virtual void addSup
145 (
146 const volScalarField& rho,
147 fvMatrix<vector>& eqn,
148 const label fieldi
149 );
150
151
152 // IO
153
154 //- Read dictionary
155 virtual bool read(const dictionary& dict);
156};
157
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161} // End namespace fv
162} // End namespace Foam
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#endif
167
168// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:121
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
labelListList zoneIDs_
Porosity coefficient.
TypeName("multiphaseMangrovesSource")
Runtime type information.
virtual bool read(const dictionary &dict)
Read dictionary.
tmp< volScalarField > dragCoeff(const volVectorField &U) const
Return the drag force coefficient.
scalarList aZone_
Width of the vegetation element.
tmp< volScalarField > inertiaCoeff() const
Return the inertia force coefficient.
scalarList NZone_
Number of plants per unit of area.
virtual ~multiphaseMangrovesSource()=default
Destructor.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add implicit contribution to momentum equation.
scalarList CmZone_
Inertia coefficient.
Base abstract class for handling finite volume options (i.e. fvOption).
Definition: fvOption.H:127
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73