Skip to content
Snippets Groups Projects
Commit f036f5a7 authored by andy's avatar andy
Browse files

ENH: Added optional temperature limiting to thermo film model

parent f47adb9a
Branches
Tags
No related merge requests found
...@@ -514,8 +514,20 @@ thermoSingleLayer::thermoSingleLayer ...@@ -514,8 +514,20 @@ thermoSingleLayer::thermoSingleLayer
heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels")) heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
), ),
phaseChange_(phaseChangeModel::New(*this, coeffs())), phaseChange_(phaseChangeModel::New(*this, coeffs())),
radiation_(filmRadiationModel::New(*this, coeffs())) radiation_(filmRadiationModel::New(*this, coeffs())),
Tmin_(-VGREAT),
Tmax_(VGREAT)
{ {
if (coeffs().readIfPresent("Tmin", Tmin_))
{
Info<< " limiting minimum temperature to " << Tmin_ << endl;
}
if (coeffs().readIfPresent("Tmax", Tmax_))
{
Info<< " limiting maximum temperature to " << Tmax_ << endl;
}
if (thermo_.hasMultiComponentCarrier()) if (thermo_.hasMultiComponentCarrier())
{ {
YPrimary_.setSize(thermo_.carrier().species().size()); YPrimary_.setSize(thermo_.carrier().species().size());
......
...@@ -166,6 +166,15 @@ protected: ...@@ -166,6 +166,15 @@ protected:
PtrList<volScalarField> YPrimary_; PtrList<volScalarField> YPrimary_;
// Limits
//- Minimum temperature limit (optional)
scalar Tmin_;
//- Maximum temperature limit (optional)
scalar Tmax_;
// Sub-models // Sub-models
//- Heat transfer coefficient bewteen film surface and primary //- Heat transfer coefficient bewteen film surface and primary
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -88,7 +88,7 @@ inline tmp<volScalarField> thermoSingleLayer::T ...@@ -88,7 +88,7 @@ inline tmp<volScalarField> thermoSingleLayer::T
const volScalarField& hs const volScalarField& hs
) const ) const
{ {
return tmp<volScalarField> tmp<volScalarField> tT
( (
new volScalarField new volScalarField
( (
...@@ -104,6 +104,11 @@ inline tmp<volScalarField> thermoSingleLayer::T ...@@ -104,6 +104,11 @@ inline tmp<volScalarField> thermoSingleLayer::T
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
) )
); );
tT().min(Tmax_);
tT().max(Tmin_);
return tT;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment