Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
Henry
2014-01-20 12:49:39 +00:00
16 changed files with 266643 additions and 55 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -198,6 +198,13 @@ int main(int argc, char *argv[])
args args
); );
// Note that we do not set the runTime time so it is still the
// one set through the controlDict. The -time option
// only affects the selected set of times from processor0.
// - can be illogical
// + any point motion handled through mesh.readUpdate
if (timeDirs.empty()) if (timeDirs.empty())
{ {
FatalErrorIn(args.executable()) FatalErrorIn(args.executable())

View File

@ -1460,41 +1460,47 @@ void Foam::extendedEdgeMesh::writeStats(Ostream& os) const
{ {
edgeMesh::writeStats(os); edgeMesh::writeStats(os);
os << indent << "point classification (size and offset) :" << nl; os << indent << "point classification :" << nl;
os << incrIndent; os << incrIndent;
os << indent << "convex feature points : " os << indent << "convex feature points : "
<< setw(8) << concaveStart_-convexStart_ << setw(8) << concaveStart_-convexStart_
<< setw(8) << convexStart_ << nl; //<< setw(8) << convexStart_
<< nl;
os << indent << "concave feature points : " os << indent << "concave feature points : "
<< setw(8) << mixedStart_-concaveStart_ << setw(8) << mixedStart_-concaveStart_
<< setw(8) << concaveStart_ << nl; //<< setw(8) << concaveStart_
<< nl;
os << indent << "mixed feature points : " os << indent << "mixed feature points : "
<< setw(8) << nonFeatureStart_-mixedStart_ << setw(8) << nonFeatureStart_-mixedStart_
<< setw(8) << mixedStart_ << nl; //<< setw(8) << mixedStart_
<< nl;
os << indent << "other (non-feature) points : " os << indent << "other (non-feature) points : "
<< setw(8) << points().size()-nonFeatureStart_ << setw(8) << points().size()-nonFeatureStart_
<< setw(8) << nonFeatureStart_ << nl; //<< setw(8) << nonFeatureStart_
<< nl;
os << decrIndent; os << decrIndent;
os << indent << "edge classification (size and offset) :" << nl; os << indent << "edge classification :" << nl;
os << incrIndent; os << incrIndent;
os << indent << "external (convex angle) edges : " os << indent << "external (convex angle) edges : "
<< setw(8) << internalStart_-externalStart_ << setw(8) << internalStart_-externalStart_
<< setw(8) << externalStart_ //<< setw(8) << externalStart_
<< nl; << nl;
os << indent << "internal (concave angle) edges : " os << indent << "internal (concave angle) edges : "
<< setw(8) << flatStart_-internalStart_ << setw(8) << flatStart_-internalStart_
<< setw(8) << internalStart_ //<< setw(8) << internalStart_
<< nl; << nl;
os << indent << "flat region edges : " os << indent << "flat region edges : "
<< setw(8) << openStart_-flatStart_ << setw(8) << openStart_-flatStart_
<< setw(8) << flatStart_ << nl; //<< setw(8) << flatStart_
<< nl;
os << indent << "open edges : " os << indent << "open edges : "
<< setw(8) << multipleStart_-openStart_ << setw(8) << multipleStart_-openStart_
<< setw(8) << openStart_ << nl; //<< setw(8) << openStart_
<< nl;
os << indent << "multiply connected edges : " os << indent << "multiply connected edges : "
<< setw(8) << edges().size()-multipleStart_ << setw(8) << edges().size()-multipleStart_
<< setw(8) << multipleStart_ //<< setw(8) << multipleStart_
<< nl; << nl;
os << decrIndent; os << decrIndent;
} }

View File

@ -1375,14 +1375,14 @@ void Foam::autoSnapDriver::releasePointsNextToMultiPatch
patchAttraction[pointI] = rawPatchAttraction[pointI]; patchAttraction[pointI] = rawPatchAttraction[pointI];
patchConstraints[pointI] = rawPatchConstraints[pointI]; patchConstraints[pointI] = rawPatchConstraints[pointI];
if (multiPatchStr.valid()) //if (multiPatchStr.valid())
{ //{
Pout<< "Adding constraint on multiPatchPoint:" // Pout<< "Adding constraint on multiPatchPoint:"
<< pp.localPoints()[pointI] // << pp.localPoints()[pointI]
<< " constraint:" << patchConstraints[pointI] // << " constraint:" << patchConstraints[pointI]
<< " attraction:" << patchAttraction[pointI] // << " attraction:" << patchAttraction[pointI]
<< endl; // << endl;
} //}
} }
} }
} }
@ -2153,6 +2153,28 @@ void Foam::autoSnapDriver::determineFeatures
); );
} }
} }
else
{
// No multi-patch snapping
nearInfo = findNearFeaturePoint
(
false, // isRegionPoint
pp,
snapDist,
pointI,
estimatedPt,
// Feature-point to pp point
pointAttractor,
pointConstraints,
// Feature-edge to pp point
edgeAttractors,
edgeConstraints,
// pp point to nearest feature
patchAttraction,
patchConstraints
);
}
const pointIndexHit& info = nearInfo.second(); const pointIndexHit& info = nearInfo.second();
if (info.hit() && featurePointStr.valid()) if (info.hit() && featurePointStr.valid())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -837,6 +837,7 @@ void Foam::mappedPatchBase::calcAMI() const
surfPtr(), surfPtr(),
faceAreaIntersect::tmMesh, faceAreaIntersect::tmMesh,
AMIPatchToPatchInterpolation::imFaceAreaWeight, AMIPatchToPatchInterpolation::imFaceAreaWeight,
-1,
AMIReverse_ AMIReverse_
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -92,6 +92,7 @@ void Foam::regionCoupledBase::resetAMI() const
surfPtr(), surfPtr(),
faceAreaIntersect::tmMesh, faceAreaIntersect::tmMesh,
AMIPatchToPatchInterpolation::imFaceAreaWeight, AMIPatchToPatchInterpolation::imFaceAreaWeight,
-1,
AMIReverse_ AMIReverse_
) )
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -243,6 +243,7 @@ Foam::regionModels::regionModel::interRegionAMI
nbrP, nbrP,
faceAreaIntersect::tmMesh, faceAreaIntersect::tmMesh,
AMIPatchToPatchInterpolation::imFaceAreaWeight, AMIPatchToPatchInterpolation::imFaceAreaWeight,
-1,
flip flip
) )
); );
@ -284,6 +285,7 @@ Foam::regionModels::regionModel::interRegionAMI
nbrP, nbrP,
faceAreaIntersect::tmMesh, faceAreaIntersect::tmMesh,
AMIPatchToPatchInterpolation::imFaceAreaWeight, AMIPatchToPatchInterpolation::imFaceAreaWeight,
-1,
flip flip
) )
); );

