Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-04-19 16:17:17 +01:00
94 changed files with 912 additions and 148 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
for (int corr=1; corr<=1; corr++)
{
volScalarField rAU(1.0/UEqn.A());
volScalarField rAU("Dp", 1.0/UEqn.A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -1,7 +1,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -1,6 +1,6 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -1,6 +1,6 @@
{
volScalarField rAU("rAU", 1.0/UEqn().A());
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();

View File

@ -6,7 +6,7 @@
thermo.rho() -= psi*p_rgh;
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -3,7 +3,7 @@
rho.relax();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();

View File

@ -5,7 +5,7 @@
rho.relax();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();
UEqn.clear();
@ -15,8 +15,8 @@
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi -= buoyancyPhi;
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi += phig;
// Solve pressure
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
@ -44,7 +44,7 @@
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
U += rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions();
}
}

View File

@ -6,7 +6,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();

View File

@ -1,5 +1,5 @@
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rAUf(rAU.name() + 'f', fvc::interpolate(rAU));
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn() == sources(U))().H();

View File

@ -1,7 +1,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf(rAU.name() + 'f', fvc::interpolate(rho*rAU));
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -8,16 +8,21 @@
surfaceScalarField rAU1f(fvc::interpolate(rAU1));
surfaceScalarField rAU2f(fvc::interpolate(rAU2));
U1 = rAU1*U1Eqn.H();
U2 = rAU2*U2Eqn.H();
volVectorField HbyA1("HbyA1", U1);
HbyA1 = rAU1*U1Eqn.H();
volVectorField HbyA2("HbyA2", U2);
HbyA2 = rAU2*U2Eqn.H();
surfaceScalarField phiDrag1
(
fvc::interpolate(alpha2/rho1*dragCoef*rAU1)*phi2 + rAU1f*(g & mesh.Sf())
fvc::interpolate(alpha2/rho1*dragCoef*rAU1)*phi2
+ rAU1f*(g & mesh.Sf())
);
surfaceScalarField phiDrag2
(
fvc::interpolate(alpha1/rho2*dragCoef*rAU2)*phi1 + rAU2f*(g & mesh.Sf())
fvc::interpolate(alpha1/rho2*dragCoef*rAU2)*phi1
+ rAU2f*(g & mesh.Sf())
);
forAll(p.boundaryField(), patchi)
@ -29,16 +34,25 @@
}
}
phi1 = (fvc::interpolate(U1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, U1, phi1)
+ phiDrag1;
phi2 = (fvc::interpolate(U2) & mesh.Sf()) + fvc::ddtPhiCorr(rAU2, U2, phi2)
+ phiDrag2;
surfaceScalarField phiHbyA1
(
(fvc::interpolate(HbyA1) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
+ phiDrag1
);
phi = alpha1f*phi1 + alpha2f*phi2;
surfaceScalarField phiHbyA2
(
(fvc::interpolate(HbyA2) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
+ phiDrag2
);
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
surfaceScalarField Dp
(
"(rho*(1|A(U)))",
"Dp",
alpha1f*rAU1f/rho1 + alpha2f*rAU2f/rho2
);
@ -46,7 +60,7 @@
{
fvScalarMatrix pEqn
(
fvm::laplacian(Dp, p) == fvc::div(phi)
fvm::laplacian(Dp, p) == fvc::div(phiHbyA)
);
pEqn.setReference(pRefCell, pRefValue);
@ -57,19 +71,17 @@
{
surfaceScalarField SfGradp(pEqn.flux()/Dp);
phi1 -= rAU1f*SfGradp/rho1;
phi2 -= rAU2f*SfGradp/rho2;
phi1 = phiHbyA1 - rAU1f*SfGradp/rho1;
phi2 = phiHbyA2 - rAU2f*SfGradp/rho2;
phi = alpha1f*phi1 + alpha2f*phi2;
p.relax();
SfGradp = pEqn.flux()/Dp;
U1 += (fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1));
//U1 += rAU1*(fvc::reconstruct(phiDrag1/rAU1f - SfGradp/rho1));
U1 = HbyA1 + (fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1));
U1.correctBoundaryConditions();
U2 += (fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2));
//U2 += rAU2*(fvc::reconstruct(phiDrag2/rAU2f - SfGradp/rho2));
U2 = HbyA2 + (fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2));
U2.correctBoundaryConditions();
U = alpha1*U1 + alpha2*U2;

View File

@ -12,7 +12,7 @@
surfaceScalarField rhof("rhof", fvc::interpolate(rho));
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", rhof*fvc::interpolate(rAU));
surfaceScalarField rAUf("Dp", rhof*fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();

View File

@ -10,7 +10,6 @@ EXE_INC = \
${EXE_NDEBUG} \
${CGAL_INC} \
-I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/extrude/extrudeModel/lnInclude \
-IconformalVoronoi2DMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
@ -18,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \

View File

@ -2,7 +2,6 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso extrudeModel
wclean extrudeMesh
wclean extrudeToRegionMesh

View File

@ -2,10 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso extrudeModel
wmake extrudeMesh
wmake libso extrudeToRegionMesh/createShellMesh
wmake extrudeToRegionMesh

View File

@ -1,10 +1,10 @@
EXE_INC = \
-IextrudedMesh \
-I../extrudeModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -1,13 +1,11 @@
EXE_INC = \
-I../extrudeModel/lnInclude \
-IcreateShellMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lextrudeModel \
-lcreateShellMesh \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh
-ldynamicMesh \
-lextrudeModel

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-Iextrude2DMesh/lnInclude \
-I../extrude/extrudeModel/lnInclude
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
EXE_LIBS = \
-lsurfMesh \

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(FOAM_APP)/utilities/mesh/generation/extrude/extrudeModel/lnInclude
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
LIB_LIBS = \
-lmeshTools \

View File

@ -30,9 +30,6 @@ surface1.stl
// Write options
// Write .eMesh file (for snappyHexMesh)
writeFeatureEdgeMesh yes;
// Write features to obj format for postprocessing
writeObj yes;
}

View File

@ -52,6 +52,8 @@ wmake $makeType conversion
wmake $makeType sampling
wmake $makeType mesh/extrudeModel
wmake $makeType dynamicMesh
wmake $makeType dynamicFvMesh
wmake $makeType topoChangerFvMesh

View File

@ -130,6 +130,7 @@ Foam::solution::solution
obr,
(
obr.readOpt() == IOobject::MUST_READ
|| obr.readOpt() == IOobject::READ_IF_PRESENT
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
@ -148,6 +149,7 @@ Foam::solution::solution
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
read(solutionDict());

View File

@ -132,6 +132,84 @@ Foam::polyBoundaryMesh::polyBoundaryMesh
{}
Foam::polyBoundaryMesh::polyBoundaryMesh
(
const IOobject& io,
const polyMesh& pm,
const polyPatchList& ppl
)
:
polyPatchList(),
regIOobject(io),
mesh_(pm)
{
if
(
(this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
|| this->readOpt() == IOobject::MUST_READ
|| this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
{
if (readOpt() == IOobject::MUST_READ_IF_MODIFIED)
{
WarningIn
(
"polyBoundaryMesh::polyBoundaryMesh\n"
"(\n"
" const IOobject&,\n"
" const polyMesh&\n"
" const polyPatchList&\n"
")"
) << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
<< " does not support automatic rereading."
<< endl;
}
polyPatchList& patches = *this;
// Read polyPatchList
Istream& is = readStream(typeName);
PtrList<entry> patchEntries(is);
patches.setSize(patchEntries.size());
forAll(patches, patchI)
{
patches.set
(
patchI,
polyPatch::New
(
patchEntries[patchI].keyword(),
patchEntries[patchI].dict(),
patchI,
*this
)
);
}
// Check state of IOstream
is.check
(
"polyBoundaryMesh::polyBoundaryMesh"
"(const IOobject&, const polyMesh&, const polyPatchList&)"
);
close();
}
else
{
polyPatchList& patches = *this;
patches.setSize(ppl.size());
forAll (patches, patchI)
{
patches.set(patchI, ppl[patchI].clone(*this).ptr());
}
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::polyBoundaryMesh::~polyBoundaryMesh()

View File

@ -119,6 +119,14 @@ public:
const label size
);
//- Construct given polyPatchList
polyBoundaryMesh
(
const IOobject&,
const polyMesh&,
const polyPatchList&
);
//- Destructor
~polyBoundaryMesh();

View File

@ -338,7 +338,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
points
@ -351,7 +351,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
faces
@ -364,7 +364,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
owner
@ -377,7 +377,7 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
neighbour
@ -391,11 +391,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::AUTO_WRITE
),
*this,
0
polyPatchList()
),
bounds_(points_, syncPar),
geometricD_(Vector<label>::zero),
@ -410,11 +410,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<pointZone>()
),
faceZones_
(
@ -424,11 +424,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<faceZone>()
),
cellZones_
(
@ -438,11 +438,11 @@ Foam::polyMesh::polyMesh
instance(),
meshSubDir,
*this,
IOobject::NO_READ,
io.readOpt(),
IOobject::NO_WRITE
),
*this,
0
PtrList<cellZone>()
),
globalMeshDataPtr_(NULL),
moving_(false),

View File

@ -162,6 +162,32 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
{}
template<class ZoneType, class MeshType>
Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh
(
const IOobject& io ,
const MeshType& mesh,
const PtrList<ZoneType>& pzm
)
:
PtrList<ZoneType>(),
regIOobject(io),
mesh_(mesh),
zoneMapPtr_(NULL)
{
ZoneMesh<ZoneType, MeshType>(io, mesh);
if (this->size() == 0)
{
PtrList<ZoneType>& zones = *this;
zones.setSize(pzm.size());
forAll (zones, zoneI)
{
zones.set(zoneI, pzm[zoneI].clone(*this).ptr());
}
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ZoneType, class MeshType>

View File

@ -106,6 +106,15 @@ public:
const label size
);
//- Construct given a PtrList
ZoneMesh
(
const IOobject&,
const MeshType&,
const PtrList<ZoneType>&
);
//- Destructor
~ZoneMesh();

View File

@ -86,4 +86,9 @@ motionSmoother/polyMeshGeometry/polyMeshGeometry.C
motionSolver/motionSolver.C
createShellMesh/createShellMesh.C
extrudePatchMesh/extrudePatchMesh.C
LIB = $(FOAM_LIBBIN)/libdynamicMesh

View File

@ -1,8 +1,10 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-ltriSurface
-ltriSurface \
-lextrudeModel

View File

@ -0,0 +1,283 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2012 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "extrudePatchMesh.H"
#include "createShellMesh.H"
#include "polyTopoChange.H"
#include "wallPolyPatch.H"
#include "emptyPolyPatch.H"
#include "wedgePolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(extrudePatchMesh, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
extrudePatchMesh::extrudePatchMesh
(
const fvMesh& mesh,
const fvPatch& patch,
const dictionary& dict
)
:
fvMesh
(
IOobject
(
dict.lookup("region"),
mesh.facesInstance(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
true
),
xferCopy(pointField()),
xferCopy(faceList()),
xferCopy(labelList()),
xferCopy(labelList()),
false
),
extrudedPatch_(patch.patch())
{
if (this->boundaryMesh().size() == 0)
{
bool columnCells = readBool(dict.lookup("columnCells"));
PackedBoolList nonManifoldEdge(extrudedPatch_.nEdges());
for (label edgeI = 0; edgeI < extrudedPatch_.nInternalEdges(); edgeI++)
{
if (columnCells)
{
nonManifoldEdge[edgeI] = true;
}
}
autoPtr<extrudeModel> model_(extrudeModel::New(dict));
faceList pointGlobalRegions;
faceList pointLocalRegions;
labelList localToGlobalRegion;
const primitiveFacePatch pp
(
extrudedPatch_, extrudedPatch_.points()
);
createShellMesh::calcPointRegions
(
this->globalData(),
pp,
nonManifoldEdge,
false,
pointGlobalRegions,
pointLocalRegions,
localToGlobalRegion
);
// Per local region an originating point
labelList localRegionPoints(localToGlobalRegion.size());
forAll(pointLocalRegions, faceI)
{
const face& f = extrudedPatch_.localFaces()[faceI];
const face& pRegions = pointLocalRegions[faceI];
forAll(pRegions, fp)
{
localRegionPoints[pRegions[fp]] = f[fp];
}
}
// Calculate region normals by reducing local region normals
pointField localRegionNormals(localToGlobalRegion.size());
{
pointField localSum(localToGlobalRegion.size(), vector::zero);
forAll(pointLocalRegions, faceI)
{
const face& pRegions = pointLocalRegions[faceI];
forAll(pRegions, fp)
{
label localRegionI = pRegions[fp];
localSum[localRegionI] +=
extrudedPatch_.faceNormals()[faceI];
}
}
Map<point> globalSum(2*localToGlobalRegion.size());
forAll(localSum, localRegionI)
{
label globalRegionI = localToGlobalRegion[localRegionI];
globalSum.insert(globalRegionI, localSum[localRegionI]);
}
// Reduce
Pstream::mapCombineGather(globalSum, plusEqOp<point>());
Pstream::mapCombineScatter(globalSum);
forAll(localToGlobalRegion, localRegionI)
{
label globalRegionI = localToGlobalRegion[localRegionI];
localRegionNormals[localRegionI] = globalSum[globalRegionI];
}
localRegionNormals /= mag(localRegionNormals);
}
// Per local region an extrusion direction
vectorField firstDisp(localToGlobalRegion.size());
forAll(firstDisp, regionI)
{
//const point& regionPt = regionCentres[regionI];
const point& regionPt = extrudedPatch_.points()
[
extrudedPatch_.meshPoints()
[
localRegionPoints[regionI]
]
];
const vector& n = localRegionNormals[regionI];
firstDisp[regionI] = model_()(regionPt, n, 1) - regionPt;
}
// Extrude engine
createShellMesh extruder
(
pp,
pointLocalRegions,
localRegionPoints
);
List<polyPatch*> regionPatches(3);
List<word> patchNames(regionPatches.size());
List<word> patchTypes(regionPatches.size());
PtrList<dictionary> dicts(regionPatches.size());
forAll (dicts, patchI)
{
if (!dicts.set(patchI))
{
dicts.set(patchI, new dictionary());
}
}
dicts[bottomPatchID] = dict.subDict("bottomCoeffs");
dicts[sidePatchID] = dict.subDict("sideCoeffs");
dicts[topPatchID] = dict.subDict("topCoeffs");
forAll (dicts, patchI)
{
dicts[patchI].lookup("name") >> patchNames[patchI];
dicts[patchI].lookup("type") >> patchTypes[patchI];
}
forAll (regionPatches, patchI)
{
dictionary& patchDict = dicts[patchI];
patchDict.set("nFaces", 0);
patchDict.set("startFace", 0);
regionPatches[patchI] = polyPatch::New
(
patchNames[patchI],
patchDict,
patchI,
mesh.boundaryMesh()
).ptr();
}
this->clearOut();
this->removeFvBoundary();
this->addFvPatches(regionPatches, true);
// At this point we have a valid mesh with 3 patches and zero cells.
// Determine:
// - per face the top and bottom patch (topPatchID, bottomPatchID)
// - per edge, per face on edge the side patch (edgePatches)
labelListList edgePatches(extrudedPatch_.nEdges());
forAll(edgePatches, edgeI)
{
const labelList& eFaces = extrudedPatch_.edgeFaces()[edgeI];
if (eFaces.size() != 2 || nonManifoldEdge[edgeI])
{
edgePatches[edgeI].setSize(eFaces.size(), sidePatchID);
}
}
polyTopoChange meshMod(regionPatches.size());
extruder.setRefinement
(
firstDisp, // first displacement
model_().expansionRatio(),
model_().nLayers(), // nLayers
labelList(extrudedPatch_.size(), topPatchID),
labelList(extrudedPatch_.size(), bottomPatchID),
edgePatches,
meshMod
);
autoPtr<mapPolyMesh> map = meshMod.changeMesh
(
*this, // mesh to change
false // inflate
);
// Update numbering on extruder.
extruder.updateMesh(map);
this->setInstance(this->thisDb().time().constant());
this->write();
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
extrudePatchMesh::~extrudePatchMesh()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,177 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2012 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
extrudePatchMesh
Description
Mesh at a patch created on the fly. The following entried should be used
on the field boundary dictionary:
// New Shell mesh data
region "regionMesh";
extrudeModel linearNormal;
linearNormalCoeffs
{
thickness 40e-6;
}
nLayers 50;
expansionRatio 1;
columnCells true;
// Patch information
bottomCoeffs
{
name "bottom";
type mappedWall;
sampleMode nearestPatchFace;
samplePatch fixedWalls;
offsetMode uniform;
offset (0 0 0);
}
topCoeffs
{
name "top";
type patch;
}
sideCoeffs
{
name "side";
type empty;
}
\*---------------------------------------------------------------------------*/
#ifndef extrudePatchMesh_H
#define extrudePatchMesh_H
#include "extrudeModel.H"
#include "autoPtr.H"
#include "fvMesh.H"
#include "Time.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
/*---------------------------------------------------------------------------*\
Class extrudePatchMesh Declaration
\*---------------------------------------------------------------------------*/
class extrudePatchMesh
:
public fvMesh
{
private:
// Private data
//- Enumeration of patch IDs
enum patchID
{
bottomPatchID,
topPatchID,
sidePatchID
};
//- Const reference to the patch from which this mesh is extruded
const polyPatch& extrudedPatch_;
public:
//- Runtime type information
TypeName("extrudePatchMesh");
// Constructors
//- Construct from mesh, patch and dictionary
extrudePatchMesh
(
const fvMesh&,
const fvPatch&,
const dictionary&
);
//- Destructor
virtual ~extrudePatchMesh();
// Member functions
// Access functions
//- Return region mesh
const fvMesh& regionMesh() const
{
return *this;
}
//- Return bottom patch
const polyPatch& bottomPatch() const
{
return this->boundaryMesh()[bottomPatchID];
}
//- Return top patch
const polyPatch& topPatch() const
{
return this->boundaryMesh()[topPatchID];
}
//- Return sides patch
const polyPatch& sidesPatch() const
{
return this->boundaryMesh()[sidePatchID];
}
//- Return extruded patch
const polyPatch& extrudedPatch() const
{
return extrudedPatch_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -258,6 +258,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
obr,
(
obr.readOpt() == IOobject::MUST_READ
|| obr.readOpt() == IOobject::READ_IF_PRESENT
? IOobject::MUST_READ_IF_MODIFIED
: obr.readOpt()
),
@ -372,6 +373,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
(
readOpt() == IOobject::MUST_READ
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
read(schemesDict());

View File

@ -295,7 +295,7 @@ Foam::fvMesh::fvMesh
fvSchemes(static_cast<const objectRegistry&>(*this)),
fvSolution(static_cast<const objectRegistry&>(*this)),
data(static_cast<const objectRegistry&>(*this)),
boundary_(*this),
boundary_(*this, boundaryMesh()),
lduPtr_(NULL),
curTimeIndex_(time().timeIndex()),
VPtr_(NULL),

View File

@ -5,5 +5,6 @@ set -x
wmake $makeType autoMesh
wmake $makeType blockMesh
wmake $makeType extrudeModel
# ----------------------------------------------------------------- end-of-file

View File

@ -3,5 +3,4 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude
LIB_LIBS = \
-lmeshTools \
-ldynamicMesh
-lmeshTools

View File

@ -37,7 +37,7 @@ laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(Dp,p) Gauss linear corrected;
}
interpolationSchemes

View File

@ -33,6 +33,7 @@ mixture
{
As 1.458e-06;
Ts 110.4;
Pr 1;
}
}

View File

@ -15,8 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Pr 0.72;
thermoType ePsiThermo<pureMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>;
mixture
@ -38,6 +36,7 @@ mixture
{
As 1.458e-06;
Ts 110;
Pr 0.72;
}
}

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear uncorrected;
laplacian((1|A(U)),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(kappaEff,T) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -39,7 +39,7 @@ laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p_rgh) Gauss linear corrected;
laplacian(Dp,p_rgh) Gauss linear corrected;
laplacian(kappaEff,T) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear limited 0.333;
laplacian((1|A(U)),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(kappaEff,T) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -42,7 +42,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(Dp,p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;

View File

@ -40,7 +40,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear orthogonal;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear orthogonal;
laplacian(Dp,p_rgh) Gauss linear orthogonal;
laplacian(alphaEff,h) Gauss linear orthogonal;
laplacian(DkEff,k) Gauss linear orthogonal;
laplacian(DepsilonEff,epsilon) Gauss linear orthogonal;

View File

@ -40,7 +40,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -42,7 +42,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -42,7 +42,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(Dp,p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;

View File

@ -43,7 +43,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(Dp,p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -41,7 +41,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(Dp,p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;

View File

@ -42,7 +42,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -42,7 +42,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -43,7 +43,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -43,7 +43,7 @@ laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(Dp,p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;

View File

@ -12,21 +12,7 @@ cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
runApplication blockMesh
surfaces="
innerCylinder
innerCylinderSmall
outerCylinder
propellerTip
propellerStem1
propellerStem2
propellerStem3
"
for s in $surfaces; do
runApplication surfaceFeatureExtract -includedAngle 150 -minElem 10 \
constant/triSurface/$s.obj $s
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.$s
done
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
# force removal of fields generated by snappy

View File

@ -0,0 +1,59 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
innerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
innerCylinderSmall.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
outerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem1.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem2.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem3.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerTip.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
// ************************************************************************* //

View File

@ -0,0 +1,17 @@
// 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;
}
trimFeatures
{
// Remove features with fewer than the specified number of edges
minElem 10;
}

View File

@ -27,19 +27,19 @@ boundaryField
mixingLength 0.01;
phi phi;
k k;
value $internalField;
value uniform 200;
}
outlet1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
inletValue uniform 200;
value uniform 200;
}
outlet2
{
type inletOutlet;
inletValue $internalField;
value $internalField;
inletValue uniform 200;
value uniform 200;
}
baffles
{
@ -47,7 +47,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value $internalField;
value uniform 0;
}
fan_half0
{
@ -63,7 +63,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value $internalField;
value uniform 200;
}
}

View File

@ -27,24 +27,24 @@ boundaryField
intensity 0.05;
U U;
phi phi;
value $internalField;
value uniform 0.375;
}
outlet1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
inletValue uniform 0.375;
value uniform 0.375;
}
outlet2
{
type inletOutlet;
inletValue $internalField;
value $internalField;
inletValue uniform 0.375;
value uniform 0.375;
}
baffles
{
type kqRWallFunction;
value $internalField;
value uniform 0;
}
fan_half0
{
@ -57,7 +57,7 @@ boundaryField
defaultFaces
{
type kqRWallFunction;
value $internalField;
value uniform 0.375;
}
}

View File

@ -29,10 +29,13 @@ boundaryField
gamma 1;
p0 40;
pressure table
2
(
(0 10)
(1 40)
);
)
;
value uniform 40;
}
outlet1
@ -54,7 +57,14 @@ boundaryField
type fan;
patchType cyclic;
jump uniform 0;
f 2(100 -0.1);
jumpTable polynomial
2
(
(100 0)
(-0.1 1)
)
;
value uniform 0;
}
fan_half1
@ -62,7 +72,6 @@ boundaryField
type fan;
patchType cyclic;
jump uniform 0;
f 2(100 -0.1);
value uniform 0;
}
defaultFaces

View File

@ -15,31 +15,37 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4
5
(
left
{
type symmetryPlane;
nFaces 320;
startFace 99210;
}
outlet
{
type patch;
nFaces 320;
startFace 99370;
startFace 99530;
}
up
{
type symmetryPlane;
nFaces 380;
startFace 99690;
startFace 99850;
}
hole
{
type wall;
nFaces 560;
startFace 100070;
startFace 100230;
}
frontAndBack
{
type empty;
nFaces 100000;
startFace 100630;
startFace 100790;
}
)

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
nProc=`grep numberOfSubdomains system/decomposeParDict \
| sed s/"numberOfSubdomains *\(.*\);"/"\1"/`
runApplication surfaceFeatureExtract constant/triSurface/flange.obj flange -includedAngle 155
runApplication surfaceFeatureExtract
# Create tight-fitting background mesh
runApplication blockMesh

View File

@ -30,9 +30,6 @@ flange.obj
// Write options
// Write .eMesh file (for snappyHexMesh)
writeFeatureEdgeMesh no;
// Write features to obj format for postprocessing
writeObj yes;
}

