combustionModel: Removed the deprecated "active" switch.
To switch-off combustion choose the "noCombustion" model selected with the name "none" in the combustionProperties file: combustionModel none;
This commit is contained in:
@ -82,95 +82,92 @@ Foam::combustionModels::EDC<ReactionThermo>::~EDC()
|
||||
template<class ReactionThermo>
|
||||
void Foam::combustionModels::EDC<ReactionThermo>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
|
||||
tmp<volScalarField> tmu(this->turbulence().mu());
|
||||
const volScalarField& mu = tmu();
|
||||
|
||||
tmp<volScalarField> tk(this->turbulence().k());
|
||||
const volScalarField& k = tk();
|
||||
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const volScalarField& rho = trho();
|
||||
|
||||
scalarField tauStar(epsilon.size(), 0);
|
||||
|
||||
if (version_ == EDCversions::v2016)
|
||||
{
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
tmp<volScalarField> ttc(this->chemistryPtr_->tc());
|
||||
const volScalarField& tc = ttc();
|
||||
|
||||
tmp<volScalarField> tmu(this->turbulence().mu());
|
||||
const volScalarField& mu = tmu();
|
||||
|
||||
tmp<volScalarField> tk(this->turbulence().k());
|
||||
const volScalarField& k = tk();
|
||||
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const volScalarField& rho = trho();
|
||||
|
||||
scalarField tauStar(epsilon.size(), 0);
|
||||
|
||||
if (version_ == EDCversions::v2016)
|
||||
forAll(tauStar, i)
|
||||
{
|
||||
tmp<volScalarField> ttc(this->chemistryPtr_->tc());
|
||||
const volScalarField& tc = ttc();
|
||||
const scalar nu = mu[i]/(rho[i] + small);
|
||||
|
||||
forAll(tauStar, i)
|
||||
const scalar Da =
|
||||
max(min(sqrt(nu/(epsilon[i] + small))/tc[i], 10), 1e-10);
|
||||
|
||||
const scalar ReT = sqr(k[i])/(nu*epsilon[i] + small);
|
||||
const scalar CtauI = min(C1_/(Da*sqrt(ReT + 1)), 2.1377);
|
||||
|
||||
const scalar CgammaI =
|
||||
max(min(C2_*sqrt(Da*(ReT + 1)), 5), 0.4082);
|
||||
|
||||
const scalar gammaL =
|
||||
CgammaI*pow025(nu*epsilon[i]/(sqr(k[i]) + small));
|
||||
|
||||
tauStar[i] = CtauI*sqrt(nu/(epsilon[i] + small));
|
||||
|
||||
if (gammaL >= 1)
|
||||
{
|
||||
const scalar nu = mu[i]/(rho[i] + small);
|
||||
|
||||
const scalar Da =
|
||||
max(min(sqrt(nu/(epsilon[i] + small))/tc[i], 10), 1e-10);
|
||||
|
||||
const scalar ReT = sqr(k[i])/(nu*epsilon[i] + small);
|
||||
const scalar CtauI = min(C1_/(Da*sqrt(ReT + 1)), 2.1377);
|
||||
|
||||
const scalar CgammaI =
|
||||
max(min(C2_*sqrt(Da*(ReT + 1)), 5), 0.4082);
|
||||
|
||||
const scalar gammaL =
|
||||
CgammaI*pow025(nu*epsilon[i]/(sqr(k[i]) + small));
|
||||
|
||||
tauStar[i] = CtauI*sqrt(nu/(epsilon[i] + small));
|
||||
|
||||
if (gammaL >= 1)
|
||||
{
|
||||
kappa_[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] =
|
||||
max
|
||||
kappa_[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
min
|
||||
(
|
||||
pow(gammaL, exp1_)/(1 - pow(gammaL, exp2_)),
|
||||
1
|
||||
),
|
||||
0
|
||||
);
|
||||
}
|
||||
pow(gammaL, exp1_)/(1 - pow(gammaL, exp2_)),
|
||||
1
|
||||
),
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(tauStar, i)
|
||||
{
|
||||
const scalar nu = mu[i]/(rho[i] + small);
|
||||
const scalar gammaL =
|
||||
Cgamma_*pow025(nu*epsilon[i]/(sqr(k[i]) + small));
|
||||
|
||||
tauStar[i] = Ctau_*sqrt(nu/(epsilon[i] + small));
|
||||
if (gammaL >= 1)
|
||||
{
|
||||
kappa_[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
pow(gammaL, exp1_)/(1 - pow(gammaL, exp2_)),
|
||||
1
|
||||
),
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->chemistryPtr_->solve(tauStar);
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll(tauStar, i)
|
||||
{
|
||||
const scalar nu = mu[i]/(rho[i] + small);
|
||||
const scalar gammaL =
|
||||
Cgamma_*pow025(nu*epsilon[i]/(sqr(k[i]) + small));
|
||||
|
||||
tauStar[i] = Ctau_*sqrt(nu/(epsilon[i] + small));
|
||||
if (gammaL >= 1)
|
||||
{
|
||||
kappa_[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] =
|
||||
max
|
||||
(
|
||||
min
|
||||
(
|
||||
pow(gammaL, exp1_)/(1 - pow(gammaL, exp2_)),
|
||||
1
|
||||
),
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->chemistryPtr_->solve(tauStar);
|
||||
}
|
||||
|
||||
|
||||
@ -186,7 +183,7 @@ template<class ReactionThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::EDC<ReactionThermo>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tQdot
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
@ -199,17 +196,9 @@ Foam::combustionModels::EDC<ReactionThermo>::Qdot() const
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0)
|
||||
kappa_*this->chemistryPtr_->Qdot()
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tQdot.ref() = kappa_*this->chemistryPtr_->Qdot();
|
||||
}
|
||||
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -341,10 +341,7 @@ void FSD<ReactionThermo, ThermoType>::correct()
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
calculateSourceNorm();
|
||||
}
|
||||
calculateSourceNorm();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -66,35 +66,32 @@ Foam::combustionModels::PaSR<ReactionThermo>::~PaSR()
|
||||
template<class ReactionThermo>
|
||||
void Foam::combustionModels::PaSR<ReactionThermo>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
laminar<ReactionThermo>::correct();
|
||||
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const scalarField& epsilon = tepsilon();
|
||||
|
||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||
const scalarField& muEff = tmuEff();
|
||||
|
||||
tmp<volScalarField> ttc(this->tc());
|
||||
const scalarField& tc = ttc();
|
||||
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const scalarField& rho = trho();
|
||||
|
||||
forAll(epsilon, i)
|
||||
{
|
||||
laminar<ReactionThermo>::correct();
|
||||
const scalar tk =
|
||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + small), 0));
|
||||
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const scalarField& epsilon = tepsilon();
|
||||
|
||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||
const scalarField& muEff = tmuEff();
|
||||
|
||||
tmp<volScalarField> ttc(this->tc());
|
||||
const scalarField& tc = ttc();
|
||||
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const scalarField& rho = trho();
|
||||
|
||||
forAll(epsilon, i)
|
||||
if (tk > small)
|
||||
{
|
||||
const scalar tk =
|
||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + small), 0));
|
||||
|
||||
if (tk > small)
|
||||
{
|
||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] = 1.0;
|
||||
}
|
||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||
}
|
||||
else
|
||||
{
|
||||
kappa_[i] = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,7 +81,6 @@ Foam::combustionModel::combustionModel
|
||||
IOdictionary(createIOobject(thermo, combustionProperties)),
|
||||
mesh_(thermo.p().mesh()),
|
||||
turb_(turb),
|
||||
active_(lookupOrDefault<Switch>("active", true)),
|
||||
coeffs_(optionalSubDict(modelType + "Coeffs")),
|
||||
modelType_(modelType)
|
||||
{}
|
||||
@ -99,7 +98,6 @@ bool Foam::combustionModel::read()
|
||||
{
|
||||
if (regIOobject::read())
|
||||
{
|
||||
this->lookup("active") >> active_;
|
||||
coeffs_ = optionalSubDict(modelType_ + "Coeffs");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -77,9 +77,6 @@ protected:
|
||||
//- Reference to the turbulence model
|
||||
const compressibleTurbulenceModel& turb_;
|
||||
|
||||
//- Active
|
||||
Switch active_;
|
||||
|
||||
//- Dictionary of the model
|
||||
dictionary coeffs_;
|
||||
|
||||
@ -138,9 +135,6 @@ public:
|
||||
//- Return const access to phi
|
||||
inline tmp<surfaceScalarField> phi() const;
|
||||
|
||||
//- Is combustion active?
|
||||
inline const Switch& active() const;
|
||||
|
||||
//- Return const dictionary of the model
|
||||
inline const dictionary& coeffs() const;
|
||||
|
||||
|
||||
@ -50,12 +50,6 @@ inline Foam::tmp<Foam::surfaceScalarField> Foam::combustionModel::phi() const
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::Switch& Foam::combustionModel::active() const
|
||||
{
|
||||
return active_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::dictionary& Foam::combustionModel::coeffs() const
|
||||
{
|
||||
return coeffs_;
|
||||
|
||||
@ -69,25 +69,21 @@ void diffusion<ReactionThermo, ThermoType>::correct()
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel = this->thermo().composition().Y()[fuelI];
|
||||
|
||||
if (this->thermo().composition().contains(oxidantName_))
|
||||
{
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
const volScalarField& YO2 =
|
||||
this->thermo().composition().Y(oxidantName_);
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermo().composition().Y()[fuelI];
|
||||
|
||||
if (this->thermo().composition().contains(oxidantName_))
|
||||
{
|
||||
const volScalarField& YO2 =
|
||||
this->thermo().composition().Y(oxidantName_);
|
||||
|
||||
this->wFuel_ ==
|
||||
C_*this->turbulence().muEff()
|
||||
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
||||
*pos0(YFuel)*pos0(YO2);
|
||||
}
|
||||
this->wFuel_ ==
|
||||
C_*this->turbulence().muEff()
|
||||
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
||||
*pos0(YFuel)*pos0(YO2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,25 +67,21 @@ void infinitelyFastChemistry<ReactionThermo, ThermoType>::correct()
|
||||
this->wFuel_ ==
|
||||
dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0);
|
||||
|
||||
if (this->active())
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel = this->thermo().composition().Y()[fuelI];
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
if (this->thermo().composition().contains("O2"))
|
||||
{
|
||||
this->singleMixturePtr_->fresCorrect();
|
||||
const volScalarField& YO2 = this->thermo().composition().Y("O2");
|
||||
|
||||
const label fuelI = this->singleMixturePtr_->fuelIndex();
|
||||
|
||||
const volScalarField& YFuel =
|
||||
this->thermo().composition().Y()[fuelI];
|
||||
|
||||
const dimensionedScalar s = this->singleMixturePtr_->s();
|
||||
|
||||
if (this->thermo().composition().contains("O2"))
|
||||
{
|
||||
const volScalarField& YO2 = this->thermo().composition().Y("O2");
|
||||
|
||||
this->wFuel_ ==
|
||||
this->rho()/(this->mesh().time().deltaT()*C_)
|
||||
*min(YFuel, YO2/s.value());
|
||||
}
|
||||
this->wFuel_ ==
|
||||
this->rho()/(this->mesh().time().deltaT()*C_)
|
||||
*min(YFuel, YO2/s.value());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -81,40 +81,33 @@ Foam::combustionModels::laminar<ReactionThermo>::tc() const
|
||||
template<class ReactionThermo>
|
||||
void Foam::combustionModels::laminar<ReactionThermo>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
if (integrateReactionRate_)
|
||||
{
|
||||
if (integrateReactionRate_)
|
||||
if (fv::localEulerDdt::enabled(this->mesh()))
|
||||
{
|
||||
if (fv::localEulerDdt::enabled(this->mesh()))
|
||||
const scalarField& rDeltaT =
|
||||
fv::localEulerDdt::localRDeltaT(this->mesh());
|
||||
|
||||
if (this->coeffs().found("maxIntegrationTime"))
|
||||
{
|
||||
const scalarField& rDeltaT =
|
||||
fv::localEulerDdt::localRDeltaT(this->mesh());
|
||||
const scalar maxIntegrationTime
|
||||
(
|
||||
readScalar(this->coeffs().lookup("maxIntegrationTime"))
|
||||
);
|
||||
|
||||
if (this->coeffs().found("maxIntegrationTime"))
|
||||
{
|
||||
scalar maxIntegrationTime
|
||||
(
|
||||
readScalar(this->coeffs().lookup("maxIntegrationTime"))
|
||||
);
|
||||
|
||||
this->chemistryPtr_->solve
|
||||
(
|
||||
min(1.0/rDeltaT, maxIntegrationTime)()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->solve((1.0/rDeltaT)());
|
||||
}
|
||||
this->chemistryPtr_->solve
|
||||
(
|
||||
min(1.0/rDeltaT, maxIntegrationTime)()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->solve(this->mesh().time().deltaTValue());
|
||||
this->chemistryPtr_->solve((1.0/rDeltaT)());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->chemistryPtr_->calculate();
|
||||
this->chemistryPtr_->solve(this->mesh().time().deltaTValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -125,16 +118,10 @@ Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::laminar<ReactionThermo>::R(volScalarField& Y) const
|
||||
{
|
||||
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
||||
|
||||
fvScalarMatrix& Su = tSu.ref();
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
const label specieI =
|
||||
this->thermo().composition().species()[Y.member()];
|
||||
|
||||
Su += this->chemistryPtr_->RR(specieI);
|
||||
}
|
||||
const label specieI = this->thermo().composition().species()[Y.member()];
|
||||
Su += this->chemistryPtr_->RR(specieI);
|
||||
|
||||
return tSu;
|
||||
}
|
||||
@ -144,30 +131,7 @@ template<class ReactionThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::laminar<ReactionThermo>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->thermo().phasePropertyName(typeName + ":Qdot"),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tQdot.ref() = this->chemistryPtr_->Qdot();
|
||||
}
|
||||
|
||||
return tQdot;
|
||||
return this->chemistryPtr_->Qdot();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ template<class ReactionThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::noCombustion<ReactionThermo>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tQdot
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
@ -92,8 +92,6 @@ Foam::combustionModels::noCombustion<ReactionThermo>::Qdot() const
|
||||
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tQdot;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1075,6 +1075,7 @@ void Foam::polyTopoChange::compact
|
||||
renumberReverseMap(localPointMap, reversePointMap_);
|
||||
|
||||
renumberKey(localPointMap, pointZone_);
|
||||
renumberKey(localPointMap, oldPoints_);
|
||||
renumber(localPointMap, retiredPoints_);
|
||||
|
||||
// Use map to relabel face vertices
|
||||
@ -2175,6 +2176,7 @@ Foam::polyTopoChange::polyTopoChange(const label nPatches, const bool strict)
|
||||
reversePointMap_(0),
|
||||
pointZone_(0),
|
||||
retiredPoints_(0),
|
||||
oldPoints_(0),
|
||||
faces_(0),
|
||||
region_(0),
|
||||
faceOwner_(0),
|
||||
@ -2210,6 +2212,7 @@ Foam::polyTopoChange::polyTopoChange
|
||||
reversePointMap_(0),
|
||||
pointZone_(0),
|
||||
retiredPoints_(0),
|
||||
oldPoints_(0),
|
||||
faces_(0),
|
||||
region_(0),
|
||||
faceOwner_(0),
|
||||
@ -2249,6 +2252,7 @@ void Foam::polyTopoChange::clear()
|
||||
reversePointMap_.clearStorage();
|
||||
pointZone_.clearStorage();
|
||||
retiredPoints_.clearStorage();
|
||||
oldPoints_.clearStorage();
|
||||
|
||||
faces_.clearStorage();
|
||||
region_.clearStorage();
|
||||
@ -2299,6 +2303,7 @@ void Foam::polyTopoChange::addMesh
|
||||
pointMap_.setCapacity(pointMap_.size() + points.size());
|
||||
reversePointMap_.setCapacity(reversePointMap_.size() + points.size());
|
||||
pointZone_.resize(pointZone_.size() + points.size()/100);
|
||||
// No need to extend oldPoints_
|
||||
|
||||
// Precalc offset zones
|
||||
labelList newZoneID(points.size(), -1);
|
||||
@ -2717,6 +2722,81 @@ void Foam::polyTopoChange::modifyPoint
|
||||
{
|
||||
retiredPoints_.insert(pointi);
|
||||
}
|
||||
|
||||
oldPoints_.erase(pointi);
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::polyTopoChange::addPoint
|
||||
(
|
||||
const point& pt,
|
||||
const point& oldPt,
|
||||
const label masterPointID,
|
||||
const label zoneID
|
||||
)
|
||||
{
|
||||
label pointi = points_.size();
|
||||
|
||||
points_.append(pt);
|
||||
pointMap_.append(masterPointID);
|
||||
reversePointMap_.append(pointi);
|
||||
|
||||
if (zoneID >= 0)
|
||||
{
|
||||
pointZone_.insert(pointi, zoneID);
|
||||
}
|
||||
|
||||
oldPoints_.insert(pointi, oldPt);
|
||||
|
||||
return pointi;
|
||||
}
|
||||
|
||||
|
||||
void Foam::polyTopoChange::modifyPoint
|
||||
(
|
||||
const label pointi,
|
||||
const point& pt,
|
||||
const point& oldPt,
|
||||
const label newZoneID
|
||||
)
|
||||
{
|
||||
if (pointi < 0 || pointi >= points_.size())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "illegal point label " << pointi << endl
|
||||
<< "Valid point labels are 0 .. " << points_.size()-1
|
||||
<< abort(FatalError);
|
||||
}
|
||||
if (pointRemoved(pointi) || pointMap_[pointi] == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "point " << pointi << " already marked for removal"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
points_[pointi] = pt;
|
||||
|
||||
Map<label>::iterator pointFnd = pointZone_.find(pointi);
|
||||
|
||||
if (pointFnd != pointZone_.end())
|
||||
{
|
||||
if (newZoneID >= 0)
|
||||
{
|
||||
pointFnd() = newZoneID;
|
||||
}
|
||||
else
|
||||
{
|
||||
pointZone_.erase(pointFnd);
|
||||
}
|
||||
}
|
||||
else if (newZoneID >= 0)
|
||||
{
|
||||
pointZone_.insert(pointi, newZoneID);
|
||||
}
|
||||
|
||||
// Always active
|
||||
retiredPoints_.erase(pointi);
|
||||
// Always provided old point
|
||||
oldPoints_.set(pointi, oldPt);
|
||||
}
|
||||
|
||||
|
||||
@ -2783,6 +2863,7 @@ void Foam::polyTopoChange::removePoint
|
||||
}
|
||||
pointZone_.erase(pointi);
|
||||
retiredPoints_.erase(pointi);
|
||||
oldPoints_.erase(pointi);
|
||||
}
|
||||
|
||||
|
||||
@ -3104,20 +3185,29 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
||||
if (inflate)
|
||||
{
|
||||
// Keep (renumbered) mesh points, store new points in map for inflation
|
||||
// (appended points (i.e. from nowhere) get value zero)
|
||||
// (appended points (i.e. from nowhere) get value as provided in
|
||||
// addPoints)
|
||||
pointField renumberedMeshPoints(newPoints.size());
|
||||
|
||||
forAll(pointMap_, newPointi)
|
||||
{
|
||||
label oldPointi = pointMap_[newPointi];
|
||||
|
||||
if (oldPointi >= 0)
|
||||
Map<point>::const_iterator iter = oldPoints_.find(newPointi);
|
||||
if (iter != oldPoints_.end())
|
||||
{
|
||||
renumberedMeshPoints[newPointi] = mesh.points()[oldPointi];
|
||||
renumberedMeshPoints[newPointi] = iter();
|
||||
}
|
||||
else
|
||||
{
|
||||
renumberedMeshPoints[newPointi] = Zero;
|
||||
label oldPointi = pointMap_[newPointi];
|
||||
|
||||
if (oldPointi >= 0)
|
||||
{
|
||||
renumberedMeshPoints[newPointi] = mesh.points()[oldPointi];
|
||||
}
|
||||
else
|
||||
{
|
||||
renumberedMeshPoints[newPointi] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3155,6 +3245,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
||||
// Clear out primitives
|
||||
{
|
||||
retiredPoints_.clearStorage();
|
||||
oldPoints_.clearStorage();
|
||||
region_.clearStorage();
|
||||
}
|
||||
|
||||
@ -3386,6 +3477,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
|
||||
// Clear out primitives
|
||||
{
|
||||
retiredPoints_.clearStorage();
|
||||
oldPoints_.clearStorage();
|
||||
region_.clearStorage();
|
||||
}
|
||||
|
||||
|
||||
@ -128,6 +128,10 @@ class polyTopoChange
|
||||
//- Retired points
|
||||
labelHashSet retiredPoints_;
|
||||
|
||||
//- Explicitly provided old location for e.g. added points without
|
||||
// masterPoint
|
||||
Map<point> oldPoints_;
|
||||
|
||||
|
||||
// Faces
|
||||
|
||||
@ -508,6 +512,31 @@ public:
|
||||
const bool inCell
|
||||
);
|
||||
|
||||
// Explicitly provided 'old' point location
|
||||
|
||||
//- Add point with original position. Return new point label.
|
||||
// Notes:
|
||||
// - masterPointID can be < 0 (appended points)
|
||||
// - inCell = false: add retired point (to end of point list)
|
||||
label addPoint
|
||||
(
|
||||
const point& newPosition,
|
||||
const point& oldPosition,
|
||||
const label masterPointID,
|
||||
const label zoneID
|
||||
);
|
||||
|
||||
//- Modify coordinate.
|
||||
// Notes:
|
||||
// - inCell = false: add retired point (to end of point list)
|
||||
void modifyPoint
|
||||
(
|
||||
const label pointi,
|
||||
const point& newPosition,
|
||||
const point& oldPosition,
|
||||
const label newZoneID
|
||||
);
|
||||
|
||||
//- Remove/merge point.
|
||||
void removePoint(const label, const label);
|
||||
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel infinitelyFastChemistry;
|
||||
|
||||
active true;
|
||||
|
||||
infinitelyFastChemistryCoeffs
|
||||
{
|
||||
semiImplicit no;
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel infinitelyFastChemistry;
|
||||
|
||||
active true;
|
||||
|
||||
infinitelyFastChemistryCoeffs
|
||||
{
|
||||
C 10;
|
||||
|
||||
@ -18,8 +18,6 @@ FoamFile
|
||||
combustionModel infinitelyFastChemistry;
|
||||
//combustionModel FSD;
|
||||
|
||||
active true;
|
||||
|
||||
infinitelyFastChemistryCoeffs
|
||||
{
|
||||
semiImplicit no;
|
||||
|
||||
@ -18,8 +18,6 @@ FoamFile
|
||||
|
||||
combustionModel infinitelyFastChemistry;
|
||||
|
||||
active on;
|
||||
|
||||
infinitelyFastChemistryCoeffs
|
||||
{
|
||||
semiImplicit no;
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel EDC;
|
||||
|
||||
active true;
|
||||
|
||||
EDCCoeffs
|
||||
{
|
||||
version v2005;
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel EDC;
|
||||
|
||||
active true;
|
||||
|
||||
EDCCoeffs
|
||||
{
|
||||
version v2005;
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,12 +17,9 @@ FoamFile
|
||||
|
||||
combustionModel PaSR;
|
||||
|
||||
active yes;
|
||||
|
||||
PaSRCoeffs
|
||||
{
|
||||
Cmix 1.0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel PaSR;
|
||||
|
||||
active true;
|
||||
|
||||
PaSRCoeffs
|
||||
{
|
||||
Cmix 1.0;
|
||||
|
||||
@ -17,11 +17,4 @@ FoamFile
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,14 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel PaSR;
|
||||
|
||||
active false;
|
||||
|
||||
PaSRCoeffs
|
||||
{
|
||||
Cmix 1.0;
|
||||
}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,12 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -15,11 +15,6 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
combustionModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -17,8 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel PaSR;
|
||||
|
||||
active yes;
|
||||
|
||||
PaSRCoeffs
|
||||
{
|
||||
Cmix 1.0;
|
||||
|
||||
@ -17,14 +17,6 @@ FoamFile
|
||||
|
||||
combustionModel PaSR;
|
||||
|
||||
active true;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
noCombustionCoeffs
|
||||
{}
|
||||
|
||||
PaSRCoeffs
|
||||
{
|
||||
Cmix 1.0;
|
||||
|
||||
Reference in New Issue
Block a user