VoF: Removed the isotropic compression option which has not proved useful for any cases

This commit is contained in:
Henry Weller
2020-05-09 14:41:15 +01:00
parent 32b4e81a3c
commit 746c080603
20 changed files with 17 additions and 72 deletions

View File

@ -1,3 +1,5 @@
#include "alphaControls.H"
tmp<surfaceScalarField> talphaPhi1(alphaPhi10); tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -105,7 +105,6 @@ int main(int argc, char *argv[])
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop()) while (pimple.loop())
{ {
#include "alphaControls.H"
#include "compressibleAlphaEqnSubCycle.H" #include "compressibleAlphaEqnSubCycle.H"
turbulence.correctPhasePhi(); turbulence.correctPhasePhi();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -138,7 +138,6 @@ int main(int argc, char *argv[])
divU = fvc::div(fvc::absolute(phi, U)); divU = fvc::div(fvc::absolute(phi, U));
#include "alphaControls.H"
#include "compressibleAlphaEqnSubCycle.H" #include "compressibleAlphaEqnSubCycle.H"
turbulence.correctPhasePhi(); turbulence.correctPhasePhi();

View File

@ -1,3 +1,5 @@
#include "alphaControls.H"
{ {
surfaceScalarField alphaPhi surfaceScalarField alphaPhi
( (

View File

@ -83,8 +83,6 @@ int main(int argc, char *argv[])
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop()) while (pimple.loop())
{ {
#include "alphaControls.H"
UdmModel.correct(); UdmModel.correct();
#include "alphaEqnSubCycle.H" #include "alphaEqnSubCycle.H"

View File

@ -134,7 +134,6 @@ int main(int argc, char *argv[])
} }
} }
#include "alphaControls.H"
#include "alphaEqnSubCycle.H" #include "alphaEqnSubCycle.H"
mixture.correct(); mixture.correct();

View File

@ -1,3 +1,5 @@
#include "alphaControls.H"
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)
{ {
dimensionedScalar totalDeltaT = runTime.deltaT(); dimensionedScalar totalDeltaT = runTime.deltaT();

View File

@ -125,7 +125,6 @@ int main(int argc, char *argv[])
} }
} }
#include "alphaControls.H"
#include "alphaEqnSubCycle.H" #include "alphaEqnSubCycle.H"
mixture.correct(); mixture.correct();

View File

@ -14,8 +14,8 @@ bool MULESCorr(alphaControls.lookupOrDefault<Switch>("MULESCorr", false));
// alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false) // alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
//); //);
// Isotropic compression coefficient // compression coefficient
scalar icAlpha scalar cAlpha
( (
alphaControls.lookupOrDefault<scalar>("icAlpha", 0) alphaControls.lookupOrDefault<scalar>("cAlpha", 0)
); );

View File

@ -1,13 +1,8 @@
#include "alphaControls.H"
{ {
// Standard face-flux compression coefficient // Standard face-flux compression coefficient
surfaceScalarField phic(mixture.cAlpha()*mag(phi/mesh.magSf())); surfaceScalarField phic(cAlpha*mag(phi/mesh.magSf()));
// Add the optional isotropic compression contribution
if (icAlpha > 0)
{
phic *= (1.0 - icAlpha);
phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
}
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)
{ {

View File

@ -140,7 +140,6 @@ int main(int argc, char *argv[])
dimensionedScalar(dimMass/dimTime, 0) dimensionedScalar(dimMass/dimTime, 0)
); );
#include "alphaControls.H"
#include "alphaEqnSubCycle.H" #include "alphaEqnSubCycle.H"
mixture.correct(); mixture.correct();

View File

@ -1,27 +0,0 @@
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaCorr(alphaControls.lookup<label>("nAlphaCorr"));
label nAlphaSubCycles(alphaControls.lookup<label>("nAlphaSubCycles"));
bool MULESCorr(alphaControls.lookupOrDefault<Switch>("MULESCorr", false));
// Apply the compression correction from the previous iteration
// Improves efficiency for steady-simulations but can only be applied
// once the alpha field is reasonably steady, i.e. fully developed
bool alphaApplyPrevCorr
(
alphaControls.lookupOrDefault<Switch>("alphaApplyPrevCorr", false)
);
// Isotropic compression coefficient
scalar icAlpha
(
alphaControls.lookupOrDefault<scalar>("icAlpha", 0)
);
// Shear compression coefficient
scalar scAlpha
(
alphaControls.lookupOrDefault<scalar>("scAlpha", 0)
);

View File

@ -154,10 +154,6 @@ Foam::interfaceProperties::interfaceProperties
) )
: :
transportPropertiesDict_(dict), transportPropertiesDict_(dict),
cAlpha_
(
alpha1.mesh().solverDict(alpha1.name()).lookup<scalar>("cAlpha")
),
sigmaPtr_(surfaceTensionModel::New(dict, alpha1.mesh())), sigmaPtr_(surfaceTensionModel::New(dict, alpha1.mesh())),
@ -229,7 +225,6 @@ void Foam::interfaceProperties::correct()
bool Foam::interfaceProperties::read() bool Foam::interfaceProperties::read()
{ {
alpha1_.mesh().solverDict(alpha1_.name()).lookup("cAlpha") >> cAlpha_;
sigmaPtr_->readDict(transportPropertiesDict_); sigmaPtr_->readDict(transportPropertiesDict_);
return true; return true;

View File

@ -60,9 +60,6 @@ class interfaceProperties
//- Keep a reference to the transportProperties dictionary //- Keep a reference to the transportProperties dictionary
const dictionary& transportPropertiesDict_; const dictionary& transportPropertiesDict_;
//- Compression coefficient
scalar cAlpha_;
//- Surface tension //- Surface tension
autoPtr<surfaceTensionModel> sigmaPtr_; autoPtr<surfaceTensionModel> sigmaPtr_;
@ -108,11 +105,6 @@ public:
// Member Functions // Member Functions
scalar cAlpha() const
{
return cAlpha_;
}
const dimensionedScalar& deltaN() const const dimensionedScalar& deltaN() const
{ {
return deltaN_; return deltaN_;

View File

@ -56,14 +56,7 @@
scalar cnCoeff = 1.0/(1.0 + ocCoeff); scalar cnCoeff = 1.0/(1.0 + ocCoeff);
// Standard face-flux compression coefficient // Standard face-flux compression coefficient
surfaceScalarField phic(mixture.cAlpha()*mag(phi/mesh.magSf())); surfaceScalarField phic(cAlpha*mag(phi/mesh.magSf()));
// Add the optional isotropic compression contribution
if (icAlpha > 0)
{
phic *= (1.0 - icAlpha);
phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
}
// Add the optional shear compression contribution // Add the optional shear compression contribution
if (scAlpha > 0) if (scAlpha > 0)

View File

@ -1,3 +1,5 @@
#include "alphaControls.H"
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)
{ {
dimensionedScalar totalDeltaT = runTime.deltaT(); dimensionedScalar totalDeltaT = runTime.deltaT();

View File

@ -22,7 +22,6 @@ solvers
nAlphaCorr 2; nAlphaCorr 2;
nAlphaSubCycles 1; nAlphaSubCycles 1;
cAlpha 1; cAlpha 1;
icAlpha 0;
MULESCorr yes; MULESCorr yes;
nLimiterIter 10; nLimiterIter 10;

View File

@ -22,7 +22,6 @@ solvers
nAlphaCorr 3; nAlphaCorr 3;
nAlphaSubCycles 1; nAlphaSubCycles 1;
cAlpha 1; cAlpha 1;
icAlpha 0;
MULESCorr yes; MULESCorr yes;
nLimiterIter 15; nLimiterIter 15;

View File

@ -22,7 +22,6 @@ solvers
nAlphaCorr 3; nAlphaCorr 3;
nAlphaSubCycles 1; nAlphaSubCycles 1;
cAlpha 1; cAlpha 1;
icAlpha 0;
MULESCorr yes; MULESCorr yes;
nLimiterIter 15; nLimiterIter 15;

View File

@ -22,7 +22,6 @@ solvers
nAlphaCorr 2; nAlphaCorr 2;
nAlphaSubCycles 1; nAlphaSubCycles 1;
cAlpha 1; cAlpha 1;
icAlpha 0;
MULESCorr yes; MULESCorr yes;
nLimiterIter 3; nLimiterIter 3;