mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -577,6 +577,40 @@ Foam::polyMesh::polyMesh
|
|||||||
<< "Found " << nFaces - defaultPatchStart
|
<< "Found " << nFaces - defaultPatchStart
|
||||||
<< " undefined faces in mesh; adding to default patch." << endl;
|
<< " undefined faces in mesh; adding to default patch." << endl;
|
||||||
|
|
||||||
|
// Check if there already exists a defaultFaces patch as last patch
|
||||||
|
// and reuse it.
|
||||||
|
label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName);
|
||||||
|
|
||||||
|
if (patchI != -1)
|
||||||
|
{
|
||||||
|
if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size())
|
||||||
|
{
|
||||||
|
FatalErrorIn("polyMesh::polyMesh(... construct from shapes...)")
|
||||||
|
<< "Default patch " << boundary_[patchI].name()
|
||||||
|
<< " already has faces in it or is not"
|
||||||
|
<< " last in list of patches." << exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
WarningIn("polyMesh::polyMesh(... construct from shapes...)")
|
||||||
|
<< "Reusing existing patch " << patchI
|
||||||
|
<< " for undefined faces." << endl;
|
||||||
|
|
||||||
|
boundary_.set
|
||||||
|
(
|
||||||
|
patchI,
|
||||||
|
polyPatch::New
|
||||||
|
(
|
||||||
|
boundaryPatchTypes[patchI],
|
||||||
|
boundaryPatchNames[patchI],
|
||||||
|
nFaces - defaultPatchStart,
|
||||||
|
defaultPatchStart,
|
||||||
|
patchI,
|
||||||
|
boundary_
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
boundary_.set
|
boundary_.set
|
||||||
(
|
(
|
||||||
nAllPatches,
|
nAllPatches,
|
||||||
@ -593,6 +627,7 @@ Foam::polyMesh::polyMesh
|
|||||||
|
|
||||||
nAllPatches++;
|
nAllPatches++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the size of the boundary
|
// Reset the size of the boundary
|
||||||
boundary_.setSize(nAllPatches);
|
boundary_.setSize(nAllPatches);
|
||||||
|
|||||||
@ -258,7 +258,10 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td)
|
|||||||
// face is hit
|
// face is hit
|
||||||
label cellI = p.cell();
|
label cellI = p.cell();
|
||||||
|
|
||||||
|
if (p.active())
|
||||||
|
{
|
||||||
dt *= p.trackToFace(p.position() + dt*U_, td);
|
dt *= p.trackToFace(p.position() + dt*U_, td);
|
||||||
|
}
|
||||||
|
|
||||||
tEnd -= dt;
|
tEnd -= dt;
|
||||||
p.stepFraction() = 1.0 - tEnd/deltaT;
|
p.stepFraction() = 1.0 - tEnd/deltaT;
|
||||||
@ -322,6 +325,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
|||||||
pp,
|
pp,
|
||||||
this->face(),
|
this->face(),
|
||||||
td.keepParticle,
|
td.keepParticle,
|
||||||
|
active_,
|
||||||
U_
|
U_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,6 +194,9 @@ protected:
|
|||||||
|
|
||||||
// Parcel properties
|
// Parcel properties
|
||||||
|
|
||||||
|
//- Active flag - tracking inactive when active = false
|
||||||
|
bool active_;
|
||||||
|
|
||||||
//- Parcel type id
|
//- Parcel type id
|
||||||
label typeId_;
|
label typeId_;
|
||||||
|
|
||||||
@ -308,6 +311,9 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
//- Return const access to active flag
|
||||||
|
inline bool active() const;
|
||||||
|
|
||||||
//- Return const access to type id
|
//- Return const access to type id
|
||||||
inline label typeId() const;
|
inline label typeId() const;
|
||||||
|
|
||||||
@ -332,8 +338,11 @@ public:
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
|
//- Return const access to active flag
|
||||||
|
inline bool& active();
|
||||||
|
|
||||||
//- Return access to type id
|
//- Return access to type id
|
||||||
inline label typeId();
|
inline label& typeId();
|
||||||
|
|
||||||
//- Return access to number of particles
|
//- Return access to number of particles
|
||||||
inline scalar& nParticle();
|
inline scalar& nParticle();
|
||||||
|
|||||||
@ -75,6 +75,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(owner, position, cellI),
|
Particle<ParcelType>(owner, position, cellI),
|
||||||
|
active_(false),
|
||||||
typeId_(owner.parcelTypeId()),
|
typeId_(owner.parcelTypeId()),
|
||||||
nParticle_(0),
|
nParticle_(0),
|
||||||
d_(0.0),
|
d_(0.0),
|
||||||
@ -102,6 +103,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(owner, position, cellI),
|
Particle<ParcelType>(owner, position, cellI),
|
||||||
|
active_(true),
|
||||||
typeId_(typeId),
|
typeId_(typeId),
|
||||||
nParticle_(nParticle0),
|
nParticle_(nParticle0),
|
||||||
d_(d0),
|
d_(d0),
|
||||||
@ -201,6 +203,13 @@ Foam::KinematicParcel<ParcelType>::trackData::g() const
|
|||||||
|
|
||||||
// * * * * * * * * * * KinematicParcel Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * KinematicParcel Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template <class ParcelType>
|
||||||
|
inline bool Foam::KinematicParcel<ParcelType>::active() const
|
||||||
|
{
|
||||||
|
return active_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class ParcelType>
|
template <class ParcelType>
|
||||||
inline Foam::label Foam::KinematicParcel<ParcelType>::typeId() const
|
inline Foam::label Foam::KinematicParcel<ParcelType>::typeId() const
|
||||||
{
|
{
|
||||||
@ -251,7 +260,14 @@ inline const Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() const
|
|||||||
|
|
||||||
|
|
||||||
template <class ParcelType>
|
template <class ParcelType>
|
||||||
inline Foam::label Foam::KinematicParcel<ParcelType>::typeId()
|
inline bool& Foam::KinematicParcel<ParcelType>::active()
|
||||||
|
{
|
||||||
|
return active_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class ParcelType>
|
||||||
|
inline Foam::label& Foam::KinematicParcel<ParcelType>::typeId()
|
||||||
{
|
{
|
||||||
return typeId_;
|
return typeId_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ License
|
|||||||
template <class ParcelType>
|
template <class ParcelType>
|
||||||
Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
Foam::string Foam::KinematicParcel<ParcelType>::propHeader =
|
||||||
Particle<ParcelType>::propHeader
|
Particle<ParcelType>::propHeader
|
||||||
|
+ " active"
|
||||||
+ " typeId"
|
+ " typeId"
|
||||||
+ " nParticle"
|
+ " nParticle"
|
||||||
+ " d"
|
+ " d"
|
||||||
@ -53,6 +54,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
Particle<ParcelType>(cloud, is, readFields),
|
Particle<ParcelType>(cloud, is, readFields),
|
||||||
|
active_(false),
|
||||||
typeId_(0),
|
typeId_(0),
|
||||||
nParticle_(0.0),
|
nParticle_(0.0),
|
||||||
d_(0.0),
|
d_(0.0),
|
||||||
@ -68,6 +70,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
{
|
{
|
||||||
if (is.format() == IOstream::ASCII)
|
if (is.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
|
active_ = readBool(is);
|
||||||
typeId_ = readLabel(is);
|
typeId_ = readLabel(is);
|
||||||
nParticle_ = readScalar(is);
|
nParticle_ = readScalar(is);
|
||||||
d_ = readScalar(is);
|
d_ = readScalar(is);
|
||||||
@ -81,7 +84,8 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
is.read
|
is.read
|
||||||
(
|
(
|
||||||
reinterpret_cast<char*>(&typeId_),
|
reinterpret_cast<char*>(&typeId_),
|
||||||
sizeof(typeId_)
|
sizeof(active_)
|
||||||
|
+ sizeof(typeId_)
|
||||||
+ sizeof(nParticle_)
|
+ sizeof(nParticle_)
|
||||||
+ sizeof(d_)
|
+ sizeof(d_)
|
||||||
+ sizeof(U_)
|
+ sizeof(U_)
|
||||||
@ -111,6 +115,9 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
Particle<ParcelType>::readFields(c);
|
Particle<ParcelType>::readFields(c);
|
||||||
|
|
||||||
|
IOField<label> active(c.fieldIOobject("active", IOobject::MUST_READ));
|
||||||
|
c.checkFieldIOobject(c, active);
|
||||||
|
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::MUST_READ));
|
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::MUST_READ));
|
||||||
c.checkFieldIOobject(c, typeId);
|
c.checkFieldIOobject(c, typeId);
|
||||||
|
|
||||||
@ -138,6 +145,7 @@ void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
|||||||
{
|
{
|
||||||
ParcelType& p = iter();
|
ParcelType& p = iter();
|
||||||
|
|
||||||
|
p.active_ = active[i];
|
||||||
p.typeId_ = typeId[i];
|
p.typeId_ = typeId[i];
|
||||||
p.nParticle_ = nParticle[i];
|
p.nParticle_ = nParticle[i];
|
||||||
p.d_ = d[i];
|
p.d_ = d[i];
|
||||||
@ -157,6 +165,7 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
|||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|
||||||
|
IOField<label> active(c.fieldIOobject("active", IOobject::NO_READ), np);
|
||||||
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
IOField<label> typeId(c.fieldIOobject("typeId", IOobject::NO_READ), np);
|
||||||
IOField<scalar> nParticle
|
IOField<scalar> nParticle
|
||||||
(
|
(
|
||||||
@ -174,6 +183,7 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
|||||||
{
|
{
|
||||||
const KinematicParcel<ParcelType>& p = iter();
|
const KinematicParcel<ParcelType>& p = iter();
|
||||||
|
|
||||||
|
active[i] = p.active();
|
||||||
typeId[i] = p.typeId();
|
typeId[i] = p.typeId();
|
||||||
nParticle[i] = p.nParticle();
|
nParticle[i] = p.nParticle();
|
||||||
d[i] = p.d();
|
d[i] = p.d();
|
||||||
@ -184,6 +194,7 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
active.write();
|
||||||
typeId.write();
|
typeId.write();
|
||||||
nParticle.write();
|
nParticle.write();
|
||||||
d.write();
|
d.write();
|
||||||
@ -206,6 +217,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << static_cast<const Particle<ParcelType>&>(p)
|
os << static_cast<const Particle<ParcelType>&>(p)
|
||||||
|
<< token::SPACE << p.active()
|
||||||
<< token::SPACE << p.typeId()
|
<< token::SPACE << p.typeId()
|
||||||
<< token::SPACE << p.nParticle()
|
<< token::SPACE << p.nParticle()
|
||||||
<< token::SPACE << p.d()
|
<< token::SPACE << p.d()
|
||||||
@ -219,8 +231,9 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os << static_cast<const Particle<ParcelType>&>(p);
|
os << static_cast<const Particle<ParcelType>&>(p);
|
||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.typeId_),
|
reinterpret_cast<const char*>(&p.active_),
|
||||||
sizeof(p.typeId())
|
sizeof(p.active())
|
||||||
|
+ sizeof(p.typeId())
|
||||||
+ sizeof(p.nParticle())
|
+ sizeof(p.nParticle())
|
||||||
+ sizeof(p.d())
|
+ sizeof(p.d())
|
||||||
+ sizeof(p.U())
|
+ sizeof(p.U())
|
||||||
|
|||||||
@ -140,6 +140,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -158,18 +159,21 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itEscape:
|
case PatchInteractionModel<CloudType>::itEscape:
|
||||||
{
|
{
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
|
active = false;
|
||||||
U = vector::zero;
|
U = vector::zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PatchInteractionModel<CloudType>::itStick:
|
case PatchInteractionModel<CloudType>::itStick:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
active = false;
|
||||||
U = vector::zero;
|
U = vector::zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
active = true;
|
||||||
|
|
||||||
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
||||||
nw /= mag(nw);
|
nw /= mag(nw);
|
||||||
|
|||||||
@ -92,6 +92,7 @@ public:
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -155,6 +155,7 @@ public:
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const = 0;
|
) const = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -61,10 +61,12 @@ bool Foam::Rebound<CloudType>::correct
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
active = true;
|
||||||
|
|
||||||
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
||||||
nw /= mag(nw);
|
nw /= mag(nw);
|
||||||
|
|||||||
@ -82,6 +82,7 @@ public:
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -98,6 +98,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -108,18 +109,21 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itEscape:
|
case PatchInteractionModel<CloudType>::itEscape:
|
||||||
{
|
{
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
|
active = false;
|
||||||
U = vector::zero;
|
U = vector::zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PatchInteractionModel<CloudType>::itStick:
|
case PatchInteractionModel<CloudType>::itStick:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
active = false;
|
||||||
U = vector::zero;
|
U = vector::zero;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
|
active = true;
|
||||||
|
|
||||||
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
||||||
nw /= mag(nw);
|
nw /= mag(nw);
|
||||||
|
|||||||
@ -102,6 +102,7 @@ public:
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
const label faceId,
|
const label faceId,
|
||||||
bool& keepParticle,
|
bool& keepParticle,
|
||||||
|
bool& active,
|
||||||
vector& U
|
vector& U
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,6 +17,9 @@ FoamFile
|
|||||||
|
|
||||||
thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||||
|
|
||||||
|
// Note: these are the properties for a "normalised" inviscid gas
|
||||||
|
// for which the speed of sound is 1 m/s at a temperature of 1K
|
||||||
|
// and gamma = 7/5
|
||||||
mixture normalisedGas 1 11640.3 2.5 0 0 1;
|
mixture normalisedGas 1 11640.3 2.5 0 0 1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,8 +15,10 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Note: these are the properties for a "normalised" inviscid gas
|
||||||
|
// for which the speed of sound is 1 m/s at a temperature of 1K
|
||||||
|
// and gamma = 7/5
|
||||||
Cv Cv [ 0 2 -2 -1 0 0 0 ] 1.78571;
|
Cv Cv [ 0 2 -2 -1 0 0 0 ] 1.78571;
|
||||||
|
|
||||||
R R [ 0 2 -2 -1 0 0 0 ] 0.714286;
|
R R [ 0 2 -2 -1 0 0 0 ] 0.714286;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,12 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
thermoType ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>;
|
thermoType ePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||||
|
|
||||||
mixture air 1 11640.31 1.78571 0 0 0.7;
|
// Note: these are the properties for a "normalised" inviscid gas
|
||||||
|
// for which the speed of sound is 1 m/s at a temperature of 1K
|
||||||
|
// and gamma = 7/5
|
||||||
|
mixture normalisedGas 1 11640.31 2.5 0 0 1;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
59
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U
Normal file
59
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform (0 0 0);
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform (0 0 0);
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type turbulentMixingLengthDissipationRateInlet;
|
||||||
|
mixingLength 0.01; // 1cm - half channel height
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 1;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 1;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
62
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k
Normal file
62
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type turbulentIntensityKineticEnergyInlet;
|
||||||
|
intensity 0.05; // 5% turbulent intensity
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 1;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 1;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object nuTilda;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object nut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
69
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p
Normal file
69
tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
//type totalPressure;
|
||||||
|
//p0 uniform 100040;
|
||||||
|
|
||||||
|
type timeVaryingTotalPressure;
|
||||||
|
p0 100040; // only used for restarts
|
||||||
|
outOfBounds clamp;
|
||||||
|
fileName "$FOAM_CASE/constant/p0vsTime";
|
||||||
|
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho none;
|
||||||
|
psi none;
|
||||||
|
gamma 1;
|
||||||
|
value uniform 100040;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet1
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 100010;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet2
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type fan;
|
||||||
|
patchType cyclic;
|
||||||
|
f 2 ( 50 -0.1 );
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
27
tutorials/incompressible/pimpleFoam/t-junction-with-fan/Allrun
Executable file
27
tutorials/incompressible/pimpleFoam/t-junction-with-fan/Allrun
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Get application name
|
||||||
|
application=`getApplication`
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
|
||||||
|
# Creating patches 'out of nothing' so willl get undefined value which
|
||||||
|
# might cause floating point error
|
||||||
|
unset FOAM_SIGFPE
|
||||||
|
unset FOAM_SETNAN
|
||||||
|
|
||||||
|
# Add cyclic baffles for fan
|
||||||
|
runApplication setSet -batch selectCyclics.setSet
|
||||||
|
runApplication createBaffles cyclicFaces fan -overwrite
|
||||||
|
|
||||||
|
# Add wall baffles
|
||||||
|
rm log.setSet
|
||||||
|
runApplication setSet -batch selectBaffles.setSet
|
||||||
|
rm log.createBaffles
|
||||||
|
runApplication createBaffles baffleFaces baffles -overwrite
|
||||||
|
|
||||||
|
runApplication $application
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
300-04-16 T-junction with baffles and fan.
|
||||||
|
Inlet on left, one outlet at bottom, one at top.
|
||||||
|
To test multiple outlets.
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel kEpsilon;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
(
|
||||||
|
(0 100010)
|
||||||
|
(1 100040)
|
||||||
|
)
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// outlet1
|
||||||
|
// +-+
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// +-----------+ |
|
||||||
|
// |inlet |
|
||||||
|
// +-----------+ |
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// | |
|
||||||
|
// +-+
|
||||||
|
// outlet2
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0.0 -0.01 0) //0
|
||||||
|
(0.2 -0.01 0)
|
||||||
|
(0.2 0.01 0) //2
|
||||||
|
(0.0 0.01 0)
|
||||||
|
|
||||||
|
(0.22 -0.01 0) //4
|
||||||
|
(0.22 0.01 0)
|
||||||
|
|
||||||
|
(0.2 -0.21 0) //6
|
||||||
|
(0.22 -0.21 0)
|
||||||
|
|
||||||
|
(0.2 0.21 0) //8
|
||||||
|
(0.22 0.21 0)
|
||||||
|
|
||||||
|
// Z
|
||||||
|
(0.0 -0.01 0.02) //0
|
||||||
|
(0.2 -0.01 0.02)
|
||||||
|
(0.2 0.01 0.02) //2
|
||||||
|
(0.0 0.01 0.02)
|
||||||
|
|
||||||
|
(0.22 -0.01 0.02) //4
|
||||||
|
(0.22 0.01 0.02)
|
||||||
|
|
||||||
|
(0.2 -0.21 0.02) //6
|
||||||
|
(0.22 -0.21 0.02)
|
||||||
|
|
||||||
|
(0.2 0.21 0.02) //8
|
||||||
|
(0.22 0.21 0.02)
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
// inlet block
|
||||||
|
hex (0 1 2 3 10 11 12 13) (50 5 5) simpleGrading (1 1 1)
|
||||||
|
|
||||||
|
// central block
|
||||||
|
hex (1 4 5 2 11 14 15 12) (5 5 5) simpleGrading (1 1 1)
|
||||||
|
|
||||||
|
// bottom block
|
||||||
|
hex (6 7 4 1 16 17 14 11) (5 50 5) simpleGrading (1 1 1)
|
||||||
|
|
||||||
|
// top block
|
||||||
|
hex (2 5 9 8 12 15 19 18) (5 50 5) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
patch inlet
|
||||||
|
(
|
||||||
|
(0 10 13 3)
|
||||||
|
)
|
||||||
|
|
||||||
|
patch outlet1
|
||||||
|
(
|
||||||
|
(6 7 17 16)
|
||||||
|
)
|
||||||
|
|
||||||
|
patch outlet2
|
||||||
|
(
|
||||||
|
(8 18 19 9)
|
||||||
|
)
|
||||||
|
|
||||||
|
wall baffles
|
||||||
|
()
|
||||||
|
|
||||||
|
cyclic fan
|
||||||
|
()
|
||||||
|
|
||||||
|
wall defaultFaces
|
||||||
|
()
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
mergePatchPairs
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
4
|
6
|
||||||
(
|
(
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
@ -35,6 +35,19 @@ FoamFile
|
|||||||
nFaces 25;
|
nFaces 25;
|
||||||
startFace 10100;
|
startFace 10100;
|
||||||
}
|
}
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 0;
|
||||||
|
startFace 10125;
|
||||||
|
}
|
||||||
|
fan
|
||||||
|
{
|
||||||
|
type cyclic;
|
||||||
|
nFaces 0;
|
||||||
|
startFace 10125;
|
||||||
|
featureCos 0.9;
|
||||||
|
}
|
||||||
defaultFaces
|
defaultFaces
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
transportModel Newtonian;
|
||||||
|
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
|
||||||
|
|
||||||
|
CrossPowerLawCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
m m [ 0 0 1 0 0 0 0 ] 1;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
BirdCarreauCoeffs
|
||||||
|
{
|
||||||
|
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
k k [ 0 0 1 0 0 0 0 ] 0;
|
||||||
|
n n [ 0 0 0 0 0 0 0 ] 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType RASModel;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
faceSet baffleFaces new boxToFace (0.099 -10 -10)(0.101 10 10)
|
||||||
|
# Remove the centre faces that become fan
|
||||||
|
faceSet baffleFaces delete boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
|
||||||
|
faceZoneSet baffleFaces new setToFaceZone baffleFaces
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
faceSet cyclicFaces new boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
|
||||||
|
cellSet cyclicFacesSlaveCells new boxToCell (-10 -10 -10)(0.1 10 10)
|
||||||
|
faceZoneSet cyclicFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs ("libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libincompressibleRASModels.so");
|
||||||
|
|
||||||
|
application pimpleFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 1;
|
||||||
|
|
||||||
|
deltaT 0.001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
|
writeInterval 0.1;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 5;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
probes
|
||||||
|
{
|
||||||
|
// Where to load it from
|
||||||
|
functionObjectLibs ( "libsampling.so" );
|
||||||
|
|
||||||
|
type probes;
|
||||||
|
|
||||||
|
// Name of the directory for probe data
|
||||||
|
name probes;
|
||||||
|
|
||||||
|
// Write at same frequency as fields
|
||||||
|
outputControl outputTime;
|
||||||
|
outputInterval 1;
|
||||||
|
|
||||||
|
// Fields to be probed
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
p U
|
||||||
|
);
|
||||||
|
|
||||||
|
probeLocations
|
||||||
|
(
|
||||||
|
( 1e-06 0 0.01 ) // at inlet
|
||||||
|
( 0.21 -0.20999 0.01 ) // at outlet1
|
||||||
|
( 0.21 0.20999 0.01 ) // at outlet2
|
||||||
|
( 0.21 0 0.01 ) // at central block
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
grad(p) Gauss linear;
|
||||||
|
grad(U) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
div(phi,U) Gauss limitedLinearV 1;
|
||||||
|
div(phi,k) Gauss limitedLinear 1;
|
||||||
|
div(phi,epsilon) Gauss limitedLinear 1;
|
||||||
|
div(phi,R) Gauss limitedLinear 1;
|
||||||
|
div(R) Gauss linear;
|
||||||
|
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||||
|
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(nuEff,U) Gauss linear corrected;
|
||||||
|
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||||
|
laplacian(DkEff,k) Gauss linear corrected;
|
||||||
|
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||||
|
laplacian(DREff,R) Gauss linear corrected;
|
||||||
|
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
interpolate(U) linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
p
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0.01;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
pFinal
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
U
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
UFinal
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
k
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
epsilon
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
nOuterCorrectors 2;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
pRefCell 0;
|
||||||
|
pRefValue 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
U 1;
|
||||||
|
k 1;
|
||||||
|
epsilon 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -100,6 +100,10 @@ patches
|
|||||||
(
|
(
|
||||||
(8 18 19 9)
|
(8 18 19 9)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
wall defaultFaces
|
||||||
|
()
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
mergePatchPairs
|
mergePatchPairs
|
||||||
|
|||||||
@ -15,6 +15,8 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs ("libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libincompressibleRASModels.so");
|
||||||
|
|
||||||
application pimpleFoam;
|
application pimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
@ -37,7 +39,7 @@ writeFormat ascii;
|
|||||||
|
|
||||||
writePrecision 6;
|
writePrecision 6;
|
||||||
|
|
||||||
writeCompression off;
|
writeCompression uncompressed;
|
||||||
|
|
||||||
timeFormat general;
|
timeFormat general;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user