Skip to content
Snippets Groups Projects
Commit a684e730 authored by Henry Weller's avatar Henry Weller
Browse files

surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification: Corrected...

surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification: Corrected and improved solidification rate controls

    Solidification phase change model where all film mass is converted when the
    local temperature > activation temperature.  The latent heat is
    assumed to be removed by heat-transfer to the wall.
parent fb3eddd2
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -57,8 +57,20 @@ solidification::solidification
:
phaseChangeModel(typeName, owner, dict),
T0_(readScalar(coeffDict_.lookup("T0"))),
L_(readScalar(coeffDict_.lookup("L"))),
alpha_(readScalar(coeffDict_.lookup("alpha"))),
maxSolidificationFrac_
(
coeffDict_.lookupOrDefault("maxSolidificationFrac", 0.2)
),
maxSolidificationRate_
(
dimensioned<scalar>::lookupOrDefault
(
"maxSolidificationRate",
coeffDict_,
dimless/dimTime,
GREAT
)
),
mass_
(
IOobject
......@@ -111,15 +123,28 @@ void solidification::correctModel
const scalarField& T = film.T();
const scalarField& alpha = film.alpha();
forAll(alpha, cellI)
const scalar rateLimiter = min
(
maxSolidificationFrac_,
(
maxSolidificationRate_
*owner_.regionMesh().time().deltaTValue()
).value()
);
forAll(alpha, celli)
{
if (alpha[cellI] > 0.5)
if (alpha[celli] > 0.5)
{
if (T[cellI] > T0_)
if (T[celli] < T0_)
{
mass_[cellI] += alpha_*availableMass[cellI];
dMass[cellI] += alpha_*availableMass[cellI];
dEnergy[cellI] += alpha_*availableMass[cellI]*L_;
const scalar dm = rateLimiter*availableMass[celli];
mass_[celli] += dm;
dMass[celli] += dm;
// Heat is assumed to be removed by heat-transfer to the wall
// so the energy remains unchanged by the phase-change.
}
}
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -25,8 +25,9 @@ Class
Foam::solidification
Description
Solidification phase change model where all film mass is converted when
the local temperature > activation temperature.
Solidification phase change model where all film mass is converted when the
local temperature > activation temperature. The latent heat is
assumed to be removed by heat-transfer to the wall.
SourceFiles
solidification.C
......@@ -55,8 +56,6 @@ class solidification
:
public phaseChangeModel
{
private:
// Private member functions
//- Disallow default bitwise copy construct
......@@ -73,11 +72,13 @@ protected:
//- Temperature at which solidification starts
scalar T0_;
//- Latent heat of solidification [J/kg]
scalar L_;
//- Solidification limiter
// Maximum fraction of film which can solidify in a time-step
scalar maxSolidificationFrac_;
//- Under-relaxation parameter for solidification process (0-1)
scalar alpha_;
//- Solidification limiter
// Maximum rate at which the film can solidify
dimensionedScalar maxSolidificationRate_;
//- Accumulated solid mass [kg]
volScalarField mass_;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment