turbulentBoundaryCoupledFvPatchScalarField.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-2015 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::compressible::
26  turbulentBoundaryCoupledFvPatchScalarField
27 
28  Description
29  Mixed boundary condition for temperature, to be used for heat-transfer
30  on back-to-back baffles.Optional thin thermal layer
31  resistances can be specified through thicknessLayers and kappaLayers
32  entries.
33 
34  The thermal conductivity, \c kappa, can either be retrieved from the
35  mesh database using the \c lookup option, or from a \c solidThermo
36  or \c fluidThermo thermophysical package.
37 
38 
39  Specifies gradient and temperature such that the equations are the same
40  on both sides:
41  - refGradient = zero gradient
42  - refValue = neighbour value
43  - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
44 
45  where KDelta is heat-transfer coefficient K * deltaCoeffs
46 
47  \heading Patch usage
48 
49  \table
50  Property | Description | Required | Default value
51  kappa | thermal conductivity option | yes |
52  kappaName | name of thermal conductivity field | no |
53  Tnbr | name of the field | no | T
54  thicknessLayers | list of thicknesses per layer [m] | no |
55  kappaLayers | list of thermal conductivites per layer [W/m/K] | no |
56  \endtable
57 
58  Example of the boundary condition specification:
59  \verbatim
60  myPatch
61  {
62  type compressible::turbulentBoundaryCoupled;
63  Tnbr T;
64  kappa lookup;
65  KappaName kappa;
66  thicknessLayers (0.1 0.2 0.3 0.4);
67  kappaLayers (1 2 3 4)
68  value uniform 300;
69  }
70  \endverbatim
71 
72 Needs to be on underlying mapped(Wall)FvPatch.
73 
74 Note: kappa : heat conduction at patch. Gets supplied how to lookup
75 calculate kappa:
76 
77 - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
78 - 'fluidThermo' : use fluidThermo and compressible::RASmodel to calculate
79 kappa
80 - 'solidThermo' : use solidThermo kappa()
81 - 'directionalSolidThermo' directionalKappa()
82 
83 SourceFiles
84 turbulentBoundaryCoupledFvPatchScalarField.C
85 
86 \*---------------------------------------------------------------------------*/
87 
88 #ifndef turbulentBoundaryCoupledFvPatchScalarField_H
89 #define turbulentBoundaryCoupledFvPatchScalarField_H
90 
91 #include "mixedFvPatchFields.H"
92 //#include "allVariableTemperatureCoupledBase.H"
93 #include "scalarField.H"
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 namespace Foam
98 {
99  namespace incompressible
100  {
101 
102  /*---------------------------------------------------------------------------*\
103  Class turbulentBoundaryCoupledFvPatchScalarField Declaration
104  \*---------------------------------------------------------------------------*/
105 
106  class turbulentBoundaryCoupledFvPatchScalarField
107  :
108  public mixedFvPatchScalarField
109  // public temperatureCoupledBase
110  {
111 
112  // Private data
113  //- Name of field on the neighbour region
114  const word TnbrName_;
115 
116 
117 
118  public:
119 
120  //- Runtime type information
121  TypeName("incompressible::turbulentBoundaryCoupled");
122 
123 
124  // Constructors
125 
126  //- Construct from patch and internal field
128  (
129  const fvPatch&,
130  const DimensionedField<scalar, volMesh>&
131  );
132 
133  //- Construct from patch, internal field and dictionary
135  (
136  const fvPatch&,
138  const dictionary&
139  );
140 
141  //- Construct by mapping given
142  // turbulentBoundaryCoupledFvPatchScalarField onto a
143  // new patch
145  (
147  const fvPatch&,
149  const fvPatchFieldMapper&
150  );
151 
152  //- Construct and return a clone
153  virtual tmp<fvPatchScalarField> clone() const
154  {
156  (
158  (
159  *this
160  )
161  );
162  }
163 
164  //- Construct as copy setting internal field reference
166  (
169  );
170 
171  //- Construct and return a clone setting internal field reference
173  (
175  ) const
176  {
178  (
180  (
181  *this,
182  iF
183  )
184  );
185  }
186 
187 
188  // Member functions
189 
190  //- Update the coefficients associated with the patch field
191  virtual void updateCoeffs();
192 
193  //- Write
194  virtual void write(Ostream&) const;
195  };
196 
197 
198  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200  } // End namespace compressible
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #endif
206 
207 // ************************************************************************* //
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::TnbrName_
const word TnbrName_
Name of field on the neighbour region.
Definition: turbulentBoundaryCoupledFvPatchScalarField.H:144
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
scalarField.H
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::TypeName
TypeName("incompressible::turbulentBoundaryCoupled")
Runtime type information.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: turbulentBoundaryCoupledFvPatchScalarField.C:124
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::turbulentBoundaryCoupledFvPatchScalarField
turbulentBoundaryCoupledFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: turbulentBoundaryCoupledFvPatchScalarField.C:42
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
mixedFvPatchFields.H
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField
Definition: turbulentBoundaryCoupledFvPatchScalarField.H:136
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: turbulentBoundaryCoupledFvPatchScalarField.C:221
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::incompressible::turbulentBoundaryCoupledFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: turbulentBoundaryCoupledFvPatchScalarField.H:183
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51