View File

@ -420,6 +420,7 @@ Foam::meshToMesh::patchAMIs() const
tgtPP, tgtPP,
faceAreaIntersect::tmMesh, faceAreaIntersect::tmMesh,
interpolationMethodAMI(method_), interpolationMethodAMI(method_),
-1,
true // flip target patch since patch normals are aligned true // flip target patch since patch normals are aligned
) )
); );

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
object alpha.water; object alpha.phase1;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory
# Generate mesh # Generate mesh
./Allrun-pre ./Allrun-pre
## Run simulation # Run simulation
./Allrun-simulation ./Allrun-simulation
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -93,17 +93,17 @@ runParallel foamyHexMesh $nProcs
runParallel collapseEdges $nProcs -collapseFaces -latestTime runParallel collapseEdges $nProcs -collapseFaces -latestTime
mv log.collapseEdges log.collapseFaces mv log.collapseEdges log.collapseFaces
\cp system/collapseDict.indirectPatchFaces system/collapseDict #\cp system/collapseDict.indirectPatchFaces system/collapseDict
runParallel collapseEdges $nProcs -collapseFaceSet indirectPatchFaces -latestTime #runParallel collapseEdges $nProcs -collapseFaceSet indirectPatchFaces -latestTime
mv log.collapseEdges log.collapseFaceSet #mv log.collapseEdges log.collapseFaceSet
runParallel checkMesh $nProcs -allTopology -allGeometry -latestTime runParallel checkMesh $nProcs -allTopology -allGeometry -latestTime
runApplication reconstructParMesh -latestTime runApplication reconstructParMesh -latestTime
# Copy the mesh into polyMesh and delete the 102 directory # Copy the mesh into polyMesh and delete the 102 directory
\cp -r 102/polyMesh constant \cp -r 101/polyMesh constant
\rm -rf 102 \rm -rf 101
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -15,16 +15,16 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases (water air); phases (phase1 phase2);
water phase1
{ {
transportModel Newtonian; transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 300; rho rho [ 1 -3 0 0 0 0 0 ] 300;
} }
air phase2
{ {
transportModel Newtonian; transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-6; nu nu [ 0 2 -1 0 0 0 0 ] 1e-6;

View File

@ -81,15 +81,8 @@ baffles
matchTolerance 0.0001; matchTolerance 0.0001;
neighbourPatch AMI2; neighbourPatch AMI2;
transform noOrdering; transform noOrdering;
// Switch to zero-gradient for low weights
lowWeightCorrection 0.2; lowWeightCorrection 0.2;
// Note: since imperfect meshing around feature edge make
// sure to project both sides onto 'proper' geometry to
// avoid errors leading to zero weights
surface
{
type triSurfaceMesh;
name rotating.stl;
}
} }
slave slave
@ -101,11 +94,6 @@ baffles
neighbourPatch AMI1; neighbourPatch AMI1;
transform noOrdering; transform noOrdering;
lowWeightCorrection 0.2; lowWeightCorrection 0.2;
surface
{
type triSurfaceMesh;
name rotating.stl;
}
} }
} }
} }

View File

@ -30,8 +30,7 @@ simpleCoeffs
hierarchicalCoeffs hierarchicalCoeffs
{ {
n ( 2 2 2 ); n ( 2 2 2 );
delta 0.2; // rotate a bit to avoid baffle topology delta 0.001;
// at processor boundary
order xyz; order xyz;
} }

View File

@ -17,7 +17,7 @@ FoamFile
solvers solvers
{ {
alpha.water alpha.phase1
{ {
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 2; nAlphaSubCycles 2;
@ -66,16 +66,15 @@ solvers
"U.*" "U.*"
{ {
solver smoothSolver; solver smoothSolver;
smoother GaussSeidel; smoother symGaussSeidel;
tolerance 1e-6; tolerance 1e-6;
relTol 0; relTol 0;
nSweeps 1;
} }
"(T|k|epsilon).*" "(T|k|epsilon).*"
{ {
solver PBiCG; solver smoothSolver;
preconditioner DILU; smoother symGaussSeidel;
tolerance 1e-6; tolerance 1e-6;
relTol 0; relTol 0;
} }

View File

@ -17,7 +17,7 @@ FoamFile
defaultFieldValues defaultFieldValues
( (
volScalarFieldValue alpha.water 1 volScalarFieldValue alpha.phase1 1
); );
regions regions
@ -27,7 +27,7 @@ regions
box (-4 -4 -1) (4 4 0.74); box (-4 -4 -1) (4 4 0.74);
fieldValues fieldValues
( (
volScalarFieldValue alpha.water 0 volScalarFieldValue alpha.phase1 0
); );
} }
); );