Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x

This commit is contained in:
sergio 2014-05-14 17:13:21 +01:00
commit 9210f4ff58
31 changed files with 1328 additions and 181 deletions

View file

@ -112,6 +112,17 @@ Foam::multiphaseMixture::multiphaseMixture
zeroGradientFvPatchScalarField::typeName
),
nu_
(
IOobject
(
"nu",
mesh_.time().timeName(),
mesh_
),
mu()/rho()
),
sigmas_(lookup("sigmas")),
dimSigma_(1, 0, -2, 0, 0),
deltaN_
@ -218,14 +229,14 @@ Foam::multiphaseMixture::muf() const
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::nu() const
{
return mu()/rho();
return nu_;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixture::nu(const label patchi) const
{
return mu(patchi)/rho(patchi);
return nu_.boundaryField()[patchi];
}
@ -340,6 +351,9 @@ void Foam::multiphaseMixture::solve()
{
solveAlphas(cAlpha);
}
// Update the mixture kinematic viscosity
nu_ = mu()/rho();
}

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -141,9 +141,10 @@ private:
const surfaceScalarField& phi_;
surfaceScalarField rhoPhi_;
volScalarField alphas_;
volScalarField nu_;
typedef HashTable<scalar, interfacePair, interfacePair::hash>
sigmaTable;

View file

