Merge remote-tracking branch 'origin/develop' into feature-shared-file

This commit is contained in:
mattijs
2016-01-25 16:36:42 +00:00
29 changed files with 1644 additions and 167 deletions

View File

@ -3,7 +3,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-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -3051,7 +3051,7 @@ void Foam::autoLayerDriver::addLayers
// Duplicate points on faceZones that layers are added to // Duplicate points on faceZones that layers are added to
labelList pointToDuplicate; labelList pointToMaster;
{ {
// Check outside of baffles for non-manifoldness // Check outside of baffles for non-manifoldness
@ -3172,7 +3172,7 @@ void Foam::autoLayerDriver::addLayers
if (map.valid()) if (map.valid())
{ {
// Store point duplication // Store point duplication
pointToDuplicate.setSize(mesh.nPoints(), -1); pointToMaster.setSize(mesh.nPoints(), -1);
const labelList& pointMap = map().pointMap(); const labelList& pointMap = map().pointMap();
const labelList& reversePointMap = map().reversePointMap(); const labelList& reversePointMap = map().reversePointMap();
@ -3185,8 +3185,8 @@ void Foam::autoLayerDriver::addLayers
if (newMasterPointI != pointI) if (newMasterPointI != pointI)
{ {
// Found slave. Mark both master and slave // Found slave. Mark both master and slave
pointToDuplicate[pointI] = newMasterPointI; pointToMaster[pointI] = newMasterPointI;
pointToDuplicate[newMasterPointI] = newMasterPointI; pointToMaster[newMasterPointI] = newMasterPointI;
} }
} }
@ -3248,7 +3248,7 @@ void Foam::autoLayerDriver::addLayers
// Now we have // Now we have
// - mesh with optional baffles and duplicated points for faceZones // - mesh with optional baffles and duplicated points for faceZones
// where layers are to be added // where layers are to be added
// - pointToDuplicate : correspondence for duplicated points // - pointToMaster : correspondence for duplicated points
// - baffles : list of pairs of faces // - baffles : list of pairs of faces
@ -3976,13 +3976,26 @@ void Foam::autoLayerDriver::addLayers
} }
// Use geometric detection of points-to-be-merged
// Update numbering of baffles // - detect any boundary face created from a duplicated face (=baffle)
// - on these mark any point created from a duplicated point
if (returnReduce(pointToMaster.size(), sumOp<label>()))
{ {
// From old mesh face to corresponding newMesh boundary face. // Estimate number of points-to-be-merged
// (we cannot just use faceMap or reverseFaceMap here since DynamicList<label> candidates(baffles.size()*4);
// multiple faces originate from the old face)
labelList oldMeshToNewMesh(map().nOldFaces(), -1); // Mark whether old face was on baffle
PackedBoolList oldBaffleFace(map().nOldFaces());
forAll(baffles, i)
{
const labelPair& baffle = baffles[i];
oldBaffleFace[baffle[0]] = true;
oldBaffleFace[baffle[1]] = true;
}
// Collect candidate if
// - point on boundary face originating from baffle
// - and point originating from duplicate
for for
( (
label faceI = mesh.nInternalFaces(); label faceI = mesh.nInternalFaces();
@ -3991,139 +4004,75 @@ void Foam::autoLayerDriver::addLayers
) )
{ {
label oldFaceI = map().faceMap()[faceI]; label oldFaceI = map().faceMap()[faceI];
if (oldFaceI != -1 && oldBaffleFace[oldFaceI])
if (oldFaceI != -1)
{ {
oldMeshToNewMesh[oldFaceI] = faceI; const face& f = mesh.faces()[faceI];
} forAll(f, fp)
}
label newI = 0;
forAll(baffles, i)
{ {
const labelPair& p = baffles[i]; label pointI = f[fp];
label oldPointI = map().pointMap()[pointI];
labelPair newB(oldMeshToNewMesh[p[0]], oldMeshToNewMesh[p[1]]); if (pointToMaster[oldPointI] != -1)
if (newB[0] != -1 && newB[1] != -1)
{ {
baffles[newI++] = newB; candidates.append(pointI);
}
} }
} }
baffles.setSize(newI);
} }
// Do geometric merge. Ideally we'd like to use a topological
// Update numbering of pointToDuplicate // merge but we've thrown away all layer-wise addressing when
if (returnReduce(pointToDuplicate.size(), sumOp<label>())) // throwing away addPatchCellLayer engine. Also the addressing
{ // is extremely complicated. There is no problem with merging
// The problem is that pointToDuplicate is valid for the old // too many points; the problem would be if merging baffles.
// boundary points which are now internal. We need to find the // Trust mergeZoneBaffles to do sufficient checks.
// corresponding new boundary point. labelList oldToNew;
label nNew = mergePoints
List<labelPair> mergePointBaffles
( (
meshRefinement::subsetBaffles pointField(mesh.points(), candidates),
( meshRefiner_.mergeDistance(),
mesh, false,
internalOrBaffleFaceZones, oldToNew
baffles
)
); );
Info<< "Detected "
<< returnReduce(mergePointBaffles.size(), sumOp<label>())
<< " baffles to merge points across" << nl << endl;
// Extract points to be merged (i.e. multiple points originating
// from a single one)
label nPointPairs = 0; labelListList newToOld(invertOneToMany(nNew, oldToNew));
forAll(pointToDuplicate, oldPointI)
// Extract points with more than one old one
pointToMaster.setSize(mesh.nPoints());
pointToMaster = -1;
forAll(newToOld, newI)
{ {
label otherOldPointI = pointToDuplicate[oldPointI]; const labelList& oldPoints = newToOld[newI];
if (otherOldPointI != -1) if (oldPoints.size() > 1)
{ {
nPointPairs++; labelList meshPoints
(
UIndirectList<label>(candidates, oldPoints)
);
label masterI = min(meshPoints);
forAll(meshPoints, i)
{
pointToMaster[meshPoints[i]] = masterI;
} }
} }
const labelList& pointMap = map().pointMap();
// 1. Construct map from old (possibly) internal point to
// new boundary point
Map<label> oldPointToBoundaryPoint(2*nPointPairs);
forAll(mergePointBaffles, i)
{
const labelPair& baffle = mergePointBaffles[i];
forAll(baffle, j)
{
const face& f = mesh.faces()[baffle[j]];
forAll(f, fp)
{
label pointI = f[fp];
label oldPointI = pointMap[pointI];
if (pointToDuplicate[oldPointI] != -1)
{
oldPointToBoundaryPoint.insert(oldPointI, pointI);
}
} }
} }
} }
// 2. Pick up old internal point
labelList oldPointToDuplicate(pointToDuplicate.xfer());
pointToDuplicate.setSize(mesh.nPoints(), -1);
forAll(mergePointBaffles, i)
{
const labelPair& baffle = mergePointBaffles[i];
forAll(baffle, j)
{
const face& f = mesh.faces()[baffle[j]];
forAll(f, fp)
{
label pointI = f[fp];
label oldPointI = pointMap[pointI];
label oldDupI = oldPointToDuplicate[oldPointI];
if (oldDupI != -1)
{
label newPointI = oldPointToBoundaryPoint[oldDupI];
pointToDuplicate[pointI] = newPointI;
}
}
}
}
// Check
forAll(pointToDuplicate, pointI)
{
label dupI = pointToDuplicate[pointI];
if (dupI != -1)
{
const point& pt = mesh.points()[pointI];
const point& dupPt = mesh.points()[dupI];
if (mag(pt-dupPt) > meshRefiner_.mergeDistance())
{
WarningInFunction
<< "Trying to merge points "
<< pointI << " at:" << pt
<< "and " << dupI << " at:" << dupPt
<< " distance " << mag(pt-dupPt)
<< endl;
}
}
}
}
}
// Count duplicate points // Count duplicate points
label nPointPairs = 0; label nPointPairs = 0;
forAll(pointToDuplicate, pointI) forAll(pointToMaster, pointI)
{ {
label otherPointI = pointToDuplicate[pointI]; label otherPointI = pointToMaster[pointI];
if (otherPointI != -1) if (otherPointI != -1)
{ {
nPointPairs++; nPointPairs++;
@ -4145,9 +4094,9 @@ void Foam::autoLayerDriver::addLayers
+ ".obj" + ".obj"
); );
Info<< "Points to be merged to " << str.name() << endl; Info<< "Points to be merged to " << str.name() << endl;
forAll(pointToDuplicate, pointI) forAll(pointToMaster, pointI)
{ {
label otherPointI = pointToDuplicate[pointI]; label otherPointI = pointToMaster[pointI];
if (otherPointI != -1) if (otherPointI != -1)
{ {
const point& pt = mesh.points()[pointI]; const point& pt = mesh.points()[pointI];
@ -4158,7 +4107,7 @@ void Foam::autoLayerDriver::addLayers
} }
autoPtr<mapPolyMesh> map = meshRefiner_.mergePoints(pointToDuplicate); autoPtr<mapPolyMesh> map = meshRefiner_.mergePoints(pointToMaster);
if (map.valid()) if (map.valid())
{ {
inplaceReorder(map().reverseCellMap(), cellNLayers); inplaceReorder(map().reverseCellMap(), cellNLayers);
@ -4358,8 +4307,64 @@ void Foam::autoLayerDriver::doLayers
<< endl; << endl;
bool faceZoneOnCoupledFace = false;
if (!preBalance)
{
// Check if there are faceZones on processor boundaries. This
// requires balancing to move them off the processor boundaries.
// Is face on a faceZone
PackedBoolList isExtrudedZoneFace(mesh.nFaces());
{
// Add contributions from faceZones that get layers
const faceZoneMesh& fZones = mesh.faceZones();
forAll(fZones, zoneI)
{
const faceZone& fZone = fZones[zoneI];
const word& fzName = fZone.name();
label mpI, spI;
surfaceZonesInfo::faceZoneType fzType;
meshRefiner_.getFaceZoneInfo(fzName, mpI, spI, fzType);
if (numLayers[mpI] > 0 || numLayers[spI])
{
forAll(fZone, i)
{
isExtrudedZoneFace[fZone[i]] = true;
}
}
}
}
PackedBoolList intOrCoupled
(
syncTools::getInternalOrCoupledFaces(mesh)
);
for
(
label faceI = mesh.nInternalFaces();
faceI < mesh.nFaces();
faceI++
)
{
if (intOrCoupled[faceI] && isExtrudedZoneFace[faceI])
{
faceZoneOnCoupledFace = true;
break;
}
}
reduce(faceZoneOnCoupledFace, orOp<bool>());
}
// Balance // Balance
if (Pstream::parRun() && preBalance) if (Pstream::parRun() && (preBalance || faceZoneOnCoupledFace))
{ {
Info<< nl Info<< nl
<< "Doing initial balancing" << nl << "Doing initial balancing" << nl
@ -4396,21 +4401,25 @@ void Foam::autoLayerDriver::doLayers
// for flipped ones // for flipped ones
const labelList& cellIDs = fZone.slaveCells(); const labelList& cellIDs = fZone.slaveCells();
forAll(cellIDs, i) forAll(cellIDs, i)
{
if (cellIDs[i] >= 0)
{ {
cellWeights[cellIDs[i]] += numLayers[mpI]; cellWeights[cellIDs[i]] += numLayers[mpI];
} }
} }
}
if (numLayers[spI] > 0) if (numLayers[spI] > 0)
{ {
const labelList& cellIDs = fZone.masterCells(); const labelList& cellIDs = fZone.masterCells();
forAll(cellIDs, i) forAll(cellIDs, i)
{
if (cellIDs[i] >= 0)
{ {
cellWeights[cellIDs[i]] += numLayers[mpI]; cellWeights[cellIDs[i]] += numLayers[mpI];
} }
} }
} }
}
// Balance mesh (and meshRefinement). Restrict faceZones to // Balance mesh (and meshRefinement). Restrict faceZones to
// be on internal faces only since they will be converted into // be on internal faces only since they will be converted into

View File

@ -3,7 +3,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-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -1911,12 +1911,31 @@ void Foam::autoRefineDriver::doRefine
0 // min cells to refine 0 // min cells to refine
); );
if
(
max(meshRefiner_.surfaces().maxGapLevel()) > 0
|| max(meshRefiner_.shells().maxGapLevel()) > 0
)
{
// In case we use automatic gap level refinement do some pre-refinement
// (fast) since it is so slow.
// Refine based on surface
surfaceOnlyRefine
(
refineParams,
20 // maxIter
);
// Refine cells that contain a gap // Refine cells that contain a gap
smallFeatureRefine smallFeatureRefine
( (
refineParams, refineParams,
100 // maxIter 100 // maxIter
); );
}
// Refine based on surface // Refine based on surface
surfaceOnlyRefine surfaceOnlyRefine

View File

@ -3,7 +3,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-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -1499,9 +1499,21 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
Pout<< " " << procI << '\t' << nProcCells[procI] << endl; Pout<< " " << procI << '\t' << nProcCells[procI] << endl;
} }
Pout<< endl; Pout<< endl;
}
// Do actual sending/receiving of mesh
map = distributor.distribute(distribution);
// Update numbering of meshRefiner
distribute(map);
// Set correct instance (for if overwrite)
mesh_.setInstance(timeName());
setInstance(mesh_.facesInstance());
if (keepZoneFaces)
if (debug && keepZoneFaces)
{ {
const faceZoneMesh& fZones = mesh_.faceZones(); const faceZoneMesh& fZones = mesh_.faceZones();
const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
@ -1529,17 +1541,6 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
} }
} }
// Do actual sending/receiving of mesh
map = distributor.distribute(distribution);
// Update numbering of meshRefiner
distribute(map);
// Set correct instance (for if overwrite)
mesh_.setInstance(timeName());
setInstance(mesh_.facesInstance());
}
return map; return map;
} }

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
wall
{
type uniformFixedValue;
uniformValue (0 0 0);
}
upperWall
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
wall
{
type zeroGradient;
}
upperWall
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.00015;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
wall
{
type fixedValue;
value $internalField;
}
upperWall
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 5e-07;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
upperWall
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type nutkRoughWallFunction;
Ks uniform 100e-6;
Cs uniform 0.5;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 2;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
upperWall
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type omegaWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
wall
{
type fixedFluxPressure;
phi phiAbs;
value uniform 0;
}
upperWall
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,17 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove surface and features
\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
rm -rf 0 > /dev/null 2>&1
cleanCase
\rm -f constant/polyMesh/boundary
\cp system/controlDict_run system/controlDict

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
#runApplication `getApplication`
runParallel `getApplication` 5
unset FOAM_SIGFPE
runParallel -log log.reconstruct redistributePar 5 -reconstruct
# A bit more testing of decomposing
\cp system/controlDict_nextWrite system/controlDict
runParallel -log log.decompose redistributePar 5 -decompose -latestTime
runParallel -log log.interDyMFoam_restart `getApplication` 5
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,27 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# copy motorbike surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
runApplication surfaceFeatureExtract
runApplication blockMesh
#runApplication snappyHexMesh -overwrite
#\rm -f constant/polyMesh/refinementHistory*
# - set the initial fields
#cp -rf 0.org 0
#runApplication setFields
runApplication decomposePar -force
runParallel snappyHexMesh 5 -overwrite
ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory
# - set the initial fields
ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} cp -r 0.org ./{}/0
runParallel setFields 5

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicRefineFvMesh;
dynamicRefineFvMeshCoeffs
{
// How often to refine
refineInterval 1;
// Field to base refinement on
field alpha.water;
// Refine field inbetween lower..upper
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
// Have slower than 2:1 refinement
nBufferLayers 1;
// Refine cells only up to maxRefinement levels
maxRefinement 3;
// Stop refinement if maxCells reached
maxCells 2000000;
// Flux field and corresponding velocity field. Fluxes on changed
// faces get recalculated by interpolating the velocity. Use 'none'
// on surfaceScalarFields that do not need to be reinterpolated.
correctFluxes
(
(phi none)
(nHatf none)
(rhoPhi none)
(ghf none)
);
// Write the refinement level as a volScalarField
dumpLevel true;
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 -9.81 );
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07;
// ************************************************************************* //

