Boundary conditions¶
Contents:
Robin boundary conditions apply a heat flux condition to temperature on an external wall.
Two boundary conditions are available in this library: the mould HTC and the water film HTC.
Installation¶
Pre-requisites:
A working installation of OpenFOAM 9.
In the directChillFoam/src/ThermophysicalTransportModels directory, run:
$ wmake libso
Mould heat transfer coefficient¶
-
class mouldHTCFvPatchScalarField : public mixedFvPatchScalarField, public temperatureCoupledBase¶
This boundary condition applies a heat flux condition to temperature on an external wall in one of three modes:
fixed power: supply \( Q \)
fixed heat flux: supply \( q \)
fixed heat transfer coefficient: supply \( h \) and \( Ta \)
where:
\( Q \)
=
Power [W]
\( q \)
=
Heat flux [W/m^2]
\( h \)
=
Heat transfer coefficient [W/m^2/K]
\( Ta \)
=
Ambient temperature [K]
thicknessLayers
andkappaLayers
entries.The thermal conductivity
kappa
can either be retrieved from various possible sources, as detailed in the classtemperatureCoupledBase
.The ambient temperature \( Ta \) is specified as a
Foam::Function1
of time but uniform in space.See also
Foam::temperatureCoupledBase Foam::mixedFvPatchScalarField Foam::waterFilmHTCFvPatchScalarField
- Usage
Property
Description
Required
Default value
mode
’power’, ‘flux’ or ‘coefficient’
yes
Q
Power [W]
for mode ‘power’
q
Heat flux [W/m^2]
for mode ‘flux’
h1
mould heat transfer coefficient [W/m^2/K]
yes*
h2
air gap heat transfer coefficient [W/m^2/K]
yes*
Ta
Ambient temperature [K]
for mode ‘coefficient’
thicknessLayers
Layer thicknesses [m]
no
kappaLayers
Layer thermal conductivities [W/m/K]
no
relaxation
Relaxation for the wall temperature
no
1
emissivity
Surface emissivity for radiative flux to ambient
no
0
qr
Name of the radiative field
no
none
qrRelaxation
Relaxation factor for radiative field
no
1
<patchName> { type mouldHTC; mode coefficient; Ta constant 300.0; h1 uniform 100.0; h2 uniform 10.0; thicknessLayers (0.1 0.2 0.3 0.4); kappaLayers (1 2 3 4); value $internalField; }
- Source files
Public Types
Public Functions
- TypeName ("mouldHTC")
Runtime type information.
-
mouldHTCFvPatchScalarField(const fvPatch&, const DimensionedField<scalar, volMesh>&)¶
Construct from patch and internal field.
-
mouldHTCFvPatchScalarField(const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary&)¶
Construct from patch, internal field and dictionary.
-
mouldHTCFvPatchScalarField(const mouldHTCFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper&)¶
Construct by mapping given.
mouldHTCFvPatchScalarField onto a new patch
-
mouldHTCFvPatchScalarField(const mouldHTCFvPatchScalarField&) = delete¶
Disallow copy without setting internal field reference.
-
mouldHTCFvPatchScalarField(const mouldHTCFvPatchScalarField&, const DimensionedField<scalar, volMesh>&)¶
Copy constructor setting internal field reference.
-
inline virtual tmp<fvPatchScalarField> clone(const DimensionedField<scalar, volMesh> &iF) const¶
Construct and return a clone setting internal field reference.
-
inline virtual bool fixesValue() const¶
Allow manipulation of the boundary values.
-
virtual void autoMap(const fvPatchFieldMapper&)¶
Map (and resize as needed) from self given a mapping object.
Used to update fields following mesh topology change
-
virtual void rmap(const fvPatchScalarField&, const labelList&)¶
Reverse map the given fvPatchField onto this fvPatchField.
Used to reconstruct fields
-
virtual void updateCoeffs()¶
Update the coefficients associated with the patch field.
-
void write(Ostream&) const¶
Write.
Water film heat transfer coefficient¶
-
class waterFilmHTCFvPatchScalarField : public mixedFvPatchScalarField, public temperatureCoupledBase¶
This boundary condition applies a heat flux condition to temperature on an external wall in one of three modes:
fixed power: supply \( Q \)
fixed heat flux: supply \( q \)
fixed heat transfer coefficient: supply \( h \) and \( Ta \)
where:
\( Q \)
=
Power [W]
\( q \)
=
Heat flux [W/m^2]
\( h \)
=
Heat transfer coefficient [W/m^2/K]
\( Ta \)
=
Ambient temperature [K]
thicknessLayers
andkappaLayers
entries.The thermal conductivity
kappa
can either be retrieved from various possible sources, as detailed in the classtemperatureCoupledBase
.The ambient temperature \( Ta \) is specified as a
Foam::Function1
of time but uniform in space.See also
Foam::temperatureCoupledBase Foam::mixedFvPatchScalarField Foam::mouldHTCFvPatchScalarField
- Usage
Property
Description
Required
Default value
mode
’power’, ‘flux’ or ‘coefficient’
yes
Q
Power [W]
for mode ‘power’
q
Heat flux [W/m^2]
for mode ‘flux’
htc
Heat transfer coefficient [W/m^2/K]
for mode ‘coefficent’
Ta
Ambient temperature [K]
for mode ‘coefficient’
thicknessLayers
Layer thicknesses [m]
no
kappaLayers
Layer thermal conductivities [W/m/K]
no
relaxation
Relaxation for the wall temperature
no
1
emissivity
Surface emissivity for radiative flux to ambient
no
0
qr
Name of the radiative field
no
none
qrRelaxation
Relaxation factor for radiative field
no
1
<patchName> { type waterFilmHTC; mode coefficient; Ta constant 300.0; htc constant 10000.0; thicknessLayers (0.1 0.2 0.3 0.4); kappaLayers (1 2 3 4); value $internalField; }
- Source files
Public Types
Public Functions
- TypeName ("waterFilmHTC")
Runtime type information.
-
waterFilmHTCFvPatchScalarField(const fvPatch&, const DimensionedField<scalar, volMesh>&)¶
Construct from patch and internal field.
-
waterFilmHTCFvPatchScalarField(const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary&)¶
Construct from patch, internal field and dictionary.
-
waterFilmHTCFvPatchScalarField(const waterFilmHTCFvPatchScalarField&, const fvPatch&, const DimensionedField<scalar, volMesh>&, const fvPatchFieldMapper&)¶
Construct by mapping given.
waterFilmHTCFvPatchScalarField onto a new patch
-
waterFilmHTCFvPatchScalarField(const waterFilmHTCFvPatchScalarField&) = delete¶
Disallow copy without setting internal field reference.
-
waterFilmHTCFvPatchScalarField(const waterFilmHTCFvPatchScalarField&, const DimensionedField<scalar, volMesh>&)¶
Copy constructor setting internal field reference.
-
inline virtual tmp<fvPatchScalarField> clone(const DimensionedField<scalar, volMesh> &iF) const¶
Construct and return a clone setting internal field reference.
-
inline virtual bool fixesValue() const¶
Allow manipulation of the boundary values.
-
virtual void autoMap(const fvPatchFieldMapper&)¶
Map (and resize as needed) from self given a mapping object.
Used to update fields following mesh topology change
-
virtual void rmap(const fvPatchScalarField&, const labelList&)¶
Reverse map the given fvPatchField onto this fvPatchField.
Used to reconstruct fields
-
virtual void updateCoeffs()¶
Update the coefficients associated with the patch field.
-
void write(Ostream&) const¶
Write.
Testing¶
The unit tests for the ThermophysicalTransportModels libraries require the Boost libraries (>= 1.69.0). The tests are run in the tests/ThermophysicalTransportModels/<boundaryType>/case folder:
$ wmake .. # Build the test executable
$ blockMesh # Create the mesh for the test case
$ ./test_mouldHTC --log_level=all # Run the tests. Use ./test_waterFilmHTC for the waterFilmHTC boundary condition.