FreeFOAM The Cross-Platform CFD Toolkit
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.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) 1991-2010 OpenCFD Ltd.
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::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
26 
27 Description
28  Mixed boundary condition for temperature, to be used for heat-transfer
29  on back-to-back baffles.
30 
31  Specifies gradient and temperature such that the equations are the same
32  on both sides:
33  - refGradient = zero gradient
34  - refValue = neighbour value
35  - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())
36 
37  where KDelta is heat-transfer coefficient K * deltaCoeffs
38 
39 
40  Example usage:
41  myInterfacePatchName
42  {
43  type compressible::turbulentTemperatureCoupledBaffleMixed;
44  neighbourFieldName T;
45  K K; // or none
46  value uniform 300;
47  }
48 
49  Needs to be on underlying directMapped(Wall)FvPatch.
50 
51  Note: if K is "none" looks up RASModel and basicThermo, otherwise expects
52  the solver to calculate a 'K' field.
53 
54  Note: runs in parallel with arbitrary decomposition. Uses directMapped
55  functionality to calculate exchange.
56 
57 SourceFiles
58  turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
63 #define turbulentTemperatureCoupledBaffleMixedFvPatchScalarField_H
64 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 namespace compressible
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
77 
79 :
80  public mixedFvPatchScalarField
81 {
82  // Private data
83 
84  //- Name of field on the neighbour region
85  const word neighbourFieldName_;
86 
87  //- Name of thermal conductivity field
88  const word KName_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("compressible::turbulentTemperatureCoupledBaffleMixed");
95 
96 
97  // Constructors
98 
99  //- Construct from patch and internal field
101  (
102  const fvPatch&,
104  );
105 
106  //- Construct from patch, internal field and dictionary
108  (
109  const fvPatch&,
111  const dictionary&
112  );
113 
114  //- Construct by mapping given
115  // turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
116  // new patch
118  (
120  const fvPatch&,
122  const fvPatchFieldMapper&
123  );
124 
125  //- Construct and return a clone
127  {
129  (
131  (
132  *this
133  )
134  );
135  }
136 
137  //- Construct as copy setting internal field reference
139  (
142  );
143 
144  //- Construct and return a clone setting internal field reference
145  virtual tmp<fvPatchScalarField> clone
146  (
148  ) const
149  {
151  (
153  (
154  *this,
155  iF
156  )
157  );
158  }
159 
160 
161  // Member functions
162 
163  //- Get corresponding K field
164  tmp<scalarField> K() const;
165 
166  //- Update the coefficients associated with the patch field
167  virtual void updateCoeffs();
168 
169  //- Write
170  virtual void write(Ostream&) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace compressible
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************ vim: set sw=4 sts=4 et: ************************ //