Revert "BUG: snappyHexMesh: attraction distance mapping. Fixes #941."

This reverts commit 708e650990.
This commit is contained in:
mattijs
2019-04-10 10:32:18 +01:00
committed by Andrew Heather
parent 181e0b75d3
commit cbc3953f26
12 changed files with 20 additions and 2377 deletions

View File

@ -153,33 +153,6 @@
surfaceScalarField phir(phic*mixture.nHatf()); surfaceScalarField phir(phic*mixture.nHatf());
DebugVar(phir.oriented());
DebugVar(phiCN().oriented());
DebugVar(alpha1.oriented());
DebugVar(alpha1.oldTime().oriented());
tmp<surfaceScalarField> f1
(
fvc::flux
(
phiCN(),
cnCoeff*alpha1 + (1.0 - cnCoeff)*alpha1.oldTime(),
alphaScheme
)
);
DebugVar(f1().oriented());
tmp<surfaceScalarField> f2
(
fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
);
DebugVar(f2().oriented());
tmp<surfaceScalarField> talphaPhi1Un tmp<surfaceScalarField> talphaPhi1Un
( (
fvc::flux fvc::flux

View File

@ -7,8 +7,6 @@
pDivU = dimensionedScalar("pDivU", p.dimensions()/dimTime, Zero); pDivU = dimensionedScalar("pDivU", p.dimensions()/dimTime, Zero);
DebugVar(fvc::interpolate(rho));
if (thermo->pDivU()) if (thermo->pDivU())
{ {
pDivU = (p*fvc::div(rhoPhi/fvc::interpolate(rho))); pDivU = (p*fvc::div(rhoPhi/fvc::interpolate(rho)));

View File

@ -1,5 +1,4 @@
EXE_INC = \ EXE_INC = \
-g -O0 \
-I../VoF \ -I../VoF \
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \

View File

@ -308,7 +308,7 @@ void Foam::snappySnapDriver::calcNearestFace
( (
labelList(1, zoneSurfi), labelList(1, zoneSurfi),
fc, fc,
sqr(scalarField(faceSnapDist, ppFaces)),// sqr of attract dist sqr(faceSnapDist),// sqr of attract dist
hitSurface, hitSurface,
hitInfo, hitInfo,
hitRegion, hitRegion,
@ -384,7 +384,7 @@ void Foam::snappySnapDriver::calcNearestFace
( (
unzonedSurfaces, unzonedSurfaces,
fc, fc,
sqr(scalarField(faceSnapDist, ppFaces)),// sqr of attract dist sqr(faceSnapDist),// sqr of attract dist
hitSurface, hitSurface,
hitInfo, hitInfo,
hitRegion, hitRegion,

View File

@ -356,13 +356,6 @@ void Foam::searchableSurfacesQueries::findNearest
{ {
// Find nearest. Return -1 or nearest point // Find nearest. Return -1 or nearest point
if (samples.size() != nearestDistSqr.size())
{
FatalErrorInFunction << "Inconsistent sizes. samples:" << samples.size()
<< " search-radius:" << nearestDistSqr.size()
<< exit(FatalError);
}
// Initialise // Initialise
nearestSurfaces.setSize(samples.size()); nearestSurfaces.setSize(samples.size());
nearestSurfaces = -1; nearestSurfaces = -1;
@ -414,14 +407,6 @@ void Foam::searchableSurfacesQueries::findNearest
{ {
// Find nearest. Return -1 or nearest point // Find nearest. Return -1 or nearest point
if (samples.size() != nearestDistSqr.size())
{
FatalErrorInFunction << "Inconsistent sizes. samples:" << samples.size()
<< " search-radius:" << nearestDistSqr.size()
<< exit(FatalError);
}
if (regionIndices.empty()) if (regionIndices.empty())
{ {
findNearest findNearest
@ -485,15 +470,6 @@ void Foam::searchableSurfacesQueries::findNearest
{ {
// Multi-surface findNearest // Multi-surface findNearest
if (start.size() != distSqr.size())
{
FatalErrorInFunction << "Inconsistent sizes. samples:" << start.size()
<< " search-radius:" << distSqr.size()
<< exit(FatalError);
}
vectorField normal; vectorField normal;
List<pointIndexHit> info; List<pointIndexHit> info;

View File

@ -15,11 +15,6 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//DebugSwitches
//{
// fv 2;
//}
application sonicFoam; application sonicFoam;
startFrom latestTime; startFrom latestTime;

View File

@ -41,7 +41,7 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default Gauss linear corrected; //limited corrected 1; //0.5; default Gauss linear limited corrected 0.5;
} }
interpolationSchemes interpolationSchemes

View File

@ -23,13 +23,13 @@ startTime 0;
stopAt endTime; stopAt endTime;
endTime 0.005; endTime 0.5;
deltaT 0.005; deltaT 0.005;
writeControl timeStep; writeControl timeStep;
writeInterval 1; writeInterval 20;
purgeWrite 0; purgeWrite 0;

View File

@ -53,12 +53,12 @@ snGradSchemes
oversetInterpolation oversetInterpolation
{ {
//method cellVolumeWeight; method cellVolumeWeight;
// Faster but less accurate // Faster but less accurate
method trackingInverseDistance; //method trackingInverseDistance;
searchBox (0 0 0)(0.02 0.01 0.01); //searchBox (0 0 0)(0.02 0.01 0.01);
searchBoxDivisions 3{(64 64 1)}; //searchBoxDivisions 3{(64 64 1)};
} }
fluxRequired fluxRequired

View File

@ -78,41 +78,17 @@ boundary
(9 13 12 8) (9 13 12 8)
); );
} }
ACMI1_couple couple1
{ {
type cyclicACMI; type patch;
matchTolerance 0.0001;
neighbourPatch ACMI2_couple;
nonOverlapPatch ACMI1_blockage;
transform noOrdering;
faces faces
( (
(2 6 5 1) (2 6 5 1)
); );
} }
ACMI2_couple couple2
{ {
type cyclicACMI; type patch;
neighbourPatch ACMI1_couple;
nonOverlapPatch ACMI2_blockage;
transform noOrdering;
faces
(
(8 12 15 11)
);
}
ACMI1_blockage
{
type wall;
faces
(
(2 6 5 1)
);
}
ACMI2_blockage
{
type wall;
faces faces
( (
(8 12 15 11) (8 12 15 11)

View File

@ -28,10 +28,7 @@ gradSchemes
divSchemes divSchemes
{ {
div(rhoPhi,U) Gauss linearUpwind grad(U); div(rhoPhi,U) Gauss linearUpwind grad(U);
// div(phi,alpha) Gauss vanLeer; div(phi,alpha) Gauss vanLeer;
div(phi,alpha) Gauss CoBlended 1.0 Minmod 2.0 upwind;
div(phirb,alpha) Gauss linear; div(phirb,alpha) Gauss linear;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;