Bugfix: consistent velocity reconstruction
Make fluxes relative before correcting velocity boundary conditions and call correct boundary conditions before interpolating and storing the values in the faceU field.
This commit is contained in:
parent
7bc0c8b3d8
commit
8e70e3fb53
1 changed files with 7 additions and 7 deletions
|
@ -1019,12 +1019,19 @@ void Foam::solutionControl::reconstructTransientVelocity
|
|||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
// If the mesh is moving, flux needs to be relative before boundary
|
||||
// conditions for velocity are corrected. VV and IG, 4/Jan/2016.
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
// Reconstruct the velocity using all the components from original equation
|
||||
U = 1.0/(1.0/rAU + ddtUEqn.A())*
|
||||
(
|
||||
U/rAU + ddtUEqn.H() - fvc::grad(p)
|
||||
);
|
||||
|
||||
// Correct boundary conditions with relative flux
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
// Get name and the corresponding index
|
||||
const word& UName = U.name();
|
||||
const label i = indices_[UName];
|
||||
|
@ -1067,13 +1074,6 @@ void Foam::solutionControl::reconstructTransientVelocity
|
|||
// Now that the normal component is zero, add the normal component from
|
||||
// conservative flux
|
||||
faceU += phi*rSf;
|
||||
|
||||
// If the mesh is moving, flux needs to be relative before boundary
|
||||
// conditions for velocity are corrected. VV and IG, 4/Jan/2016.
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
// Correct boundary conditions with relative flux
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue