Merge branch 'HrvojeJasak'
This commit is contained in:
commit
1e7189ba10
59 changed files with 1444 additions and 251 deletions
|
@ -41,13 +41,13 @@ Description
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "initContinuityErrs.H"
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
# include "createRadiationModel.H"
|
||||
# include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -57,17 +57,17 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readSIMPLEControls.H"
|
||||
#include "initConvergenceCheck.H"
|
||||
# include "readSIMPLEControls.H"
|
||||
# include "initConvergenceCheck.H"
|
||||
|
||||
p.storePrevIter();
|
||||
rho.storePrevIter();
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "pEqn.H"
|
||||
# include "UEqn.H"
|
||||
# include "hEqn.H"
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
|||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
#include "convergenceCheck.H"
|
||||
# include "convergenceCheck.H"
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
Copyright © 2000-2009 OpenCFD Ltd
|
||||
Copyright © 1993-2000 Henry Weller and Hrvoje Jasak
|
||||
Copyright © 2000-2006 Programmers manual for FOAM, a product of Nabla Ltd.
|
||||
Copyright © 2009-2011 OpenFOAM Extend Project
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<meta name="date" content="2007-04-12 00:02:00">
|
||||
<link rel="stylesheet" type="text/css" href="../Doxygen.css">
|
||||
<link rel="stylesheet" type="text/css" href="../tabs.css">
|
||||
<meta name="keywords" content="computational fluid dynamics, CFD, OpenCFD, OpenFOAM, open source CFD, open source">
|
||||
<meta name="description" content="OpenCFD Ltd, leaders in open source Computational Fluid Dynamics (CFD), the developers and maintainers of OpenFOAM: the open source CFD toolbox. We supply support and contracted developments for OpenFOAM">
|
||||
<meta name="keywords" content="computational fluid dynamics, CFD, OpenFOAM, open source CFD, open source">
|
||||
<meta name="description" content="OpenFOAM-Extend Project: Open Source Development of High Quality CFD Tools">
|
||||
</head>
|
||||
<body>
|
||||
<a id="openfoam"> </a>
|
||||
|
@ -45,20 +45,8 @@ horizontal-align: left; ">
|
|||
class=menuLefton >Source Guide</a>
|
||||
</td>
|
||||
<td class=topmenu>
|
||||
<a href="http://www.opencfd.co.uk/index.html"
|
||||
class=menuTopoff >OpenCFD</a>
|
||||
</td>
|
||||
<td class=topmenu>
|
||||
<a href="http://www.opencfd.co.uk/solutions/index.html"
|
||||
class=menuTopoff >Solutions</a>
|
||||
</td>
|
||||
<td class=topmenu>
|
||||
<a href="http://www.opencfd.co.uk/contact/index.html"
|
||||
class=menuTopoff >Contact</a>
|
||||
</td>
|
||||
<td class=topmenu>
|
||||
<a href="http://www.opencfd.co.uk/openfoam/index.html"
|
||||
class=menuTopoff >OpenFOAM</a>
|
||||
<a href="http://www.extend-project.de"
|
||||
class=menuTopoff >OpenFOAM-Extend Project</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -904,8 +904,7 @@ Tolerances
|
|||
primitiveMeshFaceFlatnessThreshold 0.8;
|
||||
|
||||
// Geometric matching tolerances
|
||||
cyclicMatchTol 1e-4;
|
||||
processorMatchTol 1e-4;
|
||||
patchFaceMatchTol 1e-4;
|
||||
|
||||
// Volumetric closed domain
|
||||
closedDomainTol 1e-10;
|
||||
|
|
|
@ -95,11 +95,13 @@ public:
|
|||
//- Declare friendship with the SubList class
|
||||
friend class SubList<T>;
|
||||
|
||||
|
||||
// Static Member Functions
|
||||
|
||||
//- Return a null UList
|
||||
inline static const UList<T>& null();
|
||||
|
||||
|
||||
// Public classes
|
||||
|
||||
//- Less function class that can be used for sorting
|
||||
|
|
|
@ -72,7 +72,7 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const
|
|||
(
|
||||
"NamedEnum<Enum, nEnum>::read(Istream& is) const",
|
||||
is
|
||||
) << name << " is not in enumeration " << toc()
|
||||
) << name << " is not in enumeration " << toc()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,45 +61,45 @@ void inv(Field<symmTensor>& tf, const UList<symmTensor>& tf1)
|
|||
}
|
||||
|
||||
scalar scale = magSqr(tf1[0]);
|
||||
Vector<bool> removeCmpts
|
||||
(
|
||||
magSqr(tf1[0].xx())/scale < SMALL,
|
||||
magSqr(tf1[0].yy())/scale < SMALL,
|
||||
magSqr(tf1[0].zz())/scale < SMALL
|
||||
);
|
||||
|
||||
if (removeCmpts.x() || removeCmpts.y() || removeCmpts.z())
|
||||
// Fixed terrible hack. HJ, 20/Jan/2011
|
||||
boolList removeCmpts(3);
|
||||
removeCmpts[0] = magSqr(tf1[0].xx())/scale < SMALL;
|
||||
removeCmpts[1] = magSqr(tf1[0].yy())/scale < SMALL;
|
||||
removeCmpts[2] = magSqr(tf1[0].zz())/scale < SMALL;
|
||||
|
||||
if (removeCmpts[0] || removeCmpts[1] || removeCmpts[2])
|
||||
{
|
||||
symmTensorField tf1Plus(tf1);
|
||||
|
||||
if (removeCmpts.x())
|
||||
if (removeCmpts[0])
|
||||
{
|
||||
tf1Plus += symmTensor(1,0,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.y())
|
||||
if (removeCmpts[1])
|
||||
{
|
||||
tf1Plus += symmTensor(0,0,0,1,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.z())
|
||||
if (removeCmpts[2])
|
||||
{
|
||||
tf1Plus += symmTensor(0,0,0,0,0,1);
|
||||
}
|
||||
|
||||
TFOR_ALL_F_OP_FUNC_F(symmTensor, tf, =, inv, symmTensor, tf1Plus)
|
||||
|
||||
if (removeCmpts.x())
|
||||
if (removeCmpts[0])
|
||||
{
|
||||
tf -= symmTensor(1,0,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.y())
|
||||
if (removeCmpts[1])
|
||||
{
|
||||
tf -= symmTensor(0,0,0,1,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.z())
|
||||
if (removeCmpts[2])
|
||||
{
|
||||
tf -= symmTensor(0,0,0,0,0,1);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ License
|
|||
|
||||
#include "tensorField.H"
|
||||
#include "transformField.H"
|
||||
#include "boolList.H"
|
||||
|
||||
#define TEMPLATE
|
||||
#include "FieldFunctionsM.C"
|
||||
|
@ -61,45 +62,46 @@ void inv(Field<tensor>& tf, const UList<tensor>& tf1)
|
|||
}
|
||||
|
||||
scalar scale = magSqr(tf1[0]);
|
||||
Vector<bool> removeCmpts
|
||||
(
|
||||
magSqr(tf1[0].xx())/scale < SMALL,
|
||||
magSqr(tf1[0].yy())/scale < SMALL,
|
||||
magSqr(tf1[0].zz())/scale < SMALL
|
||||
);
|
||||
|
||||
if (removeCmpts.x() || removeCmpts.y() || removeCmpts.z())
|
||||
// Fixed terrible hack. HJ, 20/Jan/2011
|
||||
boolList removeCmpts(3);
|
||||
removeCmpts[0] = magSqr(tf1[0].xx())/scale < SMALL;
|
||||
removeCmpts[1] = magSqr(tf1[0].yy())/scale < SMALL;
|
||||
removeCmpts[2] = magSqr(tf1[0].zz())/scale < SMALL;
|
||||
|
||||
|
||||
if (removeCmpts[0] || removeCmpts[1] || removeCmpts[2])
|
||||
{
|
||||
tensorField tf1Plus(tf1);
|
||||
|
||||
if (removeCmpts.x())
|
||||
if (removeCmpts[0])
|
||||
{
|
||||
tf1Plus += tensor(1,0,0,0,0,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.y())
|
||||
if (removeCmpts[1])
|
||||
{
|
||||
tf1Plus += tensor(0,0,0,0,1,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.z())
|
||||
if (removeCmpts[2])
|
||||
{
|
||||
tf1Plus += tensor(0,0,0,0,0,0,0,0,1);
|
||||
}
|
||||
|
||||
TFOR_ALL_F_OP_FUNC_F(tensor, tf, =, inv, tensor, tf1Plus)
|
||||
|
||||
if (removeCmpts.x())
|
||||
if (removeCmpts[0])
|
||||
{
|
||||
tf -= tensor(1,0,0,0,0,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.y())
|
||||
if (removeCmpts[1])
|
||||
{
|
||||
tf -= tensor(0,0,0,0,1,0,0,0,0);
|
||||
}
|
||||
|
||||
if (removeCmpts.z())
|
||||
if (removeCmpts[2])
|
||||
{
|
||||
tf -= tensor(0,0,0,0,0,0,0,0,1);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ License
|
|||
#include "constraints.H"
|
||||
#include "PstreamCombineReduceOps.H"
|
||||
|
||||
#define OLD_COMBINE_REDUCE 1
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
@ -65,31 +67,59 @@ tmp<Field<Type2> > GlobalPointPatchField
|
|||
// Create the global list and insert local values
|
||||
if (globalPointPatch_.globalPointSize() > 0)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& sharedPointAddr =
|
||||
globalPointPatch_.sharedPointAddr();
|
||||
|
||||
const Field<Type2>& pField = tpField();
|
||||
|
||||
// Prepare result
|
||||
tmp<Field<Type2> > tlpf(new Field<Type2>(sharedPointAddr.size()));
|
||||
Field<Type2>& lpf = tlpf();
|
||||
|
||||
# ifdef OLD_COMBINE_REDUCE
|
||||
|
||||
Field<Type2> gpf
|
||||
(
|
||||
globalPointPatch_.globalPointSize(),
|
||||
pTraits<Type2>::zero
|
||||
);
|
||||
|
||||
const labelList& addr = globalPointPatch_.sharedPointAddr();
|
||||
const Field<Type2>& pField = tpField();
|
||||
|
||||
forAll (addr, i)
|
||||
forAll (sharedPointAddr, i)
|
||||
{
|
||||
gpf[addr[i]] = pField[i];
|
||||
gpf[sharedPointAddr[i]] = pField[i];
|
||||
}
|
||||
|
||||
combineReduce(gpf, plusEqOp<Field<Type2> >());
|
||||
|
||||
// Extract local data
|
||||
tmp<Field<Type2> > tlpf(new Field<Type2>(addr.size()));
|
||||
Field<Type2>& lpf = tlpf();
|
||||
|
||||
forAll (addr, i)
|
||||
forAll (sharedPointAddr, i)
|
||||
{
|
||||
lpf[i] = gpf[addr[i]];
|
||||
lpf[i] = gpf[sharedPointAddr[i]];
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
// Pack data into a map
|
||||
Map<Type2> dataMap;
|
||||
|
||||
forAll (sharedPointAddr, i)
|
||||
{
|
||||
dataMap.insert(sharedPointAddr[i], pField[i]);
|
||||
}
|
||||
|
||||
// Communicate map
|
||||
Pstream::mapCombineGather(dataMap, plusEqOp<Type2>());
|
||||
Pstream::mapCombineScatter(dataMap);
|
||||
|
||||
// Extract local data
|
||||
forAll (sharedPointAddr, i)
|
||||
{
|
||||
lpf[i] = dataMap[sharedPointAddr[i]];
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
return tlpf;
|
||||
}
|
||||
else
|
||||
|
@ -126,6 +156,19 @@ tmp<Field<Type2> > GlobalPointPatchField
|
|||
{
|
||||
if (globalPointPatch_.globalEdgeSize() > 0)
|
||||
{
|
||||
// Bug fix: use map-based communication. HJ, 18/Nov/2010
|
||||
|
||||
const labelList& sharedEdgeAddr =
|
||||
globalPointPatch_.sharedEdgeAddr();
|
||||
|
||||
const Field<Type2>& eField = teField();
|
||||
|
||||
// Prepare result
|
||||
tmp<Field<Type2> > tlef(new Field<Type2>(sharedEdgeAddr.size()));
|
||||
Field<Type2>& lef = tlef();
|
||||
|
||||
# ifdef OLD_COMBINE_REDUCE
|
||||
|
||||
// Create the global list and insert local values
|
||||
Field<Type2> gef
|
||||
(
|
||||
|
@ -133,25 +176,41 @@ tmp<Field<Type2> > GlobalPointPatchField
|
|||
pTraits<Type2>::zero
|
||||
);
|
||||
|
||||
const labelList& addr = globalPointPatch_.sharedEdgeAddr();
|
||||
const Field<Type2>& eField = teField();
|
||||
|
||||
forAll (addr, i)
|
||||
forAll (sharedEdgeAddr, i)
|
||||
{
|
||||
gef[addr[i]] = eField[i];
|
||||
gef[sharedEdgeAddr[i]] = eField[i];
|
||||
}
|
||||
|
||||
combineReduce(gef, plusEqOp<Field<Type2> >());
|
||||
|
||||
// Extract local data
|
||||
tmp<Field<Type2> > tlef(new Field<Type2>(addr.size()));
|
||||
Field<Type2>& lef = tlef();
|
||||
|
||||
forAll (addr, i)
|
||||
forAll (sharedEdgeAddr, i)
|
||||
{
|
||||
lef[i] = gef[addr[i]];
|
||||
lef[i] = gef[sharedEdgeAddr[i]];
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
// Pack data into a map
|
||||
Map<Type2> dataMap;
|
||||
|
||||
forAll (sharedEdgeAddr, i)
|
||||
{
|
||||
dataMap.insert(sharedEdgeAddr[i], eField[i]);
|
||||
}
|
||||
|
||||
// Communicate map
|
||||
Pstream::mapCombineGather(dataMap, plusEqOp<Type2>());
|
||||
Pstream::mapCombineScatter(dataMap);
|
||||
|
||||
// Extract local data
|
||||
forAll (sharedEdgeAddr, i)
|
||||
{
|
||||
lef[i] = dataMap[sharedEdgeAddr[i]];
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
return tlef;
|
||||
}
|
||||
else
|
||||
|
@ -189,6 +248,7 @@ void GlobalPointPatchField
|
|||
// Set the values from the global sum
|
||||
tmp<Field<Type2> > trpf =
|
||||
reduceExtractPoint<Type2>(patchInternalField(pField));
|
||||
|
||||
Field<Type2>& rpf = trpf();
|
||||
|
||||
// Get addressing
|
||||
|
@ -526,6 +586,8 @@ void GlobalPointPatchField
|
|||
}
|
||||
|
||||
// Communicate map
|
||||
// Note: Cannot use reduceExtract, because it uses plusEqOp
|
||||
// HJ, 14/Jan/2011
|
||||
Pstream::mapCombineGather(dataMap, eqOp<Type>());
|
||||
Pstream::mapCombineScatter(dataMap);
|
||||
|
||||
|
@ -1063,7 +1125,8 @@ void GlobalPointPatchField
|
|||
{
|
||||
// Owner side
|
||||
localMult[doubleCutOwner[edgeI]] +=
|
||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[U[doubleCut[edgeI]]];
|
||||
cutMask[coeffI]*coeffs[coeffI]*
|
||||
psiInternal[U[doubleCut[edgeI]]];
|
||||
|
||||
sumOffDiag[doubleCutOwner[edgeI]] +=
|
||||
cutMask[coeffI]*coeffs[coeffI];
|
||||
|
@ -1072,7 +1135,8 @@ void GlobalPointPatchField
|
|||
|
||||
// Neighbour side
|
||||
localMult[doubleCutNeighbour[edgeI]] +=
|
||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[L[doubleCut[edgeI]]];
|
||||
cutMask[coeffI]*coeffs[coeffI]*
|
||||
psiInternal[L[doubleCut[edgeI]]];
|
||||
|
||||
sumOffDiag[doubleCutNeighbour[edgeI]] +=
|
||||
cutMask[coeffI]*coeffs[coeffI];
|
||||
|
@ -1085,6 +1149,7 @@ void GlobalPointPatchField
|
|||
|
||||
tmp<Field<scalar> > trpf =
|
||||
reduceExtractPoint<scalar>(localMult);
|
||||
|
||||
Field<scalar>& rpf = trpf();
|
||||
|
||||
// Get addressing
|
||||
|
|
|
@ -103,11 +103,11 @@ bool chDir(const fileName& dir);
|
|||
//
|
||||
// @return the full path name or fileName() if the name cannot be found
|
||||
// Optionally abort if the file cannot be found
|
||||
fileName findEtcFile(const fileName&, bool mandatory=false);
|
||||
fileName findEtcFile(const fileName&, bool mandatory = false);
|
||||
|
||||
//- Make a directory and return an error if it could not be created
|
||||
// and does not already exist
|
||||
bool mkDir(const fileName&, mode_t=0777);
|
||||
bool mkDir(const fileName&, mode_t = 0777);
|
||||
|
||||
//- Set the file mode
|
||||
bool chMod(const fileName&, const mode_t);
|
||||
|
@ -120,14 +120,14 @@ fileName::Type type(const fileName&);
|
|||
|
||||
//- Does the name exist (as DIRECTORY or FILE) in the file system?
|
||||
// Optionally enable/disable check for gzip file.
|
||||
bool exists(const fileName&, const bool checkGzip=true);
|
||||
bool exists(const fileName&, const bool checkGzip = true);
|
||||
|
||||
//- Does the name exist as a DIRECTORY in the file system?
|
||||
bool isDir(const fileName&);
|
||||
|
||||
//- Does the name exist as a FILE in the file system?
|
||||
// Optionally enable/disable check for gzip file.
|
||||
bool isFile(const fileName&, const bool checkGzip=true);
|
||||
bool isFile(const fileName&, const bool checkGzip = true);
|
||||
|
||||
//- Return size of file
|
||||
off_t fileSize(const fileName&);
|
||||
|
@ -139,8 +139,8 @@ time_t lastModified(const fileName&);
|
|||
fileNameList readDir
|
||||
(
|
||||
const fileName&,
|
||||
const fileName::Type=fileName::FILE,
|
||||
const bool filtergz=true
|
||||
const fileName::Type = fileName::FILE,
|
||||
const bool filtergz = true
|
||||
);
|
||||
|
||||
//- Copy, recursively if necessary, the source to the destination
|
||||
|
@ -172,7 +172,7 @@ void fdClose(const int);
|
|||
bool ping(const word&, const label port, const label timeOut);
|
||||
|
||||
//- Check if machine is up by pinging port 22 (ssh) and 222 (rsh)
|
||||
bool ping(const word&, const label timeOut=10);
|
||||
bool ping(const word&, const label timeOut = 10);
|
||||
|
||||
//- Execute the specified command
|
||||
int system(const string& command);
|
||||
|
|
|
@ -99,7 +99,7 @@ Foam::label Foam::cell::opposingFaceLabel
|
|||
{
|
||||
// There has already been an opposite face.
|
||||
// Non-prismatic cell
|
||||
Info<< "Multiple faces not sharing vertex: "
|
||||
Info<< "Multiple faces not sharing vertex: "
|
||||
<< oppositeFaceLabel << " and "
|
||||
<< curFaceLabels[faceI] << endl;
|
||||
return -1;
|
||||
|
|
|
@ -76,7 +76,6 @@ public:
|
|||
face(f),
|
||||
masterIndex_(masterIndex),
|
||||
oppositeIndex_(oppositeIndex)
|
||||
|
||||
{}
|
||||
|
||||
|
||||
|
|
|
@ -260,26 +260,30 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
|||
// Dump transformed first half
|
||||
if (debug)
|
||||
{
|
||||
fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
|
||||
|
||||
pointField transformPoints = half0.localPoints();
|
||||
|
||||
forAll (transformPoints, pointI)
|
||||
if (reverseT_.size() > 0)
|
||||
{
|
||||
transformPoints[pointI] =
|
||||
Foam::transform(reverseT_[0], transformPoints[pointI]);
|
||||
fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
|
||||
|
||||
pointField transformPoints = half0.localPoints();
|
||||
|
||||
forAll (transformPoints, pointI)
|
||||
{
|
||||
transformPoints[pointI] =
|
||||
Foam::transform(reverseT_[0], transformPoints[pointI]);
|
||||
}
|
||||
|
||||
standAlonePatch transformHalf0
|
||||
(
|
||||
half0.localFaces(),
|
||||
transformPoints
|
||||
);
|
||||
|
||||
fileName nm2(fvPath/name() + "_transform_half0_faces");
|
||||
Pout<< "cyclicPolyPatch::calcTransforms : Writing "
|
||||
<< "transform_half0 faces to file " << nm2 << endl;
|
||||
|
||||
transformHalf0.writeVTK(nm2, transformHalf0, transformPoints);
|
||||
}
|
||||
|
||||
standAlonePatch transformHalf0
|
||||
(
|
||||
half0.localFaces(),
|
||||
transformPoints
|
||||
);
|
||||
|
||||
fileName nm2(fvPath/name() + "_transform_half0_faces");
|
||||
Pout<< "cyclicPolyPatch::calcTransforms : Writing transform_half0"
|
||||
<< " faces to file " << nm2 << endl;
|
||||
transformHalf0.writeVTK(nm2, transformHalf0, transformPoints);
|
||||
}
|
||||
|
||||
// Check for error in face matching
|
||||
|
@ -354,31 +358,33 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
|||
}
|
||||
else
|
||||
{
|
||||
maxDistance =
|
||||
Foam::max
|
||||
(
|
||||
maxDistance,
|
||||
mag
|
||||
(
|
||||
half0Ctrs[faceI]
|
||||
- half1Ctrs[faceI]
|
||||
)
|
||||
);
|
||||
// Disable checking for translational distance
|
||||
// HJ, 13/Jan/2011
|
||||
// maxDistance =
|
||||
// Foam::max
|
||||
// (
|
||||
// maxDistance,
|
||||
// mag
|
||||
// (
|
||||
// half0Ctrs[faceI]
|
||||
// - half1Ctrs[faceI]
|
||||
// )
|
||||
// );
|
||||
|
||||
maxRelDistance =
|
||||
Foam::max
|
||||
(
|
||||
maxRelDistance,
|
||||
mag
|
||||
(
|
||||
half0Ctrs[faceI]
|
||||
- half1Ctrs[faceI]
|
||||
)
|
||||
/(
|
||||
mag(half1Ctrs[faceI] - half0Ctrs[faceI])
|
||||
+ SMALL
|
||||
)
|
||||
);
|
||||
// maxRelDistance =
|
||||
// Foam::max
|
||||
// (
|
||||
// maxRelDistance,
|
||||
// mag
|
||||
// (
|
||||
// half0Ctrs[faceI]
|
||||
// - half1Ctrs[faceI]
|
||||
// )
|
||||
// /(
|
||||
// mag(half1Ctrs[faceI] - half0Ctrs[faceI])
|
||||
// + SMALL
|
||||
// )
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -239,15 +239,6 @@ public:
|
|||
//- Attach regions
|
||||
void detach() const;
|
||||
|
||||
//- Is this the master side?
|
||||
bool master() const;
|
||||
|
||||
//- Is this the slave side?
|
||||
bool slave() const
|
||||
{
|
||||
return !master();
|
||||
}
|
||||
|
||||
//- Return shadow patch
|
||||
const regionCouplePolyPatch& shadow() const;
|
||||
|
||||
|
|
|
@ -217,8 +217,6 @@ void Foam::faceZone::calcCellLayers() const
|
|||
mc[faceI] = curMc;
|
||||
sc[faceI] = curSc;
|
||||
}
|
||||
//Info << "masterCells: " << mc << endl;
|
||||
//Info << "slaveCells: " << sc << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -263,8 +263,8 @@ public:
|
|||
}
|
||||
|
||||
//- Map storing the local face index for every global face index.
|
||||
// Used to find out the index of face in the zone from the known global
|
||||
// face index. If the face is not in the zone, returns -1
|
||||
// Used to find out the index of face in the zone from the known
|
||||
// global face index. If the face is not in the zone, returns -1
|
||||
label whichFace(const label globalFaceID) const;
|
||||
|
||||
//- Return reference to primitive patch
|
||||
|
|
|
@ -238,7 +238,7 @@ void Foam::attachDetach::checkDefinition()
|
|||
{
|
||||
FatalErrorIn("void attachDetach::checkDefinition()")
|
||||
<< "Master and slave patch share " << nSharedPoints
|
||||
<< " point. This is not allowed." << nl
|
||||
<< " point. This is not allowed." << nl
|
||||
<< "Please check mesh for topological errors."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ void Foam::attachDetach::attachInterface
|
|||
polyModifyFace
|
||||
(
|
||||
faces[masterPatchStart + faceI], // modified face
|
||||
masterPatchStart + faceI, // label of face being modified
|
||||
masterPatchStart + faceI, // label of face being modified
|
||||
masterFaceCells[faceI], // owner
|
||||
slaveFaceCells[faceI], // neighbour
|
||||
false, // face flip
|
||||
|
@ -128,7 +128,7 @@ void Foam::attachDetach::attachInterface
|
|||
polyModifyFace
|
||||
(
|
||||
faces[masterPatchStart + faceI].reverseFace(), // mod face
|
||||
masterPatchStart + faceI, // label of face being modified
|
||||
masterPatchStart + faceI, // label of face being modified
|
||||
slaveFaceCells[faceI], // owner
|
||||
masterFaceCells[faceI], // neighbour
|
||||
true, // face flip
|
||||
|
@ -204,7 +204,7 @@ void Foam::attachDetach::attachInterface
|
|||
mesh.faceZones()[modifiedFaceZone].whichFace(curFaceID)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
// Modify the face
|
||||
label curNeighbour = -1;
|
||||
|
||||
|
@ -222,7 +222,7 @@ void Foam::attachDetach::attachInterface
|
|||
own[curFaceID], // owner
|
||||
curNeighbour, // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID),// patch for face
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
|
@ -251,7 +251,7 @@ void Foam::attachDetach::modifyMotionPoints
|
|||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "void attachDetach::modifyMotionPoints("
|
||||
Pout<< "void attachDetach::modifyMotionPoints("
|
||||
<< "pointField& motionPoints) const "
|
||||
<< " for object " << name() << " : "
|
||||
<< "Adjusting motion points." << endl;
|
||||
|
|
|
@ -42,9 +42,9 @@ void Foam::attachDetach::detachInterface
|
|||
// 2. Modify all faces of the master zone, by putting them into the master
|
||||
// patch (look for orientation) and their renumbered mirror images
|
||||
// into the slave patch
|
||||
// 3. Create a point renumbering list, giving a new point index for original
|
||||
// points in the face patch
|
||||
// 4. Grab all faces in cells on the master side and renumber them
|
||||
// 3. Create a point renumbering list, giving a new point index for
|
||||
// original points in the face patch
|
||||
// 4. Grab all faces in cells on the master side and renumber them
|
||||
// using the point renumbering list. Exclude the ones that belong to
|
||||
// the master face zone
|
||||
//
|
||||
|
@ -70,7 +70,9 @@ void Foam::attachDetach::detachInterface
|
|||
const polyMesh& mesh = topoChanger().mesh();
|
||||
const faceZoneMesh& zoneMesh = mesh.faceZones();
|
||||
|
||||
const primitiveFacePatch& masterFaceLayer = zoneMesh[faceZoneID_.index()]();
|
||||
const primitiveFacePatch& masterFaceLayer =
|
||||
zoneMesh[faceZoneID_.index()]();
|
||||
|
||||
const pointField& points = mesh.points();
|
||||
const labelListList& meshEdgeFaces = mesh.edgeFaces();
|
||||
|
||||
|
@ -88,7 +90,12 @@ void Foam::attachDetach::detachInterface
|
|||
// with their original labels to stop duplication
|
||||
label nIntEdges = masterFaceLayer.nInternalEdges();
|
||||
|
||||
for (label curEdgeID = nIntEdges; curEdgeID < meshEdges.size(); curEdgeID++)
|
||||
for
|
||||
(
|
||||
label curEdgeID = nIntEdges;
|
||||
curEdgeID < meshEdges.size();
|
||||
curEdgeID++
|
||||
)
|
||||
{
|
||||
const labelList& curFaces = meshEdgeFaces[meshEdges[curEdgeID]];
|
||||
|
||||
|
@ -374,6 +381,33 @@ void Foam::attachDetach::detachInterface
|
|||
// If the face has changed, create a modification entry
|
||||
if (changed)
|
||||
{
|
||||
// Get zone ID and flipMap for the face
|
||||
// Bug fix. Henrik Rusche, 20/Jan/2011
|
||||
const label oldZoneID = zoneMesh.whichZone(curFaceID);
|
||||
bool oldFlip = false;
|
||||
|
||||
if (oldZoneID > -1)
|
||||
{
|
||||
const label oldFaceInZoneID =
|
||||
zoneMesh[oldZoneID].whichFace(curFaceID);
|
||||
|
||||
if (oldFaceInZoneID > -1)
|
||||
{
|
||||
oldFlip = zoneMesh[oldZoneID].flipMap()[oldFaceInZoneID];
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"attachDetach::detachInterface\n"
|
||||
"(\n"
|
||||
" polyTopoChange& ref\n"
|
||||
") const\n"
|
||||
) << "Error in zone access."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
if (mesh.isInternalFace(curFaceID))
|
||||
{
|
||||
// No need to check for nei index: internal face.
|
||||
|
@ -389,8 +423,8 @@ void Foam::attachDetach::detachInterface
|
|||
false, // flip flux
|
||||
-1, // patch for face
|
||||
false, // remove from zone
|
||||
-1, // zone for face
|
||||
false // face zone flip
|
||||
oldZoneID, // zone for face
|
||||
oldFlip // face zone flip
|
||||
)
|
||||
);
|
||||
// Pout << "modifying stick-out face. Internal Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " nei: " << nei[curFaceID] << endl;
|
||||
|
@ -408,12 +442,12 @@ void Foam::attachDetach::detachInterface
|
|||
false, // flip flux
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch
|
||||
false, // remove from zone
|
||||
-1, // zone for face
|
||||
false // face zone flip
|
||||
oldZoneID, // zone for face
|
||||
oldFlip // face zone flip
|
||||
)
|
||||
);
|
||||
);
|
||||
// Pout << "modifying stick-out face. Boundary Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " patch: " << mesh.boundaryMesh().whichPatch(curFaceID) << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -217,6 +217,18 @@ Foam::layerAdditionRemoval::~layerAdditionRemoval()
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::layerAdditionRemoval::setRemoval()
|
||||
{
|
||||
triggerRemoval_ = topoChanger().morphIndex();
|
||||
}
|
||||
|
||||
|
||||
void Foam::layerAdditionRemoval::setAddition()
|
||||
{
|
||||
triggerAddition_ = topoChanger().morphIndex();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::layerAdditionRemoval::changeTopology() const
|
||||
{
|
||||
// Protect from multiple calculation in the same time-step
|
||||
|
|
|
@ -170,6 +170,12 @@ public:
|
|||
|
||||
// Member Functions
|
||||
|
||||
//- Set layer removal
|
||||
void setRemoval();
|
||||
|
||||
//- Set addition
|
||||
void setAddition();
|
||||
|
||||
//- Check for topology change
|
||||
virtual bool changeTopology() const;
|
||||
|
||||
|
|
|
@ -168,7 +168,8 @@ void regionCoupleFvPatchField<Type>::evaluate
|
|||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
// Implement weights-based stabilised harmonic interpolation using magnitude
|
||||
// Implement weights-based stabilised harmonic interpolation using
|
||||
// magnitude of type
|
||||
// Algorithm:
|
||||
// 1) calculate magnitude of internal field and neighbour field
|
||||
// 2) calculate harmonic mean magnitude
|
||||
|
@ -189,7 +190,7 @@ void regionCoupleFvPatchField<Type>::evaluate
|
|||
|
||||
forAll (weights, faceI)
|
||||
{
|
||||
den = (mOwn[faceI] - mNei[faceI]);
|
||||
den = mOwn[faceI] - mNei[faceI];
|
||||
|
||||
if (mag(den) > SMALL)
|
||||
{
|
||||
|
|
|
@ -39,20 +39,12 @@ License
|
|||
#include "mapClouds.H"
|
||||
|
||||
#include "volPointInterpolation.H"
|
||||
#include "extendedLeastSquaresVectors.H"
|
||||
#include "extendedLeastSquaresVectors.H"
|
||||
#include "leastSquaresVectors.H"
|
||||
#include "CentredFitData.H"
|
||||
#include "linearFitPolynomial.H"
|
||||
#include "quadraticFitPolynomial.H"
|
||||
#include "quadraticLinearFitPolynomial.H"
|
||||
//#include "quadraticFitSnGradData.H"
|
||||
#include "skewCorrectionVectors.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Foam::fvMesh, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::fvMesh::clearGeomNotOldVol()
|
||||
|
|
|
@ -113,9 +113,14 @@ public:
|
|||
}
|
||||
|
||||
// Stabilise for division
|
||||
gradf = stabilise(gradf, VSMALL);
|
||||
// Changed to SMALL to prevent FPE. OB, 14/Jan/2011
|
||||
gradf = stabilise(gradf, SMALL);
|
||||
|
||||
return 2*(gradcf/gradf) - 1;
|
||||
// New formulation. Oliver Borm and Aleks Jemcov
|
||||
// HJ, 13/Jan/2011
|
||||
return max(2*(gradcf/gradf) - 1, 0);
|
||||
|
||||
// return 2*(gradcf/gradf) - 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -114,9 +114,14 @@ public:
|
|||
}
|
||||
|
||||
// Stabilise for division
|
||||
gradf = stabilise(gradf, VSMALL);
|
||||
//Changed to SMALL to prevent FPE. OB, 14/Jan/2011
|
||||
gradf = stabilise(gradf, SMALL);
|
||||
|
||||
return 2*(gradcf/gradf) - 1;
|
||||
// New formulation. Oliver Borm and Aleks Jemcov
|
||||
// HJ, 13/Jan/2011
|
||||
return max(2*(gradcf/gradf) - 1, 0);
|
||||
|
||||
// return 2*(gradcf/gradf) - 1;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
this->mesh()
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("upwindLimiter", dimless, 0.0)
|
||||
dimless
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,11 @@ public:
|
|||
faceFlux, phiP, phiN, gradcP, gradcN, d
|
||||
);
|
||||
|
||||
return r*(r + 1)/(sqr(r) + 1);
|
||||
// New formulation. Oliver Borm and Aleks Jemcov
|
||||
// HJ, 13/Jan/2011
|
||||
return (r + 1)/(r + 1/stabilise(r, VSMALL));
|
||||
|
||||
// return r*(r + 1)/(sqr(r) + 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -34,15 +34,7 @@ Description
|
|||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(harmonic, 0);
|
||||
|
||||
surfaceInterpolationScheme<scalar>::addMeshFluxConstructorToTable<harmonic>
|
||||
addharmonicScalarMeshFluxConstructorToTable_;
|
||||
|
||||
surfaceInterpolationScheme<scalar>::addMeshConstructorToTable<harmonic>
|
||||
addharmonicScalarMeshConstructorToTable_;
|
||||
|
||||
makeSurfaceInterpolationScheme(harmonic)
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -42,7 +42,6 @@ SourceFiles
|
|||
#include "surfaceInterpolationScheme.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "reverseLinear.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -53,9 +52,10 @@ namespace Foam
|
|||
Class harmonic Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class harmonic
|
||||
:
|
||||
public surfaceInterpolationScheme<scalar>
|
||||
public surfaceInterpolationScheme<Type>
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
|
@ -74,10 +74,10 @@ public:
|
|||
//- Construct from mesh
|
||||
harmonic(const fvMesh& mesh)
|
||||
:
|
||||
surfaceInterpolationScheme<scalar>(mesh)
|
||||
surfaceInterpolationScheme<Type>(mesh)
|
||||
{}
|
||||
|
||||
//- Construct from Istream.
|
||||
//- Construct from Istream
|
||||
// The name of the flux field is read from the Istream and looked-up
|
||||
// from the mesh objectRegistry
|
||||
harmonic
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
Istream& is
|
||||
)
|
||||
:
|
||||
surfaceInterpolationScheme<scalar>(mesh)
|
||||
surfaceInterpolationScheme<Type>(mesh)
|
||||
{}
|
||||
|
||||
//- Construct from faceFlux and Istream
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
Istream& is
|
||||
)
|
||||
:
|
||||
surfaceInterpolationScheme<scalar>(mesh)
|
||||
surfaceInterpolationScheme<Type>(mesh)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -106,26 +106,60 @@ public:
|
|||
//- Return the interpolation weighting factors
|
||||
virtual tmp<surfaceScalarField> weights
|
||||
(
|
||||
const GeometricField<scalar, fvPatchField, volMesh>&
|
||||
const GeometricField<Type, fvPatchField, volMesh>& phi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
tmp<surfaceScalarField> tw
|
||||
(
|
||||
"harmonic::weights"
|
||||
"(const GeometricField<scalar, fvPatchField, volMesh>&)"
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"harmonicWeightingFactors" + phi.name(),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh()
|
||||
),
|
||||
this->mesh() ,
|
||||
dimless
|
||||
)
|
||||
);
|
||||
|
||||
return tmp<surfaceScalarField>(NULL);
|
||||
}
|
||||
surfaceScalarField& w = tw();
|
||||
|
||||
//- Return the face-interpolate of the given cell field
|
||||
virtual tmp<GeometricField<scalar, fvsPatchField, surfaceMesh> >
|
||||
interpolate
|
||||
(
|
||||
const GeometricField<scalar, fvPatchField, volMesh>& vf
|
||||
) const
|
||||
{
|
||||
return 1.0/(reverseLinear<scalar>(vf.mesh()).interpolate(1.0/vf));
|
||||
const unallocLabelList& owner = this->mesh().owner();
|
||||
const unallocLabelList& neighbour = this->mesh().neighbour();
|
||||
|
||||
scalarField magPhi = mag(phi);
|
||||
|
||||
// Initialise weights to 0.5 for uniform field (den = 0)
|
||||
scalarField& wIn = w.internalField();
|
||||
wIn = 0.5;
|
||||
|
||||
// Calculate internal weights using field magnitude
|
||||
scalar mOwn, mNei, den, mean;
|
||||
|
||||
forAll (owner, faceI)
|
||||
{
|
||||
mOwn = magPhi[owner[faceI]];
|
||||
mNei = magPhi[neighbour[faceI]];
|
||||
|
||||
mean = 2*(mOwn*mNei)/(mOwn + mNei + SMALL);
|
||||
den = mOwn - mNei;
|
||||
|
||||
if (mag(den) > SMALL)
|
||||
{
|
||||
wIn[faceI] = (mean - mNei)/den;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use 0.5 weights
|
||||
}
|
||||
}
|
||||
|
||||
// Boundary weights are 1
|
||||
w.boundaryField() = 1;
|
||||
|
||||
return tw;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ template<class Type>
|
|||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
|
||||
linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf)
|
||||
{
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp =
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp =
|
||||
linearInterpolate(tvf());
|
||||
tvf.clear();
|
||||
return tinterp;
|
||||
|
|
|
@ -98,7 +98,9 @@ void Foam::directMappedPatchBase::collectSamples
|
|||
labelListList globalFaces(Pstream::nProcs());
|
||||
|
||||
globalFc[Pstream::myProcNo()] = patch_.faceCentres();
|
||||
globalSamples[Pstream::myProcNo()] = globalFc[Pstream::myProcNo()]+offsets_;
|
||||
globalSamples[Pstream::myProcNo()] =
|
||||
globalFc[Pstream::myProcNo()] + offsets_;
|
||||
|
||||
globalFaces[Pstream::myProcNo()] = identity(patch_.size());
|
||||
|
||||
// Distribute to all processors
|
||||
|
@ -115,11 +117,13 @@ void Foam::directMappedPatchBase::collectSamples
|
|||
globalSamples,
|
||||
accessOp<pointField>()
|
||||
);
|
||||
|
||||
patchFaces = ListListOps::combine<labelList>
|
||||
(
|
||||
globalFaces,
|
||||
accessOp<labelList>()
|
||||
);
|
||||
|
||||
patchFc = ListListOps::combine<pointField>
|
||||
(
|
||||
globalFc,
|
||||
|
@ -135,8 +139,9 @@ void Foam::directMappedPatchBase::collectSamples
|
|||
accessOp<labelList>()
|
||||
)
|
||||
);
|
||||
|
||||
label sampleI = 0;
|
||||
forAll(nPerProc, procI)
|
||||
forAll (nPerProc, procI)
|
||||
{
|
||||
for (label i = 0; i < nPerProc[procI]; i++)
|
||||
{
|
||||
|
@ -173,13 +178,14 @@ void Foam::directMappedPatchBase::findSamples
|
|||
"directMappedPatchBase::findSamples(const pointField&,"
|
||||
" labelList&, labelList&, pointField&) const"
|
||||
) << "No need to supply a patch name when in "
|
||||
<< sampleModeNames_[mode_] << " mode." << exit(FatalError);
|
||||
<< sampleModeNames_[mode_] << " mode."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Octree based search engine
|
||||
meshSearch meshSearchEngine(mesh, false);
|
||||
|
||||
forAll(samples, sampleI)
|
||||
forAll (samples, sampleI)
|
||||
{
|
||||
const point& sample = samples[sampleI];
|
||||
|
||||
|
@ -200,7 +206,7 @@ void Foam::directMappedPatchBase::findSamples
|
|||
cc,
|
||||
cellI
|
||||
);
|
||||
nearest[sampleI].second().first() = magSqr(cc-sample);
|
||||
nearest[sampleI].second().first() = magSqr(cc - sample);
|
||||
nearest[sampleI].second().second() = Pstream::myProcNo();
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +221,7 @@ void Foam::directMappedPatchBase::findSamples
|
|||
|
||||
if (pp.empty())
|
||||
{
|
||||
forAll(samples, sampleI)
|
||||
forAll (samples, sampleI)
|
||||
{
|
||||
nearest[sampleI].second().first() = Foam::sqr(GREAT);
|
||||
nearest[sampleI].second().second() = Pstream::myProcNo();
|
||||
|
@ -251,7 +257,7 @@ void Foam::directMappedPatchBase::findSamples
|
|||
3.0 // duplicity
|
||||
);
|
||||
|
||||
forAll(samples, sampleI)
|
||||
forAll (samples, sampleI)
|
||||
{
|
||||
const point& sample = samples[sampleI];
|
||||
|
||||
|
@ -290,13 +296,14 @@ void Foam::directMappedPatchBase::findSamples
|
|||
"directMappedPatchBase::findSamples(const pointField&,"
|
||||
" labelList&, labelList&, pointField&) const"
|
||||
) << "No need to supply a patch name when in "
|
||||
<< sampleModeNames_[mode_] << " mode." << exit(FatalError);
|
||||
<< sampleModeNames_[mode_] << " mode."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Octree based search engine
|
||||
meshSearch meshSearchEngine(mesh, false);
|
||||
|
||||
forAll(samples, sampleI)
|
||||
forAll (samples, sampleI)
|
||||
{
|
||||
const point& sample = samples[sampleI];
|
||||
|
||||
|
@ -340,20 +347,21 @@ void Foam::directMappedPatchBase::findSamples
|
|||
{
|
||||
Info<< "directMappedPatchBase::findSamples on mesh " << sampleRegion_
|
||||
<< " : " << endl;
|
||||
forAll(nearest, sampleI)
|
||||
|
||||
forAll (nearest, sampleI)
|
||||
{
|
||||
label procI = nearest[sampleI].second().second();
|
||||
label localI = nearest[sampleI].first().index();
|
||||
|
||||
Info<< " " << sampleI << " coord:"<< samples[sampleI]
|
||||
<< " found on processor:" << procI
|
||||
<< " in local cell/face:" << localI
|
||||
<< " with cc:" << nearest[sampleI].first().rawPoint() << endl;
|
||||
Info<< " " << sampleI << " coord: "<< samples[sampleI]
|
||||
<< " found on processor: " << procI
|
||||
<< " in local cell/face: " << localI
|
||||
<< " with cc: " << nearest[sampleI].first().rawPoint() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for samples not being found
|
||||
forAll(nearest, sampleI)
|
||||
forAll (nearest, sampleI)
|
||||
{
|
||||
if (!nearest[sampleI].first().hit())
|
||||
{
|
||||
|
@ -363,8 +371,8 @@ void Foam::directMappedPatchBase::findSamples
|
|||
"(const pointField&, labelList&"
|
||||
", labelList&, pointField&)"
|
||||
) << "Did not find sample " << samples[sampleI]
|
||||
<< " on any processor of region" << sampleRegion_
|
||||
<< exit(FatalError);
|
||||
<< " on any processor of region " << sampleRegion_
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,7 +382,7 @@ void Foam::directMappedPatchBase::findSamples
|
|||
sampleIndices.setSize(samples.size());
|
||||
sampleLocations.setSize(samples.size());
|
||||
|
||||
forAll(nearest, sampleI)
|
||||
forAll (nearest, sampleI)
|
||||
{
|
||||
sampleProcs[sampleI] = nearest[sampleI].second().second();
|
||||
sampleIndices[sampleI] = nearest[sampleI].first().index();
|
||||
|
@ -388,7 +396,8 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
if (mapPtr_.valid())
|
||||
{
|
||||
FatalErrorIn("directMappedPatchBase::calcMapping() const")
|
||||
<< "Mapping already calculated" << exit(FatalError);
|
||||
<< "Mapping already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if
|
||||
|
@ -415,7 +424,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
}
|
||||
|
||||
|
||||
// Get global list of all samples and the processor and face they come from.
|
||||
// Get global list of all samples and the processor and face they come from
|
||||
pointField samples;
|
||||
labelList patchFaceProcs;
|
||||
labelList patchFaces;
|
||||
|
@ -435,7 +444,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
// - cell/face sample is in (so source when mapping)
|
||||
// sampleIndices, sampleProcs.
|
||||
|
||||
//forAll(samples, i)
|
||||
//forAll (samples, i)
|
||||
//{
|
||||
// Info<< i << " need data in region "
|
||||
// << patch_.boundaryMesh().mesh().name()
|
||||
|
@ -464,7 +473,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
|
||||
label vertI = 0;
|
||||
|
||||
forAll(patchFc, i)
|
||||
forAll (patchFc, i)
|
||||
{
|
||||
meshTools::writeOBJ(str, patchFc[i]);
|
||||
vertI++;
|
||||
|
@ -482,7 +491,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
// const scalarField magOffset(mag(sampleLocations - patchFc));
|
||||
// const scalar avgOffset(average(magOffset));
|
||||
//
|
||||
// forAll(magOffset, sampleI)
|
||||
// forAll (magOffset, sampleI)
|
||||
// {
|
||||
// if
|
||||
// (
|
||||
|
@ -518,7 +527,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
labelListList& subMap = mapPtr_().subMap();
|
||||
labelListList& constructMap = mapPtr_().constructMap();
|
||||
|
||||
forAll(subMap, procI)
|
||||
forAll (subMap, procI)
|
||||
{
|
||||
subMap[procI] = UIndirectList<label>
|
||||
(
|
||||
|
@ -547,11 +556,11 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
{
|
||||
// Check that all elements get a value.
|
||||
PackedBoolList used(patch_.size());
|
||||
forAll(constructMap, procI)
|
||||
forAll (constructMap, procI)
|
||||
{
|
||||
const labelList& map = constructMap[procI];
|
||||
|
||||
forAll(map, i)
|
||||
forAll (map, i)
|
||||
{
|
||||
label faceI = map[i];
|
||||
|
||||
|
@ -569,7 +578,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
|||
}
|
||||
}
|
||||
}
|
||||
forAll(used, faceI)
|
||||
forAll (used, faceI)
|
||||
{
|
||||
if (used[faceI] == 0)
|
||||
{
|
||||
|
@ -734,7 +743,7 @@ const Foam::polyPatch& Foam::directMappedPatchBase::samplePolyPatch() const
|
|||
<< "Cannot find patch " << samplePatch_
|
||||
<< " in region " << sampleRegion_ << endl
|
||||
<< "Valid patches are " << nbrMesh.boundaryMesh().names()
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return nbrMesh.boundaryMesh()[patchI];
|
||||
|
|
|
@ -30,7 +30,7 @@ Description
|
|||
centres and processors they're on.
|
||||
|
||||
Note
|
||||
Storage is not optimal. It temporary collects all (patch)face centres
|
||||
Storage is not optimal. It temporary collects all (patch) face centres
|
||||
on all processors to keep the addressing calculation simple.
|
||||
|
||||
SourceFiles
|
||||
|
|
|
@ -191,12 +191,14 @@ Foam::radiation::P1::Ru() const
|
|||
{
|
||||
const DimensionedField<scalar, volMesh>& G =
|
||||
G_.dimensionedInternalField();
|
||||
|
||||
const DimensionedField<scalar, volMesh> E =
|
||||
absorptionEmission_->ECont()().dimensionedInternalField();
|
||||
|
||||
const DimensionedField<scalar, volMesh> a =
|
||||
absorptionEmission_->aCont()().dimensionedInternalField();
|
||||
|
||||
return a*G - 4.0*E;
|
||||
return a*G - 4.0*E;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
|
|
|
@ -29,17 +29,17 @@ gradSchemes
|
|||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,rho) Gauss limitedLinear 1;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
div(phi,rho) Gauss vanLeer;
|
||||
div(phi,U) Gauss linearUpwind Gauss linear;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div(phi,Yi_h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,Yi_h) Gauss vanLeer;
|
||||
div(phi,fu_ft_h) Gauss multivariateSelection
|
||||
{
|
||||
fu limitedLinear 1;
|
||||
ft limitedLinear 1;
|
||||
hs limitedLinear 1;
|
||||
fu vanLeer;
|
||||
ft vanLeer;
|
||||
hs vanLeer;
|
||||
};
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ solvers
|
|||
preconditioner DIC;
|
||||
tolerance 1e-09;
|
||||
relTol 0;
|
||||
minIter 1;
|
||||
}
|
||||
|
||||
rho
|
||||
|
@ -35,14 +36,15 @@ solvers
|
|||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
minIter 1;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 2;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
|
|
17
tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/Allclean
Executable file
17
tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/Allclean
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cases="fluid solid"
|
||||
|
||||
for case in $cases
|
||||
do
|
||||
cd $case
|
||||
cleanCase $case
|
||||
cd ..
|
||||
done
|
||||
|
||||
cd fluid
|
||||
rm -f constant/solid system/solid 0/solid
|
||||
cd ..
|
27
tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/Allrun
Executable file
27
tutorials/stressAnalysis/icoFsiFoam/flappingConsoleSmall/Allrun
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=icoFsiFoam
|
||||
|
||||
cd fluid
|
||||
runApplication blockMesh
|
||||
cd constant
|
||||
ln -s ../../solid/constant solid
|
||||
cd ..
|
||||
cd 0
|
||||
ln -s ../../solid/0 solid
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
cd solid
|
||||
runApplication blockMesh
|
||||
cd ..
|
||||
pwd
|
||||
|
||||
makeFsiCaseLinks fluid solid
|
||||
cd fluid
|
||||
runApplication $application
|
||||
cd ..
|
||||
makeFsiResultsLinks fluid solid
|
|
@ -0,0 +1,56 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
consoleFluid
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
topWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
bottomWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (4 0 0);
|
||||
}
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,63 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class tetPointVectorField;
|
||||
object motionU;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
consoleFluid
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topWall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottomWall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,59 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
consoleFluid
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
topWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottomWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type totalPressure;
|
||||
p0 uniform 0;
|
||||
U U;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi none;
|
||||
gamma 1;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,25 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object couplingProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solidPatch consoleSolid;
|
||||
|
||||
fluidPatch consoleFluid;
|
||||
|
||||
movingRegion region0;
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,35 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object motionProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
|
||||
twoDMotion yes;
|
||||
|
||||
solver laplaceFaceDecomposition;
|
||||
|
||||
diffusivity quadratic;
|
||||
|
||||
frozenDiffusion on;
|
||||
|
||||
distancePatches
|
||||
(
|
||||
consoleFluid
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,100 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-2 0 -0.1)
|
||||
(0 0 -0.1)
|
||||
(0.05 0 -0.1)
|
||||
(4 0 -0.1)
|
||||
(-2 0.6 -0.1)
|
||||
(0 0.6 -0.1)
|
||||
(0.05 0.6 -0.1)
|
||||
(4 0.6 -0.1)
|
||||
(-2 1 -0.1)
|
||||
(0 1 -0.1)
|
||||
(0.05 1 -0.1)
|
||||
(4 1 -0.1)
|
||||
|
||||
(-2 0 0.1)
|
||||
(0 0 0.1)
|
||||
(0.05 0 0.1)
|
||||
(4 0 0.1)
|
||||
(-2 0.6 0.1)
|
||||
(0 0.6 0.1)
|
||||
(0.05 0.6 0.1)
|
||||
(4 0.6 0.1)
|
||||
(-2 1 0.1)
|
||||
(0 1 0.1)
|
||||
(0.05 1 0.1)
|
||||
(4 1 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 12 13 17 16) (40 20 1) simpleGrading (0.1 0.2 1)
|
||||
hex (2 3 7 6 14 15 19 18) (80 20 1) simpleGrading (10 0.2 1)
|
||||
hex (4 5 9 8 16 17 21 20) (40 20 1) simpleGrading (0.1 2 1)
|
||||
hex (5 6 10 9 17 18 22 21) (5 20 1) simpleGrading (1 2 1)
|
||||
hex (6 7 11 10 18 19 23 22) (80 20 1) simpleGrading (10 2 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch consoleFluid
|
||||
(
|
||||
(1 13 17 5)
|
||||
(5 17 18 6)
|
||||
(6 18 14 2)
|
||||
)
|
||||
wall topWall
|
||||
(
|
||||
(8 20 21 9)
|
||||
(9 21 22 10)
|
||||
(10 22 23 11)
|
||||
)
|
||||
wall bottomWall
|
||||
(
|
||||
(0 1 13 12)
|
||||
(2 3 15 14)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(3 7 19 15)
|
||||
(7 11 23 19)
|
||||
)
|
||||
wall inlet
|
||||
(
|
||||
(0 12 16 4)
|
||||
(4 16 20 8)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,58 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
consoleFluid
|
||||
{
|
||||
type patch;
|
||||
nFaces 45;
|
||||
startFace 9615;
|
||||
}
|
||||
topWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 125;
|
||||
startFace 9660;
|
||||
}
|
||||
bottomWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 120;
|
||||
startFace 9785;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 40;
|
||||
startFace 9905;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type wall;
|
||||
nFaces 40;
|
||||
startFace 9945;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
nFaces 9800;
|
||||
startFace 9985;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,24 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 0.001;
|
||||
|
||||
rho rho [1 -3 0 0 0 0 0] 1;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,54 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application icoFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 50;
|
||||
|
||||
deltaT 0.0003;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 20;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression compressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,67 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
d2dt2(U) Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phiNet,U) Gauss limitedLinearV 1;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(nu,U) Gauss linear corrected;
|
||||
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
interpolate(HbyA) linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,49 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver CG;
|
||||
preconditioner Cholesky;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner Cholesky;
|
||||
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,42 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object sampleDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
|
||||
writeFormat raw;
|
||||
|
||||
sampleSets
|
||||
(
|
||||
uniform
|
||||
{
|
||||
name cutLine;
|
||||
axis distance;
|
||||
start (0 0.05 0.0005);
|
||||
end (0.1 0.05 0.0005);
|
||||
nPoints 100;
|
||||
}
|
||||
);
|
||||
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,32 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object tetFemSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
motionU
|
||||
{
|
||||
solver CG;
|
||||
preconditioner Cholesky;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,49 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
consoleSolid
|
||||
{
|
||||
type tractionDisplacement;
|
||||
traction uniform (0 0 0);
|
||||
pressure uniform 0;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
consoleFixed
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,28 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object mechanicalProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
rho rho [1 -3 0 0 0 0 0] 1000;
|
||||
|
||||
nu nu [0 0 0 0 0 0 0] 0.3;
|
||||
|
||||
E E [1 -1 -2 0 0 0 0] 2e+6;
|
||||
|
||||
planeStress yes;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,66 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 -0.1)
|
||||
(0.05 0 -0.1)
|
||||
(0.05 0.6 -0.1)
|
||||
(0 0.6 -0.1)
|
||||
(0 0 0.1)
|
||||
(0.05 0 0.1)
|
||||
(0.05 0.6 0.1)
|
||||
(0 0.6 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (10 45 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch consoleSolid
|
||||
(
|
||||
(3 7 6 2)
|
||||
(0 4 7 3)
|
||||
(2 6 5 1)
|
||||
)
|
||||
patch consoleFixed
|
||||
(
|
||||
(1 5 4 0)
|
||||
)
|
||||
empty frontAndBackPlanes
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,40 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
3
|
||||
(
|
||||
consoleSolid
|
||||
{
|
||||
type patch;
|
||||
nFaces 100;
|
||||
startFace 845;
|
||||
}
|
||||
consoleFixed
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 945;
|
||||
}
|
||||
frontAndBackPlanes
|
||||
{
|
||||
type empty;
|
||||
nFaces 900;
|
||||
startFace 955;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,52 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 50;
|
||||
|
||||
deltaT 0.0003;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 20;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression compressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,62 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
d2dt2Schemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
grad(T) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(sigma) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(DU,U) Gauss linear corrected;
|
||||
laplacian(DT,T) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
U;
|
||||
T;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,38 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
U
|
||||
{
|
||||
solver CG;
|
||||
preconditioner Cholesky;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
stressedFoam
|
||||
{
|
||||
nCorrectors 50;
|
||||
U 1e-07;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Reference in a new issue