mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -29,6 +29,7 @@ Description
|
||||
#include "dictionary.H"
|
||||
#include "Ostream.H"
|
||||
#include "Pstream.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "functionObjectTemplate.H"
|
||||
#include "Time.H"
|
||||
#include "fvCFD.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
|
||||
@ -577,9 +577,6 @@ $(interpolations)/interpolationTable/tableReaders/tableReaders.C
|
||||
$(interpolations)/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C
|
||||
$(interpolations)/interpolationTable/tableReaders/csv/csvTableReaders.C
|
||||
|
||||
algorithms/MeshWave/MeshWaveName.C
|
||||
algorithms/MeshWave/FaceCellWaveName.C
|
||||
|
||||
algorithms/indexedOctree/indexedOctreeName.C
|
||||
algorithms/indexedOctree/treeDataCell.C
|
||||
|
||||
|
||||
@ -96,18 +96,6 @@ public:
|
||||
|
||||
//- Destructor
|
||||
virtual ~coupledFacePointPatch();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return true because this patch is coupled
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -285,7 +285,8 @@ public:
|
||||
//- Return boundaryMesh reference
|
||||
const polyBoundaryMesh& boundaryMesh() const;
|
||||
|
||||
//- Return true if this patch field is coupled
|
||||
//- Return true if this patch is geometrically coupled (i.e. faces and
|
||||
// points correspondence)
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return false;
|
||||
@ -299,7 +300,7 @@ public:
|
||||
|
||||
//- Slice list to patch
|
||||
template<class T>
|
||||
const typename List<T>::subList patchSlice(const List<T>& l) const
|
||||
const typename List<T>::subList patchSlice(const UList<T>& l) const
|
||||
{
|
||||
return typename List<T>::subList(l, this->size(), start_);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (cyclicAMIPatch_.coupled())
|
||||
if (this->coupled())
|
||||
{
|
||||
this->evaluate(Pstream::blocking);
|
||||
}
|
||||
@ -140,6 +140,27 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
bool Foam::cyclicAMIFvPatchField<Type>::coupled() const
|
||||
{
|
||||
if
|
||||
(
|
||||
Pstream::parRun()
|
||||
|| (
|
||||
this->cyclicAMIPatch_.size()
|
||||
&& this->cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().size()
|
||||
)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::cyclicAMIFvPatchField<Type>::patchNeighbourField() const
|
||||
|
||||
@ -147,8 +147,12 @@ public:
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Return true if coupled. Note that the underlying patch
|
||||
// is not coupled() - the points don't align.
|
||||
virtual bool coupled() const;
|
||||
|
||||
//- Return neighbour coupled internal cell data
|
||||
tmp<Field<Type> > patchNeighbourField() const;
|
||||
virtual tmp<Field<Type> > patchNeighbourField() const;
|
||||
|
||||
//- Return reference to neighbour patchField
|
||||
const cyclicAMIFvPatchField<Type>& neighbourPatchField() const;
|
||||
|
||||
@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
|
||||
//- Return neighbour field given internal field
|
||||
tmp<Field<Type> > patchNeighbourField() const;
|
||||
virtual tmp<Field<Type> > patchNeighbourField() const;
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
@ -123,4 +123,27 @@ Foam::cyclicAMIFvsPatchField<Type>::cyclicAMIFvsPatchField
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
bool Foam::cyclicAMIFvsPatchField<Type>::coupled() const
|
||||
{
|
||||
if
|
||||
(
|
||||
Pstream::parRun()
|
||||
|| (
|
||||
this->cyclicAMIPatch_.size()
|
||||
&& this->cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().size()
|
||||
)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -123,6 +123,14 @@ public:
|
||||
new cyclicAMIFvsPatchField<Type>(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return true if running parallel
|
||||
virtual bool coupled() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||
// Build the d-vectors
|
||||
vectorField pd = p.delta();
|
||||
|
||||
if (p.coupled())
|
||||
if (pw.coupled())
|
||||
{
|
||||
forAll(pd, patchFacei)
|
||||
{
|
||||
@ -185,7 +185,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||
// Build the d-vectors
|
||||
vectorField pd = p.delta();
|
||||
|
||||
if (p.coupled())
|
||||
if (pw.coupled())
|
||||
{
|
||||
forAll(pd, patchFacei)
|
||||
{
|
||||
@ -256,7 +256,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
|
||||
label patchFacei =
|
||||
facei - mesh.boundaryMesh()[patchi].start();
|
||||
|
||||
if (mesh.boundary()[patchi].coupled())
|
||||
if (w.boundaryField()[patchi].coupled())
|
||||
{
|
||||
scalar wf = max
|
||||
(
|
||||
|
||||
@ -103,7 +103,7 @@ Foam::extendedCellToFaceStencil::extendedCellToFaceStencil(const polyMesh& mesh)
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
if (isA<coupledPolyPatch>(patches[patchI]))
|
||||
if (patches[patchI].coupled())
|
||||
{
|
||||
const coupledPolyPatch& cpp =
|
||||
refCast<const coupledPolyPatch>(patches[patchI]);
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::extendedFaceToCellStencil::extendedFaceToCellStencil(const polyMesh& mesh)
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
if (isA<coupledPolyPatch>(patches[patchI]))
|
||||
if (patches[patchI].coupled())
|
||||
{
|
||||
const coupledPolyPatch& cpp =
|
||||
refCast<const coupledPolyPatch>(patches[patchI]);
|
||||
|
||||
@ -157,7 +157,7 @@ public:
|
||||
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
if (mesh.boundary()[patchi].coupled())
|
||||
if (clippedLinearWeights.boundaryField()[patchi].coupled())
|
||||
{
|
||||
clippedLinearWeights.boundaryField()[patchi] =
|
||||
max
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
|
||||
forAll(mesh.boundary(), patchI)
|
||||
{
|
||||
if (mesh.boundary()[patchI].coupled())
|
||||
if (reverseLinearWeights.boundaryField()[patchI].coupled())
|
||||
{
|
||||
reverseLinearWeights.boundaryField()[patchI] =
|
||||
1.0 - cdWeights.boundaryField()[patchI];
|
||||
|
||||
@ -316,7 +316,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
|
||||
|
||||
if
|
||||
(
|
||||
!pp.coupled()
|
||||
!magSf.boundaryField()[patchI].coupled()
|
||||
|| refCast<const coupledPolyPatch>(pp).owner()
|
||||
)
|
||||
{
|
||||
|
||||
@ -30,6 +30,37 @@ License
|
||||
#include "mergePoints.H"
|
||||
#include "mapDistribute.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
//- Combine operator for interpolateToSource/Target
|
||||
template<class Type, class BinaryOp>
|
||||
class combineBinaryOp
|
||||
{
|
||||
const BinaryOp& bop_;
|
||||
|
||||
public:
|
||||
|
||||
combineBinaryOp(const BinaryOp& bop)
|
||||
:
|
||||
bop_(bop)
|
||||
{}
|
||||
|
||||
void operator()
|
||||
(
|
||||
Type& x,
|
||||
const label faceI,
|
||||
const Type& y,
|
||||
const scalar weight
|
||||
) const
|
||||
{
|
||||
x = bop_(x, weight*y);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
@ -1773,94 +1804,12 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
template<class Type, class CombineOp>
|
||||
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
(
|
||||
const Field<Type>& fld,
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
if (fld.size() != tgtAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToSource(const Field<Type>) const"
|
||||
) << "Supplied field size is not equal to target patch size" << nl
|
||||
<< " source patch = " << srcAddress_.size() << nl
|
||||
<< " target patch = " << tgtAddress_.size() << nl
|
||||
<< " supplied field = " << fld.size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
tmp<Field<Type> > tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
srcAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
)
|
||||
);
|
||||
|
||||
Field<Type>& result = tresult();
|
||||
|
||||
if (singlePatchProc_ == -1)
|
||||
{
|
||||
const mapDistribute& map = tgtMapPtr_();
|
||||
|
||||
Field<Type> work(fld);
|
||||
map.distribute(work);
|
||||
|
||||
forAll(result, faceI)
|
||||
{
|
||||
const labelList& faces = srcAddress_[faceI];
|
||||
const scalarList& weights = srcWeights_[faceI];
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
result[faceI] = bop(result[faceI], work[faces[i]]*weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(result, faceI)
|
||||
{
|
||||
const labelList& faces = srcAddress_[faceI];
|
||||
const scalarList& weights = srcWeights_[faceI];
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
result[faceI] = bop(result[faceI], fld[faces[i]]*weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
(
|
||||
const tmp<Field<Type> >& tFld,
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
return interpolateToSource(tFld(), bop);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
(
|
||||
const Field<Type>& fld,
|
||||
const BinaryOp& bop
|
||||
const UList<Type>& fld,
|
||||
const CombineOp& bop,
|
||||
List<Type>& result
|
||||
) const
|
||||
{
|
||||
if (fld.size() != srcAddress_.size())
|
||||
@ -1875,22 +1824,13 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
tmp<Field<Type> > tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
tgtAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
)
|
||||
);
|
||||
|
||||
Field<Type>& result = tresult();
|
||||
result.setSize(tgtAddress_.size());
|
||||
|
||||
if (singlePatchProc_ == -1)
|
||||
{
|
||||
const mapDistribute& map = srcMapPtr_();
|
||||
|
||||
Field<Type> work(fld);
|
||||
List<Type> work(fld);
|
||||
map.distribute(work);
|
||||
|
||||
forAll(result, faceI)
|
||||
@ -1900,7 +1840,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
result[faceI] = bop(result[faceI], work[faces[i]]*weights[i]);
|
||||
bop(result[faceI], faceI, work[faces[i]], weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1913,10 +1853,126 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
result[faceI] = bop(result[faceI], fld[faces[i]]*weights[i]);
|
||||
bop(result[faceI], faceI, fld[faces[i]], weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class CombineOp>
|
||||
void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const CombineOp& bop,
|
||||
List<Type>& result
|
||||
) const
|
||||
{
|
||||
if (fld.size() != tgtAddress_.size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"AMIInterpolation::interpolateToSource(const Field<Type>) const"
|
||||
) << "Supplied field size is not equal to target patch size" << nl
|
||||
<< " source patch = " << srcAddress_.size() << nl
|
||||
<< " target patch = " << tgtAddress_.size() << nl
|
||||
<< " supplied field = " << fld.size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
result.setSize(srcAddress_.size());
|
||||
|
||||
if (singlePatchProc_ == -1)
|
||||
{
|
||||
const mapDistribute& map = tgtMapPtr_();
|
||||
|
||||
List<Type> work(fld);
|
||||
map.distribute(work);
|
||||
|
||||
forAll(result, faceI)
|
||||
{
|
||||
const labelList& faces = srcAddress_[faceI];
|
||||
const scalarList& weights = srcWeights_[faceI];
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
bop(result[faceI], faceI, work[faces[i]], weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(result, faceI)
|
||||
{
|
||||
const labelList& faces = srcAddress_[faceI];
|
||||
const scalarList& weights = srcWeights_[faceI];
|
||||
|
||||
forAll(faces, i)
|
||||
{
|
||||
bop(result[faceI], faceI, fld[faces[i]], weights[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
(
|
||||
const Field<Type>& fld,
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
srcAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
)
|
||||
);
|
||||
|
||||
interpolateToSource(fld, combineBinaryOp<Type, BinaryOp>(bop), tresult());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
(
|
||||
const tmp<Field<Type> >& tFld,
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
return interpolateToSource(tFld, bop);
|
||||
}
|
||||
|
||||
|
||||
template<class SourcePatch, class TargetPatch>
|
||||
template<class Type, class BinaryOp>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
(
|
||||
const Field<Type>& fld,
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type> > tresult
|
||||
(
|
||||
new Field<Type>
|
||||
(
|
||||
tgtAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
)
|
||||
);
|
||||
|
||||
interpolateToTarget(fld, combineBinaryOp<Type, BinaryOp>(bop), tresult());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
@ -1931,7 +1987,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
const BinaryOp& bop
|
||||
) const
|
||||
{
|
||||
return interpolateToTarget(tFld(), bop);
|
||||
return interpolateToTarget(tFld, bop);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -404,7 +404,30 @@ public:
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Interpolate from target to source with supplied op
|
||||
// Low-level
|
||||
|
||||
//- Interpolate from target to source with supplied op
|
||||
// to combine existing value with remote value and weight
|
||||
template<class Type, class CombineOp>
|
||||
void interpolateToSource
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const CombineOp& bop,
|
||||
List<Type>& result
|
||||
) const;
|
||||
|
||||
//- Interpolate from source to target with supplied op
|
||||
// to combine existing value with remote value and weight
|
||||
template<class Type, class CombineOp>
|
||||
void interpolateToTarget
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const CombineOp& bop,
|
||||
List<Type>& result
|
||||
) const;
|
||||
|
||||
|
||||
//- Interpolate from target to source with supplied binary op
|
||||
template<class Type, class BinaryOp>
|
||||
tmp<Field<Type> > interpolateToSource
|
||||
(
|
||||
@ -412,7 +435,8 @@ public:
|
||||
const BinaryOp& bop
|
||||
) const;
|
||||
|
||||
//- Interpolate from target tmp field to source with supplied op
|
||||
//- Interpolate from target tmp field to source with supplied
|
||||
// binary op
|
||||
template<class Type, class BinaryOp>
|
||||
tmp<Field<Type> > interpolateToSource
|
||||
(
|
||||
@ -464,7 +488,6 @@ public:
|
||||
const tmp<Field<Type> >& tFld
|
||||
) const;
|
||||
|
||||
|
||||
// Checks
|
||||
|
||||
//- Write face connectivity as OBJ file
|
||||
|
||||
@ -107,6 +107,17 @@ public:
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicAMIPointPatch();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Is patch 'coupled'. Note that on AMI the geometry is not
|
||||
// coupled but the fields are!
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -548,23 +548,6 @@ Foam::cyclicAMIPolyPatch::~cyclicAMIPolyPatch()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::cyclicAMIPolyPatch::coupled() const
|
||||
{
|
||||
if
|
||||
(
|
||||
Pstream::parRun()
|
||||
|| (size() && neighbPatch().size())
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::cyclicAMIPolyPatch::neighbPatchID() const
|
||||
{
|
||||
if (nbrPatchID_ == -1)
|
||||
|
||||
@ -254,10 +254,12 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return true only if is coupled. Note that for non-parallel
|
||||
// operation of a decomposed case this can return the wrong
|
||||
// result
|
||||
virtual bool coupled() const;
|
||||
//- Is patch 'coupled'. Note that on AMI the geometry is not
|
||||
// coupled but the fields are!
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//- Neighbour patch name
|
||||
inline const word& neighbPatchName() const;
|
||||
@ -316,6 +318,15 @@ public:
|
||||
const tmp<Field<Type> >& tFld
|
||||
) const;
|
||||
|
||||
//- Low-level interpolate List
|
||||
template<class Type, class BinaryOp>
|
||||
void interpolate
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const BinaryOp& bop,
|
||||
List<Type>& result
|
||||
) const;
|
||||
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry
|
||||
|
||||
@ -59,4 +59,23 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicAMIPolyPatch::interpolate
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class BinaryOp>
|
||||
void Foam::cyclicAMIPolyPatch::interpolate
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const BinaryOp& bop,
|
||||
List<Type>& result
|
||||
) const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
AMIPtr_->interpolateToSource(fld, bop, result);
|
||||
}
|
||||
else
|
||||
{
|
||||
neighbPatch().AMIPtr_->interpolateToTarget(fld, bop, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -30,14 +30,21 @@ meshSearch/meshSearch.C
|
||||
|
||||
meshTools/meshTools.C
|
||||
|
||||
pWave = PointEdgeWave
|
||||
algorithms = algorithms
|
||||
|
||||
pWave = $(algorithms)/PointEdgeWave
|
||||
$(pWave)/PointEdgeWaveName.C
|
||||
$(pWave)/pointEdgePoint.C
|
||||
|
||||
patchWave = PatchEdgeFaceWave
|
||||
patchWave = $(algorithms)/PatchEdgeFaceWave
|
||||
$(patchWave)/PatchEdgeFaceWaveName.C
|
||||
$(patchWave)/patchEdgeFaceInfo.C
|
||||
|
||||
meshWave = $(algorithms)/MeshWave
|
||||
$(meshWave)/MeshWaveName.C
|
||||
$(meshWave)/FaceCellWaveName.C
|
||||
|
||||
|
||||
regionSplit/regionSplit.C
|
||||
|
||||
indexedOctree/treeDataEdge.C
|
||||
|
||||
@ -27,11 +27,14 @@ License
|
||||
#include "polyMesh.H"
|
||||
#include "processorPolyPatch.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
#include "cyclicAMIPolyPatch.H"
|
||||
#include "OPstream.H"
|
||||
#include "IPstream.H"
|
||||
#include "PstreamReduceOps.H"
|
||||
#include "debug.H"
|
||||
#include "typeInfo.H"
|
||||
#include "SubField.H"
|
||||
#include "globalMeshData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -44,6 +47,53 @@ Foam::scalar Foam::FaceCellWave<Type, TrackingData>::propagationTol_ = 0.01;
|
||||
template <class Type, class TrackingData>
|
||||
Foam::label Foam::FaceCellWave<Type, TrackingData>::dummyTrackData_ = 12345;
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
//- Combine operator for AMIInterpolation
|
||||
template<class Type, class TrackingData>
|
||||
class combine
|
||||
{
|
||||
FaceCellWave<Type, TrackingData>& solver_;
|
||||
|
||||
const polyPatch& patch_;
|
||||
|
||||
public:
|
||||
|
||||
combine
|
||||
(
|
||||
FaceCellWave<Type, TrackingData>& solver,
|
||||
const polyPatch& patch
|
||||
)
|
||||
:
|
||||
solver_(solver),
|
||||
patch_(patch)
|
||||
{}
|
||||
|
||||
|
||||
void operator()
|
||||
(
|
||||
Type& x,
|
||||
const label faceI,
|
||||
const Type& y,
|
||||
const scalar weight
|
||||
) const
|
||||
{
|
||||
if (y.valid(solver_.data()))
|
||||
{
|
||||
x.updateFace
|
||||
(
|
||||
solver_.mesh(),
|
||||
patch_.start() + faceI,
|
||||
y,
|
||||
solver_.propagationTol(),
|
||||
solver_.data()
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -244,11 +294,12 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
|
||||
|
||||
// Check if has cyclic patches
|
||||
template <class Type, class TrackingData>
|
||||
bool Foam::FaceCellWave<Type, TrackingData>::hasCyclicPatch() const
|
||||
template <class PatchType>
|
||||
bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
|
||||
{
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
{
|
||||
if (isA<cyclicPolyPatch>(mesh_.boundaryMesh()[patchI]))
|
||||
if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -446,119 +497,117 @@ void Foam::FaceCellWave<Type, TrackingData>::offset
|
||||
template <class Type, class TrackingData>
|
||||
void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
|
||||
{
|
||||
const globalMeshData& pData = mesh_.globalData();
|
||||
|
||||
// Which patches are processor patches
|
||||
const labelList& procPatches = pData.processorPatches();
|
||||
|
||||
// Send all
|
||||
|
||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
||||
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
forAll(procPatches, i)
|
||||
{
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
|
||||
label patchI = procPatches[i];
|
||||
|
||||
if (isA<processorPolyPatch>(patch))
|
||||
const processorPolyPatch& procPatch =
|
||||
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
|
||||
|
||||
// Allocate buffers
|
||||
label nSendFaces;
|
||||
labelList sendFaces(procPatch.size());
|
||||
List<Type> sendFacesInfo(procPatch.size());
|
||||
|
||||
// Determine which faces changed on current patch
|
||||
nSendFaces = getChangedPatchFaces
|
||||
(
|
||||
procPatch,
|
||||
0,
|
||||
procPatch.size(),
|
||||
sendFaces,
|
||||
sendFacesInfo
|
||||
);
|
||||
|
||||
// Adapt wallInfo for leaving domain
|
||||
leaveDomain
|
||||
(
|
||||
procPatch,
|
||||
nSendFaces,
|
||||
sendFaces,
|
||||
sendFacesInfo
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
// Allocate buffers
|
||||
label nSendFaces;
|
||||
labelList sendFaces(patch.size());
|
||||
List<Type> sendFacesInfo(patch.size());
|
||||
|
||||
// Determine which faces changed on current patch
|
||||
nSendFaces = getChangedPatchFaces
|
||||
(
|
||||
patch,
|
||||
0,
|
||||
patch.size(),
|
||||
sendFaces,
|
||||
sendFacesInfo
|
||||
);
|
||||
|
||||
// Adapt wallInfo for leaving domain
|
||||
leaveDomain
|
||||
(
|
||||
patch,
|
||||
nSendFaces,
|
||||
sendFaces,
|
||||
sendFacesInfo
|
||||
);
|
||||
|
||||
const processorPolyPatch& procPatch =
|
||||
refCast<const processorPolyPatch>(patch);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< " Processor patch " << patchI << ' ' << patch.name()
|
||||
<< " communicating with " << procPatch.neighbProcNo()
|
||||
<< " Sending:" << nSendFaces
|
||||
<< endl;
|
||||
}
|
||||
|
||||
UOPstream toNeighbour(procPatch.neighbProcNo(), pBufs);
|
||||
//writeFaces(nSendFaces, sendFaces, sendFacesInfo, toNeighbour);
|
||||
toNeighbour
|
||||
<< SubList<label>(sendFaces, nSendFaces)
|
||||
<< SubList<Type>(sendFacesInfo, nSendFaces);
|
||||
|
||||
Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
|
||||
<< " communicating with " << procPatch.neighbProcNo()
|
||||
<< " Sending:" << nSendFaces
|
||||
<< endl;
|
||||
}
|
||||
|
||||
UOPstream toNeighbour(procPatch.neighbProcNo(), pBufs);
|
||||
//writeFaces(nSendFaces, sendFaces, sendFacesInfo, toNeighbour);
|
||||
toNeighbour
|
||||
<< SubList<label>(sendFaces, nSendFaces)
|
||||
<< SubList<Type>(sendFacesInfo, nSendFaces);
|
||||
}
|
||||
|
||||
pBufs.finishedSends();
|
||||
|
||||
// Receive all
|
||||
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
forAll(procPatches, i)
|
||||
{
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
|
||||
label patchI = procPatches[i];
|
||||
|
||||
const processorPolyPatch& procPatch =
|
||||
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
|
||||
|
||||
// Allocate buffers
|
||||
labelList receiveFaces;
|
||||
List<Type> receiveFacesInfo;
|
||||
|
||||
if (isA<processorPolyPatch>(patch))
|
||||
{
|
||||
const processorPolyPatch& procPatch =
|
||||
refCast<const processorPolyPatch>(patch);
|
||||
UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs);
|
||||
fromNeighbour >> receiveFaces >> receiveFacesInfo;
|
||||
}
|
||||
|
||||
// Allocate buffers
|
||||
labelList receiveFaces;
|
||||
List<Type> receiveFacesInfo;
|
||||
if (debug)
|
||||
{
|
||||
Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
|
||||
<< " communicating with " << procPatch.neighbProcNo()
|
||||
<< " Receiving:" << receiveFaces.size()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
{
|
||||
UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs);
|
||||
fromNeighbour >> receiveFaces >> receiveFacesInfo;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< " Processor patch " << patchI << ' ' << patch.name()
|
||||
<< " communicating with " << procPatch.neighbProcNo()
|
||||
<< " Receiving:" << receiveFaces.size()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// Apply transform to received data for non-parallel planes
|
||||
if (!procPatch.parallel())
|
||||
{
|
||||
transform
|
||||
(
|
||||
procPatch.forwardT(),
|
||||
receiveFaces.size(),
|
||||
receiveFacesInfo
|
||||
);
|
||||
}
|
||||
|
||||
// Adapt wallInfo for entering domain
|
||||
enterDomain
|
||||
// Apply transform to received data for non-parallel planes
|
||||
if (!procPatch.parallel())
|
||||
{
|
||||
transform
|
||||
(
|
||||
patch,
|
||||
procPatch.forwardT(),
|
||||
receiveFaces.size(),
|
||||
receiveFaces,
|
||||
receiveFacesInfo
|
||||
);
|
||||
|
||||
// Merge received info
|
||||
mergeFaceInfo
|
||||
(
|
||||
patch,
|
||||
receiveFaces.size(),
|
||||
receiveFaces,
|
||||
receiveFacesInfo
|
||||
);
|
||||
}
|
||||
|
||||
// Adapt wallInfo for entering domain
|
||||
enterDomain
|
||||
(
|
||||
procPatch,
|
||||
receiveFaces.size(),
|
||||
receiveFaces,
|
||||
receiveFacesInfo
|
||||
);
|
||||
|
||||
// Merge received info
|
||||
mergeFaceInfo
|
||||
(
|
||||
procPatch,
|
||||
receiveFaces.size(),
|
||||
receiveFaces,
|
||||
receiveFacesInfo
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -648,6 +697,93 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
|
||||
}
|
||||
|
||||
|
||||
// Transfer information across cyclic halves.
|
||||
template <class Type, class TrackingData>
|
||||
void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
|
||||
{
|
||||
forAll(mesh_.boundaryMesh(), patchI)
|
||||
{
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
|
||||
|
||||
if (isA<cyclicAMIPolyPatch>(patch))
|
||||
{
|
||||
const cyclicAMIPolyPatch& cycPatch =
|
||||
refCast<const cyclicAMIPolyPatch>(patch);
|
||||
|
||||
List<Type> receiveInfo;
|
||||
|
||||
{
|
||||
const cyclicAMIPolyPatch& nbrPatch =
|
||||
refCast<const cyclicAMIPolyPatch>(patch).neighbPatch();
|
||||
|
||||
// Get nbrPatch data (so not just changed faces)
|
||||
typename List<Type>::subList sendInfo
|
||||
(
|
||||
nbrPatch.patchSlice
|
||||
(
|
||||
allFaceInfo_
|
||||
)
|
||||
);
|
||||
|
||||
// Adapt sendInfo for leaving domain
|
||||
const vectorField::subField fc = nbrPatch.faceCentres();
|
||||
forAll(sendInfo, i)
|
||||
{
|
||||
sendInfo[i].leaveDomain(mesh_, nbrPatch, i, fc[i], td_);
|
||||
}
|
||||
|
||||
|
||||
// Transfer sendInfo to cycPatch
|
||||
combine<Type, TrackingData> cmb(*this, cycPatch);
|
||||
|
||||
cycPatch.interpolate(sendInfo, cmb, receiveInfo);
|
||||
}
|
||||
|
||||
// Apply transform to received data for non-parallel planes
|
||||
if (!cycPatch.parallel())
|
||||
{
|
||||
transform
|
||||
(
|
||||
cycPatch.forwardT(),
|
||||
receiveInfo.size(),
|
||||
receiveInfo
|
||||
);
|
||||
}
|
||||
|
||||
// Adapt receiveInfo for entering domain
|
||||
const vectorField::subField fc = cycPatch.faceCentres();
|
||||
forAll(receiveInfo, i)
|
||||
{
|
||||
receiveInfo[i].enterDomain(mesh_, cycPatch, i, fc[i], td_);
|
||||
}
|
||||
|
||||
// Merge into global storage
|
||||
forAll(receiveInfo, i)
|
||||
{
|
||||
label meshFaceI = cycPatch.start()+i;
|
||||
|
||||
Type& currentWallInfo = allFaceInfo_[meshFaceI];
|
||||
|
||||
if
|
||||
(
|
||||
receiveInfo[i].valid(td_)
|
||||
&& !currentWallInfo.equal(receiveInfo[i], td_)
|
||||
)
|
||||
{
|
||||
updateFace
|
||||
(
|
||||
meshFaceI,
|
||||
receiveInfo[i],
|
||||
propagationTol_,
|
||||
currentWallInfo
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Set up only. Use setFaceInfo and iterate() to do actual calculation.
|
||||
@ -670,7 +806,11 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
changedCell_(mesh_.nCells(), false),
|
||||
changedCells_(mesh_.nCells()),
|
||||
nChangedCells_(0),
|
||||
hasCyclicPatches_(hasCyclicPatch()),
|
||||
hasCyclicPatches_(hasPatch<cyclicPolyPatch>()),
|
||||
hasCyclicAMIPatches_
|
||||
(
|
||||
returnReduce(hasPatch<cyclicAMIPolyPatch>(), orOp<bool>())
|
||||
),
|
||||
nEvals_(0),
|
||||
nUnvisitedCells_(mesh_.nCells()),
|
||||
nUnvisitedFaces_(mesh_.nFaces())
|
||||
@ -701,7 +841,11 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
|
||||
changedCell_(mesh_.nCells(), false),
|
||||
changedCells_(mesh_.nCells()),
|
||||
nChangedCells_(0),
|
||||
hasCyclicPatches_(hasCyclicPatch()),
|
||||
hasCyclicPatches_(hasPatch<cyclicPolyPatch>()),
|
||||
hasCyclicAMIPatches_
|
||||
(
|
||||
returnReduce(hasPatch<cyclicAMIPolyPatch>(), orOp<bool>())
|
||||
),
|
||||
nEvals_(0),
|
||||
nUnvisitedCells_(mesh_.nCells()),
|
||||
nUnvisitedFaces_(mesh_.nFaces())
|
||||
@ -888,6 +1032,12 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
|
||||
// Transfer changed faces across cyclic halves
|
||||
handleCyclicPatches();
|
||||
}
|
||||
|
||||
if (hasCyclicAMIPatches_)
|
||||
{
|
||||
handleAMICyclicPatches();
|
||||
}
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Transfer changed faces from neighbouring processors.
|
||||
@ -917,6 +1067,12 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::iterate(const label maxIter)
|
||||
// Transfer changed faces across cyclic halves
|
||||
handleCyclicPatches();
|
||||
}
|
||||
|
||||
if (hasCyclicAMIPatches_)
|
||||
{
|
||||
handleAMICyclicPatches();
|
||||
}
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Transfer changed faces from neighbouring processors.
|
||||
@ -105,7 +105,10 @@ class FaceCellWave
|
||||
label nChangedCells_;
|
||||
|
||||
//- Contains cyclics
|
||||
bool hasCyclicPatches_;
|
||||
const bool hasCyclicPatches_;
|
||||
|
||||
//- Contains cyclicAMI
|
||||
const bool hasCyclicAMIPatches_;
|
||||
|
||||
//- Number of evaluations
|
||||
label nEvals_;
|
||||
@ -163,7 +166,8 @@ class FaceCellWave
|
||||
void checkCyclic(const polyPatch& pPatch) const;
|
||||
|
||||
//- Has cyclic patch?
|
||||
bool hasCyclicPatch() const;
|
||||
template <class PatchType>
|
||||
bool hasPatch() const;
|
||||
|
||||
//- Merge received patch data into global data
|
||||
void mergeFaceInfo
|
||||
@ -225,6 +229,9 @@ class FaceCellWave
|
||||
//- Merge data from across cyclics
|
||||
void handleCyclicPatches();
|
||||
|
||||
//- Merge data from across AMI cyclics
|
||||
void handleAMICyclicPatches();
|
||||
|
||||
|
||||
// Private static data
|
||||
|
||||
@ -1769,7 +1769,7 @@ Foam::isoSurface::isoSurface
|
||||
const polyPatch& pp = patches[patchI];
|
||||
|
||||
// Adapt separated coupled (proc and cyclic) patches
|
||||
if (isA<coupledPolyPatch>(pp))
|
||||
if (pp.coupled())
|
||||
{
|
||||
fvPatchVectorField& pfld = const_cast<fvPatchVectorField&>
|
||||
(
|
||||
|
||||
@ -59,7 +59,7 @@ solvers
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 2;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
|
||||
@ -59,7 +59,7 @@ solvers
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 2;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
|
||||
58
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U
Normal file
58
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/U
Normal file
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type codedFixedValue;
|
||||
redirectType swirl;
|
||||
|
||||
code
|
||||
#{
|
||||
const vector axis(1, 0, 0);
|
||||
|
||||
vectorField v = 2.0*this->patch().Cf() ^ axis;
|
||||
v.replace(vector::X, 1.0);
|
||||
operator==(v);
|
||||
#};
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon
Normal file
50
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.5; // 0.5m - half channel height
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/k
Normal file
50
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/k
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05; // 5% turbulent intensity
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
44
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/nuTilda
Normal file
44
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/nuTilda
Normal file
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object nuTilda;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
49
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/nut
Normal file
49
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/nut
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/p
Normal file
45
tutorials/incompressible/simpleFoam/pipeCyclic/0.org/p
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"side.*"
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
11
tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
Executable file
11
tutorials/incompressible/simpleFoam/pipeCyclic/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
39
tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
Executable file
39
tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application directory
|
||||
application=`getApplication`
|
||||
|
||||
# This case uses the #codeStream which is disabled by default. Enable for
|
||||
# just this case.
|
||||
MAIN_CONTROL_DICT=`foamEtcFile controlDict`
|
||||
if [ -f "$MAIN_CONTROL_DICT" ]
|
||||
then
|
||||
echo "Modifying ${MAIN_CONTROL_DICT} to enable allowSystemOperations"
|
||||
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap 'mv ${MAIN_CONTROL_DICT}.$$ ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \
|
||||
EXIT TERM INT
|
||||
cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$
|
||||
|
||||
echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}."
|
||||
|
||||
sed \
|
||||
-e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||
${MAIN_CONTROL_DICT}.$$ > ${MAIN_CONTROL_DICT}
|
||||
fi
|
||||
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication refineHexMesh c0 -overwrite
|
||||
cp -r 0.org 0
|
||||
|
||||
#runApplication $application
|
||||
runApplication decomposePar -cellDist
|
||||
runParallel $application 5
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel realizableKE;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
//- half angle of wedge in degrees
|
||||
halfAngle 45.0;
|
||||
|
||||
//- Radius of pipe [m]
|
||||
radius 0.5;
|
||||
|
||||
|
||||
radHalfAngle #calc "degToRad($halfAngle)";
|
||||
y #calc "$radius*sin($radHalfAngle)";
|
||||
minY #calc "-1.0*$y";
|
||||
z #calc "$radius*cos($radHalfAngle)";
|
||||
minZ #calc "-1.0*$z";
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.0 0.0 0) //0
|
||||
(10 0.0 0)
|
||||
(10 0.0 0) //2
|
||||
(0.0 0.0 0)
|
||||
|
||||
(0.0 $minY $z) //4
|
||||
(10 $minY $z)
|
||||
(10 $y $z) //6
|
||||
(0.0 $y $z)
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// inlet block
|
||||
hex (0 1 2 3 4 5 6 7) (50 5 5) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 4 7 (0 0 $radius)
|
||||
arc 5 6 (10 0 $radius)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(1 2 6 5)
|
||||
);
|
||||
}
|
||||
|
||||
side1
|
||||
{
|
||||
type cyclicAMI;
|
||||
neighbourPatch side2;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
|
||||
side2
|
||||
{
|
||||
type cyclicAMI;
|
||||
neighbourPatch side1;
|
||||
faces
|
||||
(
|
||||
(7 6 2 3)
|
||||
);
|
||||
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(3 2 1 0)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,62 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
5
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 28;
|
||||
startFace 4422;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 28;
|
||||
startFace 4450;
|
||||
}
|
||||
side1
|
||||
{
|
||||
type cyclicAMI;
|
||||
nFaces 400;
|
||||
startFace 4478;
|
||||
matchTolerance 0.0001;
|
||||
neighbourPatch side2;
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
side2
|
||||
{
|
||||
type cyclicAMI;
|
||||
nFaces 250;
|
||||
startFace 4878;
|
||||
matchTolerance 0.0001;
|
||||
neighbourPatch side1;
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
nFaces 250;
|
||||
startFace 5128;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 5;
|
||||
|
||||
method scotch;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,71 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div(phi,R) Gauss limitedLinear 1;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||
div((nuEff*dev(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(nuEff,U) Gauss linear corrected;
|
||||
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DREff,R) Gauss linear corrected;
|
||||
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
interpolate(U) linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
104
tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution
Normal file
104
tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution
Normal file
@ -0,0 +1,104 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0.05;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
solver GAMG;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)Final"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 4;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
residualControl
|
||||
{
|
||||
p 1e-2;
|
||||
U 1e-3;
|
||||
"(k|epsilon)" 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
k 0.7;
|
||||
"epsilon.*" 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
cache
|
||||
{
|
||||
grad(U);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,76 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name f0;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name "side1";
|
||||
}
|
||||
}
|
||||
{
|
||||
name f0;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source boxToFace;
|
||||
sourceInfo
|
||||
{
|
||||
box (0 -100 -100)(100 -0.2 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source faceToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set f0;
|
||||
option any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
name walls;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name "walls";
|
||||
}
|
||||
}
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source faceToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set walls;
|
||||
option any;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user