Merge branch 'master' into testLoop/MartinBeaudoin
This commit is contained in:
commit
bd3d61803e
310 changed files with 4914 additions and 276306 deletions
|
@ -37,7 +37,7 @@
|
|||
- fvm::laplacian(rUAf, p)
|
||||
);
|
||||
|
||||
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
||||
if (corr == nCorr - 1 && nonOrth == nNonOrthCorr)
|
||||
{
|
||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||
}
|
||||
|
|
|
@ -47,6 +47,10 @@ _foamAddLib()
|
|||
while [ $# -ge 1 ]
|
||||
do
|
||||
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||
if [ "$WM_ARCH" == "darwinIntel" ]
|
||||
then
|
||||
export DYLD_LIBRARY_PATH=$1:$DYLD_LIBRARY_PATH
|
||||
fi
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
@ -168,15 +172,24 @@ unset MPI_ARCH_PATH
|
|||
|
||||
case "$WM_MPLIB" in
|
||||
OPENMPI)
|
||||
mpi_version=openmpi-1.4.1
|
||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
||||
if [ "$WM_ARCH" == "darwinIntel" ]
|
||||
then
|
||||
mpi_version=openmpi-system
|
||||
export MPI_HOME=/usr
|
||||
export MPI_ARCH_PATH=/usr
|
||||
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
unset OPAL_PREFIX
|
||||
else
|
||||
mpi_version=openmpi-1.4.1
|
||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
fi
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
|
@ -317,6 +330,16 @@ export MPI_BUFFER_SIZE
|
|||
# export LD_PRELOAD=$FOAM_LIBBIN/libhoard.so:$LD_PRELOAD
|
||||
#fi
|
||||
|
||||
# HOARD seems to crash Paraview on Mac OS X 10.6
|
||||
#if [ -f $FOAM_LIBBIN/libhoard.dylib ]
|
||||
#then
|
||||
# if [ -z "$DYLD_INSERT_LIBRARIES" ]
|
||||
# then
|
||||
# export DYLD_INSERT_LIBRARIES=$FOAM_LIBBIN/libhoard.dylib
|
||||
# else
|
||||
# export DYLD_INSERT_LIBRARIES=$FOAM_LIBBIN/libhoard.dylib:$DYLD_INSERT_LIBRARIES
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -27,9 +27,10 @@ Class
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved
|
||||
Fethi Tekin, All rights reserved,
|
||||
|
||||
Description
|
||||
Mass-conservative face interpolation: typedef for polyPatch to
|
||||
Mass-conservative face interpolation: typedef for stand-alone patch to
|
||||
stand-alone patch
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -49,7 +50,7 @@ namespace Foam
|
|||
{
|
||||
typedef GGIInterpolation
|
||||
<
|
||||
PrimitivePatch<face, SubList, const pointField&>,
|
||||
PrimitivePatch<face, List, pointField>,
|
||||
PrimitivePatch<face, List, pointField>
|
||||
> overlapGgiInterpolation;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -60,7 +61,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(word::null),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(vector(0.0, 0.0, 1.0)),
|
||||
angle_(0),
|
||||
nCopies_(0),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -77,14 +79,15 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
const polyBoundaryMesh& bm,
|
||||
const word& shadowName,
|
||||
const vector& axis,
|
||||
const scalar angle
|
||||
const scalar nCopies
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(name, size, start, index, bm),
|
||||
shadowName_(shadowName),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(axis),
|
||||
angle_(angle),
|
||||
nCopies_(nCopies),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -104,7 +107,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(dict.lookup("shadowPatch")),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(dict.lookup("rotationAxis")),
|
||||
angle_(readScalar(dict.lookup("angle"))),
|
||||
nCopies_(readScalar(dict.lookup("nCopies"))),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -122,7 +126,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(pp.shadowName_),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(pp.rotationAxis_),
|
||||
angle_(pp.angle_),
|
||||
nCopies_(pp.nCopies_),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -143,7 +148,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(pp.shadowName_),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(pp.rotationAxis_),
|
||||
angle_(pp.angle_),
|
||||
nCopies_(pp.nCopies_),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -199,7 +205,6 @@ Foam::label Foam::overlapGgiPolyPatch::shadowIndex() const
|
|||
return shadowIndex_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::overlapGgiPolyPatch&
|
||||
Foam::overlapGgiPolyPatch::shadow() const
|
||||
{
|
||||
|
@ -209,34 +214,21 @@ Foam::overlapGgiPolyPatch::shadow() const
|
|||
|
||||
Foam::label Foam::overlapGgiPolyPatch::nCopies() const
|
||||
{
|
||||
// Calculate number of copies to be made for the expanded slave
|
||||
// to completely cover the master
|
||||
if (!master())
|
||||
{
|
||||
FatalErrorIn("label overlapGgiPolyPatch::nCopies() const")
|
||||
<< "nCopies requested for a slave. Error in master-slave logic"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
label ncp = 0;
|
||||
scalar remainder = angle_;
|
||||
|
||||
const scalar slaveAngle = shadow().angle();
|
||||
|
||||
while (remainder > SMALL)
|
||||
{
|
||||
remainder -= slaveAngle;
|
||||
ncp++;
|
||||
}
|
||||
|
||||
return ncp;
|
||||
// Read the number of copies to be made from the dictionary for the
|
||||
// expanded slave and expanded master to cover 360 degrees
|
||||
return nCopies_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::overlapGgiPolyPatch::master() const
|
||||
{
|
||||
// The first overlapggi interface is master,second one is slave
|
||||
if (angle() == shadow().angle())
|
||||
{
|
||||
return start() < shadow().start() ;
|
||||
}
|
||||
|
||||
// Master is the one with the larger angle
|
||||
return angle() >= shadow().angle();
|
||||
return angle() > shadow().angle();
|
||||
}
|
||||
|
||||
|
||||
|
@ -246,7 +238,9 @@ void Foam::overlapGgiPolyPatch::write(Ostream& os) const
|
|||
polyPatch::write(os);
|
||||
os.writeKeyword("rotationAxis") << rotationAxis_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("angle") << angle_
|
||||
os.writeKeyword("nCopies") << nCopies_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("shadowPatch") << shadowName_
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,17 +26,17 @@ Class
|
|||
overlapGgiPolyPatch
|
||||
|
||||
Description
|
||||
Partial overlap generalised grid interface (GGI) patch. Master side
|
||||
remains unchanged and the slave side will be copied as needed
|
||||
to pave the master patch surface.
|
||||
Partial overlap generalised grid interface (GGI) patch. Master and slave
|
||||
sides are copied as much as the given number to complete the 360 degree
|
||||
cicumferential surface.
|
||||
|
||||
This implies that the master patch has got a larger angular pitch than
|
||||
the slave and that master and slave are aligned at one edge.
|
||||
Master and slave will specify the pitch, based on which the expansion
|
||||
of the master side will be performed and used in interpolation.
|
||||
The data interpolation between master and slave patches do not depend on
|
||||
relative position of them, because of the full circumferential expansion
|
||||
for both sides.
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
SourceFiles
|
||||
overlapGgiPolyPatch.C
|
||||
|
@ -78,12 +78,20 @@ class overlapGgiPolyPatch
|
|||
//- Rotation axis
|
||||
const vector rotationAxis_;
|
||||
|
||||
//- Wedge angle
|
||||
const scalar angle_;
|
||||
|
||||
// Number of copies in order to complete 360 degrees
|
||||
const scalar nCopies_;
|
||||
|
||||
// Interpolation
|
||||
|
||||
//- Pointer to expanded master patch
|
||||
mutable standAlonePatch* expandedMasterPtr_;
|
||||
|
||||
//- Pointer to expanded faceCentres of Master
|
||||
mutable vectorField* faceCentresPtr_;
|
||||
|
||||
//- Pointer to expanded faceareas of Master
|
||||
mutable vectorField* faceAreasPtr_;
|
||||
|
||||
//- Pointer to expanded slave patch
|
||||
mutable standAlonePatch* expandedSlavePtr_;
|
||||
|
||||
|
@ -97,17 +105,23 @@ class overlapGgiPolyPatch
|
|||
|
||||
// Private member functions
|
||||
|
||||
//- Return reference to patch-to-patch interpolation
|
||||
const overlapGgiInterpolation& patchToPatch() const;
|
||||
|
||||
//- Calculate expanded master patch
|
||||
void calcExpandedMaster() const;
|
||||
|
||||
//- Calculate expanded slave patch
|
||||
void calcExpandedSlave() const;
|
||||
void calcExpandedSlave() const;
|
||||
|
||||
//- Return reference to expanded master patch
|
||||
const standAlonePatch& expandedMaster() const;
|
||||
|
||||
//- Return reference to expanded slave patch
|
||||
const standAlonePatch& expandedSlave() const;
|
||||
|
||||
//- Calculate interpolation
|
||||
void calcPatchToPatch() const;
|
||||
|
||||
//- Return reference to patch-to-patch interpolation
|
||||
const overlapGgiInterpolation& patchToPatch() const;
|
||||
void calcPatchToPatch() const;
|
||||
|
||||
//- Calculate reconstructed cell centres
|
||||
void calcReconFaceCellCentres() const;
|
||||
|
@ -118,10 +132,6 @@ class overlapGgiPolyPatch
|
|||
//- Check definition: angles and offsets
|
||||
void checkDefinition() const;
|
||||
|
||||
//- Expand slave face field to full coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandSlaveData(const Field<Type>& spf) const;
|
||||
|
||||
//- Clear out
|
||||
void clearOut();
|
||||
|
||||
|
@ -177,7 +187,7 @@ public:
|
|||
const polyBoundaryMesh& bm,
|
||||
const word& shadowName,
|
||||
const vector& axis,
|
||||
const scalar angle
|
||||
const scalar n
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
|
@ -263,9 +273,9 @@ public:
|
|||
}
|
||||
|
||||
//- Return wedge angle
|
||||
const scalar& angle() const
|
||||
scalar angle() const
|
||||
{
|
||||
return angle_;
|
||||
return 360.0/nCopies();
|
||||
}
|
||||
|
||||
//- Return number of slave copies
|
||||
|
@ -280,6 +290,14 @@ public:
|
|||
return !master();
|
||||
}
|
||||
|
||||
//- Expand master face field to full for 360 degrees coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandMasterData(const Field<Type>& spf) const;
|
||||
|
||||
//- Expand slave face field to full for 360 degrees coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandSlaveData(const Field<Type>& spf) const;
|
||||
|
||||
//- Interpolate face field: given field on a the shadow side,
|
||||
// create an interpolated field on this side
|
||||
template<class Type>
|
||||
|
|
|
@ -24,11 +24,14 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "overlapGgiPolyPatch.H"
|
||||
#include "polyMesh.H"
|
||||
#include "polyPatch.H"
|
||||
#include "primitiveMesh.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "polyPatchID.H"
|
||||
#include "OFstream.H"
|
||||
|
@ -36,6 +39,108 @@ Author
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::overlapGgiPolyPatch::calcExpandedMaster() const
|
||||
{
|
||||
// Create expanded master patch interpolation
|
||||
if (expandedMasterPtr_)
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcExpandedMaster() const")
|
||||
<< "Expanded master already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (master())
|
||||
{
|
||||
// Create expanded master patch
|
||||
const label ncpm = nCopies();
|
||||
|
||||
Info << "Number of master copies: " << ncpm << endl;
|
||||
|
||||
// Create expanded master points and faces
|
||||
const polyPatch& master = boundaryMesh()[index()];
|
||||
const pointField& masterLocalPoints = master.localPoints();
|
||||
|
||||
pointField MasterExpandedPoints(ncpm*masterLocalPoints.size());
|
||||
|
||||
const scalar masterAngle = angle();
|
||||
|
||||
Info << "Master Angle is: " << masterAngle << endl;
|
||||
|
||||
// Transform points
|
||||
label nPoints_master = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
// Calculate transform
|
||||
const tensor curRotation =
|
||||
RodriguesRotation(rotationAxis_, copyI*(masterAngle));
|
||||
|
||||
forAll (masterLocalPoints, pointI)
|
||||
{
|
||||
MasterExpandedPoints[nPoints_master] =
|
||||
transform(curRotation, masterLocalPoints[pointI]);
|
||||
nPoints_master++;
|
||||
}
|
||||
}
|
||||
|
||||
// Transform faces
|
||||
const faceList& masterLocalFaces = master.localFaces();
|
||||
faceList MasterExpandedFaces(ncpm*masterLocalFaces.size());
|
||||
|
||||
label nFacesMaster = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
const label copyOffsetMaster = copyI*masterLocalPoints.size();
|
||||
|
||||
forAll (masterLocalFaces, faceI)
|
||||
{
|
||||
const face& curMasterFace = masterLocalFaces[faceI];
|
||||
|
||||
face& MastercurExpandedFace =
|
||||
MasterExpandedFaces[nFacesMaster];
|
||||
|
||||
// Copy face with offsets
|
||||
MastercurExpandedFace.setSize(curMasterFace.size());
|
||||
|
||||
forAll (curMasterFace, fpI)
|
||||
{
|
||||
MastercurExpandedFace[fpI] =
|
||||
curMasterFace[fpI] + copyOffsetMaster;
|
||||
}
|
||||
|
||||
nFacesMaster++;
|
||||
}
|
||||
}
|
||||
|
||||
expandedMasterPtr_ =
|
||||
new standAlonePatch(MasterExpandedFaces, MasterExpandedPoints);
|
||||
|
||||
if (debug > 1)
|
||||
{
|
||||
Info << "Writing expanded master patch as VTK" << endl;
|
||||
|
||||
const polyMesh& mesh = boundaryMesh().mesh();
|
||||
|
||||
fileName fvPath(mesh.time().path()/"VTK");
|
||||
mkDir(fvPath);
|
||||
|
||||
standAlonePatch::writeVTK
|
||||
(
|
||||
fvPath/fileName("expandedMaster" + name() + shadow().name()),
|
||||
MasterExpandedFaces,
|
||||
MasterExpandedPoints
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcExpandedMaster() const")
|
||||
<< "Attempting to create expanded master on a shadow"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
||||
{
|
||||
// Create expanded slave patch interpolation
|
||||
|
@ -49,7 +154,7 @@ void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
|||
if (master())
|
||||
{
|
||||
// Create expanded patch
|
||||
const label ncp = nCopies();
|
||||
const label ncp = shadow().nCopies();
|
||||
|
||||
Info << "Number of slave copies: " << ncp << endl;
|
||||
|
||||
|
@ -135,11 +240,18 @@ void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedMaster() const
|
||||
{
|
||||
if (!expandedMasterPtr_)
|
||||
{
|
||||
calcExpandedMaster();
|
||||
}
|
||||
|
||||
return *expandedMasterPtr_;
|
||||
}
|
||||
|
||||
const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedSlave() const
|
||||
{
|
||||
// Note: expanded slave only exists for the master side.
|
||||
// Slave patch will use master for interpolation.
|
||||
// HJ, 14/Jan/2009
|
||||
if (!expandedSlavePtr_)
|
||||
{
|
||||
calcExpandedSlave();
|
||||
|
@ -151,7 +263,8 @@ const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedSlave() const
|
|||
|
||||
void Foam::overlapGgiPolyPatch::calcPatchToPatch() const
|
||||
{
|
||||
// Create patch-to-patch interpolation
|
||||
// Create patch-to-patch interpolation between the expanded master
|
||||
// and slave patches
|
||||
if (patchToPatchPtr_)
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcPatchToPatch() const")
|
||||
|
@ -164,7 +277,7 @@ void Foam::overlapGgiPolyPatch::calcPatchToPatch() const
|
|||
patchToPatchPtr_ =
|
||||
new overlapGgiInterpolation
|
||||
(
|
||||
*this,
|
||||
expandedMaster(),
|
||||
expandedSlave(),
|
||||
forwardT(),
|
||||
reverseT(),
|
||||
|
@ -214,8 +327,6 @@ void Foam::overlapGgiPolyPatch::calcReconFaceCellCentres() const
|
|||
// Create neighbouring face centres using interpolation
|
||||
if (master())
|
||||
{
|
||||
vectorField alpha(shadow().size(), vector(0, 0, 1));
|
||||
|
||||
const label shadowID = shadowIndex();
|
||||
|
||||
// Get the transformed and interpolated shadow face cell centers
|
||||
|
@ -239,7 +350,7 @@ void Foam::overlapGgiPolyPatch::calcReconFaceCellCentres() const
|
|||
void Foam::overlapGgiPolyPatch::checkDefinition() const
|
||||
{
|
||||
// Sanity checks
|
||||
// 1. Check
|
||||
// 1. Check
|
||||
Info << "overlapGgiPolyPatch: sanity checks missing. HJ" << endl;
|
||||
|
||||
// if
|
||||
|
@ -265,6 +376,7 @@ void Foam::overlapGgiPolyPatch::checkDefinition() const
|
|||
|
||||
void Foam::overlapGgiPolyPatch::clearOut()
|
||||
{
|
||||
deleteDemandDrivenData(expandedMasterPtr_);
|
||||
deleteDemandDrivenData(expandedSlavePtr_);
|
||||
deleteDemandDrivenData(patchToPatchPtr_);
|
||||
deleteDemandDrivenData(reconFaceCellCentresPtr_);
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -36,20 +37,10 @@ template<class Type>
|
|||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::overlapGgiPolyPatch::expandSlaveData(const Field<Type>& spf) const
|
||||
{
|
||||
if (spf.size() != shadow().size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<Field<Type> > overlapGgiPolyPatch::interpolate"
|
||||
"(const Field<Type>& spf) const"
|
||||
) << " Incorrect field size for expansion. Field size: "
|
||||
<< spf.size() << " patch size: " << shadow().size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
const scalar slaveAngle = shadow().angle();
|
||||
|
||||
const label ncp = nCopies();
|
||||
const label ncp = shadow().nCopies();
|
||||
|
||||
tmp<Field<Type> > tef(new Field<Type>(ncp*spf.size()));
|
||||
Field<Type>& ef = tef();
|
||||
|
@ -72,6 +63,35 @@ Foam::overlapGgiPolyPatch::expandSlaveData(const Field<Type>& spf) const
|
|||
return tef;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::overlapGgiPolyPatch::expandMasterData(const Field<Type>& spf) const
|
||||
{
|
||||
const scalar masterAngle = angle();
|
||||
|
||||
const label ncpm = nCopies();
|
||||
|
||||
tmp<Field<Type> > tef(new Field<Type>(ncpm*spf.size()));
|
||||
Field<Type>& ef = tef();
|
||||
|
||||
label nFaces = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
// Calculate transform
|
||||
const tensor curRotation =
|
||||
RodriguesRotation(rotationAxis_, copyI*(masterAngle));
|
||||
|
||||
forAll (spf, faceI)
|
||||
{
|
||||
ef[nFaces] = transform(curRotation, spf[faceI]);
|
||||
nFaces++;
|
||||
}
|
||||
}
|
||||
|
||||
return tef;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -82,13 +102,20 @@ Foam::overlapGgiPolyPatch::interpolate(const Field<Type>& pf) const
|
|||
if (master())
|
||||
{
|
||||
// Expand slave data
|
||||
tmp<Field<Type> > expand = expandSlaveData(pf);
|
||||
tmp<Field<Type> > expandslave = expandSlaveData(pf);
|
||||
|
||||
return patchToPatch().slaveToMaster(expand);
|
||||
tmp<Field<Type> > tresult= patchToPatch().slaveToMaster(expandslave);
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(pf);
|
||||
// Expand master data
|
||||
tmp<Field<Type> > expandmaster = expandMasterData(pf);
|
||||
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(expandmaster);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
@ -107,11 +134,19 @@ Foam::overlapGgiPolyPatch::interpolate(const tmp<Field<Type> >& tpf) const
|
|||
// Expand slave data
|
||||
tmp<Field<Type> > expand = expandSlaveData(tpf());
|
||||
|
||||
return patchToPatch().slaveToMaster(expand);
|
||||
tmp<Field<Type> > tresult = patchToPatch().slaveToMaster(expand);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(tpf);
|
||||
// Expand master data
|
||||
tmp<Field<Type> > expandmaster = expandMasterData(tpf());
|
||||
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(expandmaster);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
|
|
@ -18,6 +18,7 @@ $(solidBodyMotionFunctions)/SKA/SKA.C
|
|||
$(solidBodyMotionFunctions)/translation/translation.C
|
||||
|
||||
mixerGgiFvMesh/mixerGgiFvMesh.C
|
||||
turboFvMesh/turboFvMesh.C
|
||||
|
||||
tetMetrics/tetMetric.C
|
||||
tetMetrics/tetMetrics.C
|
||||
|
|
|
@ -1,53 +1,43 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / O peration | Version: 1.5.dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-CR";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object taufirst;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
dynamicFvMeshLib "libtopoChangerFvMesh.so";
|
||||
dynamicFvMesh turboFvMesh;
|
||||
|
||||
internalField uniform (0 0 0 0 0 0);
|
||||
|
||||
boundaryField
|
||||
turboFvMeshCoeffs
|
||||
{
|
||||
patch3
|
||||
coordinateSystem
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0 0 0 0);
|
||||
type cylindrical;
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
patch2
|
||||
|
||||
rpm
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
patch1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
patch0
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
Rotor1 60;
|
||||
Rotor2 -30;
|
||||
Stator 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
225
src/dynamicFvMesh/turboFvMesh/turboFvMesh.C
Normal file
225
src/dynamicFvMesh/turboFvMesh/turboFvMesh.C
Normal file
|
@ -0,0 +1,225 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Instructions:
|
||||
This tool is used to have multiple rotating regions around the same origin
|
||||
with different rpms.
|
||||
Creating the cellZones is not implemented in this tool.
|
||||
The steps to obtain the cellZones are :
|
||||
|
||||
1) use regionCellSets utility. With this command you can have different
|
||||
cellSets for each region.
|
||||
|
||||
2) Change the name of the regions eg. CellRegion0 to Rotor1 ,CellRegion1
|
||||
to Stator and vice versa.
|
||||
|
||||
3) run command " setsToZones -noFlipMap ". After this command the
|
||||
cellSets are transformed to cellZones.
|
||||
|
||||
4) in dynamicMeshDict rpm section should be added.
|
||||
|
||||
5) The case is ready to be run.
|
||||
|
||||
Implemented by Fethi Tekin, 24.03.2010
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#include "turboFvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(turboFvMesh, 0);
|
||||
addToRunTimeSelectionTable(dynamicFvMesh, turboFvMesh, IOobject);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::turboFvMesh::addZonesAndModifiers()
|
||||
{
|
||||
// Add zones and modifiers for motion action
|
||||
// No functionality is implemented
|
||||
|
||||
if (cellZones().size() > 0)
|
||||
{
|
||||
Info<< "void turboFvMesh::addZonesAndModifiers() : "
|
||||
<< "Zones and modifiers already present. Skipping."
|
||||
<< endl;
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("turboFvMesh")
|
||||
<< "Cell Regions have to be created"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
void Foam::turboFvMesh::calcMovingPoints() const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "void turboFvMesh::calcMovingMasks() const : "
|
||||
<< "Calculating point and cell masks"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (movingPointsPtr_)
|
||||
{
|
||||
FatalErrorIn("void turboFvMesh::calcMovingMasks() const")
|
||||
<< "point mask already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Retrieve the zone Names
|
||||
const wordList zoneNames = cellZones().names();
|
||||
|
||||
// Set the points
|
||||
movingPointsPtr_ = new vectorField(allPoints().size(),vector::zero);
|
||||
|
||||
vectorField& movingPoints = *movingPointsPtr_;
|
||||
|
||||
const cellList& c = cells();
|
||||
const faceList& f = allFaces();
|
||||
|
||||
forAll(zoneNames,zoneI)
|
||||
{
|
||||
Info<< "Moving Region Zone Name:" << zoneNames[zoneI]<< nl<<endl;
|
||||
|
||||
const labelList& cellAddr =
|
||||
cellZones()[cellZones().findZoneID(zoneNames[zoneI])];
|
||||
|
||||
rpm_ = readScalar(dict_.subDict("rpm").lookup(zoneNames[zoneI]));
|
||||
|
||||
Info<< "rpm:" << rpm_<<nl<<endl;
|
||||
|
||||
forAll (cellAddr, cellI)
|
||||
{
|
||||
const cell& curCell = c[cellAddr[cellI]];
|
||||
|
||||
forAll (curCell, faceI)
|
||||
{
|
||||
const face& curFace = f[curCell[faceI]];
|
||||
|
||||
forAll (curFace, pointI)
|
||||
{
|
||||
//The rotation data is saved within the cell data. For
|
||||
//non-rotating regions rpm is zero,so mesh movement is
|
||||
//also zero. The conversion of rotational speed
|
||||
movingPoints[curFace[pointI]] =
|
||||
vector(0,rpm_*360.0*time().deltaT().value()/60.0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::turboFvMesh::turboFvMesh
|
||||
(
|
||||
const IOobject& io
|
||||
)
|
||||
:
|
||||
dynamicFvMesh(io),
|
||||
dict_
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dynamicMeshDict",
|
||||
time().constant(),
|
||||
*this,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
).subDict(typeName + "Coeffs")
|
||||
),
|
||||
csPtr_
|
||||
(
|
||||
coordinateSystem::New
|
||||
(
|
||||
"coordinateSystem",
|
||||
dict_.subDict("coordinateSystem")
|
||||
)
|
||||
),
|
||||
|
||||
movingPointsPtr_(NULL)
|
||||
{
|
||||
addZonesAndModifiers();
|
||||
|
||||
Info<< "Turbomachine Mixer mesh:" << nl
|
||||
<< " origin: " << cs().origin() << nl
|
||||
<< " axis : " << cs().axis() << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::turboFvMesh::~turboFvMesh()
|
||||
{
|
||||
deleteDemandDrivenData(movingPointsPtr_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Return moving points mask
|
||||
const Foam::vectorField& Foam::turboFvMesh::movingPoints() const
|
||||
{
|
||||
if (!movingPointsPtr_)
|
||||
{
|
||||
calcMovingPoints();
|
||||
}
|
||||
|
||||
return *movingPointsPtr_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::turboFvMesh::update()
|
||||
{
|
||||
movePoints
|
||||
(
|
||||
csPtr_->globalPosition
|
||||
(
|
||||
csPtr_->localPosition(allPoints()) + movingPoints()
|
||||
)
|
||||
);
|
||||
|
||||
// The mesh is not morphing
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
131
src/dynamicFvMesh/turboFvMesh/turboFvMesh.H
Normal file
131
src/dynamicFvMesh/turboFvMesh/turboFvMesh.H
Normal file
|
@ -0,0 +1,131 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2006-7 H. Jasak All rights reserved
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
turboFvMesh
|
||||
|
||||
Description
|
||||
Simple mixer mesh using an overlapGGI interface
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
SourceFiles
|
||||
turboFvMesh.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turboFvMesh_H
|
||||
#define turboFvMesh_H
|
||||
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "cylindricalCS.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turboFvMesh Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class turboFvMesh
|
||||
:
|
||||
public dynamicFvMesh
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Motion dictionary
|
||||
dictionary dict_;
|
||||
|
||||
//- Coordinate system
|
||||
autoPtr<coordinateSystem> csPtr_;
|
||||
|
||||
// - Rotational speed in rotations per minute (rpm)
|
||||
mutable scalar rpm_;
|
||||
|
||||
//- Markup field for points.
|
||||
mutable vectorField* movingPointsPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
turboFvMesh(const turboFvMesh&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const turboFvMesh&);
|
||||
|
||||
|
||||
//- Add mixer zones
|
||||
void addZonesAndModifiers();
|
||||
|
||||
//- Calculate moving Points
|
||||
void calcMovingPoints() const;
|
||||
|
||||
//- Return moving points
|
||||
const vectorField& movingPoints() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("turboFvMesh");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from IOobject
|
||||
explicit turboFvMesh(const IOobject& io);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~turboFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return coordinate system
|
||||
const coordinateSystem& cs() const
|
||||
{
|
||||
return csPtr_();
|
||||
}
|
||||
|
||||
//- Update the mesh for both mesh motion
|
||||
virtual bool update();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -12,13 +12,13 @@ viscoelasticLaws/FENE-CR/FENE_CR.C
|
|||
viscoelasticLaws/FENE-P/FENE_P.C
|
||||
viscoelasticLaws/XPP_SE/XPP_SE.C
|
||||
viscoelasticLaws/XPP_DE/XPP_DE.C
|
||||
viscoelasticLaws/PP/PP.C
|
||||
viscoelasticLaws/DCPP/DCPP.C
|
||||
viscoelasticLaws/Feta-PTT/Feta_PTT.C
|
||||
viscoelasticLaws/Leonov/Leonov.C
|
||||
viscoelasticLaws/White-Metzner/White-Metzner_Larson/White_Metzner_Larson.C
|
||||
viscoelasticLaws/White-Metzner/White-Metzner_CM/White_Metzner_CM.C
|
||||
viscoelasticLaws/White-Metzner/White-Metzner_CY/White_Metzner_CY.C
|
||||
viscoelasticLaws/WhiteMetzner/WhiteMetznerLarson/WhiteMetznerLarson.C
|
||||
viscoelasticLaws/WhiteMetzner/WhiteMetznerCross/WhiteMetznerCross.C
|
||||
viscoelasticLaws/WhiteMetzner/WhiteMetznerCarreauYasuda/WhiteMetznerCarreauYasuda.C
|
||||
viscoelasticLaws/S_MDCPP/S_MDCPP.C
|
||||
|
||||
viscoelasticLaws/multiMode/multiMode.C
|
||||
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "DCPP.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(DCPP, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, DCPP, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(DCPP, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, DCPP, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
DCPP::DCPP
|
||||
Foam::DCPP::DCPP
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -117,25 +115,23 @@ DCPP::DCPP
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> DCPP::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::DCPP::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
fvc::div(tau_/rho_, "div(tau)")
|
||||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
+ fvm::laplacian((etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DCPP::correct()
|
||||
void Foam::DCPP::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Upper convected derivate term
|
||||
volTensorField Cupper = S_ & L;
|
||||
|
@ -144,48 +140,42 @@ void DCPP::correct()
|
|||
volTensorField Clower = L & S_;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
|
||||
// Evolution of orientation
|
||||
tmp<fvSymmTensorMatrix> SEqn
|
||||
fvSymmTensorMatrix SEqn
|
||||
(
|
||||
fvm::ddt(S_)
|
||||
+ fvm::div(phi(), S_)
|
||||
==
|
||||
(1 - zeta_/2)*twoSymm( Cupper )
|
||||
- (zeta_/2)*twoSymm( Clower )
|
||||
- (1 - zeta_)*fvm::Sp( (twoD && S_) , S_ )
|
||||
- fvm::Sp(( 1/lambdaOb_/Foam::sqr(Lambda_) ), S_ )
|
||||
+ 1/lambdaOb_/Foam::sqr(Lambda_)/3*I_
|
||||
|
||||
+ fvm::div(phi(), S_)
|
||||
==
|
||||
(1 - zeta_/2)*twoSymm(Cupper)
|
||||
- (zeta_/2)*twoSymm(Clower)
|
||||
- (1 - zeta_)*fvm::Sp((twoD && S_), S_)
|
||||
- fvm::Sp(1/lambdaOb_/Foam::sqr(Lambda_), S_)
|
||||
+ 1/lambdaOb_/Foam::sqr(Lambda_)/3*I_
|
||||
);
|
||||
|
||||
SEqn().relax();
|
||||
solve(SEqn);
|
||||
SEqn.relax();
|
||||
SEqn.solve();
|
||||
|
||||
// Evolution of the backbone stretch
|
||||
tmp<fvScalarMatrix> LambdaEqn
|
||||
fvScalarMatrix lambdaEqn
|
||||
(
|
||||
fvm::ddt(Lambda_)
|
||||
+ fvm::div(phi(), Lambda_)
|
||||
==
|
||||
fvm::Sp( (twoD && S_) / 2 , Lambda_ )
|
||||
- fvm::Sp( Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_ )
|
||||
+ Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_
|
||||
+ fvm::div(phi(), Lambda_)
|
||||
==
|
||||
fvm::Sp((twoD && S_)/2 , Lambda_)
|
||||
- fvm::Sp(Foam::exp(2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_)
|
||||
+ Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_
|
||||
);
|
||||
|
||||
LambdaEqn().relax();
|
||||
solve(LambdaEqn);
|
||||
lambdaEqn.relax();
|
||||
lambdaEqn.solve();
|
||||
|
||||
// Viscoelastic stress
|
||||
tau_ = etaP_/lambdaOb_/(1 - zeta_) * (3*Foam::sqr(Lambda_)*S_ - I_);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -62,7 +62,7 @@ class DCPP
|
|||
volSymmTensorField S_;
|
||||
|
||||
//- Evolution of the backbone stretch
|
||||
volScalarField Lambda_;
|
||||
volScalarField Lambda_;
|
||||
|
||||
//- Transported viscoelastic stress
|
||||
volSymmTensorField tau_;
|
||||
|
@ -91,7 +91,7 @@ class DCPP
|
|||
//- Relaxation time for the stretch
|
||||
dimensionedScalar lambdaOs_;
|
||||
|
||||
//- Amount of arms at the end of a backbone
|
||||
//- Amount of arms at the end of a backbone
|
||||
dimensionedScalar q_;
|
||||
|
||||
|
||||
|
|
|
@ -27,20 +27,17 @@ License
|
|||
#include "EPTT.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(EPTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, EPTT, dictionary);
|
||||
defineTypeNameAndDebug(EPTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, EPTT, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
EPTT::EPTT
|
||||
Foam::EPTT::EPTT
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -72,7 +69,7 @@ EPTT::EPTT
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> EPTT::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::EPTT::divTau(volVectorField& U) const
|
||||
{
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
|
@ -85,37 +82,36 @@ tmp<fvVectorMatrix> EPTT::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void EPTT::correct()
|
||||
void Foam::EPTT::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
+ twoSymm( C )
|
||||
- zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) )
|
||||
- fvm::Sp( (1/lambda_) * Foam::exp( epsilon_ * lambda_ / etaP_ * tr(tau_) ) , tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
+ twoSymm(C)
|
||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
||||
- fvm::Sp
|
||||
(
|
||||
(1/lambda_)*Foam::exp(epsilon_*lambda_/etaP_*tr(tau_)),
|
||||
tau_
|
||||
)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "FENE_CR.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(FENE_CR, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, FENE_CR, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(FENE_CR, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, FENE_CR, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
FENE_CR::FENE_CR
|
||||
Foam::FENE_CR::FENE_CR
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -71,7 +69,7 @@ FENE_CR::FENE_CR
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> FENE_CR::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::FENE_CR::divTau(volVectorField& U) const
|
||||
{
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
|
@ -84,36 +82,31 @@ tmp<fvVectorMatrix> FENE_CR::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void FENE_CR::correct()
|
||||
void Foam::FENE_CR::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
((L2_ / lambda_ + tr(tau_)/etaP_) / (L2_ - 3.0) ) * etaP_ * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( (L2_ / lambda_ + tr(tau_)/etaP_) / (L2_ - 3.0), tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
((L2_ / lambda_ + tr(tau_)/etaP_)/(L2_ - 3.0))*etaP_*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp((L2_/lambda_ + tr(tau_)/etaP_)/(L2_ - 3), tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -72,7 +72,7 @@ class FENE_CR
|
|||
//- Zero shear rate polymer viscosity
|
||||
dimensionedScalar etaP_;
|
||||
|
||||
//- Molecular adimensional extensibility
|
||||
//- Molecular adimensional extensibility
|
||||
dimensionedScalar L2_;
|
||||
|
||||
//- Relaxation time
|
||||
|
@ -118,7 +118,7 @@ public:
|
|||
virtual tmp<volSymmTensorField> tau() const
|
||||
{
|
||||
return tau_;
|
||||
}
|
||||
}
|
||||
|
||||
//- Return the coupling term for the momentum equation
|
||||
virtual tmp<fvVectorMatrix> divTau(volVectorField& U) const;
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "FENE_P.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(FENE_P, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, FENE_P, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(FENE_P, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, FENE_P, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
FENE_P::FENE_P
|
||||
Foam::FENE_P::FENE_P
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -71,10 +69,9 @@ FENE_P::FENE_P
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> FENE_P::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::FENE_P::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -86,36 +83,35 @@ tmp<fvVectorMatrix> FENE_P::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void FENE_P::correct()
|
||||
void Foam::FENE_P::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
( 1 / lambda_ / (1 - 3/L2_) ) * etaP_ * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( 1 / lambda_ + ( 3 / lambda_ / (1 - 3/L2_) + tr(tau_)/etaP_ ) / (L2_), tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
(1/lambda_/(1 - 3/L2_))*etaP_*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp
|
||||
(
|
||||
1/lambda_ + (3/lambda_/(1 - 3/L2_) + tr(tau_)/etaP_)/(L2_),
|
||||
tau_
|
||||
)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,17 @@ License
|
|||
#include "Feta_PTT.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Feta_PTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Feta_PTT, dictionary);
|
||||
defineTypeNameAndDebug(Feta_PTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Feta_PTT, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
Feta_PTT::Feta_PTT
|
||||
Foam::Feta_PTT::Feta_PTT
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -80,7 +77,11 @@ Feta_PTT::Feta_PTT
|
|||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
etaP_/( Foam::pow(scalar(1) + A_*Foam::pow(0.5*( Foam::sqr(tr(tau_)) - tr(tau_ & tau_) ) * Foam::sqr(lambda_) / Foam::sqr(etaP_), a_), b_) )
|
||||
etaP_/
|
||||
(
|
||||
Foam::pow(scalar(1) + A_*Foam::pow(0.5*( Foam::sqr(tr(tau_))
|
||||
- tr(tau_ & tau_))*Foam::sqr(lambda_)/Foam::sqr(etaP_), a_), b_)
|
||||
)
|
||||
),
|
||||
lambdaEff_
|
||||
(
|
||||
|
@ -92,17 +93,17 @@ Feta_PTT::Feta_PTT
|
|||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
lambda_ / (scalar(1) + epsilon_*lambda_*tr(tau_) / etaP_)
|
||||
lambda_ / (scalar(1) + epsilon_*lambda_*tr(tau_) / etaP_)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> Feta_PTT::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::Feta_PTT::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_; // need to be equal to old time step (a constant)
|
||||
// Need to be equal to old time step (a constant)
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -110,46 +111,45 @@ tmp<fvVectorMatrix> Feta_PTT::divTau(volVectorField& U) const
|
|||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Feta_PTT::correct()
|
||||
void Foam::Feta_PTT::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// etaP effective
|
||||
etaPEff_ = etaP_/( Foam::pow(scalar(1) + A_*Foam::pow(0.5*( Foam::sqr(tr(tau_)) - tr(tau_ & tau_) ) * Foam::sqr(lambda_) / Foam::sqr(etaP_), a_), b_) );
|
||||
etaPEff_ = etaP_/
|
||||
(
|
||||
Foam::pow(scalar(1) + A_*Foam::pow(0.5*( Foam::sqr(tr(tau_))
|
||||
- tr(tau_ & tau_)) * Foam::sqr(lambda_)/Foam::sqr(etaP_), a_), b_)
|
||||
);
|
||||
|
||||
// lambda effective
|
||||
lambdaEff_ = (lambda_ / (scalar(1) + epsilon_*lambda_*tr(tau_) / etaP_) );
|
||||
lambdaEff_ = lambda_/(scalar(1) + epsilon_*lambda_*tr(tau_)/etaP_);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPEff_ / lambdaEff_ * twoD
|
||||
+ twoSymm( C )
|
||||
- zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) )
|
||||
- fvm::Sp( epsilon_ / etaPEff_ * tr(tau_) + 1/lambdaEff_, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPEff_/lambdaEff_*twoD
|
||||
+ twoSymm(C)
|
||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
||||
- fvm::Sp(epsilon_/etaPEff_*tr(tau_) + 1/lambdaEff_, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -89,11 +89,13 @@ class Feta_PTT
|
|||
dimensionedScalar b_;
|
||||
|
||||
|
||||
//- Effective zero shear rate polymer viscosity and relaxation time
|
||||
//- Effective zero shear rate polymer viscosity
|
||||
volScalarField etaPEff_;
|
||||
|
||||
//- Relaxation time
|
||||
volScalarField lambdaEff_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "Giesekus.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(Giesekus, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Giesekus, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Giesekus, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Giesekus, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
Giesekus::Giesekus
|
||||
Foam::Giesekus::Giesekus
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -71,7 +69,7 @@ Giesekus::Giesekus
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> Giesekus::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::Giesekus::divTau(volVectorField& U) const
|
||||
{
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
|
@ -84,7 +82,7 @@ tmp<fvVectorMatrix> Giesekus::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void Giesekus::correct()
|
||||
void Foam::Giesekus::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
@ -96,25 +94,21 @@ void Giesekus::correct()
|
|||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
+ twoSymm( C )
|
||||
- (alpha_ / etaP_) * ( tau_ & tau_)
|
||||
- fvm::Sp(1/lambda_, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
+ twoSymm(C)
|
||||
- (alpha_/etaP_)*(tau_ & tau_)
|
||||
- fvm::Sp(1/lambda_, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
virtual tmp<volSymmTensorField> tau() const
|
||||
{
|
||||
return tau_;
|
||||
}
|
||||
}
|
||||
|
||||
//- Return the coupling term for the momentum equation
|
||||
virtual tmp<fvVectorMatrix> divTau(volVectorField& U) const;
|
||||
|
|
|
@ -27,20 +27,17 @@ License
|
|||
#include "LPTT.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(LPTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, LPTT, dictionary);
|
||||
defineTypeNameAndDebug(LPTT, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, LPTT, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
LPTT::LPTT
|
||||
Foam::LPTT::LPTT
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -72,11 +69,10 @@ LPTT::LPTT
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> LPTT::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::LPTT::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
// dimensionedScalar etaPEff = (1 + 1/epsilon_)*etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -88,37 +84,32 @@ tmp<fvVectorMatrix> LPTT::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void LPTT::correct()
|
||||
void Foam::LPTT::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
+ twoSymm( C )
|
||||
- zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) )
|
||||
- fvm::Sp( epsilon_ / etaP_ * tr(tau_) + 1/lambda_, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
+ twoSymm(C)
|
||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
||||
- fvm::Sp(epsilon_/etaP_*tr(tau_) + 1/lambda_, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,17 @@ License
|
|||
#include "Leonov.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Leonov, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Leonov, dictionary);
|
||||
defineTypeNameAndDebug(Leonov, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Leonov, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
Leonov::Leonov
|
||||
Foam::Leonov::Leonov
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -102,10 +99,9 @@ Leonov::Leonov
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> Leonov::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::Leonov::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -116,40 +112,43 @@ tmp<fvVectorMatrix> Leonov::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void Leonov::correct()
|
||||
void Foam::Leonov::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = sigma_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> sigmaEqn
|
||||
fvSymmTensorMatrix sigmaEqn
|
||||
(
|
||||
fvm::ddt(sigma_)
|
||||
+ fvm::div(phi(), sigma_)
|
||||
==
|
||||
twoSymm( C )
|
||||
- 1/etaP_/2*( (sigma_ & sigma_) - Foam::pow( (etaP_/lambda_),2)*I_ )
|
||||
+ fvm::Sp(1/etaP_/6*( tr(sigma_) - Foam::pow(etaP_/lambda_,2) * tr(inv(sigma_)) ), sigma_)
|
||||
|
||||
+ fvm::div(phi(), sigma_)
|
||||
==
|
||||
twoSymm(C)
|
||||
- 1/etaP_/2*((sigma_ & sigma_) - Foam::pow((etaP_/lambda_), 2)*I_)
|
||||
+ fvm::Sp
|
||||
(
|
||||
1/etaP_/6*
|
||||
(
|
||||
tr(sigma_)
|
||||
- Foam::pow(etaP_/lambda_,2) * tr(inv(sigma_))
|
||||
),
|
||||
sigma_
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
sigmaEqn().relax();
|
||||
solve(sigmaEqn);
|
||||
sigmaEqn.relax();
|
||||
sigmaEqn.solve();
|
||||
|
||||
// Viscoelastic stress
|
||||
tau_ = sigma_ - etaP_/lambda_ * I_;
|
||||
tau_ = sigma_ - etaP_/lambda_*I_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "Maxwell.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(Maxwell, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Maxwell, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Maxwell, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Maxwell, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
Maxwell::Maxwell
|
||||
Foam::Maxwell::Maxwell
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -70,10 +68,9 @@ Maxwell::Maxwell
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> Maxwell::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::Maxwell::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -85,32 +82,26 @@ tmp<fvVectorMatrix> Maxwell::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void Maxwell::correct()
|
||||
void Foam::Maxwell::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
- fvm::Sp( 1/lambda_, tau_ )
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
- fvm::Sp( 1/lambda_, tau_ )
|
||||
);
|
||||
|
||||
// tauEqn().relax(); // to see
|
||||
solve(tauEqn);
|
||||
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "Oldroyd_B.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(Oldroyd_B, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Oldroyd_B, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(Oldroyd_B, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, Oldroyd_B, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
Oldroyd_B::Oldroyd_B
|
||||
Foam::Oldroyd_B::Oldroyd_B
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -70,10 +68,10 @@ Oldroyd_B::Oldroyd_B
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> Oldroyd_B::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix>
|
||||
Foam::Oldroyd_B::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -81,40 +79,34 @@ tmp<fvVectorMatrix> Oldroyd_B::divTau(volVectorField& U) const
|
|||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Oldroyd_B::correct()
|
||||
void Foam::Oldroyd_B::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( 1/lambda_, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp(1/lambda_, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -24,23 +24,20 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PP.H"
|
||||
#include "S_MDCPP.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(PP, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, PP, dictionary);
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(S_MDCPP, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, S_MDCPP, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
PP::PP
|
||||
Foam::S_MDCPP::S_MDCPP
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -49,30 +46,6 @@ PP::PP
|
|||
)
|
||||
:
|
||||
viscoelasticLaw(name, U, phi),
|
||||
S_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"S" + name,
|
||||
U.time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U.mesh()
|
||||
),
|
||||
Lambda_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Lambda" + name,
|
||||
U.time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U.mesh()
|
||||
),
|
||||
tau_
|
||||
(
|
||||
IOobject
|
||||
|
@ -80,16 +53,10 @@ PP::PP
|
|||
"tau" + name,
|
||||
U.time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
dimensionSet(1, -1, -2, 0, 0, 0, 0),
|
||||
symmTensor::zero
|
||||
)
|
||||
U.mesh()
|
||||
),
|
||||
I_
|
||||
(
|
||||
|
@ -108,6 +75,7 @@ PP::PP
|
|||
rho_(dict.lookup("rho")),
|
||||
etaS_(dict.lookup("etaS")),
|
||||
etaP_(dict.lookup("etaP")),
|
||||
zeta_(dict.lookup("zeta")),
|
||||
lambdaOb_(dict.lookup("lambdaOb")),
|
||||
lambdaOs_(dict.lookup("lambdaOs")),
|
||||
q_(dict.lookup("q"))
|
||||
|
@ -116,9 +84,8 @@ PP::PP
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> PP::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::S_MDCPP::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
|
@ -131,68 +98,46 @@ tmp<fvVectorMatrix> PP::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void PP::correct()
|
||||
void Foam::S_MDCPP::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = S_ & L;
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Lambda (Backbone stretch)
|
||||
volScalarField Lambda =
|
||||
Foam::sqrt(1 + tr(tau_)*lambdaOb_*(1 - zeta_)/3/etaP_);
|
||||
|
||||
// Evolution of orientation
|
||||
tmp<fvSymmTensorMatrix> SEqn
|
||||
// Auxiliary field
|
||||
volScalarField aux = Foam::exp( 2/q_*(Lambda - 1));
|
||||
|
||||
// Extra function
|
||||
volScalarField fTau =
|
||||
aux*(2*lambdaOb_/lambdaOs_*(1 - 1/Lambda) + 1/Foam::sqr(Lambda));
|
||||
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(S_)
|
||||
+ fvm::div(phi(), S_)
|
||||
==
|
||||
twoSymm( C )
|
||||
- fvm::Sp( 1/lambdaOb_, S_ )
|
||||
+ 1/3/lambdaOb_*I_
|
||||
|
||||
);
|
||||
|
||||
SEqn().relax();
|
||||
solve(SEqn);
|
||||
|
||||
|
||||
// Evolution of the backbone stretch
|
||||
tmp<fvScalarMatrix> LambdaEqn
|
||||
(
|
||||
fvm::ddt(Lambda_)
|
||||
+ fvm::div(phi(), Lambda_)
|
||||
==
|
||||
fvm::Sp( (twoD && (S_/tr(S_)) ) / 2 , Lambda_ )
|
||||
- fvm::Sp( Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_ )
|
||||
+ Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_
|
||||
|
||||
);
|
||||
|
||||
LambdaEqn().relax();
|
||||
solve(LambdaEqn);
|
||||
|
||||
|
||||
// Pom Pom condition:
|
||||
Lambda_.max
|
||||
(
|
||||
dimensionedScalar
|
||||
(
|
||||
"zero",
|
||||
Lambda_.dimensions(),
|
||||
scalar( q_.value() )
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambdaOb_*twoD
|
||||
+ twoSymm(C)
|
||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
||||
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
||||
- (
|
||||
1/lambdaOb_*( etaP_/lambdaOb_/(1 - zeta_)*(fTau - aux)*I_)
|
||||
)
|
||||
);
|
||||
|
||||
// Viscoelastic stress
|
||||
tau_ = etaP_/lambdaOb_ * (3*Foam::sqr(Lambda_)*S_/tr(S_) - I_);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,147 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
S_MDCPP
|
||||
|
||||
Description
|
||||
S-MDCPP non linear viscoelastic fluid model:
|
||||
Wei Wang, Xikui Li and Xianhong Han,
|
||||
Journal of Non-Newtonian Fluid Mechanics, 165,1480-1493, 2010.
|
||||
|
||||
Author
|
||||
Jovani L. Favero. All rights reserved
|
||||
|
||||
SourceFiles
|
||||
S_MDCPP.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef S_MDCPP_H
|
||||
#define S_MDCPP_H
|
||||
|
||||
#include "viscoelasticLaw.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class S_MDCPP Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class S_MDCPP
|
||||
:
|
||||
public viscoelasticLaw
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Transported viscoelastic stress
|
||||
volSymmTensorField tau_;
|
||||
|
||||
//- Identity tensor
|
||||
dimensionedSymmTensor I_;
|
||||
|
||||
// Model constants
|
||||
|
||||
//- Density
|
||||
dimensionedScalar rho_;
|
||||
|
||||
//- Solvent viscosity
|
||||
dimensionedScalar etaS_;
|
||||
|
||||
//- Zero shear rate polymer viscosity
|
||||
dimensionedScalar etaP_;
|
||||
|
||||
//- Material parameter, defining the amount of anisotropy
|
||||
dimensionedScalar zeta_;
|
||||
|
||||
//- Relaxation time of the backbone tube orientation
|
||||
dimensionedScalar lambdaOb_;
|
||||
|
||||
//- Relaxation time for the stretch
|
||||
dimensionedScalar lambdaOs_;
|
||||
|
||||
//- Amount of arms at the end of a backbone
|
||||
dimensionedScalar q_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
S_MDCPP(const S_MDCPP&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const S_MDCPP&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("S-MDCPP");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
S_MDCPP
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~S_MDCPP()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the viscoelastic stress tensor
|
||||
virtual tmp<volSymmTensorField> tau() const
|
||||
{
|
||||
return tau_;
|
||||
}
|
||||
|
||||
//- Return the coupling term for the momentum equation
|
||||
virtual tmp<fvVectorMatrix> divTau(volVectorField& U) const;
|
||||
|
||||
//- Correct the viscoelastic stress
|
||||
virtual void correct();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,144 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "S_MDCPP.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(S_MDCPP, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, S_MDCPP, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::S_MDCPP::S_MDCPP
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
viscoelasticLaw(name, U, phi),
|
||||
tau_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tau" + name,
|
||||
U.time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U.mesh()
|
||||
),
|
||||
I_
|
||||
(
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"I",
|
||||
dimensionSet(0, 0, 0, 0, 0, 0, 0),
|
||||
symmTensor
|
||||
(
|
||||
1, 0, 0,
|
||||
1, 0,
|
||||
1
|
||||
)
|
||||
)
|
||||
),
|
||||
rho_(dict.lookup("rho")),
|
||||
etaS_(dict.lookup("etaS")),
|
||||
etaP_(dict.lookup("etaP")),
|
||||
zeta_(dict.lookup("zeta")),
|
||||
lambdaOb_(dict.lookup("lambdaOb")),
|
||||
lambdaOs_(dict.lookup("lambdaOs")),
|
||||
q_(dict.lookup("q"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::S_MDCPP::divTau(volVectorField& U) const
|
||||
{
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
fvc::div(tau_/rho_, "div(tau)")
|
||||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Foam::S_MDCPP::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Lambda (Backbone stretch)
|
||||
volScalarField Lambda =
|
||||
Foam::sqrt(1 + tr(tau_)*lambdaOb_*(1 - zeta_)/3/etaP_);
|
||||
|
||||
// Auxiliary field
|
||||
volScalarField aux = Foam::exp( 2/q_*(Lambda - 1));
|
||||
|
||||
// Extra function
|
||||
volScalarField fTau =
|
||||
aux*(2*lambdaOb_/lambdaOs_*(1 - 1/Lambda) + 1/Foam::sqr(Lambda));
|
||||
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambdaOb_*twoD
|
||||
+ twoSymm(C)
|
||||
- zeta_/2*((tau_ & twoD) + (twoD & tau_))
|
||||
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
||||
- (
|
||||
1/lambdaOb_*(etaP_/lambdaOb_/(1 - zeta_)*(fTau - aux)*I_)
|
||||
)
|
||||
);
|
||||
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,22 +23,23 @@ License
|
|||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
PP
|
||||
S-MDCPP
|
||||
|
||||
Description
|
||||
Pom-Pom (PP) non linear viscoelastic fluid model.
|
||||
(McLeish,T.C.B., Larson R.G., J. Rheol. 42, 81, 1998)
|
||||
S-MDCPP non linear viscoelastic fluid model:
|
||||
Wei Wang, Xikui Li and Xianhong Han,
|
||||
Journal of Non-Newtonian Fluid Mechanics, 165,1480-1493, 2010.
|
||||
|
||||
Author
|
||||
Jovani L. Favero. All rights reserved
|
||||
|
||||
SourceFiles
|
||||
PP.C
|
||||
S_MDCPP.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PP_H
|
||||
#define PP_H
|
||||
#ifndef S_MDCP_H
|
||||
#define S_MDCP_H
|
||||
|
||||
#include "viscoelasticLaw.H"
|
||||
|
||||
|
@ -48,32 +49,25 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PP Declaration
|
||||
Class S_MDCPP Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class PP
|
||||
class S_MDCPP
|
||||
:
|
||||
public viscoelasticLaw
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Evolution of orientation
|
||||
volSymmTensorField S_;
|
||||
|
||||
//- Evolution of the backbone stretch
|
||||
volScalarField Lambda_;
|
||||
|
||||
//- Transported viscoelastic stress
|
||||
//- Transported viscoelastic stress
|
||||
volSymmTensorField tau_;
|
||||
|
||||
//- Identity tensor
|
||||
dimensionedSymmTensor I_;
|
||||
|
||||
|
||||
// Model constants
|
||||
|
||||
//- Density
|
||||
dimensionedScalar rho_;
|
||||
dimensionedScalar rho_;
|
||||
|
||||
//- Solvent viscosity
|
||||
dimensionedScalar etaS_;
|
||||
|
@ -81,6 +75,9 @@ class PP
|
|||
//- Zero shear rate polymer viscosity
|
||||
dimensionedScalar etaP_;
|
||||
|
||||
//- Material parameter, defining the amount of anisotropy
|
||||
dimensionedScalar zeta_;
|
||||
|
||||
//- Relaxation time of the backbone tube orientation
|
||||
dimensionedScalar lambdaOb_;
|
||||
|
||||
|
@ -94,21 +91,21 @@ class PP
|
|||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
PP(const PP&);
|
||||
S_MDCPP(const S_MDCPP&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const PP&);
|
||||
void operator=(const S_MDCPP&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("PP");
|
||||
TypeName("S_MDCPP");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
PP
|
||||
S_MDCPP
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -119,7 +116,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
virtual ~PP()
|
||||
virtual ~S_MDCPP()
|
||||
{}
|
||||
|
||||
|
|
@ -24,23 +24,27 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "White_Metzner_CY.H"
|
||||
#include "WhiteMetznerCarreauYasuda.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
defineTypeNameAndDebug(WhiteMetznerCarreauYasuda, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
viscoelasticLaw,
|
||||
WhiteMetznerCarreauYasuda,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
defineTypeNameAndDebug(White_Metzner_CY, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, White_Metzner_CY, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
White_Metzner_CY::White_Metzner_CY
|
||||
Foam::WhiteMetznerCarreauYasuda::WhiteMetznerCarreauYasuda
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -76,10 +80,11 @@ White_Metzner_CY::White_Metzner_CY
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> White_Metzner_CY::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix>
|
||||
Foam::WhiteMetznerCarreauYasuda::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_; // need to be equal to old time step (a constant)
|
||||
// Need to be equal to old time step (a constant)
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -87,45 +92,43 @@ tmp<fvVectorMatrix> White_Metzner_CY::divTau(volVectorField& U) const
|
|||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void White_Metzner_CY::correct()
|
||||
void Foam::WhiteMetznerCarreauYasuda::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Effective viscosity and relaxation time
|
||||
volScalarField etaPValue = etaP_ * Foam::pow( 1 + Foam::pow( K_* sqrt(2.0)*mag(symm(L)),a_), (m_- 1)/a_ );
|
||||
volScalarField lambdaValue = lambda_ * Foam::pow( 1 + Foam::pow( L_* sqrt(2.0)*mag(symm(L)),b_), (n_- 1)/b_ );
|
||||
volScalarField etaPValue = etaP_*
|
||||
Foam::pow(1 + Foam::pow(K_* sqrt(2.0)*mag(symm(L)),a_), (m_- 1)/a_);
|
||||
|
||||
volScalarField lambdaValue = lambda_*
|
||||
Foam::pow(1 + Foam::pow( L_* sqrt(2.0)*mag(symm(L)),b_), (n_- 1)/b_);
|
||||
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPValue / lambdaValue * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( 1/lambdaValue, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPValue/lambdaValue*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp(1/lambdaValue, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,7 +23,7 @@ License
|
|||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
White_Metzner_CY
|
||||
WhiteMetznerCarreauYasuda
|
||||
|
||||
Description
|
||||
White-Metzner Carreau-Yasuda Law non linear viscoelastic fluid model
|
||||
|
@ -34,12 +34,12 @@ Author
|
|||
Jovani L. Favero. All rights reserved
|
||||
|
||||
SourceFiles
|
||||
White_Metzner_CY.C
|
||||
WhiteMetznerCarreauYasuda.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef White_Metzner_CY_H
|
||||
#define White_Metzner_CY_H
|
||||
#ifndef WhiteMetznerCarreauYasuda_H
|
||||
#define WhiteMetznerCarreauYasuda_H
|
||||
|
||||
#include "viscoelasticLaw.H"
|
||||
|
||||
|
@ -49,10 +49,10 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class White_Metzner_CY Declaration
|
||||
Class WhiteMetznerCarreauYasuda Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class White_Metzner_CY
|
||||
class WhiteMetznerCarreauYasuda
|
||||
:
|
||||
public viscoelasticLaw
|
||||
{
|
||||
|
@ -98,21 +98,21 @@ class White_Metzner_CY
|
|||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
White_Metzner_CY(const White_Metzner_CY&);
|
||||
WhiteMetznerCarreauYasuda(const WhiteMetznerCarreauYasuda&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const White_Metzner_CY&);
|
||||
void operator=(const WhiteMetznerCarreauYasuda&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("White-Metzner_Carreau-Yasuda");
|
||||
TypeName("WhiteMetznerCarreauYasuda");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
White_Metzner_CY
|
||||
WhiteMetznerCarreauYasuda
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
virtual ~White_Metzner_CY()
|
||||
virtual ~WhiteMetznerCarreauYasuda()
|
||||
{}
|
||||
|
||||
|
|
@ -24,23 +24,21 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "White_Metzner_CM.H"
|
||||
#include "WhiteMetznerCross.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(White_Metzner_CM, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, White_Metzner_CM, dictionary);
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(WhiteMetznerCross, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, WhiteMetznerCross, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
White_Metzner_CM::White_Metzner_CM
|
||||
Foam::WhiteMetznerCross::WhiteMetznerCross
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -74,10 +72,11 @@ White_Metzner_CM::White_Metzner_CM
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> White_Metzner_CM::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix>
|
||||
Foam::WhiteMetznerCross::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_; // need to be equal to old time step (a constant)
|
||||
// Need to be equal to old time step (a constant)
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -89,40 +88,38 @@ tmp<fvVectorMatrix> White_Metzner_CM::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void White_Metzner_CM::correct()
|
||||
void Foam::WhiteMetznerCross::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Effective viscosity and relaxation time
|
||||
volScalarField etaPValue = etaP_ / (1 + Foam::pow(K_* sqrt(2.0)*mag(symm(L)), (1 - m_)) );
|
||||
volScalarField lambdaValue = lambda_ / (1 + Foam::pow(L_ * sqrt(2.0)*mag(symm(L)), (1 - n_)) );
|
||||
volScalarField etaPValue = etaP_/
|
||||
(1 + Foam::pow(K_* sqrt(2.0)*mag(symm(L)), (1 - m_)));
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
volScalarField lambdaValue = lambda_/
|
||||
(1 + Foam::pow(L_ * sqrt(2.0)*mag(symm(L)), (1 - n_)));
|
||||
|
||||
// Stress transport equation
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPValue / lambdaValue * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( 1/lambdaValue, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaPValue/lambdaValue*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp(1/lambdaValue, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,7 +23,7 @@ License
|
|||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
White_Metzner_CM
|
||||
WhiteMetznerCross
|
||||
|
||||
Description
|
||||
White-Metzner Power Law non linear viscoelastic fluid model
|
||||
|
@ -34,12 +34,12 @@ Author
|
|||
Jovani L. Favero. All rights reserved
|
||||
|
||||
SourceFiles
|
||||
White_Metzner_CM.C
|
||||
WhiteMetznerCross.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef White_Metzner_CM_H
|
||||
#define White_Metzner_CM_H
|
||||
#ifndef WhiteMetznerCross_H
|
||||
#define WhiteMetznerCross_H
|
||||
|
||||
#include "viscoelasticLaw.H"
|
||||
|
||||
|
@ -49,10 +49,10 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class White_Metzner_CM Declaration
|
||||
Class WhiteMetznerCross Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class White_Metzner_CM
|
||||
class WhiteMetznerCross
|
||||
:
|
||||
public viscoelasticLaw
|
||||
{
|
||||
|
@ -92,21 +92,21 @@ class White_Metzner_CM
|
|||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
White_Metzner_CM(const White_Metzner_CM&);
|
||||
WhiteMetznerCross(const WhiteMetznerCross&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const White_Metzner_CM&);
|
||||
void operator=(const WhiteMetznerCross&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("White-Metzner_Cross-Model");
|
||||
TypeName("WhiteMetznerCross");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
White_Metzner_CM
|
||||
WhiteMetznerCross
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
virtual ~White_Metzner_CM()
|
||||
virtual ~WhiteMetznerCross()
|
||||
{}
|
||||
|
||||
|
|
@ -24,23 +24,25 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "White_Metzner_Larson.H"
|
||||
#include "WhiteMetznerLarson.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(White_Metzner_Larson, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, White_Metzner_Larson, dictionary);
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(WhiteMetznerLarson, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
viscoelasticLaw,
|
||||
WhiteMetznerLarson,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
White_Metzner_Larson::White_Metzner_Larson
|
||||
Foam::WhiteMetznerLarson::WhiteMetznerLarson
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -71,10 +73,13 @@ White_Metzner_Larson::White_Metzner_Larson
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> White_Metzner_Larson::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::WhiteMetznerLarson::divTau
|
||||
(
|
||||
volVectorField& U
|
||||
) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_; // need to be equal to old time step (a constant)
|
||||
// Meed to be equal to old time step (a constant)
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
(
|
||||
|
@ -82,13 +87,11 @@ tmp<fvVectorMatrix> White_Metzner_Larson::divTau(volVectorField& U) const
|
|||
- fvc::laplacian(etaPEff/rho_, U, "laplacian(etaPEff,U)")
|
||||
+ fvm::laplacian( (etaPEff + etaS_)/rho_, U, "laplacian(etaPEff+etaS,U)")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void White_Metzner_Larson::correct()
|
||||
void Foam::WhiteMetznerLarson::correct()
|
||||
{
|
||||
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
|
||||
|
@ -99,23 +102,19 @@ void White_Metzner_Larson::correct()
|
|||
volSymmTensorField twoD = twoSymm( L );
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambda_ * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp( (1 + a_*lambda_* sqrt(2.0)*mag(symm(L)) )/lambda_, tau_ )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambda_*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp((1 + a_*lambda_* sqrt(2.0)*mag(symm(L)) )/lambda_, tau_)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,7 +23,7 @@ License
|
|||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
White_Metzner_Larson
|
||||
WhiteMetznerLarson
|
||||
|
||||
Description
|
||||
White-Metzner non linear viscoelastic fluid model (Larson, R. G.,
|
||||
|
@ -33,12 +33,12 @@ Author
|
|||
Jovani L. Favero. All rights reserved
|
||||
|
||||
SourceFiles
|
||||
White_Metzner_Larson.C
|
||||
WhiteMetznerLarson.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef White_Metzner_Larson_H
|
||||
#define White_Metzner_Larson_H
|
||||
#ifndef WhiteMetznerLarson_H
|
||||
#define WhiteMetznerLarson_H
|
||||
|
||||
#include "viscoelasticLaw.H"
|
||||
|
||||
|
@ -48,10 +48,10 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class White_Metzner_Larson Declaration
|
||||
Class WhiteMetznerLarson Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class White_Metzner_Larson
|
||||
class WhiteMetznerLarson
|
||||
:
|
||||
public viscoelasticLaw
|
||||
{
|
||||
|
@ -82,21 +82,21 @@ class White_Metzner_Larson
|
|||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
White_Metzner_Larson(const White_Metzner_Larson&);
|
||||
WhiteMetznerLarson(const WhiteMetznerLarson&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const White_Metzner_Larson&);
|
||||
void operator=(const WhiteMetznerLarson&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("White-Metzner_Larson");
|
||||
TypeName("WhiteMetznerLarson");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
White_Metzner_Larson
|
||||
WhiteMetznerLarson
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
virtual ~White_Metzner_Larson()
|
||||
virtual ~WhiteMetznerLarson()
|
||||
{}
|
||||
|
||||
|
|
@ -27,20 +27,17 @@ License
|
|||
#include "XPP_DE.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(XPP_DE, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, XPP_DE, dictionary);
|
||||
defineTypeNameAndDebug(XPP_DE, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, XPP_DE, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
XPP_DE::XPP_DE
|
||||
Foam::XPP_DE::XPP_DE
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -117,9 +114,8 @@ XPP_DE::XPP_DE
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> XPP_DE::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::XPP_DE::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
||||
return
|
||||
|
@ -132,29 +128,33 @@ tmp<fvVectorMatrix> XPP_DE::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void XPP_DE::correct()
|
||||
void Foam::XPP_DE::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = S_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
|
||||
// Evolution of orientation
|
||||
// Evolution of orientation
|
||||
tmp<fvSymmTensorMatrix> SEqn
|
||||
(
|
||||
fvm::ddt(S_)
|
||||
+ fvm::div(phi(), S_)
|
||||
==
|
||||
twoSymm( C )
|
||||
- fvm::Sp( (twoD && S_) , S_ )
|
||||
- fvm::Sp( 1/lambdaOb_/Foam::sqr(Lambda_)*(1 - alpha_ - 3*alpha_*Foam::pow(Lambda_, 4)*tr(S_ & S_) ), S_ )
|
||||
- 1/lambdaOb_/Foam::sqr(Lambda_)*( 3*alpha_*Foam::pow(Lambda_, 4)*(S_ & S_) - (1 - alpha_)/3*I_ )
|
||||
|
||||
+ fvm::div(phi(), S_)
|
||||
==
|
||||
twoSymm(C)
|
||||
- fvm::Sp((twoD && S_) , S_)
|
||||
- fvm::Sp
|
||||
(
|
||||
1/lambdaOb_/Foam::sqr(Lambda_)*
|
||||
(1 - alpha_ - 3*alpha_*Foam::pow(Lambda_, 4)*tr(S_ & S_)),
|
||||
S_
|
||||
)
|
||||
- 1/lambdaOb_/Foam::sqr(Lambda_)*
|
||||
(3*alpha_*Foam::pow(Lambda_, 4)*(S_ & S_) - (1 - alpha_)/3*I_)
|
||||
);
|
||||
|
||||
SEqn().relax();
|
||||
|
@ -162,28 +162,22 @@ void XPP_DE::correct()
|
|||
|
||||
|
||||
// Evolution of the backbone stretch
|
||||
tmp<fvScalarMatrix> LambdaEqn
|
||||
fvScalarMatrix LambdaEqn
|
||||
(
|
||||
fvm::ddt(Lambda_)
|
||||
+ fvm::div(phi(), Lambda_)
|
||||
==
|
||||
fvm::Sp( (twoD && S_) / 2 , Lambda_ )
|
||||
- fvm::Sp( Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_ )
|
||||
+ Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_
|
||||
|
||||
+ fvm::div(phi(), Lambda_)
|
||||
==
|
||||
fvm::Sp((twoD && S_)/2 , Lambda_)
|
||||
- fvm::Sp(Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_)
|
||||
+ Foam::exp(2/q_*(Lambda_ - 1))/lambdaOs_
|
||||
);
|
||||
|
||||
LambdaEqn().relax();
|
||||
solve(LambdaEqn);
|
||||
LambdaEqn.relax();
|
||||
LambdaEqn.solve();
|
||||
|
||||
// Viscoelastic stress
|
||||
tau_ = etaP_/lambdaOb_ * (3*Foam::sqr(Lambda_)*S_ - I_);
|
||||
|
||||
tau_ = etaP_/lambdaOb_*(3*Foam::sqr(Lambda_)*S_ - I_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -61,7 +61,7 @@ class XPP_DE
|
|||
volSymmTensorField S_;
|
||||
|
||||
//- Evolution of the backbone stretch
|
||||
volScalarField Lambda_;
|
||||
volScalarField Lambda_;
|
||||
|
||||
//- Transported viscoelastic stress
|
||||
volSymmTensorField tau_;
|
||||
|
|
|
@ -27,19 +27,17 @@ License
|
|||
#include "XPP_SE.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(XPP_SE, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, XPP_SE, dictionary);
|
||||
defineTypeNameAndDebug(XPP_SE, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, XPP_SE, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
XPP_SE::XPP_SE
|
||||
Foam::XPP_SE::XPP_SE
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -86,7 +84,7 @@ XPP_SE::XPP_SE
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> XPP_SE::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix> Foam::XPP_SE::divTau(volVectorField& U) const
|
||||
{
|
||||
|
||||
dimensionedScalar etaPEff = etaP_;
|
||||
|
@ -101,47 +99,50 @@ tmp<fvVectorMatrix> XPP_SE::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
void XPP_SE::correct()
|
||||
void Foam::XPP_SE::correct()
|
||||
{
|
||||
// Velocity gradient tensor
|
||||
volTensorField L = fvc::grad( U() );
|
||||
volTensorField L = fvc::grad(U());
|
||||
|
||||
// Convected derivate term
|
||||
volTensorField C = tau_ & L;
|
||||
|
||||
// Twice the rate of deformation tensor
|
||||
volSymmTensorField twoD = twoSymm( L );
|
||||
volSymmTensorField twoD = twoSymm(L);
|
||||
|
||||
// Lambda (Backbone stretch)
|
||||
volScalarField Lambda = Foam::sqrt( 1 + tr(tau_)*lambdaOb_/3/etaP_ );
|
||||
volScalarField Lambda = Foam::sqrt(1 + tr(tau_)*lambdaOb_/3/etaP_);
|
||||
|
||||
// lambdaS (stretch relaxation time)
|
||||
volScalarField lambdaS = lambdaOs_*Foam::exp( -2/q_*(Lambda - 1));
|
||||
volScalarField lambdaS = lambdaOs_*Foam::exp(-2/q_*(Lambda - 1));
|
||||
|
||||
// Extra function
|
||||
volScalarField fTau = 2*lambdaOb_/lambdaS*(1 - 1/Lambda) + 1/Foam::sqr(Lambda)*(1 - alpha_*tr(tau_ & tau_)/3/Foam::sqr(etaP_/lambdaOb_) );
|
||||
volScalarField fTau = 2*lambdaOb_/lambdaS*(1 - 1/Lambda)
|
||||
+ 1/Foam::sqr(Lambda)*
|
||||
(1 - alpha_*tr(tau_ & tau_)/3/Foam::sqr(etaP_/lambdaOb_));
|
||||
|
||||
// Stress transport equation
|
||||
tmp<fvSymmTensorMatrix> tauEqn
|
||||
fvSymmTensorMatrix tauEqn
|
||||
(
|
||||
fvm::ddt(tau_)
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_ / lambdaOb_ * twoD
|
||||
+ twoSymm( C )
|
||||
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
||||
- (
|
||||
1/lambdaOb_*( alpha_*lambdaOb_/etaP_*(tau_ & tau_) + etaP_/lambdaOb_*(fTau -1)*I_ ) )
|
||||
+ fvm::div(phi(), tau_)
|
||||
==
|
||||
etaP_/lambdaOb_*twoD
|
||||
+ twoSymm(C)
|
||||
- fvm::Sp(1/lambdaOb_*fTau, tau_)
|
||||
- (
|
||||
1/lambdaOb_*
|
||||
(
|
||||
alpha_*lambdaOb_/etaP_*(tau_ & tau_)
|
||||
+ etaP_/lambdaOb_*(fTau - 1)*I_
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
tauEqn().relax();
|
||||
solve(tauEqn);
|
||||
tauEqn.relax();
|
||||
tauEqn.solve();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -27,20 +27,18 @@ License
|
|||
#include "multiMode.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(multiMode, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, multiMode, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(multiMode, 0);
|
||||
addToRunTimeSelectionTable(viscoelasticLaw, multiMode, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// from components
|
||||
multiMode::multiMode
|
||||
Foam::multiMode::multiMode
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -67,24 +65,6 @@ multiMode::multiMode
|
|||
symmTensor::zero
|
||||
)
|
||||
),
|
||||
nulo_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nulo",
|
||||
U.time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
"zero",
|
||||
dimensionSet(1, -1, -2, 0, 0, 0, 0),
|
||||
symmTensor::zero
|
||||
)
|
||||
),
|
||||
models_()
|
||||
{
|
||||
PtrList<entry> modelEntries(dict.lookup("models"));
|
||||
|
@ -109,7 +89,8 @@ multiMode::multiMode
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> multiMode::divTau(volVectorField& U) const
|
||||
Foam::tmp<Foam::fvVectorMatrix>
|
||||
Foam::multiMode::divTau(volVectorField& U) const
|
||||
{
|
||||
tmp<fvVectorMatrix> divMatrix = models_[0].divTau(U);
|
||||
|
||||
|
@ -122,10 +103,9 @@ tmp<fvVectorMatrix> multiMode::divTau(volVectorField& U) const
|
|||
}
|
||||
|
||||
|
||||
tmp<volSymmTensorField> multiMode::tau() const
|
||||
Foam::tmp<Foam::volSymmTensorField> Foam::multiMode::tau() const
|
||||
{
|
||||
|
||||
tau_ = nulo_;
|
||||
tau_ *= 0;
|
||||
|
||||
for (label i = 0; i < models_.size(); i++)
|
||||
{
|
||||
|
@ -133,11 +113,10 @@ tmp<volSymmTensorField> multiMode::tau() const
|
|||
}
|
||||
|
||||
return tau_;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void multiMode::correct()
|
||||
void Foam::multiMode::correct()
|
||||
{
|
||||
forAll (models_, i)
|
||||
{
|
||||
|
@ -146,12 +125,7 @@ void multiMode::correct()
|
|||
}
|
||||
|
||||
tau();
|
||||
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -59,9 +59,6 @@ class multiMode
|
|||
//- Transported viscoelastic stress
|
||||
mutable volSymmTensorField tau_;
|
||||
|
||||
//- A null (zero) symmetric tensor
|
||||
volSymmTensorField nulo_;
|
||||
|
||||
//- List of models
|
||||
PtrList<viscoelasticLaw> models_;
|
||||
|
||||
|
|
|
@ -29,12 +29,7 @@ License
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<viscoelasticLaw> viscoelasticLaw::New
|
||||
Foam::autoPtr<Foam::viscoelasticLaw> Foam::viscoelasticLaw::New
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -66,8 +61,4 @@ autoPtr<viscoelasticLaw> viscoelasticLaw::New
|
|||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -30,15 +30,14 @@ License
|
|||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(viscoelasticLaw, 0);
|
||||
defineRunTimeSelectionTable(viscoelasticLaw, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(viscoelasticLaw, 0);
|
||||
defineRunTimeSelectionTable(viscoelasticLaw, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
viscoelasticLaw::viscoelasticLaw
|
||||
Foam::viscoelasticLaw::viscoelasticLaw
|
||||
(
|
||||
const word& name,
|
||||
const volVectorField& U,
|
||||
|
@ -51,8 +50,4 @@ viscoelasticLaw::viscoelasticLaw
|
|||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,60 +1,56 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd PTT-Exponential
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd DCPP
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd Giesekus
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
|
||||
cd ..
|
||||
cd FENE-CR
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd FENE-P
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd Feta-PTT
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd Leonov
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd Oldroyd-B
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd PP
|
||||
cleanCase
|
||||
cd S-MDCPP
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd PTT-Linear
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd White-Metzner/Carreau-Yasuda
|
||||
cleanCase
|
||||
cd WhiteMetzner/CarreauYasuda
|
||||
./Allclean
|
||||
|
||||
cd ../..
|
||||
cd XPP_DE
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
cd XPP_SE
|
||||
cleanCase
|
||||
./Allclean
|
||||
|
||||
cd ..
|
||||
|
||||
|
|
|
@ -1,39 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="viscoelasticFluidFoam"
|
||||
|
||||
cd FENE-CR
|
||||
|
||||
runApplication gmshToFoam mesh.msh
|
||||
cp boundary constant/polyMesh/boundary
|
||||
echo "FENE-CR: execution time ~ 320 s in a Core 2 Duo 2.0 Ghz processor"
|
||||
runApplication $application
|
||||
|
||||
cd ..
|
||||
cd PTT-Exponential
|
||||
runApplication blockMesh
|
||||
echo "PTT-Exponential: execution time ~ 4250 s in a Core 2 Duo 2.0 Ghz processor"
|
||||
runApplication $application
|
||||
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd DCPP
|
||||
|
||||
runApplication blockMesh
|
||||
echo "DCPP: execution time ~ 41830 s in a Core 2 Duo 2.0 Ghz processor"
|
||||
runApplication $application
|
||||
runApplication PSD
|
||||
runApplication sample
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd Giesekus
|
||||
./Allrun
|
||||
|
||||
runApplication blockMesh
|
||||
echo "Giesekus: execution time ~ 91195 s in a Core 2 Duo 2.0 Ghz processor"
|
||||
runApplication $application
|
||||
runApplication stressDifferences
|
||||
|
||||
cd ..
|
||||
cd FENE-CR
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd FENE-P
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd Feta-PTT
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd Leonov
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd Oldroyd-B
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd S-MDCPP
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd PTT-Linear
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd White-Metzner/Carreau-Yasuda
|
||||
./Allrun
|
||||
|
||||
cd ../..
|
||||
cd XPP_DE
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
cd XPP_SE
|
||||
./Allrun
|
||||
|
||||
cd ..
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object Lambdafirst;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Lambdafirst;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object Lambdafourth;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Lambdafourth;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object Lambdasecond;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Lambdasecond;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object Lambdathird;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Lambdathird;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object Sfirst;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object Sfirst;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object Sfourth;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object Sfourth;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object Ssecond;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object Ssecond;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object Sthird;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object Sthird;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volVectorField;
|
||||
object U;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
@ -52,5 +44,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object p;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "DCPP";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
9
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/Allclean
Executable file
9
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/Allclean
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -R -f sets
|
||||
echo "done!"
|
||||
|
22
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/Allrun
Executable file
22
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/Allrun
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
echo "Running blockMesh application"
|
||||
runApplication blockMesh
|
||||
|
||||
echo "Running viscoelasticFluidFoam solver"
|
||||
echo "DCPP model: execution time ~ 41830 s in a Core 2 Duo 2.0 Ghz processor"
|
||||
runApplication $application
|
||||
|
||||
echo "Running PSD application"
|
||||
runApplication PSD
|
||||
|
||||
echo "Running sample application"
|
||||
runApplication sample
|
||||
|
||||
echo "done!"
|
35
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/README
Normal file
35
tutorials/viscoelastic/viscoelasticFluidFoam/DCPP/README
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#
|
||||
#+TITLE: *DCPP viscoelastic constitutive model README file for version 1.6-ext*
|
||||
#+AUTHOR: Jovani
|
||||
#+DATE: 05 October 2010
|
||||
|
||||
|
||||
|
||||
* This is a simulation case for a viscoelastic fluid described by the Double
|
||||
Convected Pom-Pom constitutive model (DCPP).
|
||||
The geometry was the 4:1 plane contraction. This is a well studied
|
||||
geometry in viscoelastic fluid flow research.
|
||||
|
||||
More details about the model or parameters used, as also informations
|
||||
about the geometry, can be found at:
|
||||
|
||||
*** CLEMEUR, N.; RUTGERS, R. P. G.; DEBBAUT, B. Numerical simulation of abrupt
|
||||
contraction flows using the double convected pom-pom model. Journal of Non-
|
||||
Newtonian Fluid Mechanics, v. 117, n. 2-3, p. 193 – 209, 2004. ISSN 0377-
|
||||
0257.
|
||||
<http://www.sciencedirect.com/science/article/B6TGV-4C47GVS-3/2/d9d170224e2a3ee5f6560b5ec5875662>
|
||||
|
||||
|
||||
* The results for this case using viscoelasticFluidFoam solver can be found at:
|
||||
|
||||
*** Journal of Non-Newtonian Fluid Mechanics:
|
||||
<http://www.sciencedirect.com/science/article/B6TGV-511BYYF-1/2/53b604790dda6f271bb2e82870ba0c2a>
|
||||
|
||||
|
|
@ -1,28 +1,19 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "DCPP";
|
||||
instance "constant";
|
||||
local "polyMesh";
|
||||
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
|
@ -104,5 +95,4 @@ mergePatchPairs
|
|||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Revision: exported |
|
||||
| \\/ M anipulation | Web: http://www.OpenFOAM.org |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
/*
|
||||
|
@ -41,7 +33,6 @@ zeta 0.2 0.2 0.07 0.05
|
|||
|
||||
*/
|
||||
|
||||
|
||||
rheology
|
||||
{
|
||||
|
||||
|
@ -100,9 +91,6 @@ rheology
|
|||
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "DCPP";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application viscoelasticFluidFoam;
|
||||
|
@ -60,5 +52,4 @@ maxCo 0.8;
|
|||
|
||||
maxDeltaT 0.01;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method metis;
|
||||
|
@ -60,5 +51,4 @@ roots
|
|||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "DCPP";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default CrankNicholson 1;
|
||||
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
|
@ -33,23 +24,22 @@ gradSchemes
|
|||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind; //GammaV 0.5;
|
||||
div(phi,U) Gauss Minmod; //upwind;
|
||||
|
||||
div(phi,Sfirst) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Ssecond) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Sthird) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Sfourth) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Sfirst) Gauss Minmod; //upwind;
|
||||
div(phi,Ssecond) Gauss Minmod; //upwind;
|
||||
div(phi,Sthird) Gauss Minmod; //upwind;
|
||||
div(phi,Sfourth) Gauss Minmod; //upwind;
|
||||
|
||||
div(phi,Lambdafirst) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Lambdasecond) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Lambdathird) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Lambdafourth) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,Lambdafirst) Gauss Minmod; //upwind;
|
||||
div(phi,Lambdasecond) Gauss Minmod; //upwind;
|
||||
div(phi,Lambdathird) Gauss Minmod; //upwind;
|
||||
div(phi,Lambdafourth) Gauss Minmod; //upwind;
|
||||
|
||||
div(tau) Gauss linear;
|
||||
}
|
||||
|
@ -79,5 +69,4 @@ fluxRequired
|
|||
p;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "DCPP";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
|
||||
p CG
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
{
|
||||
// type Cholesky;
|
||||
type AMG;
|
||||
// preconditioner Cholesky;
|
||||
preconditioner AMG;
|
||||
cycle W-cycle;
|
||||
policy AAMG;
|
||||
nPreSweeps 0;
|
||||
|
@ -43,135 +36,144 @@ solvers
|
|||
}
|
||||
|
||||
tolerance 1e-07;
|
||||
relTol 0.0;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 800;
|
||||
};
|
||||
}
|
||||
|
||||
U BiCGStab
|
||||
U
|
||||
{
|
||||
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Sfirst BiCGStab
|
||||
Sfirst
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Ssecond BiCGStab
|
||||
Ssecond
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Sthird BiCGStab
|
||||
Sthird
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Sfourth BiCGStab
|
||||
Sfourth
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Lambdafirst BiCGStab
|
||||
Lambdafirst
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Lambdasecond BiCGStab
|
||||
Lambdasecond
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Lambdathird BiCGStab
|
||||
Lambdathird
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
Lambdafourth BiCGStab
|
||||
Lambdafourth
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
@ -193,6 +195,4 @@ relaxationFactors
|
|||
Lambdafourth 0.3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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 dictionary;
|
||||
object sampleDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object sampleDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
interpolationScheme cellPointFace;
|
||||
|
@ -58,5 +56,4 @@ fields
|
|||
PSD
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,57 +1,47 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "FENE-CR";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class volVectorField;
|
||||
object U;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
patch3
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (5 0 0);
|
||||
value uniform (0 0 -0.03875);
|
||||
}
|
||||
|
||||
patch2
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
patch1
|
||||
fixedWalls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
patch0
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
simetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,55 +1,46 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.3 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "FENE-CR";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object p;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
patch3
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
}
|
||||
patch2
|
||||
fixedWalls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
patch1
|
||||
simetry
|
||||
{
|
||||
type zeroGradient;
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
patch0
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-CR";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
@ -28,27 +20,27 @@ internalField uniform (0 0 0 0 0 0);
|
|||
|
||||
boundaryField
|
||||
{
|
||||
patch3
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0 0 0 0);
|
||||
}
|
||||
patch2
|
||||
fixedWalls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
patch1
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
patch0
|
||||
simetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
8
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/Allclean
Executable file
8
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/Allclean
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
echo "done!"
|
||||
|
16
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/Allrun
Executable file
16
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/Allrun
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
echo "Running blockMesh application"
|
||||
runApplication blockMesh
|
||||
|
||||
echo "Running viscoelasticFluidFoam solver"
|
||||
echo "FENE-CR model: "
|
||||
runApplication $application
|
||||
|
||||
echo "done!"
|
26
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/README
Normal file
26
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-CR/README
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#
|
||||
#+TITLE: *FENE-CR viscoelastic constitutive model README file for version 1.6-ext*
|
||||
#+AUTHOR: Jovani
|
||||
#+DATE: 05 October 2010
|
||||
|
||||
|
||||
|
||||
* This is a simulation case for a viscoelastic fluid described by the Finitely
|
||||
Extensible Nonlinear Elastic Chilcott-Rallison constitutive model (FENE-CR).
|
||||
The geometry was the 5:1 3D plane contraction, considering 1/4 of the real
|
||||
geometry.
|
||||
|
||||
*** This is only an illustrative case for the FENE-CR constitutive model. Therefore,
|
||||
there are not more details published until now for this model using this geometry
|
||||
and viscoelasticFluidFoam solver.
|
||||
|
||||
*** Some results using this model with a 2D 4:1 plane contraction can be found at:
|
||||
<http://hdl.handle.net/10183/16306>
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
/*--------------------------------*- 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 dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(0 1 0)
|
||||
(0 0 50) //block one
|
||||
(1 0 50)
|
||||
(0 1 50)
|
||||
|
||||
(3 0 50) //block two
|
||||
(0 3 50)
|
||||
(5 0 50)
|
||||
(0 5 50)
|
||||
|
||||
(0 0 120)
|
||||
(1 0 120) //block three
|
||||
(0 1 120)
|
||||
|
||||
(3 0 120) //block four
|
||||
(0 3 120)
|
||||
(5 0 120)
|
||||
(0 5 120)
|
||||
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
|
||||
hex (0 1 2 0 3 4 5 3) (10 10 50) simpleGrading (0.3 1 0.05)
|
||||
hex (3 4 5 3 10 11 12 10) (10 10 60) simpleGrading (0.3 1 20)
|
||||
hex (4 6 7 5 11 13 14 12) (20 10 60) simpleGrading (3 1 20)
|
||||
hex (6 8 9 7 13 15 16 14) (20 10 60) simpleGrading (0.3 1 20)
|
||||
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 1 2 (0.9396926 0.342020 0)
|
||||
arc 4 5 (0.9396926 0.342020 50)
|
||||
arc 6 7 (2.8190779 1.026060 50)
|
||||
arc 8 9 (4.698463 1.7101007 50)
|
||||
arc 11 12 (0.9396926 0.342020 120)
|
||||
arc 13 14 (2.8190779 1.026060 120)
|
||||
arc 15 16 (4.698463 1.7101007 120)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch inlet
|
||||
(
|
||||
(10 12 11 10)
|
||||
(12 14 13 11)
|
||||
(14 16 15 13)
|
||||
)
|
||||
wall fixedWalls
|
||||
(
|
||||
(1 4 5 2)
|
||||
(4 6 7 5)
|
||||
(6 8 9 7)
|
||||
(8 15 16 9)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(0 1 2 0)
|
||||
)
|
||||
symmetryPlane simetry
|
||||
(
|
||||
(0 3 4 1)
|
||||
(0 2 5 3)
|
||||
(3 10 11 4)
|
||||
(4 11 13 6)
|
||||
|
||||
(6 13 15 8)
|
||||
(3 5 12 10)
|
||||
(5 7 14 12)
|
||||
(7 9 16 14)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,8 +1,8 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
@ -15,33 +15,38 @@ FoamFile
|
|||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
4
|
||||
5
|
||||
(
|
||||
patch0
|
||||
inlet
|
||||
{
|
||||
type empty;
|
||||
nFaces 8592;
|
||||
startFace 6292;
|
||||
type patch;
|
||||
nFaces 500;
|
||||
startFace 99900;
|
||||
}
|
||||
patch1
|
||||
fixedWalls
|
||||
{
|
||||
type wall;
|
||||
nFaces 292;
|
||||
startFace 14884;
|
||||
nFaces 1500;
|
||||
startFace 100400;
|
||||
}
|
||||
patch2
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 6;
|
||||
startFace 15176;
|
||||
nFaces 100;
|
||||
startFace 101900;
|
||||
}
|
||||
patch3
|
||||
simetry
|
||||
{
|
||||
type patch;
|
||||
nFaces 6;
|
||||
startFace 15182;
|
||||
type symmetryPlane;
|
||||
nFaces 7000;
|
||||
startFace 102000;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
nFaces 0;
|
||||
startFace 109000;
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,50 +1,29 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
rheology
|
||||
{
|
||||
|
||||
type multiMode;
|
||||
|
||||
models
|
||||
(
|
||||
|
||||
first
|
||||
{
|
||||
type FENE-CR;
|
||||
rho rho [1 -3 0 0 0 0 0] 875.96;
|
||||
etaS etaS [1 -1 -1 0 0 0 0] 0.007;
|
||||
etaP etaP [1 -1 -1 0 0 0 0] 11.356;
|
||||
lambda lambda [0 0 1 0 0 0 0] 0.35;
|
||||
L2 L2 [0 0 0 0 0 0 0] 25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,42 +1,34 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-CR";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application viscoelasticFluidFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0.0;
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 5;
|
||||
endTime 3;
|
||||
|
||||
deltaT 1e-6;
|
||||
deltaT 1e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 1;
|
||||
writeInterval 0.5;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
@ -60,5 +52,4 @@ maxCo 0.8;
|
|||
|
||||
maxDeltaT 0.001;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method metis;
|
||||
|
@ -60,5 +51,4 @@ roots
|
|||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,30 +1,22 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-CR";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default CrankNicholson 1;
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
|
@ -38,8 +30,8 @@ gradSchemes
|
|||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind; //GammaV 0.5;
|
||||
div(phi,taufirst) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phi,tau) Gauss upwind;
|
||||
div(tau) Gauss linear;
|
||||
}
|
||||
|
||||
|
@ -68,5 +60,4 @@ fluxRequired
|
|||
p;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-CR";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
|
||||
p CG
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
/* type AMG;
|
||||
// preconditioner Cholesky;
|
||||
preconditioner AMG;
|
||||
cycle W-cycle;
|
||||
policy AAMG;
|
||||
nPreSweeps 0;
|
||||
|
@ -39,41 +32,43 @@ solvers
|
|||
minCoarseEqns 20;
|
||||
nMaxLevels 100;
|
||||
scale off;
|
||||
smoother ILU;*/
|
||||
smoother ILU;
|
||||
}
|
||||
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0.0;
|
||||
tolerance 1e-07;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 800;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
U BiCGStab
|
||||
U
|
||||
{
|
||||
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-5;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
taufirst BiCGStab
|
||||
tau
|
||||
{
|
||||
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-5;
|
||||
relTol 0.0;
|
||||
|
||||
};
|
||||
|
||||
|
@ -81,7 +76,6 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
pRefCell 0;
|
||||
|
@ -92,9 +86,7 @@ relaxationFactors
|
|||
{
|
||||
p 0.3;
|
||||
U 0.5;
|
||||
taufirst 0.3;
|
||||
tau 0.3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
50
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/0/N1
Normal file
50
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/0/N1
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*--------------------------------*- 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 volScalarField;
|
||||
location "0";
|
||||
object N1;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
simetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
50
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/0/N2
Normal file
50
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/0/N2
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*--------------------------------*- 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 volScalarField;
|
||||
location "0";
|
||||
object N2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
simetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-P";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volVectorField;
|
||||
object U;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
@ -52,5 +44,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-P";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volScalarField;
|
||||
object p;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,25 +1,17 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-P";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volSymmTensorField;
|
||||
object tau;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
@ -51,5 +43,4 @@ boundaryField
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1-dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "/home/jovani/jovaniFoam/foamNewSolver/cases/recentCases/upwind";
|
||||
case "FENE-P";
|
||||
instance "0";
|
||||
local "";
|
||||
|
||||
class volSymmTensorField;
|
||||
object taufirst;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0 0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0 0 0 0);
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
simetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
9
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/Allclean
Executable file
9
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/Allclean
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -R -f sets
|
||||
echo "done!"
|
||||
|
22
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/Allrun
Executable file
22
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/Allrun
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
echo "Running blockMesh application"
|
||||
runApplication blockMesh
|
||||
|
||||
echo "Running viscoelasticFluidFoam solver"
|
||||
echo "FENE-P model:"
|
||||
runApplication $application
|
||||
|
||||
echo "Running stressDifferences application"
|
||||
runApplication stressDifferences
|
||||
|
||||
echo "Running sample application"
|
||||
runApplication sample
|
||||
|
||||
echo "done!"
|
34
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/README
Normal file
34
tutorials/viscoelastic/viscoelasticFluidFoam/FENE-P/README
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#
|
||||
#+TITLE: *FENE-P viscoelastic constitutive model README file for version 1.6-ext*
|
||||
#+AUTHOR: Jovani
|
||||
#+DATE: 05 October 2010
|
||||
|
||||
|
||||
|
||||
* This is a simulation case for a viscoelastic fluid described by the Finitely
|
||||
Extensible Nonlinear Elastic-Peterlin constitutive model (FENE-P).
|
||||
The geometry was the 4:1 plane contraction. This is a well studied
|
||||
geometry in viscoelastic fluid flow research.
|
||||
|
||||
More details about the model or parameters used, as also informations
|
||||
about the geometry, can be found at:
|
||||
|
||||
*** AZAIEZ, J.; GUÉNETTE, R.; AïT-KADI, A. Numerical simulation of viscoelastic
|
||||
flows through a planar contraction. Journal of Non-Newtonian Fluid
|
||||
Mechanics, v. 62, n. 2-3, p. 253 – 277, 1996. ISSN 0377-0257.
|
||||
<http://www.sciencedirect.com/science/article/B6TGV-3TKMMG1-8/2/b9b59e81347a3b5b3c185a2d9f2289af>
|
||||
|
||||
|
||||
* The results for this case using viscoelasticFluidFoam solver can be found at:
|
||||
|
||||
*** Journal of Non-Newtonian Fluid Mechanics:
|
||||
<http://www.sciencedirect.com/science/article/B6TGV-511BYYF-1/2/53b604790dda6f271bb2e82870ba0c2a>
|
||||
|
||||
|
|
@ -1,28 +1,19 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-P";
|
||||
instance "constant";
|
||||
local "polyMesh";
|
||||
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
convertToMeters 0.0032;
|
||||
|
||||
vertices
|
||||
|
@ -104,5 +95,4 @@ mergePatchPairs
|
|||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5-dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
|
||||
| \\ / O peration | Version: 1.6-ext |
|
||||
| \\ / A nd | Web: www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
|
@ -1,25 +1,17 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object viscoelasticProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
/*
|
||||
|
@ -30,32 +22,22 @@ Mechanics, v. 62, n. 2-3, p. 253 - 277, 1996.
|
|||
|
||||
Table 1
|
||||
Model Model parameter lambda etaS etaP
|
||||
PTT Linear L2 = 6.0 0.04 0.002 1.422
|
||||
FENE-P L2 = 6.0 0.04 0.002 1.422
|
||||
|
||||
*/
|
||||
|
||||
rheology
|
||||
{
|
||||
|
||||
type multiMode;
|
||||
|
||||
models
|
||||
(
|
||||
|
||||
first
|
||||
{
|
||||
|
||||
type FENE-P;
|
||||
rho rho [1 -3 0 0 0 0 0] 803.87097;
|
||||
etaS etaS [1 -1 -1 0 0 0 0] 0.002;
|
||||
etaP etaP [1 -1 -1 0 0 0 0] 1.422;
|
||||
lambda lambda [0 0 1 0 0 0 0] 0.04;
|
||||
L2 L2 [0 0 0 0 0 0 0] 6.0;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,32 +1,24 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-P";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application viscoelasticFluidFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0.0;
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
|
@ -36,7 +28,7 @@ deltaT 1e-5;
|
|||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
@ -60,5 +52,4 @@ maxCo 0.8;
|
|||
|
||||
maxDeltaT 0.001;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method metis;
|
||||
|
@ -60,5 +51,4 @@ roots
|
|||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,30 +1,22 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/home/jovani/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-P";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default CrankNicholson 1;
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
|
@ -38,8 +30,8 @@ gradSchemes
|
|||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind; //GammaV 0.5;
|
||||
div(phi,taufirst) Gauss upwind; //Gamma 0.5;
|
||||
div(phi,U) Gauss Minmod; //upwind;
|
||||
div(phi,tau) Gauss Minmod; //upwind;
|
||||
div(tau) Gauss linear;
|
||||
}
|
||||
|
||||
|
@ -68,5 +60,4 @@ fluxRequired
|
|||
p;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4.1 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "/opt/OpenFOAM/jovani-1.4.1/run/tutorials/viscoelasticFluidFoam";
|
||||
case "FENE-P";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
|
||||
p CG
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
{
|
||||
// type Cholesky;
|
||||
type AMG;
|
||||
// preconditioner Cholesky;
|
||||
preconditioner AMG;
|
||||
cycle W-cycle;
|
||||
policy AAMG;
|
||||
nPreSweeps 0;
|
||||
|
@ -42,38 +35,40 @@ solvers
|
|||
smoother ILU;
|
||||
}
|
||||
|
||||
|
||||
tolerance 1e-07;
|
||||
relTol 0.0;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 800;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
U BiCGStab
|
||||
U
|
||||
{
|
||||
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
taufirst BiCGStab
|
||||
tau
|
||||
{
|
||||
|
||||
solver BiCGStab;
|
||||
preconditioner
|
||||
{
|
||||
type Cholesky;
|
||||
preconditioner Cholesky;
|
||||
}
|
||||
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-6;
|
||||
relTol 0.0;
|
||||
|
||||
};
|
||||
|
||||
|
@ -81,9 +76,8 @@ solvers
|
|||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor yes;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
@ -92,9 +86,7 @@ relaxationFactors
|
|||
{
|
||||
p 0.3;
|
||||
U 0.5;
|
||||
taufirst 0.3;
|
||||
tau 0.3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / 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;
|
||||
|
||||
root "";
|
||||
case "FENE-P";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object sampleDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object sampleDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
interpolationScheme cellPoint;
|
||||
|
||||
writeFormat raw;
|
||||
setFormat raw;
|
||||
|
||||
sets
|
||||
(
|
||||
|
@ -49,7 +40,6 @@ sets
|
|||
nPoints 100;
|
||||
}
|
||||
|
||||
|
||||
fig7_x_1
|
||||
{
|
||||
type uniform;
|
||||
|
@ -59,7 +49,6 @@ sets
|
|||
nPoints 100;
|
||||
}
|
||||
|
||||
|
||||
fig7_x_15
|
||||
{
|
||||
type uniform;
|
||||
|
@ -87,7 +76,6 @@ sets
|
|||
nPoints 100;
|
||||
}
|
||||
|
||||
|
||||
// y axes N1 upstream profile
|
||||
|
||||
fig7_y_1
|
||||
|
@ -221,5 +209,4 @@ fields
|
|||
N1
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue