homTempFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2 
3  DAFoam : Discrete Adjoint with OpenFOAM
4  Version : v4
5 
6  One layer CHT boundary condition obtained through homogenization (for
7  laminar flows only)
8 
9  Contribution from Eric Segalerba
10 
11  OpenFOAM: The Open Source CFD Toolbox
12 
13  Copyright (C): 2011-2016 OpenFOAM Foundation
14 
15  OpenFOAM License:
16 
17  OpenFOAM is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  (at your option) any later version.
21 
22  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
23  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25  for more details.
26 
27  You should have received a copy of the GNU General Public License
28  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef homTempFvPatchScalarField_H
33 #define homTempFvPatchScalarField_H
34 
35 #include "fixedValueFvPatchFields.H"
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41 
42 /*---------------------------------------------------------------------------*\
43  Class homTempFvPatchScalarField Declaration
44 \*---------------------------------------------------------------------------*/
45 
47  : public fixedValueFvPatchScalarField
48 {
49 protected:
50  // Protected Data
51 
52  //- Solid thermal conductivity
53  const scalar kS_;
54 
55  //- Fluid thermal conductivity
56  const scalar kF_;
57 
58  //- Solid thickness
59  const scalar solidThickness_;
60 
61  //- Base temperature field
62  Field<scalar> baseTemperature_;
63 
64  //- Old temperature value
65  Field<scalar> oldT;
66 
67  //- Cell temperature initialization
68  //Field<scalar> Tcell;
69 public:
70  //- Runtime type information
71  TypeName("homTemp");
72 
73  // Constructors
74 
75  //- Construct from patch and internal field
77  const fvPatch&,
78  const DimensionedField<scalar, volMesh>&);
79 
80  //- Construct from patch, internal field and dictionary
82  const fvPatch&,
83  const DimensionedField<scalar, volMesh>&,
84  const dictionary&);
85 
86  //- Construct by mapping given homTempFvPatchScalarField
87  // onto a new patch
90  const fvPatch&,
91  const DimensionedField<scalar, volMesh>&,
92  const fvPatchFieldMapper&);
93 
94  //- Disallow copy without setting internal field reference
96  const homTempFvPatchScalarField&) = delete;
97 
98  //- Copy constructor setting internal field reference
101  const DimensionedField<scalar, volMesh>&);
102 
103  //- Construct and return a clone setting internal field reference
104  virtual tmp<fvPatchScalarField> clone(
105  const DimensionedField<scalar, volMesh>& iF) const
106  {
107  return tmp<fvPatchScalarField>(
108  new homTempFvPatchScalarField(*this, iF));
109  }
110 
111  // Member Functions
112 
113  // Evaluation functions
114 
115  //- Update the coefficients associated with the patch field
116  virtual void updateCoeffs();
117 
118  //- Write
119  virtual void write(Ostream&) const;
120 };
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Foam::homTempFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Definition: homTempFvPatchScalarField.H:104
Foam::homTempFvPatchScalarField
Definition: homTempFvPatchScalarField.H:46
Foam::homTempFvPatchScalarField::baseTemperature_
Field< scalar > baseTemperature_
Definition: homTempFvPatchScalarField.H:62
Foam::homTempFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Definition: homTempFvPatchScalarField.C:84
Foam::homTempFvPatchScalarField::solidThickness_
const scalar solidThickness_
Definition: homTempFvPatchScalarField.H:59
Foam::homTempFvPatchScalarField::write
virtual void write(Ostream &) const
Definition: homTempFvPatchScalarField.C:124
Foam
Definition: checkGeometry.C:32
Foam::homTempFvPatchScalarField::kS_
const scalar kS_
Definition: homTempFvPatchScalarField.H:53
Foam::homTempFvPatchScalarField::kF_
const scalar kF_
Definition: homTempFvPatchScalarField.H:56
Foam::homTempFvPatchScalarField::oldT
Field< scalar > oldT
Definition: homTempFvPatchScalarField.H:65
Foam::homTempFvPatchScalarField::homTempFvPatchScalarField
homTempFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Definition: homTempFvPatchScalarField.C:35
Foam::homTempFvPatchScalarField::TypeName
TypeName("homTemp")