mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: extrudeMesh: make edge collape optional
This commit is contained in:
@ -238,6 +238,25 @@ int main(int argc, char *argv[])
|
||||
dict.lookup("constructFrom")
|
||||
);
|
||||
|
||||
// Any merging of small edges
|
||||
const scalar mergeTol(dict.lookupOrDefault<scalar>("mergeTol", 1e-4));
|
||||
|
||||
Info<< "Extruding from " << ExtrudeModeNames[mode]
|
||||
<< " using model " << model().type() << endl;
|
||||
if (flipNormals)
|
||||
{
|
||||
Info<< "Flipping normals before extruding" << endl;
|
||||
}
|
||||
if (mergeTol > 0)
|
||||
{
|
||||
Info<< "Collapsing edges < " << mergeTol << " of bounding box" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Not collapsing any edges after extrusion" << endl;
|
||||
}
|
||||
Info<< endl;
|
||||
|
||||
|
||||
// Generated mesh (one of either)
|
||||
autoPtr<fvMesh> meshFromMesh;
|
||||
@ -715,7 +734,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
const boundBox& bb = mesh.bounds();
|
||||
const vector span = bb.span();
|
||||
const scalar mergeDim = 1e-4 * bb.minDim();
|
||||
const scalar mergeDim = mergeTol * bb.minDim();
|
||||
|
||||
Info<< "Mesh bounding box : " << bb << nl
|
||||
<< " with span : " << span << nl
|
||||
@ -726,6 +745,7 @@ int main(int argc, char *argv[])
|
||||
// Collapse edges
|
||||
// ~~~~~~~~~~~~~~
|
||||
|
||||
if (mergeDim > 0)
|
||||
{
|
||||
Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;
|
||||
|
||||
|
||||
@ -88,4 +88,8 @@ sigmaRadialCoeffs
|
||||
// degree wedges.
|
||||
mergeFaces false; //true;
|
||||
|
||||
// Merge small edges. Fraction of bounding box.
|
||||
mergeTol 0;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -10,12 +10,14 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
object extrudeMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// What to extrude:
|
||||
// patch : from patch of another case ('sourceCase')
|
||||
// mesh : as above but with original case included
|
||||
// surface : from externally read surface
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "../wingMotion_snappyHexMesh";
|
||||
@ -24,7 +26,8 @@ sourcePatches (front);
|
||||
// If construct from patch: patch to use for back (can be same as sourcePatch)
|
||||
exposedPatchName back;
|
||||
|
||||
// Flip surface normals before usage.
|
||||
// Flip surface normals before usage. Valid only for extrude from surface or
|
||||
// patch.
|
||||
flipNormals false;
|
||||
|
||||
//- Linear extrusion in point-normal direction
|
||||
@ -41,7 +44,10 @@ linearNormalCoeffs
|
||||
|
||||
// Do front and back need to be merged? Usually only makes sense for 360
|
||||
// degree wedges.
|
||||
mergeFaces false;
|
||||
mergeFaces false; //true;
|
||||
|
||||
// Merge small edges. Fraction of bounding box.
|
||||
mergeTol 0;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user