View File

@ -30,15 +30,11 @@ surfaceOrient \
constant/triSurface/domain_clean_orient.stl
> log.surfaceOrient.domain 2>&1
runApplication surfaceFeatureExtract \
constant/triSurface/coneAndSphere_clean_orient.obj \
coneAndSphere -includedAngle 125
runApplication surfaceFeatureExtract
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.coneAndSphere_clean
unset FOAM_SIGFPE
runApplication surfaceFeatureExtract \
constant/triSurface/domain_clean_orient.stl \
domain -includedAngle 125
runApplication surfaceFeatureExtract
mv log.surfaceFeatureExtract log.surfaceFeatureExtract.domain
# Generate aligned points (in constant/internalDelaunayVertices) and a

View File

@ -0,0 +1,57 @@
/*--------------------------------*- 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
coneAndSphere_clean_orient.obj
{
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 125;
}
// Write options
// Write features to obj format for postprocessing
writeObj no;
}
domain_clean_orient.stl
{
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 125;
}
// Write options
// Write features to obj format for postprocessing
writeObj no;
}
// ************************************************************************* //

View File

@ -6,5 +6,5 @@
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
runApplication blockMesh
runApplication surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/flange.stl flange
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite

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 dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
flange.stl
{
// 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;
}
// Write options
// Write features to obj format for postprocessing
writeObj yes;
}
// ************************************************************************* //

View File

@ -22,7 +22,8 @@ boundaryField
{
inlet
{
type zeroGradient;
type fixedFluxPressure;
value uniform 0;
}
outlet
@ -33,7 +34,7 @@ boundaryField
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -1901,7 +1901,8 @@ boundaryField
{
inlet
{
type zeroGradient;
type fixedFluxPressure;
value uniform 0;
}
outlet
@ -1912,7 +1913,7 @@ boundaryField
walls
{
type buoyantPressure;
type fixedFluxPressure;
value uniform 0;
}

View File

@ -42,7 +42,7 @@ laplacianSchemes
default none;
laplacian(nuEff1,U1) Gauss linear corrected;
laplacian(nuEff2,U2) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(Dp,p) Gauss linear corrected;
}
interpolationSchemes

View File

@ -43,7 +43,7 @@ laplacianSchemes
default none;
laplacian(nuf,rhoU) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(rAUf,p) Gauss linear corrected;
laplacian(Dp,p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
}

View File

@ -43,7 +43,7 @@ laplacianSchemes
default none;
laplacian(nuf,rhoU) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(rAUf,p) Gauss linear corrected;
laplacian(Dp,p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;
}

View File

@ -44,7 +44,7 @@ laplacianSchemes
default none;
laplacian(nuf,rhoU) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(rAUf,p) Gauss linear corrected;
laplacian(Dp,p) Gauss linear corrected;
laplacian(DomegaEff,omega) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(1,p) Gauss linear corrected;