1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 turbulentTemperatureCoupledBaffleFvPatchScalarField
28 Harmonic fixed value boundary condition for temperature, to be used
29 for heat-transfer on back-to-back baffles.
31 If my temperature is T1, heat conductivity K1 and neighbour is T2,K2
33 both sides get fixedValue (K1/dx1*T1 + K2/dx2*T2)/(K1/dx1+K2/dx2)
38 type compressible::turbulentTemperatureCoupledBaffle;
45 Needs to be on underlying directMapped(Wall)FvPatch.
47 Note: see temperatureCoupledBase on ways to specify K.
49 Note: runs in parallel with arbitrary decomposition. Uses directMapped
50 functionality to calculate exchange.
52 Note: lags interface data so both sides use same data.
53 - problem: schedule to calculate average would interfere
54 with standard processor swaps.
55 - so: updateCoeffs sets both to same Twall. Only need to do
56 this for last outer iteration but don't have access to this.
59 turbulentTemperatureCoupledBaffleFvPatchScalarField.C
61 \*---------------------------------------------------------------------------*/
63 #ifndef turbulentTemperatureCoupledBaffleFvPatchScalarField_H
64 #define turbulentTemperatureCoupledBaffleFvPatchScalarField_H
66 #include "fixedValueFvPatchFields.H"
67 #include "temperatureCoupledBase.H"
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 /*---------------------------------------------------------------------------*\
75 Class turbulentTemperatureCoupledBaffleFvPatchScalarField Declaration
76 \*---------------------------------------------------------------------------*/
78 class turbulentTemperatureCoupledBaffleFvPatchScalarField
80 public fixedValueFvPatchScalarField,
81 public temperatureCoupledBase
85 //- Name of field on the neighbour region
86 const word neighbourFieldName_;
89 // Private Member Functions
91 //- Am I or neighbour owner of interface
92 bool interfaceOwner(const polyMesh&, const polyPatch&) const;
97 //- Runtime type information
98 TypeName("compressible::turbulentTemperatureCoupledBaffle");
103 //- Construct from patch and internal field
104 turbulentTemperatureCoupledBaffleFvPatchScalarField
107 const DimensionedField<scalar, volMesh>&
110 //- Construct from patch, internal field and dictionary
111 turbulentTemperatureCoupledBaffleFvPatchScalarField
114 const DimensionedField<scalar, volMesh>&,
118 //- Construct by mapping given
119 // turbulentTemperatureCoupledBaffleFvPatchScalarField onto a new patch
120 turbulentTemperatureCoupledBaffleFvPatchScalarField
122 const turbulentTemperatureCoupledBaffleFvPatchScalarField&,
124 const DimensionedField<scalar, volMesh>&,
125 const fvPatchFieldMapper&
128 //- Construct and return a clone
129 virtual tmp<fvPatchScalarField> clone() const
131 return tmp<fvPatchScalarField>
133 new turbulentTemperatureCoupledBaffleFvPatchScalarField(*this)
137 //- Construct as copy setting internal field reference
138 turbulentTemperatureCoupledBaffleFvPatchScalarField
140 const turbulentTemperatureCoupledBaffleFvPatchScalarField&,
141 const DimensionedField<scalar, volMesh>&
144 //- Construct and return a clone setting internal field reference
145 virtual tmp<fvPatchScalarField> clone
147 const DimensionedField<scalar, volMesh>& iF
150 return tmp<fvPatchScalarField>
152 new turbulentTemperatureCoupledBaffleFvPatchScalarField
163 //- Update the coefficients associated with the patch field
164 virtual void updateCoeffs();
167 virtual void write(Ostream&) const;
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 } // End namespace Foam
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 // ************************************************************************* //