@ -282,13 +282,6 @@ extern messageStream Info;
::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] " \
<< #var " = " << var << ::Foam::endl
/**
* \def IInfo
* Indented Info
*/
#define IInfo \
::Foam::Info<< indent
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -130,11 +130,11 @@ void Foam::functionObjectFile::write()
void Foam::functionObjectFile::resetNames(const wordList& names)
{
names_.clear();
names_.insert(names);
if (Pstream::master())
{
names_.clear();
names_.insert(names);
filePtrs_.clear();
filePtrs_.setSize(names_.toc().size());
@ -145,11 +145,11 @@ void Foam::functionObjectFile::resetNames(const wordList& names)
void Foam::functionObjectFile::resetName(const word& name)
{
names_.clear();
names_.insert(name);
if (Pstream::master())
{
names_.clear();
names_.insert(name);
filePtrs_.clear();
filePtrs_.setSize(1);
@ -191,11 +191,11 @@ Foam::functionObjectFile::functionObjectFile
names_(),
filePtrs_()
{
names_.clear();
names_.insert(name);
if (Pstream::master())
{
names_.clear();
names_.insert(name);
filePtrs_.clear();
filePtrs_.setSize(1);
@ -216,11 +216,11 @@ Foam::functionObjectFile::functionObjectFile
names_(names),
filePtrs_()
{
names_.clear();
names_.insert(names);
if (Pstream::master())
{
names_.clear();
names_.insert(names);
filePtrs_.clear();
filePtrs_.setSize(names_.size());

View file

@ -203,9 +203,21 @@ void Foam::porosityModels::DarcyForchheimer::correct
if (UEqn.dimensions() == dimForce)
{
const volScalarField& rho = mesh_.lookupObject<volScalarField>(rhoName);
const volScalarField& mu = mesh_.lookupObject<volScalarField>(muName);
apply(Udiag, Usource, V, rho, mu, U);
if (mesh_.foundObject<volScalarField>(muName))
{
const volScalarField& mu =
mesh_.lookupObject<volScalarField>(muName);
apply(Udiag, Usource, V, rho, mu, U);
}
else
{
const volScalarField& nu =
mesh_.lookupObject<volScalarField>(nuName);
apply(Udiag, Usource, V, rho, rho*nu, U);
}
}
else
{

View file

@ -113,7 +113,7 @@ void Foam::fv::option::setCellSet()
{
case smPoints:
{
IInfo<< "- selecting cells using points" << endl;
Info<< indent << "- selecting cells using points" << endl;
labelHashSet selectedCells;
@ -141,7 +141,8 @@ void Foam::fv::option::setCellSet()
}
case smCellSet:
{
IInfo<< "- selecting cells using cellSet " << cellSetName_ << endl;
Info<< indent
<< "- selecting cells using cellSet " << cellSetName_ << endl;
cellSet selectedCells(mesh_, cellSetName_);
cells_ = selectedCells.toc();
@ -150,7 +151,8 @@ void Foam::fv::option::setCellSet()
}
case smCellZone:
{
IInfo<< "- selecting cells using cellZone " << cellSetName_ << endl;
Info<< indent
<< "- selecting cells using cellZone " << cellSetName_ << endl;
label zoneID = mesh_.cellZones().findZoneID(cellSetName_);
if (zoneID == -1)
@ -168,7 +170,7 @@ void Foam::fv::option::setCellSet()
{
if (active_ && master_)
{
IInfo<< "- selecting inter region mapping" << endl;
Info<< indent << "- selecting inter region mapping" << endl;
const fvMesh& nbrMesh =
mesh_.time().lookupObject<fvMesh>(nbrRegionName_);
@ -213,7 +215,7 @@ void Foam::fv::option::setCellSet()
}
case smAll:
{
IInfo<< "- selecting all cells" << endl;
Info<< indent << "- selecting all cells" << endl;
cells_ = identity(mesh_.nCells());
break;
@ -238,7 +240,8 @@ void Foam::fv::option::setCellSet()
}
reduce(V_, sumOp<scalar>());
IInfo<< "- selected " << returnReduce(cells_.size(), sumOp<label>())
Info<< indent
<< "- selected " << returnReduce(cells_.size(), sumOp<label>())
<< " cell(s) with volume " << V_ << nl << endl;
}
}
@ -277,12 +280,12 @@ Foam::fv::option::option
if (dict_.readIfPresent("timeStart", timeStart_))
{
dict_.lookup("duration") >> duration_;
IInfo<< "- applying source at time " << timeStart_
Info<< indent << "- applying source at time " << timeStart_
<< " for duration " << duration_ << endl;
}
else
{
IInfo<< "- applying source for all time" << endl;
Info<< indent << "- applying source for all time" << endl;
}
setSelection(dict_);
@ -304,7 +307,8 @@ Foam::autoPtr<Foam::fv::option> Foam::fv::option::New
{
word modelType(coeffs.lookup("type"));
IInfo<< "Selecting finite volume options model type " << modelType << endl;
Info<< indent
<< "Selecting finite volume options model type " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);

View file

@ -45,10 +45,22 @@ namespace fv
}
}
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
void Foam::fv::explicitPorositySource::initialise()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fv::explicitPorositySource::explicitPorositySource
(
const word& name,
const word& modelType,
const dictionary& dict,
const fvMesh& mesh
)
:
option(name, modelType, dict, mesh),
porosityPtr_(NULL)
{
read(dict);
if (selectionMode_ != smCellZone)
{
FatalErrorIn("void Foam::fv::explicitPorositySource::initialise()")
@ -66,29 +78,7 @@ void Foam::fv::explicitPorositySource::initialise()
coeffs_,
cellSetName_
).ptr()
),
fieldNames_.setSize(1, UName_);
applied_.setSize(1, false);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fv::explicitPorositySource::explicitPorositySource
(
const word& name,
const word& modelType,
const dictionary& dict,
const fvMesh& mesh
)
:
option(name, modelType, dict, mesh),
porosityPtr_(NULL),
UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
{
initialise();
);
}
@ -101,9 +91,7 @@ void Foam::fv::explicitPorositySource::addSup
)
{
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
porosityPtr_->addResistance(porosityEqn);
eqn -= porosityEqn;
}
@ -116,14 +104,25 @@ void Foam::fv::explicitPorositySource::addSup
)
{
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
const volScalarField& mu = mesh_.lookupObject<volScalarField>(muName_);
porosityPtr_->addResistance(porosityEqn, rho, mu);
porosityPtr_->addResistance(porosityEqn);
eqn -= porosityEqn;
}
void Foam::fv::explicitPorositySource::addSup
(
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<vector>& eqn,
const label fieldI
)
{
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
porosityPtr_->addResistance(porosityEqn);
eqn -= alpha*porosityEqn;
}
void Foam::fv::explicitPorositySource::writeData(Ostream& os) const
{
os << indent << name_ << endl;
@ -135,8 +134,21 @@ bool Foam::fv::explicitPorositySource::read(const dictionary& dict)
{
if (option::read(dict))
{
coeffs_.readIfPresent("UName", UName_);
coeffs_.readIfPresent("muName", muName_);
if (coeffs_.found("UNames"))
{
coeffs_.lookup("UNames") >> fieldNames_;
}
else if (coeffs_.found("UName"))
{
word UName(coeffs_.lookup("UName"));
fieldNames_ = wordList(1, UName);
}
else
{
fieldNames_ = wordList(1, "U");
}
applied_.setSize(fieldNames_.size(), false);
return true;
}

View file

@ -34,6 +34,7 @@ Description
explicitPorositySourceCoeffs
{
type DarcyForchheimer;
DarcyForchheimerCoeffs
{
d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
@ -88,22 +89,6 @@ protected:
//- Run-time selectable porosity model
autoPtr<porosityModel> porosityPtr_;
//- Velocity field name, default = U
word UName_;
//- Density field name (compressible case only), default = rho
word rhoName_;
//- Dynamic viscosity field name (compressible case only)
// default = thermo:mu
word muName_;
// Protected Member Functions
//- Initialise
void initialise();
private:
@ -158,6 +143,15 @@ public:
const label fieldI
);
//- Add implicit contribution to phase momentum equation
virtual void addSup
(
const volScalarField& alpha,
const volScalarField& rho,
fvMatrix<vector>& eqn,
const label fieldI
);
// I-O

View file

@ -234,6 +234,29 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct)
reduce(n, sumOp<vector>());
axis = n/mag(n);
}
if (debug)
{
volScalarField area
(
IOobject
(
name_ + ":area",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("0", dimArea, 0)
);
UIndirectList<scalar>(area.internalField(), cells_) = area_;
Info<< type() << ": " << name_ << " writing field " << area.name()
<< endl;
area.write();
}
}
@ -317,7 +340,8 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem()
(
mesh_,
axis,
origin
origin,
cells_
)
);
@ -339,7 +363,8 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem()
(
mesh_,
axis,
origin
origin,
cells_
)
);
@ -503,10 +528,6 @@ void Foam::fv::rotorDiskSource::calculate
scalar AOAmin = GREAT;
scalar AOAmax = -GREAT;
tmp<vectorField> tUcf(localAxesRotation_->transform(U));
vectorField& Ucf = tUcf();
forAll(cells_, i)
{
if (area_[i] > ROOTVSMALL)
@ -516,7 +537,7 @@ void Foam::fv::rotorDiskSource::calculate
const scalar radius = x_[i].x();
// velocity in local cylindrical reference frame
vector Uc = Ucf[i];
vector Uc = localAxesRotation_->transform(U[cellI], i);
// transform from rotor cylindrical into local coning system
Uc = R_[i] & Uc;
@ -545,6 +566,14 @@ void Foam::fv::rotorDiskSource::calculate
// effective angle of attack
scalar alphaEff = alphaGeom - atan2(-Uc.z(), Uc.y());
if (alphaEff > mathematical::pi)
{
alphaEff -= mathematical::twoPi;
}
if (alphaEff < -mathematical::pi)
{
alphaEff += mathematical::twoPi;
}
AOAmin = min(AOAmin, alphaEff);
AOAmax = max(AOAmax, alphaEff);
@ -581,7 +610,7 @@ void Foam::fv::rotorDiskSource::calculate
localForce = invR_[i] & localForce;
// convert force to global cartesian co-ordinate system
force[cellI] = coordSys_.globalVector(localForce);
force[cellI] = localAxesRotation_->invTransform(localForce, i);
if (divideVolume)
{

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -120,7 +120,6 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
// Average molecular weight of carrier mix - assumes perfect gas
const scalar Wc = this->rhoc_*specie::RR*this->Tc_/this->pc_;
forAll(dMassPC, i)
{
const label idc = composition.localToGlobalCarrierId(idPhase, i);
@ -285,7 +284,7 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew);
if (debug && (this->Tc_ < td.cloud().constProps().TMin()))
if (this->Tc_ < td.cloud().constProps().TMin())
{
if (debug)
{

View file

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -154,8 +154,9 @@ void Foam::ManualInjection<CloudType>::updateMesh()
template<class CloudType>
Foam::scalar Foam::ManualInjection<CloudType>::timeEnd() const
{
// Not used
return this->SOI_;
// Injection is instantaneous - but allow for a finite interval to
// avoid numerical issues when interval is zero
return ROOTVSMALL;
}

View file

@ -250,7 +250,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
if (nFace)
{
IInfo<< "AMI: Patch " << patchName
Info<< indent
<< "AMI: Patch " << patchName
<< " sum(weights) min/max/average = "
<< gMin(wghtSum) << ", "
<< gMax(wghtSum) << ", "
@ -260,7 +261,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
if (nLow)
{
IInfo<< "AMI: Patch " << patchName
Info<< indent
<< "AMI: Patch " << patchName
<< " identified " << nLow
<< " faces with weights less than " << lowWeightTol
<< endl;
@ -803,7 +805,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
label srcTotalSize = returnReduce(srcPatch.size(), sumOp<label>());
label tgtTotalSize = returnReduce(tgtPatch.size(), sumOp<label>());
IInfo<< "AMI: Creating addressing and weights between "
Info<< indent
<< "AMI: Creating addressing and weights between "
<< srcTotalSize << " source faces and "
<< tgtTotalSize << " target faces"
<< endl;

View file

@ -51,20 +51,41 @@ namespace Foam
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
void Foam::localAxesRotation::init(const objectRegistry& obr)
void Foam::localAxesRotation::init
(
const objectRegistry& obr,
const List<label>& cells
)
{
const polyMesh& mesh = refCast<const polyMesh>(obr);
const vectorField& cc = mesh.cellCentres();
tensorField& R = Rptr_();
forAll(cc, cellI)
if (cells.size())
{
vector dir = cc[cellI] - origin_;
dir /= mag(dir) + VSMALL;
Rptr_.reset(new tensorField(cells.size()));
const axesRotation ar(e3_, dir);
tensorField& R = Rptr_();
forAll(cells, i)
{
label cellI = cells[i];
vector dir = cc[cellI] - origin_;
dir /= mag(dir) + VSMALL;
R[cellI] = ar.R();
R[i] = axesRotation(e3_, dir).R();
}
}
else
{
Rptr_.reset(new tensorField(mesh.nCells()));
tensorField& R = Rptr_();
forAll(cc, cellI)
{
vector dir = cc[cellI] - origin_;
dir /= mag(dir) + VSMALL;
R[cellI] = axesRotation(e3_, dir).R();
}
}
}
@ -90,13 +111,41 @@ Foam::localAxesRotation::localAxesRotation
// rotation axis
dict.lookup("e3") >> e3_;
const polyMesh& mesh = refCast<const polyMesh>(obr);
Rptr_.reset(new tensorField(mesh.nCells()));
init(obr);
}
Foam::localAxesRotation::localAxesRotation
(
const objectRegistry& obr,
const vector& axis,
const point& origin
)
:
Rptr_(),
origin_(origin),
e3_(axis)
{
init(obr);
}
Foam::localAxesRotation::localAxesRotation
(
const objectRegistry& obr,
const vector& axis,
const point& origin,
const List<label>& cells
)
:
Rptr_(),
origin_(origin),
e3_(axis)
{
init(obr, cells);
}
Foam::localAxesRotation::localAxesRotation(const dictionary& dict)
:
Rptr_(),
@ -113,23 +162,6 @@ Foam::localAxesRotation::localAxesRotation(const dictionary& dict)
}
Foam::localAxesRotation::localAxesRotation
(
const objectRegistry& obr,
const vector& axis,
const point& origin
)
:
Rptr_(),
origin_(origin),
e3_(axis)
{
const polyMesh& mesh = refCast<const polyMesh>(obr);
Rptr_.reset(new tensorField(mesh.nCells()));
init(obr);
}
Foam::localAxesRotation::localAxesRotation(const tensorField& R)
:
Rptr_(),
@ -157,43 +189,26 @@ void Foam::localAxesRotation::updateCells
const labelList& cells
)
{
const vectorField& cc = mesh.cellCentres();
tensorField& R = Rptr_();
forAll(cells, i)
{
label cellI = cells[i];
vector dir = mesh.cellCentres()[cellI] - origin_;
vector dir = cc[cellI] - origin_;
dir /= mag(dir) + VSMALL;
Rptr_()[cellI] = axesRotation(e3_, dir).R();
R[cellI] = axesRotation(e3_, dir).R();
}
}
Foam::vector Foam::localAxesRotation::transform(const vector& st) const
{
notImplemented
(
"vector localAxesRotation::transform(const vector&) const"
);
return vector::zero;
}
Foam::vector Foam::localAxesRotation::invTransform(const vector& st) const
{
notImplemented
(
"vector localAxesRotation::invTransform(const vector&) const"
);
return vector::zero;
}
Foam::tmp<Foam::vectorField> Foam::localAxesRotation::transform
(
const vectorField& st
const vectorField& vf
) const
{
if (Rptr_->size() != st.size())
if (Rptr_->size() != vf.size())
{
FatalErrorIn
(
@ -203,25 +218,65 @@ Foam::tmp<Foam::vectorField> Foam::localAxesRotation::transform
<< abort(FatalError);
}
return (Rptr_() & st);
return (Rptr_() & vf);
}
Foam::vector Foam::localAxesRotation::transform(const vector& v) const
{
notImplemented
(
"vector localAxesRotation::transform(const vector&) const"
);
return vector::zero;
}
Foam::vector Foam::localAxesRotation::transform
(
const vector& v,
const label cmptI
) const
{
return (Rptr_()[cmptI] & v);
}
Foam::tmp<Foam::vectorField> Foam::localAxesRotation::invTransform
(
const vectorField& st
const vectorField& vf
) const
{
return (Rptr_().T() & st);
return (Rptr_().T() & vf);
}
Foam::vector Foam::localAxesRotation::invTransform(const vector& v) const
{
notImplemented
(
"vector localAxesRotation::invTransform(const vector&) const"
);
return vector::zero;
}
Foam::vector Foam::localAxesRotation::invTransform
(
const vector& v,
const label cmptI
) const
{
return (Rptr_()[cmptI].T() & v);
}
Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
(
const tensorField& st
const tensorField& tf
) const
{
if (Rptr_->size() != st.size())
if (Rptr_->size() != tf.size())
{
FatalErrorIn
(
@ -233,13 +288,13 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
<< "tensorField st has different size to tensorField Tr"
<< abort(FatalError);
}
return (Rptr_() & st & Rptr_().T());
return (Rptr_() & tf & Rptr_().T());
}
Foam::tensor Foam::localAxesRotation::transformTensor
(
const tensor& st
const tensor& t
) const
{
notImplemented
@ -253,21 +308,21 @@ Foam::tensor Foam::localAxesRotation::transformTensor
Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
(
const tensorField& st,
const tensorField& tf,
const labelList& cellMap
) const
{
if (cellMap.size() != st.size())
if (cellMap.size() != tf.size())
{
FatalErrorIn
(
"tmp<tensorField> localAxesRotation::transformTensor"
"("
"const tensorField&"
"const tensorField&, "
"const labelList&"
")"
)
<< "tensorField st has different size to tensorField Tr"
<< "tensorField tf has different size to tensorField Tr"
<< abort(FatalError);
}
@ -278,7 +333,7 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
forAll(cellMap, i)
{
const label cellI = cellMap[i];
t[i] = R[cellI] & st[i] & Rtr[cellI];
t[i] = R[cellI] & tf[i] & Rtr[cellI];
}
return tt;
@ -287,13 +342,13 @@ Foam::tmp<Foam::tensorField> Foam::localAxesRotation::transformTensor
Foam::tmp<Foam::symmTensorField> Foam::localAxesRotation::transformVector
(
const vectorField& st
const vectorField& vf
) const
{
if (Rptr_->size() != st.size())
if (Rptr_->size() != vf.size())
{
FatalErrorIn("localAxesRotation::transformVector(const vectorField&)")
<< "tensorField st has different size to tensorField Tr"
<< "tensorField vf has different size to tensorField Tr"
<< abort(FatalError);
}
@ -303,7 +358,7 @@ Foam::tmp<Foam::symmTensorField> Foam::localAxesRotation::transformVector
const tensorField& R = Rptr_();
forAll(fld, i)
{
fld[i] = transformPrincipal(R[i], st[i]);
fld[i] = transformPrincipal(R[i], vf[i]);
}
return tfld;
}
@ -311,7 +366,7 @@ Foam::tmp<Foam::symmTensorField> Foam::localAxesRotation::transformVector
Foam::symmTensor Foam::localAxesRotation::transformVector
(
const vector& st
const vector& v
) const
{
notImplemented

View file

@ -80,7 +80,11 @@ class localAxesRotation
// Private members
//- Init transformation tensor field
void init(const objectRegistry& obr);
void init
(
const objectRegistry& obr,
const List<label>& cells = List<label>()
);
public:
@ -93,7 +97,7 @@ public:
//- Construct from dictionary and objectRegistry
localAxesRotation(const dictionary&, const objectRegistry&);
//- Construct from dictionary and objectRegistry
//- Construct from components for all cells
localAxesRotation
(
const objectRegistry&,
@ -101,6 +105,15 @@ public:
const point& origin
);
//- Construct from components for list of cells
localAxesRotation
(
const objectRegistry&,
const vector& axis,
const point& origin,
const List<label>& cells
);
//- Construct from dictionary
localAxesRotation(const dictionary&);
@ -167,16 +180,22 @@ public:
}
//- Transform vectorField using transformation tensor field
virtual tmp<vectorField> transform(const vectorField& st) const;
virtual tmp<vectorField> transform(const vectorField& tf) const;
//- Transform vector using transformation tensor
virtual vector transform(const vector& st) const;
virtual vector transform(const vector& v) const;
//- Transform vector using transformation tensor for component
virtual vector transform(const vector& v, const label cmptI) const;
//- Inverse transform vectorField using transformation tensor field
virtual tmp<vectorField> invTransform(const vectorField& st) const;
virtual tmp<vectorField> invTransform(const vectorField& vf) const;
//- Inverse transform vector using transformation tensor
virtual vector invTransform(const vector& st) const;
virtual vector invTransform(const vector& v) const;
//- Inverse transform vector using transformation tensor for component
virtual vector invTransform(const vector& v, const label cmptI) const;
//- Return if the rotation is uniform
virtual bool uniform() const
@ -185,15 +204,15 @@ public:
}
//- Transform tensor field using transformation tensorField
virtual tmp<tensorField> transformTensor(const tensorField& st) const;
virtual tmp<tensorField> transformTensor(const tensorField& tf) const;
//- Transform tensor using transformation tensorField
virtual tensor transformTensor(const tensor& st) const;
virtual tensor transformTensor(const tensor& t) const;
//- Transform tensor sub-field using transformation tensorField
virtual tmp<tensorField> transformTensor
(
const tensorField& st,
const tensorField& tf,
const labelList& cellMap
) const;
@ -201,19 +220,18 @@ public:
// symmetrical tensorField
virtual tmp<symmTensorField> transformVector
(
const vectorField& st
const vectorField& vf
) const;
//- Transform vector using transformation tensor and return
// symmetrical tensor (R & st & R.T())
virtual symmTensor transformVector(const vector& st) const;
virtual symmTensor transformVector(const vector& v) const;
// Write
//- Write
virtual void write(Ostream&) const;
};

View file

@ -0,0 +1,57 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
front
{
type fixedValue;
value uniform (0 0 0);
}
back
{
type fixedValue;
value uniform (0 0 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
porosityWall
{
type slip;
value uniform (0 0 0);
}
inlet
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
}
outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
inletValue uniform (0 0 0);
}
}
// ************************************************************************* //

View file

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
front
{
type zeroGradient;
}
back
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
porosityWall
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / 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 200;
boundaryField
{
front
{
type epsilonWallFunction;
value uniform 200;
}
back
{
type epsilonWallFunction;
value uniform 200;
}
walls
{
type epsilonWallFunction;
value uniform 200;
}
porosityWall
{
type epsilonWallFunction;
value uniform 200;
}
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.005;
value uniform 200;
}
outlet
{
type inletOutlet;
inletValue uniform 200;
value uniform 200;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / 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
{
front
{
type kqRWallFunction;
value uniform 1;
}
back
{
type kqRWallFunction;
value uniform 1;
}
walls
{
type kqRWallFunction;
value uniform 1;
}
porosityWall
{
type kqRWallFunction;
value uniform 1;
}
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,57 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / 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
{
front
{
type nutkWallFunction;
value uniform 0;
}
back
{
type nutkWallFunction;
value uniform 0;
}
walls
{
type nutkWallFunction;
value uniform 0;
}
porosityWall
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
front
{
type fixedFluxPressure;
value $internalField;
}
back
{
type fixedFluxPressure;
value $internalField;
}
walls
{
type fixedFluxPressure;
value $internalField;
}
porosityWall
{
type fixedFluxPressure;
value $internalField;
}
inlet
{
type fixedFluxPressure;
value $internalField;
}
outlet
{
type fixedValue;
value $internalField;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication `getApplication`

View file

@ -0,0 +1,25 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / 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;
// ************************************************************************* //

View file

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );
// ************************************************************************* //

View file

@ -0,0 +1,189 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
`format' ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// block definition for a porosity with an angled inlet/outlet
// the porosity is not aligned with the main axes
//
dnl> -----------------------------------------------------------------
dnl> <STANDARD DEFINTIONS>
dnl>
changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'print ($1)')]) dnl>
define(VCOUNT, 0) dnl>
define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl>
dnl>
define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl>
define(quad2D, ($1f $1b $2b $2f)) dnl>
define(frontQuad, ($1f $2f $3f $4f)) dnl>
define(backQuad, ($4b $3b $2b $1b)) dnl>
dnl>
dnl> </STANDARD DEFINTIONS>
dnl> -----------------------------------------------------------------
dnl>
define(ncells, 20) dnl>
define(ninlet, 15) dnl>
define(nporo, 20) dnl>
define(noutlet, 20) dnl>
dnl>
define(x0,0) dnl>
define(y0,0) dnl>
define(y0,0) dnl>
define(Cos,0.7071067812) dnl> == cos(45)
define(Sin,0.7071067812) dnl> == sin(45)
dnl>
define(width,50) dnl>
define(zBack,calc(-width/2)) dnl>
define(zFront,calc(width/2)) dnl>
define(leninlet,150)dnl>
define(lenporo,100)dnl>
define(lenoutlet,100)dnl>
dnl>
define(xhyp,calc(Sin*width)) dnl>
define(yhyp,calc(Cos*width)) dnl>
define(xinlet,leninlet)dnl>
define(xporo,calc(Cos*lenporo)) dnl>
define(yporo,calc(Sin*lenporo)) dnl>
define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl>
define(youtlet,calc(yporo + Sin*lenoutlet)) dnl>
dnl>
convertToMeters 0.001;
vertices
(
// inlet region
( -xinlet y0 zBack ) vlabel(in1b)
( -xinlet yhyp zBack ) vlabel(in2b)
( -xinlet y0 zFront ) vlabel(in1f)
( -xinlet yhyp zFront ) vlabel(in2f)
// join inlet->outlet
( x0 y0 zBack ) vlabel(join1b)
( -xhyp yhyp zBack ) vlabel(join2b)
( x0 y0 zFront ) vlabel(join1f)
( -xhyp yhyp zFront ) vlabel(join2f)
// porosity ends ->outlet
( xporo yporo zBack ) vlabel(poro1b)
( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b)
( xporo yporo zFront ) vlabel(poro1f)
( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f)
// outlet
( xoutlet youtlet zBack ) vlabel(out1b)
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b)
( xoutlet youtlet zFront ) vlabel(out1f)
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f)
);
blocks
(
// inlet block
hex2D(in1, join1, join2, in2)
inlet ( ninlet ncells ncells ) simpleGrading (1 1 1)
// porosity block
hex2D(join1, poro1, poro2, join2)
porosity ( nporo ncells ncells ) simpleGrading (1 1 1)
// outlet block
hex2D(poro1, out1, out2, poro2)
outlet ( noutlet ncells ncells ) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
// is there no way of defining all my 'defaultFaces' to be 'wall'?
front
{
type wall;
faces
(
// inlet block
frontQuad(in1, join1, join2, in2)
// outlet block
frontQuad(poro1, out1, out2, poro2)
);
}
back
{
type wall;
faces
(
// inlet block
backQuad(in1, join1, join2, in2)
// outlet block
backQuad(poro1, out1, out2, poro2)
);
}
walls
{
type wall;
faces
(
// inlet block
quad2D(in1, join1)
quad2D(join2, in2)
// outlet block
quad2D(poro1, out1)
quad2D(out2, poro2)
);
}
porosityWall
{
type wall;
faces
(
// porosity block
frontQuad(join1, poro1, poro2, join2)
// porosity block
backQuad(join1, poro1, poro2, join2)
// porosity block
quad2D(join1, poro1)
quad2D(poro2, join2)
);
}
inlet
{
type patch;
faces
(
quad2D(in2, in1)
);
}
outlet
{
type patch;
faces
(
quad2D(out2, out1)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6
(
front
{
type wall;
inGroups 1(wall);
nFaces 700;
startFace 63400;
}
back
{
type wall;
inGroups 1(wall);
nFaces 700;
startFace 64100;
}
walls
{
type wall;
inGroups 1(wall);
nFaces 1400;
startFace 64800;
}
porosityWall
{
type wall;
inGroups 1(wall);
nFaces 1600;
startFace 66200;
}
inlet
{
type patch;
nFaces 400;
startFace 67800;
}
outlet
{
type patch;
nFaces 400;
startFace 68200;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
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 ] 0;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
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 ] 0;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07;
// ************************************************************************* //

View file

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RASModel;
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application interFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep on;
maxCo 1;
maxAlphaCo 1;
maxDeltaT 1;
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
porosity1
{
type explicitPorositySource;
active true;
selectionMode cellZone;
cellZone porosity;
explicitPorositySourceCoeffs
{
type DarcyForchheimer;
DarcyForchheimerCoeffs
{
d d [0 -2 0 0 0 0 0] (2e8 -1000 -1000);
f f [0 -1 0 0 0 0 0] (0 0 0);
coordinateSystem
{
type cartesian;
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (0.70710678 0.70710678 0);
e2 (0 0 1);
}
}
}
}
}
//************************************************************************* //

View file

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / 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;
}
divSchemes
{
div(rhoPhi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((muEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p_rgh;
pcorr;
alpha.water;
}
// ************************************************************************* //

View file

@ -0,0 +1,108 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.water.*"
{
nAlphaCorr 2;
nAlphaSubCycles 1;
cAlpha 1;
MULESCorr yes;
nLimiterIter 3;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
}
pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-5;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-5;
relTol 0;
maxIter 50;
}
p_rgh
{
solver GAMG;
tolerance 5e-9;
relTol 0.01;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
maxIter 50;
};
p_rghFinal
{
$p_rgh;
relTol 0;
}
"(U|k|epsilon).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
minIter 1;
}
}
PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
equations
{
".*" 1;
}
}
// ************************************************************************* //