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 -------------------------------------------------------------------------------
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::fv::multiphaseMangrovesSource
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
34 
35 Usage
36 
37 SourceFiles
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 
50 namespace Foam
51 {
52 
53 // Forward Declarations
54 class MangrovesModel;
55 
56 namespace fv
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class multiphaseMangrovesSource Declaration
61 \*---------------------------------------------------------------------------*/
62 
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 
76 protected:
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 
110 public:
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 // ************************************************************************* //
volFields.H
Foam::fv::option::name
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fv::multiphaseMangrovesSource::CdZone_
scalarList CdZone_
Drag coefficient.
Definition: multiphaseMangrovesSource.H:91
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::multiphaseMangrovesSource::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: multiphaseMangrovesSource.C:207
Foam::fv::multiphaseMangrovesSource
Definition: multiphaseMangrovesSource.H:62
Foam::fv::option
Base abstract class for handling finite volume options (i.e. fvOption).
Definition: fvOption.H:126
Foam::fv::multiphaseMangrovesSource::NZone_
scalarList NZone_
Number of plants per unit of area.
Definition: multiphaseMangrovesSource.H:85
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::fv::multiphaseMangrovesSource::TypeName
TypeName("multiphaseMangrovesSource")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
U
U
Definition: pEqn.H:72
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
Foam::fv::multiphaseMangrovesSource::CmZone_
scalarList CmZone_
Inertia coefficient.
Definition: multiphaseMangrovesSource.H:88
fvOption.H
Foam::List< scalar >
Foam::fv::multiphaseMangrovesSource::inertiaCoeff
tmp< volScalarField > inertiaCoeff() const
Return the inertia force coefficient.
Definition: multiphaseMangrovesSource.C:102
Foam::fv::multiphaseMangrovesSource::~multiphaseMangrovesSource
virtual ~multiphaseMangrovesSource()=default
Destructor.
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::fv::multiphaseMangrovesSource::dragCoeff
tmp< volScalarField > dragCoeff(const volVectorField &U) const
Return the drag force coefficient.
Definition: multiphaseMangrovesSource.C:57
Foam::fv::multiphaseMangrovesSource::addSup
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add implicit contribution to momentum equation.
Definition: multiphaseMangrovesSource.C:169
Foam::fv::multiphaseMangrovesSource::zoneIDs_
labelListList zoneIDs_
Porosity coefficient.
Definition: multiphaseMangrovesSource.H:97
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::fv::multiphaseMangrovesSource::aZone_
scalarList aZone_
Width of the vegetation element.
Definition: multiphaseMangrovesSource.H:82