Files
OpenFOAM-12/tutorials
Henry Weller a346040bcb MomentumTransportModels::ReynoldsStress: Improved the R-U coupling stabilisation algorithm
On unstructured collocated meshes the Reynolds stress tends to decouple from the
velocity creating pronounced staggering patterns in the solution.  This effect
is reduced or eliminated by a special coupling algorithm which replaces the
gradient diffusion component of the Reynolds stress with the equivalent compact
representation on the mesh, i.e. div-grad with Laplacian in the DivDevRhoReff function:

template<class BasicMomentumTransportModel>
template<class RhoFieldType>
Foam::tmp<Foam::fvVectorMatrix>
Foam::ReynoldsStress<BasicMomentumTransportModel>::DivDevRhoReff
(
    const RhoFieldType& rho,
    volVectorField& U
) const
{
    tmp<volTensorField> tgradU = fvc::grad(U);
    const volTensorField& gradU = tgradU();
    const surfaceTensorField gradUf(fvc::interpolate(gradU));

    // Interpolate Reynolds stress to the faces
    // with either a stress or velocity coupling correction
    const surfaceVectorField Refff
    (
        (this->mesh().Sf() & fvc::interpolate(R_))

        // Stress coupling
      + couplingFactor_
       *(this->mesh().Sf() & fvc::interpolate(this->nut()*gradU))

        // or velocity gradient coupling
   // + couplingFactor_
   //  *fvc::interpolate(this->nut())*(this->mesh().Sf() & gradUf)

      - fvc::interpolate(couplingFactor_*this->nut() + this->nu())
       *this->mesh().magSf()*fvc::snGrad(U)
      - fvc::interpolate(this->nu())*(this->mesh().Sf() & dev2(gradUf.T()))
    );

    return
    (
        fvc::div(fvc::interpolate(this->alpha_*rho)*Refff)
      - correction(fvm::laplacian(this->alpha_*rho*this->nuEff(), U))
    );
}

In the above two options for the coupling term are provided, one based on the
stress correction (un-commented) and an alternative based an the velocity
gradient correction (commented).  Tests run so far indicate that the stress
correction provides better coupling while minimising the error introduced.

A new tutorial case ductSecondaryFlow is provided which demonstrates the updated
coupling algorithm on the simulation of the classic secondary flow generated in
rectangular ducts.
2022-05-10 15:54:03 +01:00
..