mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
New Courant number now implemented in most solvers
CHT solvers still to do
This commit is contained in:
@ -39,15 +39,14 @@ scalar meanAlphaCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
mixture.nearInterface()
|
||||
*mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);
|
||||
scalarField sumPhi =
|
||||
mixture.nearInterface()().internalField()
|
||||
*fvc::surfaceSum(mag(phi))().internalField();
|
||||
|
||||
alphaCoNum = max(SfUfbyDelta/mesh.magSf())
|
||||
.value()*runTime.deltaT().value();
|
||||
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
||||
.value()*runTime.deltaT().value();
|
||||
meanAlphaCoNum =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
|
||||
|
||||
@ -457,12 +457,12 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseMixture::nearInterface() const
|
||||
{
|
||||
tmp<surfaceScalarField> tnearInt
|
||||
tmp<volScalarField> tnearInt
|
||||
(
|
||||
new surfaceScalarField
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -477,8 +477,7 @@ Foam::multiphaseMixture::nearInterface() const
|
||||
|
||||
forAllConstIter(PtrDictionary<phase>, phases_, iter)
|
||||
{
|
||||
surfaceScalarField alphaf = fvc::interpolate(iter());
|
||||
tnearInt() = max(tnearInt(), pos(alphaf - 0.01)*pos(0.99 - alphaf));
|
||||
tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
|
||||
}
|
||||
|
||||
return tnearInt;
|
||||
|
||||
@ -258,7 +258,7 @@ public:
|
||||
|
||||
//- Indicator of the proximity of the interface
|
||||
// Field values are 1 near and 0 away for the interface.
|
||||
tmp<surfaceScalarField> nearInterface() const;
|
||||
tmp<volScalarField> nearInterface() const;
|
||||
|
||||
//- Solve for the mixture phase-fractions
|
||||
void solve();
|
||||
|
||||
Reference in New Issue
Block a user