noFluxFvPatchScalarField.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::noFlux
26
27Description
28 Zero mass flux boundary condition to specify pressure gradient. The special case of HydrothermalMassFluxPressure with q=0
29
30 Example of the boundary condition specification:
31 \verbatim
32 myPatch
33 {
34 type noFlux;
35 }
36 \endverbatim
37
38SourceFiles
39 noFlux.C
40
41\*---------------------------------------------------------------------------*/
42
43#ifndef noFlux_H
44#define noFlux_H
45
46#include "fixedGradientFvPatchFields.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class noFluxFvPatch Declaration
55 \*---------------------------------------------------------------------------*/
56
57class noFlux
58:
59 public fixedGradientFvPatchScalarField
60{
61 // Private data
62
63 //- Name of the velocity and permeability fields used to calculate the wall BC in darcy's law
65 word phigName_;
66
67public:
68
69 //- Runtime type information
70 TypeName("noFlux");
71
72
73 // Constructors
74
75 //- Construct from patch and internal field
76 noFlux
77 (
78 const fvPatch&,
79 const DimensionedField<scalar, volMesh>&
80 );
81
82 //- Construct from patch, internal field and dictionary
83 noFlux
84 (
85 const fvPatch&,
86 const DimensionedField<scalar, volMesh>&,
87 const dictionary&
88 );
89
90 //- Construct by mapping given
91 // noFlux onto a new patch
92 noFlux
93 (
94 const noFlux&,
95 const fvPatch&,
96 const DimensionedField<scalar, volMesh>&,
97 const fvPatchFieldMapper&
98 );
99
100 //- Construct as copy
101 noFlux
102 (
103 const noFlux&
104 );
105
106 //- Construct and return a clone
107 virtual tmp<fvPatchScalarField> clone() const
108 {
109 return tmp<fvPatchScalarField>
110 (
111 new noFlux(*this)
112 );
113 }
114
115 //- Construct as copy setting internal field reference
116 noFlux
117 (
118 const noFlux&,
119 const DimensionedField<scalar, volMesh>&
120 );
121
122 //- Construct and return a clone setting internal field reference
123 virtual tmp<fvPatchScalarField> clone
124 (
125 const DimensionedField<scalar, volMesh>& iF
126 ) const
127 {
128 return tmp<fvPatchScalarField>
129 (
130 new noFlux(*this, iF)
131 );
132 }
133
134 // Member functions
135
136 //- Update the coefficients associated with the patch field
137 virtual void updateCoeffs();
138
139 //- Write
140 virtual void write(Ostream&) const;
141};
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145} // End namespace Foam
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149#endif
150
151// ************************************************************************* //
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
virtual void write(Ostream &) const
noFlux(const fvPatch &, const DimensionedField< scalar, volMesh > &)
virtual tmp< fvPatchScalarField > clone() const
virtual void updateCoeffs()
TypeName("noFlux")