INT: Additional integration updates/clean-up
This commit is contained in:
parent
ec326f5a4c
commit
647e1c892d
@ -175,12 +175,28 @@ tmp<surfaceScalarField> ddtScheme<Type>::fvcDdtPhiCoeff
|
|||||||
|
|
||||||
if (ddtPhiCoeff_ < 0)
|
if (ddtPhiCoeff_ < 0)
|
||||||
{
|
{
|
||||||
|
// v1712 and earlier
|
||||||
|
// ddtCouplingCoeff -= min
|
||||||
|
// (
|
||||||
|
// mag(phiCorr)
|
||||||
|
// /(mag(phi) + dimensionedScalar("small", phi.dimensions(), SMALL)),
|
||||||
|
// scalar(1)
|
||||||
|
// );
|
||||||
|
|
||||||
|
// See note below re: commented code
|
||||||
ddtCouplingCoeff -= min
|
ddtCouplingCoeff -= min
|
||||||
(
|
(
|
||||||
|
// mag(phiCorr)
|
||||||
|
//*mesh().time().deltaT()*mag(mesh().deltaCoeffs())/mesh().magSf(),
|
||||||
|
// scalar(1)
|
||||||
mag(phiCorr)
|
mag(phiCorr)
|
||||||
*mesh().time().deltaT()*mesh().deltaCoeffs()/mesh().magSf(),
|
*mesh().time().deltaT()*mesh().deltaCoeffs()/mesh().magSf(),
|
||||||
scalar(1)
|
scalar(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Note: setting oriented to false to avoid having to use mag(deltaCoeffs)
|
||||||
|
// - the deltaCoeffs field is always positive (scalars)
|
||||||
|
ddtCouplingCoeff.setOriented(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -268,19 +268,20 @@ void Foam::singleCellFvMesh::agglomerateMesh
|
|||||||
}
|
}
|
||||||
addFvPatches(newPatches);
|
addFvPatches(newPatches);
|
||||||
|
|
||||||
|
const label nFace = patchFaces.size();
|
||||||
|
|
||||||
// Actually change the mesh. // Owner, neighbour is trivial
|
// Actually change the mesh. // Owner, neighbour is trivial
|
||||||
resetPrimitives
|
resetPrimitives
|
||||||
(
|
(
|
||||||
autoPtr<pointField>::New(std::move(boundaryPoints)),
|
autoPtr<pointField>::New(std::move(boundaryPoints)),
|
||||||
autoPtr<faceList>::New(std::move(patchFaces)),
|
autoPtr<faceList>::New(std::move(patchFaces)),
|
||||||
autoPtr<labelList>::New(patchFaces.size(), Zero), // owner
|
autoPtr<labelList>::New(nFace, Zero), // owner
|
||||||
autoPtr<labelList>::New(), // neighbour
|
autoPtr<labelList>::New(), // neighbour
|
||||||
patchSizes,
|
patchSizes,
|
||||||
patchStarts,
|
patchStarts,
|
||||||
true // syncPar
|
true // syncPar
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Adapt the zones
|
// Adapt the zones
|
||||||
cellZones().clear();
|
cellZones().clear();
|
||||||
cellZones().setSize(mesh.cellZones().size());
|
cellZones().setSize(mesh.cellZones().size());
|
||||||
|
Loading…
Reference in New Issue
Block a user