adsorptionMassFractionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
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 
24 Class
25  Foam::adsorptionMassFractionFvPatchScalarField
26 
27 Description
28  This is a mass-fraction boundary condition for an adsorbing wall.
29 
30  This condition models a baffle which adsorbs some species and not others.
31  It must be used in conjunction with a
32  specieTransferVelocityFvPatchVectorField velocity condition, and a
33  specieTransferTemperatureFvPatchScalarField temperature condition.
34 
35  The mass flux of a species is calculated as a coefficient multiplied by the
36  concentration adjacent to the patch.
37  \f[
38  \phi_{Yi} = c A \psi_i
39  \f]
40  where
41  \vartable
42  \phi_{Yi} | Flux of the adsorbing specie [kg/s]
43  c | Transfer coefficient [kg/m^2/s/<property-dimensions>]
44  A | Patch face area [m^2]
45  C_i | Property adjacent to the patch [<property-dimensions>]
46  \endvartable
47 
48  A species that is adsorbed by the patch will, therefore, have a coefficient
49  greater than zero, whilst a species that is not adsorbed will have a
50  coefficient equal to zero.
51 
52 Usage
53  \table
54  Property | Description | Req'd? | Default
55  c | Transfer coefficient | no | 0
56  property | Property used to drive the transfer; massFraction, \\
57  moleFraction, molarConcentration, or partialPressure | if c is \\
58  non-zero |
59  phi | Name of the flux field | no | phi
60  U | Name of the velocity field | no | U
61  \endtable
62 
63  Example of the boundary condition specification:
64  \verbatim
65  <patchName>
66  {
67  type adsorptionMassFraction;
68  property molarConcentration;
69  c 1e-3;
70  value $internalField;
71  }
72  \endverbatim
73 
74 See also
75  Foam::specieTransferMassFractionFvPatchScalarField
76  Foam::specieTransferVelocityFvPatchVectorField
77  Foam::specieTransferTemperatureFvPatchScalarField
78 
79 SourceFiles
80  adsorptionMassFractionFvPatchScalarField.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef adsorptionMassFractionFvPatchScalarField_H
85 #define adsorptionMassFractionFvPatchScalarField_H
86 
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 
94 class basicSpecieMixture;
95 
96 /*---------------------------------------------------------------------------*\
97  Class adsorptionMassFractionFvPatchScalarField Declaration
98 \*---------------------------------------------------------------------------*/
99 
100 class adsorptionMassFractionFvPatchScalarField
101 :
102  public specieTransferMassFractionFvPatchScalarField
103 {
104 public:
105 
106  //- Runtime type information
107  TypeName("adsorptionMassFraction");
108 
109 
110  // Constructors
111 
112  //- Construct from patch and internal field
114  (
115  const fvPatch&,
116  const DimensionedField<scalar, volMesh>&
117  );
118 
119  //- Construct from patch, internal field and dictionary
121  (
122  const fvPatch&,
123  const DimensionedField<scalar, volMesh>&,
124  const dictionary&
125  );
126 
127  //- Construct by mapping given fixedValueTypeFvPatchField
128  // onto a new patch
130  (
132  const fvPatch&,
133  const DimensionedField<scalar, volMesh>&,
134  const fvPatchFieldMapper&
135  );
136 
137 
138  //- Disallow copy without setting internal field reference
140  (
142  ) = delete;
143 
144  //- Copy constructor setting internal field reference
146  (
149  );
150 
151  //- Construct and return a clone setting internal field reference
153  (
155  ) const
156  {
158  (
160  (
161  *this,
162  iF
163  )
164  );
165  }
166 
167 
168  // Member Functions
169 
170  // Evaluation functions
171 
172  //- Return the flux of this species
173  tmp<scalarField> calcPhiYp() const;
174 
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 
188 #endif
189 
190 // ************************************************************************* //
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("adsorptionMassFraction")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
This is a mass-fraction boundary condition for an adsorbing wall.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:53
adsorptionMassFractionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
tmp< scalarField > calcPhiYp() const
Return the flux of this species.
Namespace for OpenFOAM.