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[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
#include "createTime.H"
|
# include "createTime.H"
|
||||||
#include "createMesh.H"
|
# include "createMesh.H"
|
||||||
#include "readGravitationalAcceleration.H"
|
# include "readGravitationalAcceleration.H"
|
||||||
#include "createFields.H"
|
# include "createFields.H"
|
||||||
#include "createRadiationModel.H"
|
# include "createRadiationModel.H"
|
||||||
#include "initContinuityErrs.H"
|
# include "initContinuityErrs.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -57,17 +57,17 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "readSIMPLEControls.H"
|
# include "readSIMPLEControls.H"
|
||||||
#include "initConvergenceCheck.H"
|
# include "initConvergenceCheck.H"
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
rho.storePrevIter();
|
rho.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// Pressure-velocity SIMPLE corrector
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
# include "UEqn.H"
|
||||||
#include "hEqn.H"
|
# include "hEqn.H"
|
||||||
#include "pEqn.H"
|
# include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
#include "convergenceCheck.H"
|
# include "convergenceCheck.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
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>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
<meta name="date" content="2007-04-12 00:02:00">
|
<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="../Doxygen.css">
|
||||||
<link rel="stylesheet" type="text/css" href="../tabs.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="keywords" content="computational fluid dynamics, CFD, 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="description" content="OpenFOAM-Extend Project: Open Source Development of High Quality CFD Tools">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a id="openfoam"> </a>
|
<a id="openfoam"> </a>
|
||||||
|
@ -45,20 +45,8 @@ horizontal-align: left; ">
|
||||||
class=menuLefton >Source Guide</a>
|
class=menuLefton >Source Guide</a>
|
||||||
</td>
|
</td>
|
||||||
<td class=topmenu>
|
<td class=topmenu>
|
||||||
<a href="http://www.opencfd.co.uk/index.html"
|
<a href="http://www.extend-project.de"
|
||||||
class=menuTopoff >OpenCFD</a>
|
class=menuTopoff >OpenFOAM-Extend Project</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>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -904,8 +904,7 @@ Tolerances
|
||||||
primitiveMeshFaceFlatnessThreshold 0.8;
|
primitiveMeshFaceFlatnessThreshold 0.8;
|
||||||
|
|
||||||
// Geometric matching tolerances
|
// Geometric matching tolerances
|
||||||
cyclicMatchTol 1e-4;
|
patchFaceMatchTol 1e-4;
|
||||||
processorMatchTol 1e-4;
|
|
||||||
|
|
||||||
// Volumetric closed domain
|
// Volumetric closed domain
|
||||||
closedDomainTol 1e-10;
|
closedDomainTol 1e-10;
|
||||||
|
|
|
@ -95,11 +95,13 @@ public:
|
||||||
//- Declare friendship with the SubList class
|
//- Declare friendship with the SubList class
|
||||||
friend class SubList<T>;
|
friend class SubList<T>;
|
||||||
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Member Functions
|
||||||
|
|
||||||
//- Return a null UList
|
//- Return a null UList
|
||||||
inline static const UList<T>& null();
|
inline static const UList<T>& null();
|
||||||
|
|
||||||
|
|
||||||
// Public classes
|
// Public classes
|
||||||
|
|
||||||
//- Less function class that can be used for sorting
|
//- 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",
|
"NamedEnum<Enum, nEnum>::read(Istream& is) const",
|
||||||
is
|
is
|
||||||
) << name << " is not in enumeration " << toc()
|
) << name << " is not in enumeration " << toc()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,45 +61,45 @@ void inv(Field<symmTensor>& tf, const UList<symmTensor>& tf1)
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scale = magSqr(tf1[0]);
|
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);
|
symmTensorField tf1Plus(tf1);
|
||||||
|
|
||||||
if (removeCmpts.x())
|
if (removeCmpts[0])
|
||||||
{
|
{
|
||||||
tf1Plus += symmTensor(1,0,0,0,0,0);
|
tf1Plus += symmTensor(1,0,0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removeCmpts.y())
|
if (removeCmpts[1])
|
||||||
{
|
{
|
||||||
tf1Plus += symmTensor(0,0,0,1,0,0);
|
tf1Plus += symmTensor(0,0,0,1,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removeCmpts.z())
|
if (removeCmpts[2])
|
||||||
{
|
{
|
||||||
tf1Plus += symmTensor(0,0,0,0,0,1);
|
tf1Plus += symmTensor(0,0,0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
TFOR_ALL_F_OP_FUNC_F(symmTensor, tf, =, inv, symmTensor, tf1Plus)
|
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);
|
tf -= symmTensor(1,0,0,0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removeCmpts.y())
|
if (removeCmpts[1])
|
||||||
{
|
{
|
||||||
tf -= symmTensor(0,0,0,1,0,0);
|
tf -= symmTensor(0,0,0,1,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removeCmpts.z())
|
if (removeCmpts[2])
|
||||||
{
|
{
|
||||||
tf -= symmTensor(0,0,0,0,0,1);
|
tf -= symmTensor(0,0,0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ License
|
||||||
|
|
||||||
#include "tensorField.H"
|
#include "tensorField.H"
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
|
#include "boolList.H"
|
||||||
|
|
||||||
#define TEMPLATE
|
#define TEMPLATE
|
||||||
#include "FieldFunctionsM.C"
|
#include "FieldFunctionsM.C"
|
||||||
|
@ -61,45 +62,46 @@ void inv(Field<tensor>& tf, const UList<tensor>& tf1)
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scale = magSqr(tf1[0]);
|
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);
|
tensorField tf1Plus(tf1);
|
||||||
|
|
||||||
if (removeCmpts.x())
|
if (removeCmpts[0])
|
||||||
{
|
{
|
||||||
tf1Plus += tensor(1,0,0,0,0,0,0,0,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);
|
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);
|
tf1Plus += tensor(0,0,0,0,0,0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
TFOR_ALL_F_OP_FUNC_F(tensor, tf, =, inv, tensor, tf1Plus)
|
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);
|
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);
|
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);
|
tf -= tensor(0,0,0,0,0,0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@ License
|
||||||
#include "constraints.H"
|
#include "constraints.H"
|
||||||
#include "PstreamCombineReduceOps.H"
|
#include "PstreamCombineReduceOps.H"
|
||||||
|
|
||||||
|
#define OLD_COMBINE_REDUCE 1
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
@ -65,31 +67,59 @@ tmp<Field<Type2> > GlobalPointPatchField
|
||||||
// Create the global list and insert local values
|
// Create the global list and insert local values
|
||||||
if (globalPointPatch_.globalPointSize() > 0)
|
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
|
Field<Type2> gpf
|
||||||
(
|
(
|
||||||
globalPointPatch_.globalPointSize(),
|
globalPointPatch_.globalPointSize(),
|
||||||
pTraits<Type2>::zero
|
pTraits<Type2>::zero
|
||||||
);
|
);
|
||||||
|
|
||||||
const labelList& addr = globalPointPatch_.sharedPointAddr();
|
forAll (sharedPointAddr, i)
|
||||||
const Field<Type2>& pField = tpField();
|
|
||||||
|
|
||||||
forAll (addr, i)
|
|
||||||
{
|
{
|
||||||
gpf[addr[i]] = pField[i];
|
gpf[sharedPointAddr[i]] = pField[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
combineReduce(gpf, plusEqOp<Field<Type2> >());
|
combineReduce(gpf, plusEqOp<Field<Type2> >());
|
||||||
|
|
||||||
// Extract local data
|
// Extract local data
|
||||||
tmp<Field<Type2> > tlpf(new Field<Type2>(addr.size()));
|
forAll (sharedPointAddr, i)
|
||||||
Field<Type2>& lpf = tlpf();
|
|
||||||
|
|
||||||
forAll (addr, 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;
|
return tlpf;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -126,6 +156,19 @@ tmp<Field<Type2> > GlobalPointPatchField
|
||||||
{
|
{
|
||||||
if (globalPointPatch_.globalEdgeSize() > 0)
|
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
|
// Create the global list and insert local values
|
||||||
Field<Type2> gef
|
Field<Type2> gef
|
||||||
(
|
(
|
||||||
|
@ -133,25 +176,41 @@ tmp<Field<Type2> > GlobalPointPatchField
|
||||||
pTraits<Type2>::zero
|
pTraits<Type2>::zero
|
||||||
);
|
);
|
||||||
|
|
||||||
const labelList& addr = globalPointPatch_.sharedEdgeAddr();
|
forAll (sharedEdgeAddr, i)
|
||||||
const Field<Type2>& eField = teField();
|
|
||||||
|
|
||||||
forAll (addr, i)
|
|
||||||
{
|
{
|
||||||
gef[addr[i]] = eField[i];
|
gef[sharedEdgeAddr[i]] = eField[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
combineReduce(gef, plusEqOp<Field<Type2> >());
|
combineReduce(gef, plusEqOp<Field<Type2> >());
|
||||||
|
|
||||||
// Extract local data
|
// Extract local data
|
||||||
tmp<Field<Type2> > tlef(new Field<Type2>(addr.size()));
|
forAll (sharedEdgeAddr, i)
|
||||||
Field<Type2>& lef = tlef();
|
|
||||||
|
|
||||||
forAll (addr, 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;
|
return tlef;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -189,6 +248,7 @@ void GlobalPointPatchField
|
||||||
// Set the values from the global sum
|
// Set the values from the global sum
|
||||||
tmp<Field<Type2> > trpf =
|
tmp<Field<Type2> > trpf =
|
||||||
reduceExtractPoint<Type2>(patchInternalField(pField));
|
reduceExtractPoint<Type2>(patchInternalField(pField));
|
||||||
|
|
||||||
Field<Type2>& rpf = trpf();
|
Field<Type2>& rpf = trpf();
|
||||||
|
|
||||||
// Get addressing
|
// Get addressing
|
||||||
|
@ -526,6 +586,8 @@ void GlobalPointPatchField
|
||||||
}
|
}
|
||||||
|
|
||||||
// Communicate map
|
// Communicate map
|
||||||
|
// Note: Cannot use reduceExtract, because it uses plusEqOp
|
||||||
|
// HJ, 14/Jan/2011
|
||||||
Pstream::mapCombineGather(dataMap, eqOp<Type>());
|
Pstream::mapCombineGather(dataMap, eqOp<Type>());
|
||||||
Pstream::mapCombineScatter(dataMap);
|
Pstream::mapCombineScatter(dataMap);
|
||||||
|
|
||||||
|
@ -1063,7 +1125,8 @@ void GlobalPointPatchField
|
||||||
{
|
{
|
||||||
// Owner side
|
// Owner side
|
||||||
localMult[doubleCutOwner[edgeI]] +=
|
localMult[doubleCutOwner[edgeI]] +=
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[U[doubleCut[edgeI]]];
|
cutMask[coeffI]*coeffs[coeffI]*
|
||||||
|
psiInternal[U[doubleCut[edgeI]]];
|
||||||
|
|
||||||
sumOffDiag[doubleCutOwner[edgeI]] +=
|
sumOffDiag[doubleCutOwner[edgeI]] +=
|
||||||
cutMask[coeffI]*coeffs[coeffI];
|
cutMask[coeffI]*coeffs[coeffI];
|
||||||
|
@ -1072,7 +1135,8 @@ void GlobalPointPatchField
|
||||||
|
|
||||||
// Neighbour side
|
// Neighbour side
|
||||||
localMult[doubleCutNeighbour[edgeI]] +=
|
localMult[doubleCutNeighbour[edgeI]] +=
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[L[doubleCut[edgeI]]];
|
cutMask[coeffI]*coeffs[coeffI]*
|
||||||
|
psiInternal[L[doubleCut[edgeI]]];
|
||||||
|
|
||||||
sumOffDiag[doubleCutNeighbour[edgeI]] +=
|
sumOffDiag[doubleCutNeighbour[edgeI]] +=
|
||||||
cutMask[coeffI]*coeffs[coeffI];
|
cutMask[coeffI]*coeffs[coeffI];
|
||||||
|
@ -1085,6 +1149,7 @@ void GlobalPointPatchField
|
||||||
|
|
||||||
tmp<Field<scalar> > trpf =
|
tmp<Field<scalar> > trpf =
|
||||||
reduceExtractPoint<scalar>(localMult);
|
reduceExtractPoint<scalar>(localMult);
|
||||||
|
|
||||||
Field<scalar>& rpf = trpf();
|
Field<scalar>& rpf = trpf();
|
||||||
|
|
||||||
// Get addressing
|
// Get addressing
|
||||||
|
|
|
@ -103,11 +103,11 @@ bool chDir(const fileName& dir);
|
||||||
//
|
//
|
||||||
// @return the full path name or fileName() if the name cannot be found
|
// @return the full path name or fileName() if the name cannot be found
|
||||||
// Optionally abort if the file 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
|
//- Make a directory and return an error if it could not be created
|
||||||
// and does not already exist
|
// and does not already exist
|
||||||
bool mkDir(const fileName&, mode_t=0777);
|
bool mkDir(const fileName&, mode_t = 0777);
|
||||||
|
|
||||||
//- Set the file mode
|
//- Set the file mode
|
||||||
bool chMod(const fileName&, const mode_t);
|
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?
|
//- Does the name exist (as DIRECTORY or FILE) in the file system?
|
||||||
// Optionally enable/disable check for gzip file.
|
// 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?
|
//- Does the name exist as a DIRECTORY in the file system?
|
||||||
bool isDir(const fileName&);
|
bool isDir(const fileName&);
|
||||||
|
|
||||||
//- Does the name exist as a FILE in the file system?
|
//- Does the name exist as a FILE in the file system?
|
||||||
// Optionally enable/disable check for gzip file.
|
// 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
|
//- Return size of file
|
||||||
off_t fileSize(const fileName&);
|
off_t fileSize(const fileName&);
|
||||||
|
@ -139,8 +139,8 @@ time_t lastModified(const fileName&);
|
||||||
fileNameList readDir
|
fileNameList readDir
|
||||||
(
|
(
|
||||||
const fileName&,
|
const fileName&,
|
||||||
const fileName::Type=fileName::FILE,
|
const fileName::Type = fileName::FILE,
|
||||||
const bool filtergz=true
|
const bool filtergz = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Copy, recursively if necessary, the source to the destination
|
//- 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);
|
bool ping(const word&, const label port, const label timeOut);
|
||||||
|
|
||||||
//- Check if machine is up by pinging port 22 (ssh) and 222 (rsh)
|
//- 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
|
//- Execute the specified command
|
||||||
int system(const string& command);
|
int system(const string& command);
|
||||||
|
|
|
@ -76,7 +76,6 @@ public:
|
||||||
face(f),
|
face(f),
|
||||||
masterIndex_(masterIndex),
|
masterIndex_(masterIndex),
|
||||||
oppositeIndex_(oppositeIndex)
|
oppositeIndex_(oppositeIndex)
|
||||||
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -260,26 +260,30 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||||
// Dump transformed first half
|
// Dump transformed first half
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
|
if (reverseT_.size() > 0)
|
||||||
|
|
||||||
pointField transformPoints = half0.localPoints();
|
|
||||||
|
|
||||||
forAll (transformPoints, pointI)
|
|
||||||
{
|
{
|
||||||
transformPoints[pointI] =
|
fileName fvPath(boundaryMesh().mesh().time().path()/"VTK");
|
||||||
Foam::transform(reverseT_[0], transformPoints[pointI]);
|
|
||||||
|
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
|
// Check for error in face matching
|
||||||
|
@ -354,31 +358,33 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maxDistance =
|
// Disable checking for translational distance
|
||||||
Foam::max
|
// HJ, 13/Jan/2011
|
||||||
(
|
// maxDistance =
|
||||||
maxDistance,
|
// Foam::max
|
||||||
mag
|
// (
|
||||||
(
|
// maxDistance,
|
||||||
half0Ctrs[faceI]
|
// mag
|
||||||
- half1Ctrs[faceI]
|
// (
|
||||||
)
|
// half0Ctrs[faceI]
|
||||||
);
|
// - half1Ctrs[faceI]
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
|
||||||
maxRelDistance =
|
// maxRelDistance =
|
||||||
Foam::max
|
// Foam::max
|
||||||
(
|
// (
|
||||||
maxRelDistance,
|
// maxRelDistance,
|
||||||
mag
|
// mag
|
||||||
(
|
// (
|
||||||
half0Ctrs[faceI]
|
// half0Ctrs[faceI]
|
||||||
- half1Ctrs[faceI]
|
// - half1Ctrs[faceI]
|
||||||
)
|
// )
|
||||||
/(
|
// /(
|
||||||
mag(half1Ctrs[faceI] - half0Ctrs[faceI])
|
// mag(half1Ctrs[faceI] - half0Ctrs[faceI])
|
||||||
+ SMALL
|
// + SMALL
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,15 +239,6 @@ public:
|
||||||
//- Attach regions
|
//- Attach regions
|
||||||
void detach() const;
|
void detach() const;
|
||||||
|
|
||||||
//- Is this the master side?
|
|
||||||
bool master() const;
|
|
||||||
|
|
||||||
//- Is this the slave side?
|
|
||||||
bool slave() const
|
|
||||||
{
|
|
||||||
return !master();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return shadow patch
|
//- Return shadow patch
|
||||||
const regionCouplePolyPatch& shadow() const;
|
const regionCouplePolyPatch& shadow() const;
|
||||||
|
|
||||||
|
|
|
@ -217,8 +217,6 @@ void Foam::faceZone::calcCellLayers() const
|
||||||
mc[faceI] = curMc;
|
mc[faceI] = curMc;
|
||||||
sc[faceI] = curSc;
|
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.
|
//- 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
|
// Used to find out the index of face in the zone from the known
|
||||||
// face index. If the face is not in the zone, returns -1
|
// global face index. If the face is not in the zone, returns -1
|
||||||
label whichFace(const label globalFaceID) const;
|
label whichFace(const label globalFaceID) const;
|
||||||
|
|
||||||
//- Return reference to primitive patch
|
//- Return reference to primitive patch
|
||||||
|
|
|
@ -109,7 +109,7 @@ void Foam::attachDetach::attachInterface
|
||||||
polyModifyFace
|
polyModifyFace
|
||||||
(
|
(
|
||||||
faces[masterPatchStart + faceI], // modified face
|
faces[masterPatchStart + faceI], // modified face
|
||||||
masterPatchStart + faceI, // label of face being modified
|
masterPatchStart + faceI, // label of face being modified
|
||||||
masterFaceCells[faceI], // owner
|
masterFaceCells[faceI], // owner
|
||||||
slaveFaceCells[faceI], // neighbour
|
slaveFaceCells[faceI], // neighbour
|
||||||
false, // face flip
|
false, // face flip
|
||||||
|
@ -128,7 +128,7 @@ void Foam::attachDetach::attachInterface
|
||||||
polyModifyFace
|
polyModifyFace
|
||||||
(
|
(
|
||||||
faces[masterPatchStart + faceI].reverseFace(), // mod face
|
faces[masterPatchStart + faceI].reverseFace(), // mod face
|
||||||
masterPatchStart + faceI, // label of face being modified
|
masterPatchStart + faceI, // label of face being modified
|
||||||
slaveFaceCells[faceI], // owner
|
slaveFaceCells[faceI], // owner
|
||||||
masterFaceCells[faceI], // neighbour
|
masterFaceCells[faceI], // neighbour
|
||||||
true, // face flip
|
true, // face flip
|
||||||
|
@ -222,7 +222,7 @@ void Foam::attachDetach::attachInterface
|
||||||
own[curFaceID], // owner
|
own[curFaceID], // owner
|
||||||
curNeighbour, // neighbour
|
curNeighbour, // neighbour
|
||||||
false, // face flip
|
false, // face flip
|
||||||
mesh.boundaryMesh().whichPatch(curFaceID),// patch for face
|
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||||
false, // remove from zone
|
false, // remove from zone
|
||||||
modifiedFaceZone, // zone for face
|
modifiedFaceZone, // zone for face
|
||||||
modifiedFaceZoneFlip // face flip in zone
|
modifiedFaceZoneFlip // face flip in zone
|
||||||
|
|
|
@ -42,8 +42,8 @@ void Foam::attachDetach::detachInterface
|
||||||
// 2. Modify all faces of the master zone, by putting them into the master
|
// 2. Modify all faces of the master zone, by putting them into the master
|
||||||
// patch (look for orientation) and their renumbered mirror images
|
// patch (look for orientation) and their renumbered mirror images
|
||||||
// into the slave patch
|
// into the slave patch
|
||||||
// 3. Create a point renumbering list, giving a new point index for original
|
// 3. Create a point renumbering list, giving a new point index for
|
||||||
// points in the face patch
|
// original points in the face patch
|
||||||
// 4. Grab all faces in cells on the master side and renumber them
|
// 4. Grab all faces in cells on the master side and renumber them
|
||||||
// using the point renumbering list. Exclude the ones that belong to
|
// using the point renumbering list. Exclude the ones that belong to
|
||||||
// the master face zone
|
// the master face zone
|
||||||
|
@ -70,7 +70,9 @@ void Foam::attachDetach::detachInterface
|
||||||
const polyMesh& mesh = topoChanger().mesh();
|
const polyMesh& mesh = topoChanger().mesh();
|
||||||
const faceZoneMesh& zoneMesh = mesh.faceZones();
|
const faceZoneMesh& zoneMesh = mesh.faceZones();
|
||||||
|
|
||||||
const primitiveFacePatch& masterFaceLayer = zoneMesh[faceZoneID_.index()]();
|
const primitiveFacePatch& masterFaceLayer =
|
||||||
|
zoneMesh[faceZoneID_.index()]();
|
||||||
|
|
||||||
const pointField& points = mesh.points();
|
const pointField& points = mesh.points();
|
||||||
const labelListList& meshEdgeFaces = mesh.edgeFaces();
|
const labelListList& meshEdgeFaces = mesh.edgeFaces();
|
||||||
|
|
||||||
|
@ -88,7 +90,12 @@ void Foam::attachDetach::detachInterface
|
||||||
// with their original labels to stop duplication
|
// with their original labels to stop duplication
|
||||||
label nIntEdges = masterFaceLayer.nInternalEdges();
|
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]];
|
const labelList& curFaces = meshEdgeFaces[meshEdges[curEdgeID]];
|
||||||
|
|
||||||
|
@ -374,6 +381,33 @@ void Foam::attachDetach::detachInterface
|
||||||
// If the face has changed, create a modification entry
|
// If the face has changed, create a modification entry
|
||||||
if (changed)
|
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))
|
if (mesh.isInternalFace(curFaceID))
|
||||||
{
|
{
|
||||||
// No need to check for nei index: internal face.
|
// No need to check for nei index: internal face.
|
||||||
|
@ -389,8 +423,8 @@ void Foam::attachDetach::detachInterface
|
||||||
false, // flip flux
|
false, // flip flux
|
||||||
-1, // patch for face
|
-1, // patch for face
|
||||||
false, // remove from zone
|
false, // remove from zone
|
||||||
-1, // zone for face
|
oldZoneID, // zone for face
|
||||||
false // face zone flip
|
oldFlip // face zone flip
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Pout << "modifying stick-out face. Internal Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " nei: " << nei[curFaceID] << endl;
|
// Pout << "modifying stick-out face. Internal Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " nei: " << nei[curFaceID] << endl;
|
||||||
|
@ -408,8 +442,8 @@ void Foam::attachDetach::detachInterface
|
||||||
false, // flip flux
|
false, // flip flux
|
||||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch
|
mesh.boundaryMesh().whichPatch(curFaceID), // patch
|
||||||
false, // remove from zone
|
false, // remove from zone
|
||||||
-1, // zone for face
|
oldZoneID, // zone for face
|
||||||
false // face zone flip
|
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;
|
// 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 * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::layerAdditionRemoval::setRemoval()
|
||||||
|
{
|
||||||
|
triggerRemoval_ = topoChanger().morphIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::layerAdditionRemoval::setAddition()
|
||||||
|
{
|
||||||
|
triggerAddition_ = topoChanger().morphIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::layerAdditionRemoval::changeTopology() const
|
bool Foam::layerAdditionRemoval::changeTopology() const
|
||||||
{
|
{
|
||||||
// Protect from multiple calculation in the same time-step
|
// Protect from multiple calculation in the same time-step
|
||||||
|
|
|
@ -170,6 +170,12 @@ public:
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Set layer removal
|
||||||
|
void setRemoval();
|
||||||
|
|
||||||
|
//- Set addition
|
||||||
|
void setAddition();
|
||||||
|
|
||||||
//- Check for topology change
|
//- Check for topology change
|
||||||
virtual bool changeTopology() const;
|
virtual bool changeTopology() const;
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,8 @@ void regionCoupleFvPatchField<Type>::evaluate
|
||||||
const Pstream::commsTypes
|
const Pstream::commsTypes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Implement weights-based stabilised harmonic interpolation using magnitude
|
// Implement weights-based stabilised harmonic interpolation using
|
||||||
|
// magnitude of type
|
||||||
// Algorithm:
|
// Algorithm:
|
||||||
// 1) calculate magnitude of internal field and neighbour field
|
// 1) calculate magnitude of internal field and neighbour field
|
||||||
// 2) calculate harmonic mean magnitude
|
// 2) calculate harmonic mean magnitude
|
||||||
|
@ -189,7 +190,7 @@ void regionCoupleFvPatchField<Type>::evaluate
|
||||||
|
|
||||||
forAll (weights, faceI)
|
forAll (weights, faceI)
|
||||||
{
|
{
|
||||||
den = (mOwn[faceI] - mNei[faceI]);
|
den = mOwn[faceI] - mNei[faceI];
|
||||||
|
|
||||||
if (mag(den) > SMALL)
|
if (mag(den) > SMALL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,20 +39,12 @@ License
|
||||||
#include "mapClouds.H"
|
#include "mapClouds.H"
|
||||||
|
|
||||||
#include "volPointInterpolation.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 * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(Foam::fvMesh, 0);
|
defineTypeNameAndDebug(Foam::fvMesh, 0);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fvMesh::clearGeomNotOldVol()
|
void Foam::fvMesh::clearGeomNotOldVol()
|
||||||
|
|
|
@ -113,9 +113,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stabilise for division
|
// 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
|
// 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()
|
||||||
),
|
),
|
||||||
this->mesh(),
|
this->mesh(),
|
||||||
dimensionedScalar("upwindLimiter", dimless, 0.0)
|
dimless
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,11 @@ public:
|
||||||
faceFlux, phiP, phiN, gradcP, gradcN, d
|
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
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
makeSurfaceInterpolationScheme(harmonic)
|
||||||
defineTypeNameAndDebug(harmonic, 0);
|
|
||||||
|
|
||||||
surfaceInterpolationScheme<scalar>::addMeshFluxConstructorToTable<harmonic>
|
|
||||||
addharmonicScalarMeshFluxConstructorToTable_;
|
|
||||||
|
|
||||||
surfaceInterpolationScheme<scalar>::addMeshConstructorToTable<harmonic>
|
|
||||||
addharmonicScalarMeshConstructorToTable_;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
|
@ -42,7 +42,6 @@ SourceFiles
|
||||||
#include "surfaceInterpolationScheme.H"
|
#include "surfaceInterpolationScheme.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "reverseLinear.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -53,9 +52,10 @@ namespace Foam
|
||||||
Class harmonic Declaration
|
Class harmonic Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
class harmonic
|
class harmonic
|
||||||
:
|
:
|
||||||
public surfaceInterpolationScheme<scalar>
|
public surfaceInterpolationScheme<Type>
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
@ -74,10 +74,10 @@ public:
|
||||||
//- Construct from mesh
|
//- Construct from mesh
|
||||||
harmonic(const fvMesh& 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
|
// The name of the flux field is read from the Istream and looked-up
|
||||||
// from the mesh objectRegistry
|
// from the mesh objectRegistry
|
||||||
harmonic
|
harmonic
|
||||||
|
@ -86,7 +86,7 @@ public:
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceInterpolationScheme<scalar>(mesh)
|
surfaceInterpolationScheme<Type>(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Construct from faceFlux and Istream
|
//- Construct from faceFlux and Istream
|
||||||
|
@ -97,7 +97,7 @@ public:
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
surfaceInterpolationScheme<scalar>(mesh)
|
surfaceInterpolationScheme<Type>(mesh)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,26 +106,60 @@ public:
|
||||||
//- Return the interpolation weighting factors
|
//- Return the interpolation weighting factors
|
||||||
virtual tmp<surfaceScalarField> weights
|
virtual tmp<surfaceScalarField> weights
|
||||||
(
|
(
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>&
|
const GeometricField<Type, fvPatchField, volMesh>& phi
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
notImplemented
|
tmp<surfaceScalarField> tw
|
||||||
(
|
(
|
||||||
"harmonic::weights"
|
new surfaceScalarField
|
||||||
"(const GeometricField<scalar, fvPatchField, volMesh>&)"
|
(
|
||||||
|
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
|
const unallocLabelList& owner = this->mesh().owner();
|
||||||
virtual tmp<GeometricField<scalar, fvsPatchField, surfaceMesh> >
|
const unallocLabelList& neighbour = this->mesh().neighbour();
|
||||||
interpolate
|
|
||||||
(
|
scalarField magPhi = mag(phi);
|
||||||
const GeometricField<scalar, fvPatchField, volMesh>& vf
|
|
||||||
) const
|
// Initialise weights to 0.5 for uniform field (den = 0)
|
||||||
{
|
scalarField& wIn = w.internalField();
|
||||||
return 1.0/(reverseLinear<scalar>(vf.mesh()).interpolate(1.0/vf));
|
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,9 @@ void Foam::directMappedPatchBase::collectSamples
|
||||||
labelListList globalFaces(Pstream::nProcs());
|
labelListList globalFaces(Pstream::nProcs());
|
||||||
|
|
||||||
globalFc[Pstream::myProcNo()] = patch_.faceCentres();
|
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());
|
globalFaces[Pstream::myProcNo()] = identity(patch_.size());
|
||||||
|
|
||||||
// Distribute to all processors
|
// Distribute to all processors
|
||||||
|
@ -115,11 +117,13 @@ void Foam::directMappedPatchBase::collectSamples
|
||||||
globalSamples,
|
globalSamples,
|
||||||
accessOp<pointField>()
|
accessOp<pointField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
patchFaces = ListListOps::combine<labelList>
|
patchFaces = ListListOps::combine<labelList>
|
||||||
(
|
(
|
||||||
globalFaces,
|
globalFaces,
|
||||||
accessOp<labelList>()
|
accessOp<labelList>()
|
||||||
);
|
);
|
||||||
|
|
||||||
patchFc = ListListOps::combine<pointField>
|
patchFc = ListListOps::combine<pointField>
|
||||||
(
|
(
|
||||||
globalFc,
|
globalFc,
|
||||||
|
@ -135,8 +139,9 @@ void Foam::directMappedPatchBase::collectSamples
|
||||||
accessOp<labelList>()
|
accessOp<labelList>()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
label sampleI = 0;
|
label sampleI = 0;
|
||||||
forAll(nPerProc, procI)
|
forAll (nPerProc, procI)
|
||||||
{
|
{
|
||||||
for (label i = 0; i < nPerProc[procI]; i++)
|
for (label i = 0; i < nPerProc[procI]; i++)
|
||||||
{
|
{
|
||||||
|
@ -173,13 +178,14 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
"directMappedPatchBase::findSamples(const pointField&,"
|
"directMappedPatchBase::findSamples(const pointField&,"
|
||||||
" labelList&, labelList&, pointField&) const"
|
" labelList&, labelList&, pointField&) const"
|
||||||
) << "No need to supply a patch name when in "
|
) << "No need to supply a patch name when in "
|
||||||
<< sampleModeNames_[mode_] << " mode." << exit(FatalError);
|
<< sampleModeNames_[mode_] << " mode."
|
||||||
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Octree based search engine
|
// Octree based search engine
|
||||||
meshSearch meshSearchEngine(mesh, false);
|
meshSearch meshSearchEngine(mesh, false);
|
||||||
|
|
||||||
forAll(samples, sampleI)
|
forAll (samples, sampleI)
|
||||||
{
|
{
|
||||||
const point& sample = samples[sampleI];
|
const point& sample = samples[sampleI];
|
||||||
|
|
||||||
|
@ -200,7 +206,7 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
cc,
|
cc,
|
||||||
cellI
|
cellI
|
||||||
);
|
);
|
||||||
nearest[sampleI].second().first() = magSqr(cc-sample);
|
nearest[sampleI].second().first() = magSqr(cc - sample);
|
||||||
nearest[sampleI].second().second() = Pstream::myProcNo();
|
nearest[sampleI].second().second() = Pstream::myProcNo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +221,7 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
|
|
||||||
if (pp.empty())
|
if (pp.empty())
|
||||||
{
|
{
|
||||||
forAll(samples, sampleI)
|
forAll (samples, sampleI)
|
||||||
{
|
{
|
||||||
nearest[sampleI].second().first() = Foam::sqr(GREAT);
|
nearest[sampleI].second().first() = Foam::sqr(GREAT);
|
||||||
nearest[sampleI].second().second() = Pstream::myProcNo();
|
nearest[sampleI].second().second() = Pstream::myProcNo();
|
||||||
|
@ -251,7 +257,7 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
3.0 // duplicity
|
3.0 // duplicity
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(samples, sampleI)
|
forAll (samples, sampleI)
|
||||||
{
|
{
|
||||||
const point& sample = samples[sampleI];
|
const point& sample = samples[sampleI];
|
||||||
|
|
||||||
|
@ -290,13 +296,14 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
"directMappedPatchBase::findSamples(const pointField&,"
|
"directMappedPatchBase::findSamples(const pointField&,"
|
||||||
" labelList&, labelList&, pointField&) const"
|
" labelList&, labelList&, pointField&) const"
|
||||||
) << "No need to supply a patch name when in "
|
) << "No need to supply a patch name when in "
|
||||||
<< sampleModeNames_[mode_] << " mode." << exit(FatalError);
|
<< sampleModeNames_[mode_] << " mode."
|
||||||
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Octree based search engine
|
// Octree based search engine
|
||||||
meshSearch meshSearchEngine(mesh, false);
|
meshSearch meshSearchEngine(mesh, false);
|
||||||
|
|
||||||
forAll(samples, sampleI)
|
forAll (samples, sampleI)
|
||||||
{
|
{
|
||||||
const point& sample = samples[sampleI];
|
const point& sample = samples[sampleI];
|
||||||
|
|
||||||
|
@ -340,20 +347,21 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
{
|
{
|
||||||
Info<< "directMappedPatchBase::findSamples on mesh " << sampleRegion_
|
Info<< "directMappedPatchBase::findSamples on mesh " << sampleRegion_
|
||||||
<< " : " << endl;
|
<< " : " << endl;
|
||||||
forAll(nearest, sampleI)
|
|
||||||
|
forAll (nearest, sampleI)
|
||||||
{
|
{
|
||||||
label procI = nearest[sampleI].second().second();
|
label procI = nearest[sampleI].second().second();
|
||||||
label localI = nearest[sampleI].first().index();
|
label localI = nearest[sampleI].first().index();
|
||||||
|
|
||||||
Info<< " " << sampleI << " coord:"<< samples[sampleI]
|
Info<< " " << sampleI << " coord: "<< samples[sampleI]
|
||||||
<< " found on processor:" << procI
|
<< " found on processor: " << procI
|
||||||
<< " in local cell/face:" << localI
|
<< " in local cell/face: " << localI
|
||||||
<< " with cc:" << nearest[sampleI].first().rawPoint() << endl;
|
<< " with cc: " << nearest[sampleI].first().rawPoint() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for samples not being found
|
// Check for samples not being found
|
||||||
forAll(nearest, sampleI)
|
forAll (nearest, sampleI)
|
||||||
{
|
{
|
||||||
if (!nearest[sampleI].first().hit())
|
if (!nearest[sampleI].first().hit())
|
||||||
{
|
{
|
||||||
|
@ -363,8 +371,8 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
"(const pointField&, labelList&"
|
"(const pointField&, labelList&"
|
||||||
", labelList&, pointField&)"
|
", labelList&, pointField&)"
|
||||||
) << "Did not find sample " << samples[sampleI]
|
) << "Did not find sample " << samples[sampleI]
|
||||||
<< " on any processor of region" << sampleRegion_
|
<< " on any processor of region " << sampleRegion_
|
||||||
<< exit(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +382,7 @@ void Foam::directMappedPatchBase::findSamples
|
||||||
sampleIndices.setSize(samples.size());
|
sampleIndices.setSize(samples.size());
|
||||||
sampleLocations.setSize(samples.size());
|
sampleLocations.setSize(samples.size());
|
||||||
|
|
||||||
forAll(nearest, sampleI)
|
forAll (nearest, sampleI)
|
||||||
{
|
{
|
||||||
sampleProcs[sampleI] = nearest[sampleI].second().second();
|
sampleProcs[sampleI] = nearest[sampleI].second().second();
|
||||||
sampleIndices[sampleI] = nearest[sampleI].first().index();
|
sampleIndices[sampleI] = nearest[sampleI].first().index();
|
||||||
|
@ -388,7 +396,8 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
if (mapPtr_.valid())
|
if (mapPtr_.valid())
|
||||||
{
|
{
|
||||||
FatalErrorIn("directMappedPatchBase::calcMapping() const")
|
FatalErrorIn("directMappedPatchBase::calcMapping() const")
|
||||||
<< "Mapping already calculated" << exit(FatalError);
|
<< "Mapping already calculated"
|
||||||
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
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;
|
pointField samples;
|
||||||
labelList patchFaceProcs;
|
labelList patchFaceProcs;
|
||||||
labelList patchFaces;
|
labelList patchFaces;
|
||||||
|
@ -435,7 +444,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
// - cell/face sample is in (so source when mapping)
|
// - cell/face sample is in (so source when mapping)
|
||||||
// sampleIndices, sampleProcs.
|
// sampleIndices, sampleProcs.
|
||||||
|
|
||||||
//forAll(samples, i)
|
//forAll (samples, i)
|
||||||
//{
|
//{
|
||||||
// Info<< i << " need data in region "
|
// Info<< i << " need data in region "
|
||||||
// << patch_.boundaryMesh().mesh().name()
|
// << patch_.boundaryMesh().mesh().name()
|
||||||
|
@ -464,7 +473,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
|
|
||||||
label vertI = 0;
|
label vertI = 0;
|
||||||
|
|
||||||
forAll(patchFc, i)
|
forAll (patchFc, i)
|
||||||
{
|
{
|
||||||
meshTools::writeOBJ(str, patchFc[i]);
|
meshTools::writeOBJ(str, patchFc[i]);
|
||||||
vertI++;
|
vertI++;
|
||||||
|
@ -482,7 +491,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
// const scalarField magOffset(mag(sampleLocations - patchFc));
|
// const scalarField magOffset(mag(sampleLocations - patchFc));
|
||||||
// const scalar avgOffset(average(magOffset));
|
// const scalar avgOffset(average(magOffset));
|
||||||
//
|
//
|
||||||
// forAll(magOffset, sampleI)
|
// forAll (magOffset, sampleI)
|
||||||
// {
|
// {
|
||||||
// if
|
// if
|
||||||
// (
|
// (
|
||||||
|
@ -518,7 +527,7 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
labelListList& subMap = mapPtr_().subMap();
|
labelListList& subMap = mapPtr_().subMap();
|
||||||
labelListList& constructMap = mapPtr_().constructMap();
|
labelListList& constructMap = mapPtr_().constructMap();
|
||||||
|
|
||||||
forAll(subMap, procI)
|
forAll (subMap, procI)
|
||||||
{
|
{
|
||||||
subMap[procI] = UIndirectList<label>
|
subMap[procI] = UIndirectList<label>
|
||||||
(
|
(
|
||||||
|
@ -547,11 +556,11 @@ void Foam::directMappedPatchBase::calcMapping() const
|
||||||
{
|
{
|
||||||
// Check that all elements get a value.
|
// Check that all elements get a value.
|
||||||
PackedBoolList used(patch_.size());
|
PackedBoolList used(patch_.size());
|
||||||
forAll(constructMap, procI)
|
forAll (constructMap, procI)
|
||||||
{
|
{
|
||||||
const labelList& map = constructMap[procI];
|
const labelList& map = constructMap[procI];
|
||||||
|
|
||||||
forAll(map, i)
|
forAll (map, i)
|
||||||
{
|
{
|
||||||
label faceI = 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)
|
if (used[faceI] == 0)
|
||||||
{
|
{
|
||||||
|
@ -734,7 +743,7 @@ const Foam::polyPatch& Foam::directMappedPatchBase::samplePolyPatch() const
|
||||||
<< "Cannot find patch " << samplePatch_
|
<< "Cannot find patch " << samplePatch_
|
||||||
<< " in region " << sampleRegion_ << endl
|
<< " in region " << sampleRegion_ << endl
|
||||||
<< "Valid patches are " << nbrMesh.boundaryMesh().names()
|
<< "Valid patches are " << nbrMesh.boundaryMesh().names()
|
||||||
<< exit(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nbrMesh.boundaryMesh()[patchI];
|
return nbrMesh.boundaryMesh()[patchI];
|
||||||
|
|
|
@ -30,7 +30,7 @@ Description
|
||||||
centres and processors they're on.
|
centres and processors they're on.
|
||||||
|
|
||||||
Note
|
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.
|
on all processors to keep the addressing calculation simple.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
|
|
@ -191,12 +191,14 @@ Foam::radiation::P1::Ru() const
|
||||||
{
|
{
|
||||||
const DimensionedField<scalar, volMesh>& G =
|
const DimensionedField<scalar, volMesh>& G =
|
||||||
G_.dimensionedInternalField();
|
G_.dimensionedInternalField();
|
||||||
|
|
||||||
const DimensionedField<scalar, volMesh> E =
|
const DimensionedField<scalar, volMesh> E =
|
||||||
absorptionEmission_->ECont()().dimensionedInternalField();
|
absorptionEmission_->ECont()().dimensionedInternalField();
|
||||||
|
|
||||||
const DimensionedField<scalar, volMesh> a =
|
const DimensionedField<scalar, volMesh> a =
|
||||||
absorptionEmission_->aCont()().dimensionedInternalField();
|
absorptionEmission_->aCont()().dimensionedInternalField();
|
||||||
|
|
||||||
return a*G - 4.0*E;
|
return a*G - 4.0*E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
|
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||||
| \\ / O peration | Version: 1.6-ext |
|
| \\ / O peration | Version: 1.6-ext |
|
||||||
| \\ / A nd | Web: www.extend-project.de |
|
| \\ / A nd | Web: www.extend-project.de |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
|
|
|
@ -29,17 +29,17 @@ gradSchemes
|
||||||
divSchemes
|
divSchemes
|
||||||
{
|
{
|
||||||
default none;
|
default none;
|
||||||
div(phi,rho) Gauss limitedLinear 1;
|
div(phi,rho) Gauss vanLeer;
|
||||||
div(phi,U) Gauss limitedLinearV 1;
|
div(phi,U) Gauss linearUpwind Gauss linear;
|
||||||
div(phiU,p) Gauss linear;
|
div(phiU,p) Gauss linear;
|
||||||
div(phi,k) Gauss limitedLinear 1;
|
div(phi,k) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss limitedLinear 1;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(phi,Yi_h) Gauss upwind;
|
div(phi,Yi_h) Gauss vanLeer;
|
||||||
div(phi,fu_ft_h) Gauss multivariateSelection
|
div(phi,fu_ft_h) Gauss multivariateSelection
|
||||||
{
|
{
|
||||||
fu limitedLinear 1;
|
fu vanLeer;
|
||||||
ft limitedLinear 1;
|
ft vanLeer;
|
||||||
hs limitedLinear 1;
|
hs vanLeer;
|
||||||
};
|
};
|
||||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ solvers
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-09;
|
tolerance 1e-09;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
|
minIter 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rho
|
rho
|
||||||
|
@ -35,14 +36,15 @@ solvers
|
||||||
{
|
{
|
||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-06;
|
tolerance 1e-08;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
|
minIter 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PISO
|
PISO
|
||||||
{
|
{
|
||||||
nCorrectors 2;
|
nCorrectors 4;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
|
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||||
| \\ / O peration | Version: 1.6-ext |
|
| \\ / O peration | Version: 1.6-ext |
|
||||||
| \\ / A nd | Web: www.extend-project.de |
|
| \\ / A nd | Web: www.extend-project.de |
|
||||||
| \\/ M anipulation | |
|
| \\/ 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