View File

@ -0,0 +1,4 @@
Directory to house tri-surfaces
The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry
directory

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,89 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-1 -0.5 0)
( 3 -0.5 0)
( 3 0.5 0)
(-1 0.5 0)
(-1 -0.5 2)
( 3 -0.5 2)
( 3 0.5 2)
(-1 0.5 2)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (8 2 4) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
walls
{
type wall;
faces
(
(3 7 6 2)
(1 5 4 0)
(0 4 7 3)
(2 6 5 1)
(0 3 2 1)
);
}
// inlet
// {
// type patch;
// faces
// (
// (0 4 7 3)
// );
// }
// outlet
// {
// type patch;
// faces
// (
// (2 6 5 1)
// );
// }
// lowerWall
// {
// type wall;
// faces
// (
// (0 3 2 1)
// );
// }
upperWall
{
type patch;
faces
(
(4 5 6 7)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//DebugSwitches
//{
// dynamicRefineFvMesh 1;
//}
application interDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 2;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.02;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.5;
maxAlphaCo 0.5;
maxDeltaT 1;
functions
{
// Print stats
#include "minMax"
}
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//DebugSwitches
//{
// dynamicRefineFvMesh 1;
//}
application interDyMFoam;
startFrom latestTime;
startTime 0;
stopAt nextWrite;
endTime 2;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.02;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.5;
maxAlphaCo 0.5;
maxDeltaT 1;
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//DebugSwitches
//{
// dynamicRefineFvMesh 1;
//}
application interDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 2;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.02;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.5;
maxAlphaCo 0.5;
maxDeltaT 1;
functions
{
// Print stats
#include "minMax"
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 5;
method hierarchical;
// method ptscotch;
// Optional decomposition constraints
constraints
{
refinementHistory
{
//- Decompose cells such that all cell originating from single cell
// end up on same processor
type refinementHistory;
}
}
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (5 1 1);
delta 0.001;
order xyz;
}
manualCoeffs
{
dataFile "cellDecomposition";
}
// ************************************************************************* //

View File

@ -0,0 +1,66 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phi,omega) Gauss upwind;
div(phi,k) Gauss upwind;
div(phirb,alpha) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p_rgh;
pcorr;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,95 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.water.*"
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
p_rgh
{
solver GAMG;
tolerance 1e-7;
relTol 0.01;
smoother DIC;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration false;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
"pcorr.*"
{
$p_rghFinal;
tolerance 0.001;
}
"U.*"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-06;
relTol 0;
nSweeps 1;
}
"(k|omega|nuTilda).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-08;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
pRefPoint (0.51 0.51 0.51);
pRefValue 0;
}
relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,24 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Include defaults parameters from master dictionary
#include "$WM_PROJECT_DIR/etc/caseDicts/meshQualityDict"
////- minFaceWeight (0 -> 0.5)
//minFaceWeight 0.02;
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
minMax
{
// Type of functionObject
type fieldMinMax;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
// Log to output (default: false)
log true;
// Fields to be monitored - runTime modifiable
fields
(
U
p
);
}
// ************************************************************************* //

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.water 0
volVectorFieldValue U ( 0 0 0 )
);
regions
(
boxToCell
{
//box ( -1 -0.5 0 ) ( -0.5 0.5 2 );
//box ( -0.5 -0.5 1.5 ) ( 1.5 0.5 2 );
box ( 0 -0.5 1.5 ) ( 2 0.5 1.75 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,314 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
motorBike.obj
{
type triSurfaceMesh;
name motorBike;
}
};
//// Optional: avoid patch-face merging. Allows mesh to be used for
//// refinement/unrefinement
//mergePatchFaces off; // default on
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// If local number of cells is >= maxLocalCells on any processor
// switches from from refinement followed by balancing
// (current method) to (weighted) balancing before refinement.
maxLocalCells 100000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 10;
// Allow a certain level of imbalance during refining
// (since balancing is quite expensive)
// Expressed as fraction of perfect balance (= overall number of cells /
// nProcs). 0=balance always.
maxLoadUnbalance 0.10;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 3;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
();
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
motorBike
{
// Surface-wise min and max refinement level
level (3 3);
// Optional specification of patch type (default is wall). No
// constraint types (cyclic, symmetry) etc. are allowed.
patchInfo
{
type wall;
inGroups (motorBikeGroup);
}
}
}
// Resolve sharp angles
resolveFeatureAngle 30;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (2.991 0.4991 1.991);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 2.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Feature snapping
// //- Number of feature edge snapping iterations.
// // Leave out altogether to disable.
// nFeatureSnapIter 10;
//
// //- Detect (geometric only) features by sampling the surface
// // (default=false).
// implicitFeatureSnap false;
//
// //- Use castellatedMeshControls::features (default = true)
// explicitFeatureSnap true;
//
// //- Detect points on multiple surfaces (only for explicitFeatureSnap)
// multiRegionFeatureSnap false;
}
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
layers
{
"motorBike.*"
{
nSurfaceLayers 1;
}
}
// Expansion factor for layer mesh
expansionRatio 1.0;
// Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// is the thickness of the layer furthest away from the wall.
// See relativeSizes parameter.
finalLayerThickness 0.3;
// Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
minThickness 0.1;
// If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0;
// Advanced settings
// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 60;
// At non-patched sides allow mesh to slip if extrusion direction makes
// angle larger than slipFeatureAngle.
slipFeatureAngle 30;
// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 3;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
#include "meshQualityDict"
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- amount to scale back displacement at error points
errorReduction 0.75;
}
// Advanced
// Write flags
writeFlags
(
layerFields // write volScalarField for layer coverage
);
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
motorBike.obj
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
}
subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges no;
// Keep open edges (edges with 1 connected face)
openEdges yes;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
}
// ************************************************************************* //