solvers::*:moveMesh: rationalised the application of correctPhi
Flux correction is now applied if either the topology changed or the mesh is moving and correctPhi is true. This strategy allows moving mesh cases without topology change to be run without any change to the fluxes which is appropriate for solid-body motion of the entire domain or a rotating sub-domain with NCC.
This commit is contained in:
@ -35,7 +35,7 @@ void Foam::solvers::VoFSolver::moveMesh()
|
||||
{
|
||||
if
|
||||
(
|
||||
correctPhi
|
||||
(correctPhi || mesh.topoChanged())
|
||||
&& divergent()
|
||||
&& !divU.valid()
|
||||
)
|
||||
@ -65,34 +65,31 @@ void Foam::solvers::VoFSolver::moveMesh()
|
||||
|
||||
correctUphiBCs(U_, phi, true);
|
||||
|
||||
if (correctPhi)
|
||||
if (divU.valid())
|
||||
{
|
||||
if (divU.valid())
|
||||
{
|
||||
CorrectPhi
|
||||
(
|
||||
phi,
|
||||
U,
|
||||
p_rgh,
|
||||
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
|
||||
divU(),
|
||||
pressureReference(),
|
||||
pimple
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
CorrectPhi
|
||||
(
|
||||
phi,
|
||||
U,
|
||||
p_rgh,
|
||||
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
|
||||
geometricZeroField(),
|
||||
pressureReference(),
|
||||
pimple
|
||||
);
|
||||
}
|
||||
CorrectPhi
|
||||
(
|
||||
phi,
|
||||
U,
|
||||
p_rgh,
|
||||
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
|
||||
divU(),
|
||||
pressureReference(),
|
||||
pimple
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
CorrectPhi
|
||||
(
|
||||
phi,
|
||||
U,
|
||||
p_rgh,
|
||||
surfaceScalarField("rAUf", fvc::interpolate(rAU())),
|
||||
geometricZeroField(),
|
||||
pressureReference(),
|
||||
pimple
|
||||
);
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
Reference in New Issue
Block a user