ENH: Added optional temperature limiting to thermo film model

This commit is contained in:
andy
2012-11-12 11:00:03 +00:00
parent f47adb9a0f
commit f036f5a761
3 changed files with 29 additions and 3 deletions

View File

@ -514,8 +514,20 @@ thermoSingleLayer::thermoSingleLayer
heatTransferModel::New(*this, coeffs().subDict("lowerSurfaceModels"))
),
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())
{
YPrimary_.setSize(thermo_.carrier().species().size());

View File

@ -166,6 +166,15 @@ protected:
PtrList<volScalarField> YPrimary_;
// Limits
//- Minimum temperature limit (optional)
scalar Tmin_;
//- Maximum temperature limit (optional)
scalar Tmax_;
// Sub-models
//- Heat transfer coefficient bewteen film surface and primary

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,7 +88,7 @@ inline tmp<volScalarField> thermoSingleLayer::T
const volScalarField& hs
) const
{
return tmp<volScalarField>
tmp<volScalarField> tT
(
new volScalarField
(
@ -104,6 +104,11 @@ inline tmp<volScalarField> thermoSingleLayer::T
zeroGradientFvPatchScalarField::typeName
)
);
tT().min(Tmax_);
tT().max(Tmin_);
return tT;
}