ENH: Added film coverage field, alpha, to kinematicSingleLayer film model

This commit is contained in:
andy
2012-11-12 10:38:23 +00:00
parent 55913bf964
commit 711a0e99cf
3 changed files with 41 additions and 3 deletions

View File

@ -197,6 +197,12 @@ tmp<volScalarField> kinematicSingleLayer::pp()
}
void kinematicSingleLayer::correctAlpha()
{
alpha_ == pos(delta_ - dimensionedScalar("SMALL", dimless, SMALL));
}
void kinematicSingleLayer::updateSubmodels()
{
if (debug)
@ -503,6 +509,19 @@ kinematicSingleLayer::kinematicSingleLayer
),
regionMesh()
),
alpha_
(
IOobject
(
"alpha",
time().timeName(),
regionMesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
regionMesh(),
dimensionedScalar("zero", dimless, 0.0)
),
U_
(
IOobject
@ -838,6 +857,8 @@ void kinematicSingleLayer::evolveRegion()
Info<< "kinematicSingleLayer::evolveRegion()" << endl;
}
correctAlpha();
updateSubmodels();
// Solve continuity for deltaRho_
@ -1032,7 +1053,9 @@ void kinematicSingleLayer::info() const
<< indent << "min/max(mag(U)) = " << min(mag(U_)).value() << ", "
<< max(mag(U_)).value() << nl
<< indent << "min/max(delta) = " << min(delta_).value() << ", "
<< max(delta_).value() << nl;
<< max(delta_).value() << nl
<< indent << "coverage = "
<< gSum(alpha_.internalField()*magSf())/gSum(magSf()) << nl;
injection_.info(Info);
}

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
@ -113,6 +113,9 @@ protected:
//- Film thickness / [m]
volScalarField delta_;
//- Film coverage indicator, 1 = covered, 0 = uncovered / []
volScalarField alpha_;
//- Velocity - mean / [m/s]
volVectorField U_;
@ -227,6 +230,9 @@ protected:
// Implicit pressure source coefficient
virtual tmp<volScalarField> pp();
//- Correct film coverage field
virtual void correctAlpha();
//- Update the film sub-models
virtual void updateSubmodels();
@ -323,6 +329,9 @@ public:
//- Return const access to the film thickness / [m]
inline const volScalarField& delta() const;
//- Return the film coverage, 1 = covered, 0 = uncovered / []
inline const volScalarField& alpha() const;
//- Return the film velocity [m/s]
virtual const volVectorField& U() const;

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
@ -79,6 +79,12 @@ inline const volScalarField& kinematicSingleLayer::delta() const
}
inline const volScalarField& kinematicSingleLayer::alpha() const
{
return alpha_;
}
inline volVectorField& kinematicSingleLayer::USpPrimary()
{
return USpPrimary_;