FreeFOAM The Cross-Platform CFD Toolkit
solidWallMixedTemperatureCoupledFvPatchScalarField.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  solidWallMixedTemperatureCoupledFvPatchScalarField
26 
27 Description
28  Mixed boundary condition for temperature, to be used by the
29  conjugate heat transfer solver.
30  Both sides use a mix of zeroGradient and neighbourvalue.
31 
32  Example usage:
33  myInterfacePatchName
34  {
35  type solidWallMixedTemperatureCoupled;
36  neighbourFieldName T;
37  K K;
38  value uniform 300;
39  }
40 
41  Needs to be on underlying directMapped(Wall)FvPatch.
42 
43  Note: runs in parallel with arbitrary decomposition. Uses directMapped
44  functionality to calculate exchange.
45 
46 SourceFiles
47  solidWallMixedTemperatureCoupledFvPatchScalarField.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef solidWallMixedTemperatureCoupledFvPatchScalarField_H
52 #define solidWallMixedTemperatureCoupledFvPatchScalarField_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class solidWallMixedTemperatureCoupledFvPatchScalarField Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 :
67  public mixedFvPatchScalarField
68 {
69  // Private data
70 
71  //- Name of field on the neighbour region
72  const word neighbourFieldName_;
73 
74  //- Name of thermal conductivity field
75  const word KName_;
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("solidWallMixedTemperatureCoupled");
81 
82 
83  // Constructors
84 
85  //- Construct from patch and internal field
87  (
88  const fvPatch&,
90  );
91 
92  //- Construct from patch, internal field and dictionary
94  (
95  const fvPatch&,
97  const dictionary&
98  );
99 
100  //- Construct by mapping given
101  // solidWallMixedTemperatureCoupledFvPatchScalarField onto a new patch
103  (
105  const fvPatch&,
107  const fvPatchFieldMapper&
108  );
109 
110  //- Construct and return a clone
112  {
114  (
116  );
117  }
118 
119  //- Construct as copy setting internal field reference
121  (
124  );
125 
126  //- Construct and return a clone setting internal field reference
128  (
130  ) const
131  {
133  (
135  (
136  *this,
137  iF
138  )
139  );
140  }
141 
142 
143  // Member functions
144 
145  //- Get corresponding K field
146  const fvPatchScalarField& K() const;
147 
148  //- Update the coefficients associated with the patch field
149  virtual void updateCoeffs();
150 
151  //- Write
152  virtual void write(Ostream&) const;
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************ vim: set sw=4 sts=4 et: ************************ //