semiPermeableBaffleVelocityFvPatchVectorField.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 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::semiPermeableBaffleVelocityFvPatchVectorField
28 
29 Group
30  grpGenericBoundaryConditions
31 
32 Description
33  This is a velocity boundary condition for a semi-permeable baffle.
34 
35  This is a velocity boundary condition for baffles which are permeable to a
36  some species and impermeable to others. It must be used in conjunction
37  with the corresponding mass-fraction condition,
38  semiPermeableBaffleMassFractionFvPatchScalarField.
39 
40  This condition sums the species fluxes generated by the the mass-fraction
41  conditions, and uses this total to set the velocity.
42 
43 Usage
44  \table
45  Property | Description | Req'd? | Default
46  rho | Name of the density field | no | rho
47  \endtable
48 
49 See also
50  Foam::semiPermeableBaffleMassFractionFvPatchScalarField
51 
52 SourceFiles
53  semiPermeableBaffleVelocityFvPatchVectorField.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef semiPermeableBaffleVelocityFvPatchVectorField_H
58 #define semiPermeableBaffleVelocityFvPatchVectorField_H
59 
60 #include "mappedPatchBase.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 
68 class basicSpecieMixture;
69 
70 /*---------------------------------------------------------------------------*\
71  Class semiPermeableBaffleVelocityFvPatchVectorField Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class semiPermeableBaffleVelocityFvPatchVectorField
75 :
76  public fixedValueFvPatchVectorField
77 {
78  // Private data
79 
80  //- Name of the density field
81  const word rhoName_;
82 
83 
84  // Private Member Functions
85 
86  //- Return the composition
87  const basicSpecieMixture& composition() const;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("semiPermeableBaffleVelocity");
94 
95 
96  // Constructors
97 
98  //- Construct from patch and internal field
100  (
101  const fvPatch&,
103  );
104 
105  //- Construct from patch, internal field and dictionary
107  (
108  const fvPatch&,
110  const dictionary&
111  );
112 
113  //- Construct by mapping given fixedValueTypeFvPatchField
114  // onto a new patch
116  (
118  const fvPatch&,
120  const fvPatchFieldMapper&
121  );
122 
123  //- Construct as copy
125  (
127  );
128 
129  //- Construct and return a clone
130  virtual tmp<fvPatchVectorField> clone() const
131  {
133  (
135  );
136  }
137 
138  //- Construct as copy setting internal field reference
140  (
143  );
144 
145  //- Construct and return a clone setting internal field reference
147  (
149  ) const
150  {
152  (
154  (
155  *this,
156  iF
157  )
158  );
159  }
160 
161 
162  // Member functions
163 
164  // Evaluation functions
165 
166  //- Update the coefficients associated with the patch field
167  virtual void updateCoeffs();
168 
169 
170  //- Write
171  virtual void write(Ostream&) const;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 
182 #endif
183 
184 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::basicSpecieMixture
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Definition: basicSpecieMixture.H:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::semiPermeableBaffleVelocityFvPatchVectorField::TypeName
TypeName("semiPermeableBaffleVelocity")
Runtime type information.
Foam::semiPermeableBaffleVelocityFvPatchVectorField
This is a velocity boundary condition for a semi-permeable baffle.
Definition: semiPermeableBaffleVelocityFvPatchVectorField.H:83
Foam::semiPermeableBaffleVelocityFvPatchVectorField::semiPermeableBaffleVelocityFvPatchVectorField
semiPermeableBaffleVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Definition: semiPermeableBaffleVelocityFvPatchVectorField.C:68
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::semiPermeableBaffleVelocityFvPatchVectorField::clone
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
Definition: semiPermeableBaffleVelocityFvPatchVectorField.H:139
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::semiPermeableBaffleVelocityFvPatchVectorField::write
virtual void write(Ostream &) const
Write.
Definition: semiPermeableBaffleVelocityFvPatchVectorField.C:169
Foam::semiPermeableBaffleVelocityFvPatchVectorField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: semiPermeableBaffleVelocityFvPatchVectorField.C:132
fixedValueFvPatchFields.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
mappedPatchBase.H