diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index f7cfae75625013be13eeaff3b8e11b6c1b1b8e03..f5b5b36f59983888af9e3caa2ad8ffe499fa271d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -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. } } } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.H b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.H index 87f0c1206e987e603f455eee32ab6233d437aa65..1854feac28c487d675509ed423183a7e0822413e 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.H +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.H @@ -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_;