HydrothermalMassFluxPressureFvPatchScalarField.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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8License
9 This file is part of OpenFOAM.
10
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
15
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24Class
25 Foam::HydrothermalMassFluxPressure
26
27Description
28 Fixed mass flux boundary condition to specify pressure gradient. Input mass flux: q [kg/s].
29 \heading Patch usage
30 \table
31 Property | Description | Required | Default value
32 q | heat flux value | yes |
33 \endtable
34 Example of the boundary condition specification:
35 \verbatim
36 myPatch
37 {
38 type HydrothermalMassFluxPressure;
39 q uniform -0.0115; //kg/s, netagive means flow into domain; positive means flow out domain
40 }
41 \endverbatim
42
43SourceFiles
44 HydrothermalMassFluxPressure.C
45
46\*---------------------------------------------------------------------------*/
47
48#ifndef HydrothermalMassFluxPressure_H
49#define HydrothermalMassFluxPressure_H
50
51#include "fixedGradientFvPatchFields.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57
58/*---------------------------------------------------------------------------*\
59 Class HydrothermalMassFluxPressureFvPatch Declaration
60 \*---------------------------------------------------------------------------*/
61
63:
64 public fixedGradientFvPatchScalarField
65{
66 // Private data
67
68 //- Name of the velocity and permeability fields used to calculate the wall BC in darcy's law
70 // word rhophiName_;
71 word phigName_;
72 scalarField q_; //mass flux [kg/m^2/s]
73
74public:
75
76 //- Runtime type information
77 TypeName("hydrothermalMassFluxPressure");
78
79
80 // Constructors
81
82 //- Construct from patch and internal field
84 (
85 const fvPatch&,
86 const DimensionedField<scalar, volMesh>&
87 );
88
89 //- Construct from patch, internal field and dictionary
91 (
92 const fvPatch&,
93 const DimensionedField<scalar, volMesh>&,
94 const dictionary&
95 );
96
97 //- Construct by mapping given
98 // HydrothermalMassFluxPressure onto a new patch
100 (
102 const fvPatch&,
103 const DimensionedField<scalar, volMesh>&,
104 const fvPatchFieldMapper&
105 );
106
107 //- Construct as copy
109 (
111 );
112
113 //- Construct and return a clone
114 virtual tmp<fvPatchScalarField> clone() const
115 {
116 return tmp<fvPatchScalarField>
117 (
119 );
120 }
121
122 //- Construct as copy setting internal field reference
124 (
126 const DimensionedField<scalar, volMesh>&
127 );
128
129 //- Construct and return a clone setting internal field reference
130 virtual tmp<fvPatchScalarField> clone
131 (
132 const DimensionedField<scalar, volMesh>& iF
133 ) const
134 {
135 return tmp<fvPatchScalarField>
136 (
137 new HydrothermalMassFluxPressure(*this, iF)
138 );
139 }
140
141 // Member functions
142
143 //- Update the coefficients associated with the patch field
144 virtual void updateCoeffs();
145
146 //- Write
147 virtual void write(Ostream&) const;
148};
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152} // End namespace Foam
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156#endif
157
158// ************************************************************************* //
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
HydrothermalMassFluxPressure(const fvPatch &, const DimensionedField< scalar, volMesh > &)
TypeName("hydrothermalMassFluxPressure")