overset modifications: allow overset pacthes overlap, allow fringe faces walk, mass conservation update

Merged Sergio Ferraris requested to merge feature-overset-coupledPatch into develop


This merge addresses three main topics:

  1. Allow overset patches displace outside the background domain.

  2. Allow fringe faces away from the HOLE cells in the background domain

  3. Some option to improve mass conservation in overset

  4. overset patches can displace outside the domain. The problem of selecting the correct donors was addressed creating a new type of cell type named "POROUS". In these cells, DONORS can't be selected as they lay close to the end of the background domain. Any attempt to find a suitable donor proved to be unstable. Therefore these cells are not interpolated but let connected withing its mesh and solved locally. As these cells are normally close to wall without a proper BC applied , if left unweighted they lead to divergency, to avoid this a small damping effect is introduce using fvOption. Tests showed that damping U is robust enough to keep U-p stable.


/tutorials/multiphase/overInterDyMFoam/twoSquaresOutDomain/ /tutorials/incompressible/overPimpleDyMFoam/rotatingSquare/

The fvOption is as:

limitU { type velocityDampingConstraint; active true; selectionMode cellType; UMax 0; C 1; }

A constant C of '1' seems to be working generally. Of course , the solution on this cell is not accurate as an artificial porous cell is being introduced, on the other hand, cells next to wall will damp U anyway by shear stress.

NOTE: This feature was tested for inverseDistance, trackingInverseDistance, volumeWeight cell stencils. This approach does not support the overlapping of two inset meshes on top of the background mesh.

  1. Allow fringe faces away from the HOLE cells in the background domain

In the overset approach is advantageous if the interpolated cells are far removed from areas were the flow experiences large gradients. Specially next to HOLES cells created by the inset mesh on the background mesh. Initially, the INTERPOLATED cells where located next to the HOLES cells. This created a extra burden to the solver to solve for continuity which resulted in pressure peaks.

As a result we developed a way to make a 'walk' away from the HOLE cells into the bulk of the domain in order to interpolate smoother fields.

To use a different layers for the interpolated cells In the fvSchemes is specified:

oversetInterpolation { method inverseDistance; searchBox (0 0 0)(0.1 0.1 0.1); searchBoxDivisions (130 130 1); holeLayers 4; useLayer 2; }

holeLayers specifies how many layer out of the HOLE cells will be walked. The code will report an average ratio of the volume on each mesh, ideally one. In the obove set up the walk will be done for 4 layers and layer 2 will be used.

Tutorial :

tutorials/incompressible/overPimpleDyMFoam/simpleRotor/ tutorials/multiphase/overInterDyMFoam/floatingBody/ tutorials/multiphase/overInterDyMFoam/rigidBodyHull/

The following is a typical improvement expected on residuals for p:

pResNoLayers pRes4Layers

NOTE: This feature was tested for inverseDistance, trackingInverseDistance, volumeWeight cell stencils This feature was not extensibly tested to work with 1) (overlapping patches). So, the walks to find the layers could need to be reviewed.

  1. Some options to improve mass conservation in overset

The overset solvers were updated to make them more consistent. Experimental keyword were removed. i.e: massFluxInterpolation ddtCorr correctPhi

The new option oversetAdjustPhi adds a flux correction outside the pressure Eq. This flag adjusts the flux in and out of the fringes faces in the inner loop of PIMPLE.

This feature is still experimental as the outcome of this approach is still under investigation. It proved to work in some cases. The flag is specified in the fvSolution:


PIMPLE { momentumPredictor no; nOuterCorrectors 1; nCorrectors 3; nNonOrthogonalCorrectors 0;

oversetAdjustPhi    true;


the mass conservation with and without oversetAdjustPhi for the above tutorial case:

NonOuterMassCorr outerMassCorr

The other option for mass conservation is the implicit correction specified on the field patch as:

free { type overset; massCorrection true; value uniform 300; }

The overset patch was made an lduInterface in order to have a hook inside the linear solver to add a sum(phi) = 0 on fringe faces. It is important to note that this restriction is added in a Amul function and in the linear solvers the actual variable being converged is to the field itself but a pre-condition variable, only the first residuals are calculated using p and its flux. Therefore, the application of this restriction have some theoretical gaps. Nonetheless, the flux balance on these faces out of the linear solver DO satisfy sum(phi) = 0.

See example for overLaplacian


Switching oh/off the massCorrection flag results in a better flux across the overset patch.

This approach wasn't very successful when applied to overInterFoam cases and more study might be needed, even when the sum(phi) does go to zero, the overall conservation is not fully conserved.

NOTE: It was observed that using interpolated cells as donors is possible as far as the relative number is not too large. By default allowInterpolatedDonors is true. But under some circumstance the user might prefer not to use them.

Merge request reports