mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRG: Integrated Foundation code to commit ba4dbed
This commit is contained in:
@ -54,4 +54,3 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
|
|||||||
|
|
||||||
T.write();
|
T.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,4 +3,3 @@ if (adjustTimeStep)
|
|||||||
runTime.setDeltaT(min(dtChem, maxDeltaT));
|
runTime.setDeltaT(min(dtChem, maxDeltaT));
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
||||||
|
|
||||||
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
||||||
|
|
||||||
|
|||||||
@ -2,4 +2,3 @@
|
|||||||
|
|
||||||
const int nNonOrthCorr =
|
const int nNonOrthCorr =
|
||||||
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||||
|
|
||||||
|
|||||||
@ -182,6 +182,11 @@
|
|||||||
if (alphaApplyPrevCorr && MULESCorr)
|
if (alphaApplyPrevCorr && MULESCorr)
|
||||||
{
|
{
|
||||||
talphaPhiCorr0 = alphaPhi - talphaPhiCorr0;
|
talphaPhiCorr0 = alphaPhi - talphaPhiCorr0;
|
||||||
|
talphaPhiCorr0.ref().rename("alphaPhiCorr0");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
talphaPhiCorr0.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
if
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -128,6 +128,9 @@ int main(int argc, char *argv[])
|
|||||||
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
<< runTime.elapsedCpuTime() - timeBeforeMeshUpdate
|
||||||
<< " s" << endl;
|
<< " s" << endl;
|
||||||
|
|
||||||
|
// Do not apply previous time-step mesh compression flux
|
||||||
|
talphaPhiCorr0.clear();
|
||||||
|
|
||||||
gh = (g & mesh.C()) - ghRef;
|
gh = (g & mesh.C()) - ghRef;
|
||||||
ghf = (g & mesh.Cf()) - ghRef;
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,11 +64,8 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
|
|
||||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||||
{
|
{
|
||||||
phaseModel& phase1 = iter();
|
phaseModel& phase = iter();
|
||||||
volScalarField& alpha1 = phase1;
|
volScalarField& alpha1 = phase;
|
||||||
|
|
||||||
phase1.alphaPhi() =
|
|
||||||
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
|
|
||||||
|
|
||||||
alphaPhiCorrs.set
|
alphaPhiCorrs.set
|
||||||
(
|
(
|
||||||
@ -79,7 +76,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
fvc::flux
|
fvc::flux
|
||||||
(
|
(
|
||||||
phi_,
|
phi_,
|
||||||
phase1,
|
phase,
|
||||||
"div(phi," + alpha1.name() + ')'
|
"div(phi," + alpha1.name() + ')'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -92,13 +89,13 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
phaseModel& phase2 = iter2();
|
phaseModel& phase2 = iter2();
|
||||||
volScalarField& alpha2 = phase2;
|
volScalarField& alpha2 = phase2;
|
||||||
|
|
||||||
if (&phase2 == &phase1) continue;
|
if (&phase2 == &phase) continue;
|
||||||
|
|
||||||
surfaceScalarField phir(phase1.phi() - phase2.phi());
|
surfaceScalarField phir(phase.phi() - phase2.phi());
|
||||||
|
|
||||||
scalarCoeffSymmTable::const_iterator cAlpha
|
scalarCoeffSymmTable::const_iterator cAlpha
|
||||||
(
|
(
|
||||||
cAlphas_.find(interfacePair(phase1, phase2))
|
cAlphas_.find(interfacePair(phase, phase2))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (cAlpha != cAlphas_.end())
|
if (cAlpha != cAlphas_.end())
|
||||||
@ -108,7 +105,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
(mag(phi_) + mag(phir))/mesh_.magSf()
|
(mag(phi_) + mag(phir))/mesh_.magSf()
|
||||||
);
|
);
|
||||||
|
|
||||||
phir += min(cAlpha()*phic, max(phic))*nHatf(phase1, phase2);
|
phir += min(cAlpha()*phic, max(phic))*nHatf(phase, phase2);
|
||||||
}
|
}
|
||||||
|
|
||||||
word phirScheme
|
word phirScheme
|
||||||
@ -119,39 +116,18 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
alphaPhiCorr += fvc::flux
|
alphaPhiCorr += fvc::flux
|
||||||
(
|
(
|
||||||
-fvc::flux(-phir, phase2, phirScheme),
|
-fvc::flux(-phir, phase2, phirScheme),
|
||||||
phase1,
|
phase,
|
||||||
phirScheme
|
phirScheme
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField::Boundary& alphaPhiCorrBf =
|
phase.correctInflowOutflow(alphaPhiCorr);
|
||||||
alphaPhiCorr.boundaryFieldRef();
|
|
||||||
|
|
||||||
// Ensure that the flux at inflow BCs is preserved
|
|
||||||
forAll(alphaPhiCorrBf, patchi)
|
|
||||||
{
|
|
||||||
fvsPatchScalarField& alphaPhiCorrp = alphaPhiCorrBf[patchi];
|
|
||||||
|
|
||||||
if (!alphaPhiCorrp.coupled())
|
|
||||||
{
|
|
||||||
const scalarField& phi1p = phase1.phi().boundaryField()[patchi];
|
|
||||||
const scalarField& alpha1p = alpha1.boundaryField()[patchi];
|
|
||||||
|
|
||||||
forAll(alphaPhiCorrp, facei)
|
|
||||||
{
|
|
||||||
if (phi1p[facei] < 0)
|
|
||||||
{
|
|
||||||
alphaPhiCorrp[facei] = alpha1p[facei]*phi1p[facei];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MULES::limit
|
MULES::limit
|
||||||
(
|
(
|
||||||
1.0/mesh_.time().deltaT().value(),
|
1.0/mesh_.time().deltaT().value(),
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
phase1,
|
phase,
|
||||||
phi_,
|
phi_,
|
||||||
alphaPhiCorr,
|
alphaPhiCorr,
|
||||||
zeroField(),
|
zeroField(),
|
||||||
@ -182,29 +158,30 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
|
|
||||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||||
{
|
{
|
||||||
phaseModel& phase1 = iter();
|
phaseModel& phase = iter();
|
||||||
|
|
||||||
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
|
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
|
||||||
alphaPhi += upwind<scalar>(mesh_, phi_).flux(phase1);
|
alphaPhi += upwind<scalar>(mesh_, phi_).flux(phase);
|
||||||
|
phase.correctInflowOutflow(alphaPhi);
|
||||||
|
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
phase1,
|
phase,
|
||||||
alphaPhi,
|
alphaPhi,
|
||||||
zeroField(),
|
zeroField(),
|
||||||
zeroField()
|
zeroField()
|
||||||
);
|
);
|
||||||
|
|
||||||
phase1.alphaPhi() += alphaPhi;
|
phase.alphaPhi() = alphaPhi;
|
||||||
|
|
||||||
Info<< phase1.name() << " volume fraction, min, max = "
|
Info<< phase.name() << " volume fraction, min, max = "
|
||||||
<< phase1.weightedAverage(mesh_.V()).value()
|
<< phase.weightedAverage(mesh_.V()).value()
|
||||||
<< ' ' << min(phase1).value()
|
<< ' ' << min(phase).value()
|
||||||
<< ' ' << max(phase1).value()
|
<< ' ' << max(phase).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
sumAlpha += phase1;
|
sumAlpha += phase;
|
||||||
|
|
||||||
phasei++;
|
phasei++;
|
||||||
}
|
}
|
||||||
@ -215,6 +192,15 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
<< ' ' << max(sumAlpha).value()
|
<< ' ' << max(sumAlpha).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
// Correct the sum of the phase-fractions to avoid 'drift'
|
||||||
|
volScalarField sumCorr(1.0 - sumAlpha);
|
||||||
|
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||||
|
{
|
||||||
|
phaseModel& phase = iter();
|
||||||
|
volScalarField& alpha = phase;
|
||||||
|
alpha += alpha*sumCorr;
|
||||||
|
}
|
||||||
|
|
||||||
calcAlphas();
|
calcAlphas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -236,6 +236,24 @@ bool Foam::phaseModel::read(const dictionary& phaseDict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const
|
||||||
|
{
|
||||||
|
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
|
||||||
|
const volScalarField::Boundary& alphaBf = boundaryField();
|
||||||
|
const surfaceScalarField::Boundary& phiBf = phi().boundaryField();
|
||||||
|
|
||||||
|
forAll(alphaPhiBf, patchi)
|
||||||
|
{
|
||||||
|
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
|
||||||
|
|
||||||
|
if (!alphaPhip.coupled())
|
||||||
|
{
|
||||||
|
alphaPhip = phiBf[patchi]*alphaBf[patchi];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::phaseModel::d() const
|
Foam::tmp<Foam::volScalarField> Foam::phaseModel::d() const
|
||||||
{
|
{
|
||||||
return dPtr_().d();
|
return dPtr_().d();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -208,6 +208,9 @@ public:
|
|||||||
return alphaPhi_;
|
return alphaPhi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Ensure that the flux at inflow/outflow BCs is preserved
|
||||||
|
void correctInflowOutflow(surfaceScalarField& alphaPhi) const;
|
||||||
|
|
||||||
//- Correct the phase properties
|
//- Correct the phase properties
|
||||||
void correct();
|
void correct();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -681,6 +681,14 @@ void Foam::multiphaseMixture::solveAlphas
|
|||||||
<< ' ' << max(sumAlpha).value()
|
<< ' ' << max(sumAlpha).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
// Correct the sum of the phase-fractions to avoid 'drift'
|
||||||
|
volScalarField sumCorr(1.0 - sumAlpha);
|
||||||
|
forAllIter(PtrDictionary<phase>, phases_, iter)
|
||||||
|
{
|
||||||
|
phase& alpha = iter();
|
||||||
|
alpha += alpha*sumCorr;
|
||||||
|
}
|
||||||
|
|
||||||
calcAlphas();
|
calcAlphas();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,9 +86,7 @@ Foam::interfaceCompositionModels::Saturated<Thermo, OtherThermo>::update
|
|||||||
(
|
(
|
||||||
const volScalarField& Tf
|
const volScalarField& Tf
|
||||||
)
|
)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Thermo, class OtherThermo>
|
template<class Thermo, class OtherThermo>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -375,6 +375,18 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
volScalarField hef1(phase1.thermo().he(phase1.thermo().p(), Tf));
|
volScalarField hef1(phase1.thermo().he(phase1.thermo().p(), Tf));
|
||||||
volScalarField hef2(phase2.thermo().he(phase2.thermo().p(), Tf));
|
volScalarField hef2(phase2.thermo().he(phase2.thermo().p(), Tf));
|
||||||
|
|
||||||
|
volScalarField L
|
||||||
|
(
|
||||||
|
min
|
||||||
|
(
|
||||||
|
(pos(iDmdt)*he2 + neg(iDmdt)*hef2)
|
||||||
|
- (neg(iDmdt)*he1 + pos(iDmdt)*hef1),
|
||||||
|
0.3*mag(hef2 - hef1)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField iDmdtNew(iDmdt);
|
||||||
|
|
||||||
if (massTransfer_ )
|
if (massTransfer_ )
|
||||||
{
|
{
|
||||||
volScalarField H1
|
volScalarField H1
|
||||||
@ -389,28 +401,13 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
|
|
||||||
Tf = saturationModel_->Tsat(phase1.thermo().p());
|
Tf = saturationModel_->Tsat(phase1.thermo().p());
|
||||||
|
|
||||||
scalar iDmdtRelax(this->mesh().fieldRelaxationFactor("iDmdt"));
|
iDmdtNew =
|
||||||
|
(H1*(Tf - T1) + H2*(Tf - T2))/L;
|
||||||
|
|
||||||
iDmdt =
|
|
||||||
(1 - iDmdtRelax)*iDmdt
|
|
||||||
+ iDmdtRelax*(H1*(Tf - T1) + H2*(Tf - T2))
|
|
||||||
/min
|
|
||||||
(
|
|
||||||
(pos(iDmdt)*he2 + neg(iDmdt)*hef2)
|
|
||||||
- (neg(iDmdt)*he1 + pos(iDmdt)*hef1),
|
|
||||||
0.3*mag(hef2 - hef1)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "iDmdt." << pair.name()
|
|
||||||
<< ": min = " << min(iDmdt.primitiveField())
|
|
||||||
<< ", mean = " << average(iDmdt.primitiveField())
|
|
||||||
<< ", max = " << max(iDmdt.primitiveField())
|
|
||||||
<< ", integral = " << fvc::domainIntegrate(iDmdt).value()
|
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iDmdt == dimensionedScalar("0", dmdt.dimensions(), 0);
|
iDmdtNew == dimensionedScalar("0",dmdt.dimensions(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField H1(this->heatTransferModels_[pair][pair.first()]->K());
|
volScalarField H1(this->heatTransferModels_[pair][pair.first()]->K());
|
||||||
@ -423,16 +420,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
H2.boundaryFieldRef() =
|
H2.boundaryFieldRef() =
|
||||||
max(H2.boundaryField(), phase2.boundaryField()*HLimit);
|
max(H2.boundaryField(), phase2.boundaryField()*HLimit);
|
||||||
|
|
||||||
volScalarField mDotL
|
Tf = (H1*T1 + H2*T2 + iDmdtNew*L)/(H1 + H2);
|
||||||
(
|
|
||||||
iDmdt*
|
|
||||||
(
|
|
||||||
(pos(iDmdt)*he2 + neg(iDmdt)*hef2)
|
|
||||||
- (neg(iDmdt)*he1 + pos(iDmdt)*hef1)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Tf = (H1*T1 + H2*T2 + mDotL)/(H1 + H2);
|
|
||||||
|
|
||||||
Info<< "Tf." << pair.name()
|
Info<< "Tf." << pair.name()
|
||||||
<< ": min = " << min(Tf.primitiveField())
|
<< ": min = " << min(Tf.primitiveField())
|
||||||
@ -440,6 +428,19 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
<< ", max = " << max(Tf.primitiveField())
|
<< ", max = " << max(Tf.primitiveField())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
scalar iDmdtRelax(this->mesh().fieldRelaxationFactor("iDmdt"));
|
||||||
|
iDmdt = (1 - iDmdtRelax)*iDmdt + iDmdtRelax*iDmdtNew;
|
||||||
|
|
||||||
|
if (massTransfer_ )
|
||||||
|
{
|
||||||
|
Info<< "iDmdt." << pair.name()
|
||||||
|
<< ": min = " << min(iDmdt.primitiveField())
|
||||||
|
<< ", mean = " << average(iDmdt.primitiveField())
|
||||||
|
<< ", max = " << max(iDmdt.primitiveField())
|
||||||
|
<< ", integral = " << fvc::domainIntegrate(iDmdt).value()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Accumulate dmdt contributions from boundaries
|
// Accumulate dmdt contributions from boundaries
|
||||||
volScalarField wDmdt
|
volScalarField wDmdt
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -165,6 +165,24 @@ bool Foam::phaseModel::compressible() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const
|
||||||
|
{
|
||||||
|
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
|
||||||
|
const volScalarField::Boundary& alphaBf = boundaryField();
|
||||||
|
const surfaceScalarField::Boundary& phiBf = phi()().boundaryField();
|
||||||
|
|
||||||
|
forAll(alphaPhiBf, patchi)
|
||||||
|
{
|
||||||
|
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
|
||||||
|
|
||||||
|
if (!alphaPhip.coupled())
|
||||||
|
{
|
||||||
|
alphaPhip = phiBf[patchi]*alphaBf[patchi];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::tmp<Foam::volScalarField>& Foam::phaseModel::divU() const
|
const Foam::tmp<Foam::volScalarField>& Foam::phaseModel::divU() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -283,6 +283,9 @@ public:
|
|||||||
//- Access the mass flux of the phase
|
//- Access the mass flux of the phase
|
||||||
virtual surfaceScalarField& alphaRhoPhi() = 0;
|
virtual surfaceScalarField& alphaRhoPhi() = 0;
|
||||||
|
|
||||||
|
//- Ensure that the flux at inflow/outflow BCs is preserved
|
||||||
|
void correctInflowOutflow(surfaceScalarField& alphaPhi) const;
|
||||||
|
|
||||||
|
|
||||||
// Transport
|
// Transport
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -76,9 +76,7 @@ void Foam::phaseSystem::generatePairs
|
|||||||
|
|
||||||
// pair already exists
|
// pair already exists
|
||||||
if (phasePairs_.found(key))
|
if (phasePairs_.found(key))
|
||||||
{
|
{}
|
||||||
// do nothing ...
|
|
||||||
}
|
|
||||||
|
|
||||||
// new ordered pair
|
// new ordered pair
|
||||||
else if (key.ordered())
|
else if (key.ordered())
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,15 +71,17 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
{
|
{
|
||||||
bool LTS = fv::localEulerDdt::enabled(mesh_);
|
bool LTS = fv::localEulerDdt::enabled(mesh_);
|
||||||
|
|
||||||
|
forAll(phases(), phasei)
|
||||||
|
{
|
||||||
|
phases()[phasei].correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
PtrList<surfaceScalarField> alphaPhiCorrs(phases().size());
|
PtrList<surfaceScalarField> alphaPhiCorrs(phases().size());
|
||||||
forAll(phases(), phasei)
|
forAll(phases(), phasei)
|
||||||
{
|
{
|
||||||
phaseModel& phase = phases()[phasei];
|
phaseModel& phase = phases()[phasei];
|
||||||
volScalarField& alpha1 = phase;
|
volScalarField& alpha1 = phase;
|
||||||
|
|
||||||
phase.alphaPhi() =
|
|
||||||
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
|
|
||||||
|
|
||||||
alphaPhiCorrs.set
|
alphaPhiCorrs.set
|
||||||
(
|
(
|
||||||
phasei,
|
phasei,
|
||||||
@ -134,28 +136,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField::Boundary& alphaPhiCorrBf =
|
phase.correctInflowOutflow(alphaPhiCorr);
|
||||||
alphaPhiCorr.boundaryFieldRef();
|
|
||||||
|
|
||||||
// Ensure that the flux at inflow BCs is preserved
|
|
||||||
forAll(alphaPhiCorr.boundaryField(), patchi)
|
|
||||||
{
|
|
||||||
fvsPatchScalarField& alphaPhiCorrp = alphaPhiCorrBf[patchi];
|
|
||||||
|
|
||||||
if (!alphaPhiCorrp.coupled())
|
|
||||||
{
|
|
||||||
const scalarField& phi1p = phase.phi().boundaryField()[patchi];
|
|
||||||
const scalarField& alpha1p = alpha1.boundaryField()[patchi];
|
|
||||||
|
|
||||||
forAll(alphaPhiCorrp, facei)
|
|
||||||
{
|
|
||||||
if (phi1p[facei] < 0)
|
|
||||||
{
|
|
||||||
alphaPhiCorrp[facei] = alpha1p[facei]*phi1p[facei];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LTS)
|
if (LTS)
|
||||||
{
|
{
|
||||||
@ -215,8 +196,9 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
phaseModel& phase = phases()[phasei];
|
phaseModel& phase = phases()[phasei];
|
||||||
volScalarField& alpha = phase;
|
volScalarField& alpha = phase;
|
||||||
|
|
||||||
surfaceScalarField& alphaPhic = alphaPhiCorrs[phasei];
|
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
|
||||||
alphaPhic += upwind<scalar>(mesh_, phi_).flux(phase);
|
alphaPhi += upwind<scalar>(mesh_, phi_).flux(phase);
|
||||||
|
phase.correctInflowOutflow(alphaPhi);
|
||||||
|
|
||||||
volScalarField::Internal Sp
|
volScalarField::Internal Sp
|
||||||
(
|
(
|
||||||
@ -298,12 +280,12 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
alpha,
|
alpha,
|
||||||
alphaPhic,
|
alphaPhi,
|
||||||
Sp,
|
Sp,
|
||||||
Su
|
Su
|
||||||
);
|
);
|
||||||
|
|
||||||
phase.alphaPhi() += alphaPhic;
|
phase.alphaPhi() = alphaPhi;
|
||||||
|
|
||||||
Info<< phase.name() << " volume fraction, min, max = "
|
Info<< phase.name() << " volume fraction, min, max = "
|
||||||
<< phase.weightedAverage(mesh_.V()).value()
|
<< phase.weightedAverage(mesh_.V()).value()
|
||||||
@ -319,6 +301,14 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
<< ' ' << min(sumAlpha).value()
|
<< ' ' << min(sumAlpha).value()
|
||||||
<< ' ' << max(sumAlpha).value()
|
<< ' ' << max(sumAlpha).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
// Correct the sum of the phase-fractions to avoid 'drift'
|
||||||
|
volScalarField sumCorr(1.0 - sumAlpha);
|
||||||
|
forAll(phases(), phasei)
|
||||||
|
{
|
||||||
|
volScalarField& alpha = phases()[phasei];
|
||||||
|
alpha += alpha*sumCorr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,9 @@ License
|
|||||||
#include "saturationModel.H"
|
#include "saturationModel.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
#include "uniformDimensionedFields.H"
|
#include "uniformDimensionedFields.H"
|
||||||
|
#include "mathematicalConstants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant::mathematical;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -157,6 +159,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
(
|
(
|
||||||
dict.subDict("departureFreqModel")
|
dict.subDict("departureFreqModel")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (dict.found("dDep"))
|
||||||
|
{
|
||||||
|
dDep_ = scalarField("dDep", dict, p.size());
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,10 +267,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
// Lookup the fluid model
|
// Lookup the fluid model
|
||||||
const ThermalPhaseChangePhaseSystem
|
const ThermalPhaseChangePhaseSystem
|
||||||
<
|
<
|
||||||
MomentumTransferPhaseSystem
|
MomentumTransferPhaseSystem<twoPhaseSystem>
|
||||||
<
|
>& fluid =
|
||||||
twoPhaseSystem>
|
refCast
|
||||||
>& fluid = refCast
|
|
||||||
<
|
<
|
||||||
const ThermalPhaseChangePhaseSystem
|
const ThermalPhaseChangePhaseSystem
|
||||||
<
|
<
|
||||||
@ -477,9 +484,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const scalarField Ja(rhoLiquidw*Cpw*Tsub/(rhoVaporw*L));
|
const scalarField Ja(rhoLiquidw*Cpw*Tsub/(rhoVaporw*L));
|
||||||
const scalarField Al(fLiquid*4.8*exp(-Ja/80));
|
const scalarField Al(fLiquid*4.8*exp(-Ja/80));
|
||||||
|
|
||||||
const scalarField A2(min(M_PI*sqr(dDep_)*N*Al/4, scalar(1)));
|
const scalarField A2(min(pi*sqr(dDep_)*N*Al/4, scalar(1)));
|
||||||
const scalarField A1(max(1 - A2, scalar(1e-4)));
|
const scalarField A1(max(1 - A2, scalar(1e-4)));
|
||||||
const scalarField A2E(min(M_PI*sqr(dDep_)*N*Al/4, scalar(5)));
|
const scalarField A2E(min(pi*sqr(dDep_)*N*Al/4, scalar(5)));
|
||||||
|
|
||||||
// Wall evaporation heat flux [kg/s3 = J/m2s]
|
// Wall evaporation heat flux [kg/s3 = J/m2s]
|
||||||
const scalarField Qe((1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*L);
|
const scalarField Qe((1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*L);
|
||||||
@ -495,7 +502,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
// Quenching heat transfer coefficient
|
// Quenching heat transfer coefficient
|
||||||
const scalarField hQ
|
const scalarField hQ
|
||||||
(
|
(
|
||||||
2*(alphaw*Cpw)*fDep*sqrt((0.8/fDep)/(M_PI*alphaw/rhow))
|
2*(alphaw*Cpw)*fDep*sqrt((0.8/fDep)/(pi*alphaw/rhow))
|
||||||
);
|
);
|
||||||
|
|
||||||
// Quenching heat flux
|
// Quenching heat flux
|
||||||
@ -622,11 +629,13 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||||
departureFreqModel_->write(os);
|
departureFreqModel_->write(os);
|
||||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dmdt_.writeEntry("dmdt", os);
|
dmdt_.writeEntry("dmdt", os);
|
||||||
|
dDep_.writeEntry("dDep", os);
|
||||||
alphatConv_.writeEntry("alphatConv", os);
|
alphatConv_.writeEntry("alphatConv", os);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -269,7 +269,7 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Calculate and return the departure diameter field
|
//- Return the departure diameter field
|
||||||
const scalarField& dDeparture() const
|
const scalarField& dDeparture() const
|
||||||
{
|
{
|
||||||
return dDep_;
|
return dDep_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -201,7 +201,6 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
word alphaScheme("div(phi," + alpha1.name() + ')');
|
word alphaScheme("div(phi," + alpha1.name() + ')');
|
||||||
word alpharScheme("div(phir," + alpha1.name() + ')');
|
word alpharScheme("div(phir," + alpha1.name() + ')');
|
||||||
|
|
||||||
const surfaceScalarField& phi = this->phi();
|
|
||||||
const surfaceScalarField& phi1 = phase1_.phi();
|
const surfaceScalarField& phi1 = phase1_.phi();
|
||||||
const surfaceScalarField& phi2 = phase2_.phi();
|
const surfaceScalarField& phi2 = phase2_.phi();
|
||||||
|
|
||||||
@ -236,9 +235,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
alpha1.correctBoundaryConditions();
|
alpha1.correctBoundaryConditions();
|
||||||
surfaceScalarField alpha1f(fvc::interpolate(max(alpha1, scalar(0))));
|
|
||||||
|
|
||||||
surfaceScalarField phic("phic", phi);
|
|
||||||
surfaceScalarField phir("phir", phi1 - phi2);
|
surfaceScalarField phir("phir", phi1 - phi2);
|
||||||
|
|
||||||
tmp<surfaceScalarField> alphaDbyA;
|
tmp<surfaceScalarField> alphaDbyA;
|
||||||
@ -279,7 +276,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
),
|
),
|
||||||
// Divergence term is handled explicitly to be
|
// Divergence term is handled explicitly to be
|
||||||
// consistent with the explicit transport solution
|
// consistent with the explicit transport solution
|
||||||
fvc::div(phi)*min(alpha1, scalar(1))
|
fvc::div(phi_)*min(alpha1, scalar(1))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tdgdt.valid())
|
if (tdgdt.valid())
|
||||||
@ -300,11 +297,11 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField alphaPhic1
|
surfaceScalarField alphaPhi1
|
||||||
(
|
(
|
||||||
fvc::flux
|
fvc::flux
|
||||||
(
|
(
|
||||||
phic,
|
phi_,
|
||||||
alpha1,
|
alpha1,
|
||||||
alphaScheme
|
alphaScheme
|
||||||
)
|
)
|
||||||
@ -316,28 +313,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaceScalarField::Boundary& alphaPhic1Bf =
|
phase1_.correctInflowOutflow(alphaPhi1);
|
||||||
alphaPhic1.boundaryFieldRef();
|
|
||||||
|
|
||||||
// Ensure that the flux at inflow BCs is preserved
|
|
||||||
forAll(alphaPhic1Bf, patchi)
|
|
||||||
{
|
|
||||||
fvsPatchScalarField& alphaPhic1p = alphaPhic1Bf[patchi];
|
|
||||||
|
|
||||||
if (!alphaPhic1p.coupled())
|
|
||||||
{
|
|
||||||
const scalarField& phi1p = phi1.boundaryField()[patchi];
|
|
||||||
const scalarField& alpha1p = alpha1.boundaryField()[patchi];
|
|
||||||
|
|
||||||
forAll(alphaPhic1p, facei)
|
|
||||||
{
|
|
||||||
if (phi1p[facei] < 0)
|
|
||||||
{
|
|
||||||
alphaPhic1p[facei] = alpha1p[facei]*phi1p[facei];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
@ -355,14 +331,14 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
!(++alphaSubCycle).end();
|
!(++alphaSubCycle).end();
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
surfaceScalarField alphaPhic10(alphaPhic1);
|
surfaceScalarField alphaPhi10(alphaPhi1);
|
||||||
|
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
alpha1,
|
alpha1,
|
||||||
phi,
|
phi_,
|
||||||
alphaPhic10,
|
alphaPhi10,
|
||||||
(alphaSubCycle.index()*Sp)(),
|
(alphaSubCycle.index()*Sp)(),
|
||||||
(Su - (alphaSubCycle.index() - 1)*Sp*alpha1)(),
|
(Su - (alphaSubCycle.index() - 1)*Sp*alpha1)(),
|
||||||
phase1_.alphaMax(),
|
phase1_.alphaMax(),
|
||||||
@ -371,11 +347,11 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
|
|
||||||
if (alphaSubCycle.index() == 1)
|
if (alphaSubCycle.index() == 1)
|
||||||
{
|
{
|
||||||
phase1_.alphaPhi() = alphaPhic10;
|
phase1_.alphaPhi() = alphaPhi10;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
phase1_.alphaPhi() += alphaPhic10;
|
phase1_.alphaPhi() += alphaPhi10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,15 +363,15 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
alpha1,
|
alpha1,
|
||||||
phi,
|
phi_,
|
||||||
alphaPhic1,
|
alphaPhi1,
|
||||||
Sp,
|
Sp,
|
||||||
Su,
|
Su,
|
||||||
phase1_.alphaMax(),
|
phase1_.alphaMax(),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
phase1_.alphaPhi() = alphaPhic1;
|
phase1_.alphaPhi() = alphaPhi1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alphaDbyA.valid())
|
if (alphaDbyA.valid())
|
||||||
@ -415,8 +391,8 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
phase1_.alphaRhoPhi() =
|
phase1_.alphaRhoPhi() =
|
||||||
fvc::interpolate(phase1_.rho())*phase1_.alphaPhi();
|
fvc::interpolate(phase1_.rho())*phase1_.alphaPhi();
|
||||||
|
|
||||||
phase2_.alphaPhi() = phi - phase1_.alphaPhi();
|
phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
|
||||||
alpha2 = scalar(1) - alpha1;
|
phase2_.correctInflowOutflow(phase2_.alphaPhi());
|
||||||
phase2_.alphaRhoPhi() =
|
phase2_.alphaRhoPhi() =
|
||||||
fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();
|
fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();
|
||||||
|
|
||||||
@ -425,6 +401,13 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
<< " Min(alpha1) = " << min(alpha1).value()
|
<< " Min(alpha1) = " << min(alpha1).value()
|
||||||
<< " Max(alpha1) = " << max(alpha1).value()
|
<< " Max(alpha1) = " << max(alpha1).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
// Ensure the phase-fractions are bounded
|
||||||
|
alpha1.max(0);
|
||||||
|
alpha1.min(1);
|
||||||
|
|
||||||
|
// Update the phase-fraction of the other phase
|
||||||
|
alpha2 = scalar(1) - alpha1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -248,27 +248,19 @@ bool Foam::phaseModel::read(const dictionary& phaseProperties)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::phaseModel::correctInflowFlux(surfaceScalarField& alphaPhi) const
|
void Foam::phaseModel::correctInflowOutflow(surfaceScalarField& alphaPhi) const
|
||||||
{
|
{
|
||||||
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
|
surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef();
|
||||||
|
const volScalarField::Boundary& alphaBf = boundaryField();
|
||||||
|
const surfaceScalarField::Boundary& phiBf = phi().boundaryField();
|
||||||
|
|
||||||
// Ensure that the flux at inflow BCs is preserved
|
|
||||||
forAll(alphaPhiBf, patchi)
|
forAll(alphaPhiBf, patchi)
|
||||||
{
|
{
|
||||||
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
|
fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi];
|
||||||
|
|
||||||
if (!alphaPhip.coupled())
|
if (!alphaPhip.coupled())
|
||||||
{
|
{
|
||||||
const scalarField& phip = phi().boundaryField()[patchi];
|
alphaPhip = phiBf[patchi]*alphaBf[patchi];
|
||||||
const scalarField& alphap = boundaryField()[patchi];
|
|
||||||
|
|
||||||
forAll(alphaPhip, facei)
|
|
||||||
{
|
|
||||||
if (phip[facei] < SMALL)
|
|
||||||
{
|
|
||||||
alphaPhip[facei] = alphap[facei]*phip[facei];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -319,8 +319,8 @@ public:
|
|||||||
return alphaRhoPhi_;
|
return alphaRhoPhi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Ensure that the flux at inflow BCs is preserved
|
//- Ensure that the flux at inflow/outflow BCs is preserved
|
||||||
void correctInflowFlux(surfaceScalarField& alphaPhi) const;
|
void correctInflowOutflow(surfaceScalarField& alphaPhi) const;
|
||||||
|
|
||||||
//- Correct the phase properties
|
//- Correct the phase properties
|
||||||
// other than the thermodynamics and turbulence
|
// other than the thermodynamics and turbulence
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -444,7 +444,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
phase1_.correctInflowFlux(alphaPhic1);
|
phase1_.correctInflowOutflow(alphaPhic1);
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
@ -515,8 +515,7 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
fvc::interpolate(phase1_.rho())*phase1_.alphaPhi();
|
fvc::interpolate(phase1_.rho())*phase1_.alphaPhi();
|
||||||
|
|
||||||
phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
|
phase2_.alphaPhi() = phi_ - phase1_.alphaPhi();
|
||||||
alpha2 = scalar(1) - alpha1;
|
phase2_.correctInflowOutflow(phase2_.alphaPhi());
|
||||||
phase2_.correctInflowFlux(phase2_.alphaPhi());
|
|
||||||
phase2_.alphaRhoPhi() =
|
phase2_.alphaRhoPhi() =
|
||||||
fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();
|
fvc::interpolate(phase2_.rho())*phase2_.alphaPhi();
|
||||||
|
|
||||||
@ -525,6 +524,12 @@ void Foam::twoPhaseSystem::solve()
|
|||||||
<< " Min(" << alpha1.name() << ") = " << min(alpha1).value()
|
<< " Min(" << alpha1.name() << ") = " << min(alpha1).value()
|
||||||
<< " Max(" << alpha1.name() << ") = " << max(alpha1).value()
|
<< " Max(" << alpha1.name() << ") = " << max(alpha1).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
// Ensure the phase-fractions are bounded
|
||||||
|
alpha1.max(0);
|
||||||
|
alpha1.min(1);
|
||||||
|
|
||||||
|
alpha2 = scalar(1) - alpha1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,4 +62,3 @@ int main()
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -48,4 +48,3 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
||||||
|
|
||||||
|
|||||||
@ -48,4 +48,3 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
Info<< "\nTime [" << timeName << "] = " << runTime.timeName() << nl;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -468,7 +468,8 @@ void readCells
|
|||||||
IOWarningInFunction(is)
|
IOWarningInFunction(is)
|
||||||
<< "Cell type " << feID << " not supported" << endl;
|
<< "Cell type " << feID << " not supported" << endl;
|
||||||
}
|
}
|
||||||
is.getLine(line); // Do nothing
|
|
||||||
|
is.getLine(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -82,6 +82,11 @@ int main(int argc, char *argv[])
|
|||||||
"blockTopology",
|
"blockTopology",
|
||||||
"write block edges and centres as .obj files"
|
"write block edges and centres as .obj files"
|
||||||
);
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noClean",
|
||||||
|
"keep the existing files in the polyMesh"
|
||||||
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"dict",
|
"dict",
|
||||||
@ -171,6 +176,30 @@ int main(int argc, char *argv[])
|
|||||||
dictPath = runTime.system()/regionPath/dictName;
|
dictPath = runTime.system()/regionPath/dictName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!args.optionFound("noClean"))
|
||||||
|
{
|
||||||
|
fileName polyMeshPath
|
||||||
|
(
|
||||||
|
runTime.path()/runTime.constant()/regionPath/polyMesh::meshSubDir
|
||||||
|
);
|
||||||
|
|
||||||
|
if (exists(polyMeshPath))
|
||||||
|
{
|
||||||
|
if (exists(polyMeshPath/dictName))
|
||||||
|
{
|
||||||
|
Info<< "Not deleting polyMesh directory " << nl
|
||||||
|
<< " " << polyMeshPath << nl
|
||||||
|
<< " because it contains " << dictName << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Deleting polyMesh directory" << nl
|
||||||
|
<< " " << polyMeshPath << endl;
|
||||||
|
rmDir(polyMeshPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IOobject meshDictIO
|
IOobject meshDictIO
|
||||||
(
|
(
|
||||||
dictPath,
|
dictPath,
|
||||||
|
|||||||
@ -666,15 +666,6 @@ void writeMesh
|
|||||||
}
|
}
|
||||||
refinementHistory::removeFiles(mesh);
|
refinementHistory::removeFiles(mesh);
|
||||||
|
|
||||||
//label flag = meshRefinement::MESH;
|
|
||||||
//if (writeLevel)
|
|
||||||
//{
|
|
||||||
// flag |= meshRefinement::SCALARLEVELS;
|
|
||||||
//}
|
|
||||||
//if (debug & meshRefinement::OBJINTERSECTIONS)
|
|
||||||
//{
|
|
||||||
// flag |= meshRefinement::OBJINTERSECTIONS;
|
|
||||||
//}
|
|
||||||
meshRefiner.write
|
meshRefiner.write
|
||||||
(
|
(
|
||||||
debugLevel,
|
debugLevel,
|
||||||
@ -726,117 +717,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
autoPtr<fvMesh> meshPtr;
|
autoPtr<fvMesh> meshPtr;
|
||||||
|
|
||||||
// if (surfaceSimplify)
|
|
||||||
// {
|
|
||||||
// IOdictionary foamyHexMeshDict
|
|
||||||
// (
|
|
||||||
// IOobject
|
|
||||||
// (
|
|
||||||
// "foamyHexMeshDict",
|
|
||||||
// runTime.system(),
|
|
||||||
// runTime,
|
|
||||||
// IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
// IOobject::NO_WRITE
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// const dictionary& motionDict =
|
|
||||||
// foamyHexMeshDict.subDict("motionControl");
|
|
||||||
//
|
|
||||||
// const scalar defaultCellSize =
|
|
||||||
// readScalar(motionDict.lookup("defaultCellSize"));
|
|
||||||
//
|
|
||||||
// Info<< "Constructing single cell mesh from boundBox" << nl << endl;
|
|
||||||
//
|
|
||||||
// boundBox bb(args.optionRead<boundBox>("surfaceSimplify"));
|
|
||||||
//
|
|
||||||
// labelList owner(6, label(0));
|
|
||||||
// labelList neighbour(0);
|
|
||||||
//
|
|
||||||
// const cellModel& hexa = *(cellModeller::lookup("hex"));
|
|
||||||
// faceList faces = hexa.modelFaces();
|
|
||||||
//
|
|
||||||
// meshPtr.set
|
|
||||||
// (
|
|
||||||
// new fvMesh
|
|
||||||
// (
|
|
||||||
// IOobject
|
|
||||||
// (
|
|
||||||
// fvMesh::defaultRegion,
|
|
||||||
// runTime.timeName(),
|
|
||||||
// runTime,
|
|
||||||
// IOobject::NO_READ
|
|
||||||
// ),
|
|
||||||
// xferMove<Field<vector>>(bb.points()()),
|
|
||||||
// faces.xfer(),
|
|
||||||
// owner.xfer(),
|
|
||||||
// neighbour.xfer()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// List<polyPatch*> patches(1);
|
|
||||||
//
|
|
||||||
// patches[0] = new wallPolyPatch
|
|
||||||
// (
|
|
||||||
// "boundary",
|
|
||||||
// 6,
|
|
||||||
// 0,
|
|
||||||
// 0,
|
|
||||||
// meshPtr().boundaryMesh(),
|
|
||||||
// wallPolyPatch::typeName
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// meshPtr().addFvPatches(patches);
|
|
||||||
//
|
|
||||||
// const scalar initialCellSize = ::pow(meshPtr().V()[0], 1.0/3.0);
|
|
||||||
// const label initialRefLevels =
|
|
||||||
// ::log(initialCellSize/defaultCellSize)/::log(2);
|
|
||||||
//
|
|
||||||
// Info<< "Default cell size = " << defaultCellSize << endl;
|
|
||||||
// Info<< "Initial cell size = " << initialCellSize << endl;
|
|
||||||
//
|
|
||||||
// Info<< "Initial refinement levels = " << initialRefLevels << endl;
|
|
||||||
//
|
|
||||||
// Info<< "Mesh starting size = " << meshPtr().nCells() << endl;
|
|
||||||
//
|
|
||||||
// // meshCutter must be destroyed before writing the mesh otherwise it
|
|
||||||
// // writes the cellLevel/pointLevel files
|
|
||||||
// {
|
|
||||||
// hexRef8 meshCutter(meshPtr(), false);
|
|
||||||
//
|
|
||||||
// for (label refinei = 0; refinei < initialRefLevels; ++refinei)
|
|
||||||
// {
|
|
||||||
// // Mesh changing engine.
|
|
||||||
// polyTopoChange meshMod(meshPtr(), true);
|
|
||||||
//
|
|
||||||
// // Play refinement commands into mesh changer.
|
|
||||||
// meshCutter.setRefinement
|
|
||||||
// (
|
|
||||||
// identity(meshPtr().nCells()),
|
|
||||||
// meshMod
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// // Create mesh (no inflation), return map from old to new mesh
|
|
||||||
// autoPtr<mapPolyMesh> map =
|
|
||||||
// meshMod.changeMesh(meshPtr(), false);
|
|
||||||
//
|
|
||||||
// // Update fields
|
|
||||||
// meshPtr().updateMesh(map);
|
|
||||||
//
|
|
||||||
// // Delete mesh volumes.
|
|
||||||
// meshPtr().clearOut();
|
|
||||||
//
|
|
||||||
// Info<< "Refinement Iteration " << refinei + 1
|
|
||||||
// << ", Mesh size = " << meshPtr().nCells() << endl;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Info<< "Mesh end size = " << meshPtr().nCells() << endl;
|
|
||||||
//
|
|
||||||
// Info<< "Create mesh" << endl;
|
|
||||||
// meshPtr().write();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
{
|
{
|
||||||
word regionName;
|
word regionName;
|
||||||
if (args.optionReadIfPresent("region", regionName))
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -87,10 +87,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "createNamedPolyMesh.H"
|
#include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
|
const fileName setsSubPath(mesh.dbDir()/polyMesh::meshSubDir/"sets");
|
||||||
|
|
||||||
// Search for list of objects for the time of the mesh
|
// Search for list of objects for the time of the mesh
|
||||||
word setsInstance = runTime.findInstance
|
word setsInstance = runTime.findInstance
|
||||||
(
|
(
|
||||||
polyMesh::meshSubDir/"sets",
|
setsSubPath,
|
||||||
word::null,
|
word::null,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
mesh.facesInstance()
|
mesh.facesInstance()
|
||||||
@ -98,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
IOobjectList objects(mesh, setsInstance, polyMesh::meshSubDir/"sets");
|
IOobjectList objects(mesh, setsInstance, polyMesh::meshSubDir/"sets");
|
||||||
|
|
||||||
Info<< "Searched : " << setsInstance/polyMesh::meshSubDir/"sets"
|
Info<< "Searched : " << setsInstance/setsSubPath
|
||||||
<< nl
|
<< nl
|
||||||
<< "Found : " << objects.names() << nl
|
<< "Found : " << objects.names() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -142,9 +142,7 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundFixed)
|
if (!foundFixed)
|
||||||
|
|||||||
@ -114,4 +114,3 @@ if (timeDirs.size())
|
|||||||
volumeFields.erase(missing);
|
volumeFields.erase(missing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -100,4 +100,3 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
// Do nothing
|
|
||||||
void USERD_exit_routine
|
void USERD_exit_routine
|
||||||
(
|
(
|
||||||
void
|
void
|
||||||
@ -10,4 +9,3 @@ void USERD_exit_routine
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,4 +8,3 @@ int USERD_get_changing_geometry_status(void)
|
|||||||
// Choose the most general option
|
// Choose the most general option
|
||||||
return Z_CHANGE_CONN;
|
return Z_CHANGE_CONN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,4 +29,3 @@ int USERD_get_descrip_lines
|
|||||||
#endif
|
#endif
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,4 +8,3 @@ int USERD_get_element_label_status(void)
|
|||||||
#endif
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -118,6 +118,3 @@ int USERD_get_gold_variable_info
|
|||||||
|
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,4 +9,3 @@ int USERD_get_node_label_status(void)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,4 +41,3 @@ int USERD_get_sol_times
|
|||||||
|
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -68,4 +68,3 @@ int USERD_get_var_value_at_specific
|
|||||||
#endif
|
#endif
|
||||||
return Z_OK;
|
return Z_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,4 +59,3 @@ int USERD_get_block_ghost_flags
|
|||||||
{
|
{
|
||||||
return(Z_OK);
|
return(Z_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,4 +32,3 @@ else
|
|||||||
// Info<< "getLagrangianScalar: nVar = " << nVar << endl;
|
// Info<< "getLagrangianScalar: nVar = " << nVar << endl;
|
||||||
return Z_UNDEF;
|
return Z_UNDEF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,4 +44,3 @@ else
|
|||||||
// Info<< "getLagrangianVector: nVar = " << nVar << endl;
|
// Info<< "getLagrangianVector: nVar = " << nVar << endl;
|
||||||
return Z_UNDEF;
|
return Z_UNDEF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,4 +45,3 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalarField samples(nIntervals, 0);
|
scalarField samples(nIntervals, 0);
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -29,7 +29,7 @@
|
|||||||
# Deprecated script extract the 'ExecutionTime' for each time-step from a
|
# Deprecated script extract the 'ExecutionTime' for each time-step from a
|
||||||
# log file for graphing.
|
# log file for graphing.
|
||||||
#
|
#
|
||||||
# Superceded by the more general foamLog script.
|
# Superseded by the more general foamLog script.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -29,7 +29,7 @@
|
|||||||
# Deprecated script extract initial turbulence residuals for each time-step
|
# Deprecated script extract initial turbulence residuals for each time-step
|
||||||
# from a log file for graphing.
|
# from a log file for graphing.
|
||||||
#
|
#
|
||||||
# Superceded by the more general foamLog script.
|
# Superseded by the more general foamLog script.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -29,7 +29,7 @@
|
|||||||
# Deprecated script extract initial velocity and pressure residuals for each
|
# Deprecated script extract initial velocity and pressure residuals for each
|
||||||
# time-step from a log file for graphing.
|
# time-step from a log file for graphing.
|
||||||
#
|
#
|
||||||
# Superceded by the more general foamLog script.
|
# Superseded by the more general foamLog script.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
echo $Script "has been superceded by the -postProcess solver option:"
|
echo $Script "has been superseded by the -postProcess solver option:"
|
||||||
echo "<solverName> -funcs '(R components(turbulenceProperties:R))'"
|
echo "<solverName> -funcs '(R components(turbulenceProperties:R))'"
|
||||||
echo "e.g."
|
echo "e.g."
|
||||||
echo "simpleFoam -postProcess -funcs '(R components(turbulenceProperties:R))'"
|
echo "simpleFoam -postProcess -funcs '(R components(turbulenceProperties:R))'"
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
echo $Script "has been superceded by the postProcess utility:"
|
echo $Script "has been superseded by the postProcess utility:"
|
||||||
echo " postProcess -func 'grad(U)'"
|
echo " postProcess -func 'grad(U)'"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
2
bin/wdot
2
bin/wdot
@ -31,7 +31,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
Script=${0##*/}
|
||||||
|
|
||||||
echo $Script "has been superceded by the postProcess utility:"
|
echo $Script "has been superseded by the postProcess utility:"
|
||||||
echo "postProcess -func XiReactionRate"
|
echo "postProcess -func XiReactionRate"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -51,7 +51,6 @@ wmake $targetType sampling
|
|||||||
wmake $targetType dynamicFvMesh
|
wmake $targetType dynamicFvMesh
|
||||||
wmake $targetType sampling
|
wmake $targetType sampling
|
||||||
wmake $targetType topoChangerFvMesh
|
wmake $targetType topoChangerFvMesh
|
||||||
wmake $targetType sampling
|
|
||||||
|
|
||||||
# Compile scotchDecomp, metisDecomp etc.
|
# Compile scotchDecomp, metisDecomp etc.
|
||||||
parallel/Allwmake $targetType $*
|
parallel/Allwmake $targetType $*
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,4 +31,3 @@ void Foam::error::printStack(Ostream& os)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -341,4 +341,3 @@ void inplaceRotateList(ListType<DataType>& list, label n);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
//- Return the name of the given enumeration element
|
//- Return the name of the given enumeration element
|
||||||
const char* operator[](const Enum e) const
|
const char* operator[](const Enum e) const
|
||||||
{
|
{
|
||||||
return names[e];
|
return names[int(e)];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
|||||||
that what they have is not the original version, so that the original
|
that what they have is not the original version, so that the original
|
||||||
author's reputation will not be affected by problems that might be
|
author's reputation will not be affected by problems that might be
|
||||||
introduced by others.
|
introduced by others.
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
Finally, software patents pose a constant threat to the existence of
|
||||||
any free program. We wish to make sure that a company cannot
|
any free program. We wish to make sure that a company cannot
|
||||||
effectively restrict the users of a free program by obtaining a
|
effectively restrict the users of a free program by obtaining a
|
||||||
@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
|||||||
"work based on the library" and a "work that uses the library". The
|
"work based on the library" and a "work that uses the library". The
|
||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ Library.
|
|||||||
You may charge a fee for the physical act of transferring a copy,
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
and you may at your option offer warranty protection in exchange for a
|
and you may at your option offer warranty protection in exchange for a
|
||||||
fee.
|
fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
of it, thus forming a work based on the Library, and copy and
|
of it, thus forming a work based on the Library, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
|||||||
ordinary GNU General Public License has appeared, then you can specify
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
that version instead if you wish.) Do not make any other change in
|
that version instead if you wish.) Do not make any other change in
|
||||||
these notices.
|
these notices.
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
Once this change is made in a given copy, it is irreversible for
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
subsequent copies and derivative works made from that copy.
|
subsequent copies and derivative works made from that copy.
|
||||||
@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
|||||||
distribute the object code for the work under the terms of Section 6.
|
distribute the object code for the work under the terms of Section 6.
|
||||||
Any executables containing that work also fall under Section 6,
|
Any executables containing that work also fall under Section 6,
|
||||||
whether or not they are linked directly with the Library itself.
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
6. As an exception to the Sections above, you may also combine or
|
||||||
link a "work that uses the Library" with the Library to produce a
|
link a "work that uses the Library" with the Library to produce a
|
||||||
work containing portions of the Library, and distribute that work
|
work containing portions of the Library, and distribute that work
|
||||||
@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
|||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
use both them and the Library together in an executable that you
|
use both them and the Library together in an executable that you
|
||||||
distribute.
|
distribute.
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
7. You may place library facilities that are a work based on the
|
||||||
Library side-by-side in a single library together with other library
|
Library side-by-side in a single library together with other library
|
||||||
facilities not covered by this License, and distribute such a combined
|
facilities not covered by this License, and distribute such a combined
|
||||||
@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
|||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties with
|
You are not responsible for enforcing compliance by third parties with
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
|||||||
the Free Software Foundation. If the Library does not specify a
|
the Free Software Foundation. If the Library does not specify a
|
||||||
license version number, you may choose any version ever published by
|
license version number, you may choose any version ever published by
|
||||||
the Free Software Foundation.
|
the Free Software Foundation.
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
programs whose distribution conditions are incompatible with these,
|
programs whose distribution conditions are incompatible with these,
|
||||||
write to the author to ask for permission. For software which is
|
write to the author to ask for permission. For software which is
|
||||||
@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
If you develop a new library, and you want it to be of the greatest
|
||||||
@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
|||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
That's all there is to it!
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,4 +64,3 @@ dimensionedSphericalTensor inv(const dimensionedSphericalTensor&);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,4 +86,3 @@ dimensionedTensor operator*(const dimensionedVector&);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,4 +56,3 @@ typedef dimensioned<vector> dimensionedVector;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,4 +47,3 @@ namespace Foam
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,4 +47,3 @@ namespace Foam
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -151,16 +151,6 @@ realizableKE<BasicTurbulenceModel>::realizableKE
|
|||||||
transport,
|
transport,
|
||||||
propertiesName
|
propertiesName
|
||||||
),
|
),
|
||||||
|
|
||||||
Cmu_
|
|
||||||
(
|
|
||||||
dimensioned<scalar>::lookupOrAddToDict
|
|
||||||
(
|
|
||||||
"Cmu",
|
|
||||||
this->coeffDict_,
|
|
||||||
0.09
|
|
||||||
)
|
|
||||||
),
|
|
||||||
A0_
|
A0_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::lookupOrAddToDict
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
@ -240,7 +230,6 @@ bool realizableKE<BasicTurbulenceModel>::read()
|
|||||||
{
|
{
|
||||||
if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
|
if (eddyViscosity<RASModel<BasicTurbulenceModel>>::read())
|
||||||
{
|
{
|
||||||
Cmu_.readIfPresent(this->coeffDict());
|
|
||||||
A0_.readIfPresent(this->coeffDict());
|
A0_.readIfPresent(this->coeffDict());
|
||||||
C2_.readIfPresent(this->coeffDict());
|
C2_.readIfPresent(this->coeffDict());
|
||||||
sigmak_.readIfPresent(this->coeffDict());
|
sigmak_.readIfPresent(this->coeffDict());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,6 @@ Description
|
|||||||
\verbatim
|
\verbatim
|
||||||
realizableKECoeffs
|
realizableKECoeffs
|
||||||
{
|
{
|
||||||
Cmu 0.09;
|
|
||||||
A0 4.0;
|
A0 4.0;
|
||||||
C2 1.9;
|
C2 1.9;
|
||||||
sigmak 1.0;
|
sigmak 1.0;
|
||||||
@ -90,7 +89,6 @@ protected:
|
|||||||
|
|
||||||
// Model coefficients
|
// Model coefficients
|
||||||
|
|
||||||
dimensionedScalar Cmu_;
|
|
||||||
dimensionedScalar A0_;
|
dimensionedScalar A0_;
|
||||||
dimensionedScalar C2_;
|
dimensionedScalar C2_;
|
||||||
dimensionedScalar sigmak_;
|
dimensionedScalar sigmak_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "PaSR.H"
|
#include "PaSR.H"
|
||||||
#include "fvmSup.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,19 +38,18 @@ Foam::combustionModels::PaSR<Type>::PaSR
|
|||||||
:
|
:
|
||||||
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
|
laminar<Type>(modelType, mesh, combustionProperties, phaseName),
|
||||||
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
|
Cmix_(readScalar(this->coeffs().lookup("Cmix"))),
|
||||||
turbulentReaction_(this->coeffs().lookup("turbulentReaction")),
|
|
||||||
kappa_
|
kappa_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject::groupName("PaSR:kappa", phaseName),
|
IOobject::groupName(typeName + ":kappa", phaseName),
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("kappa", dimless, 0.0)
|
dimensionedScalar("kappa", dimless, 0)
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -72,20 +70,21 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
|||||||
{
|
{
|
||||||
laminar<Type>::correct();
|
laminar<Type>::correct();
|
||||||
|
|
||||||
if (turbulentReaction_)
|
|
||||||
{
|
|
||||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||||
const volScalarField& epsilon = tepsilon();
|
const scalarField& epsilon = tepsilon();
|
||||||
|
|
||||||
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
tmp<volScalarField> tmuEff(this->turbulence().muEff());
|
||||||
const volScalarField& muEff = tmuEff();
|
const scalarField& muEff = tmuEff();
|
||||||
|
|
||||||
tmp<volScalarField> ttc(this->tc());
|
tmp<volScalarField> ttc(this->tc());
|
||||||
const volScalarField& tc = ttc();
|
const scalarField& tc = ttc();
|
||||||
|
|
||||||
tmp<volScalarField> trho(this->rho());
|
tmp<volScalarField> trho(this->rho());
|
||||||
const volScalarField& rho = trho();
|
const scalarField& rho = trho();
|
||||||
|
|
||||||
forAll(epsilon, i)
|
forAll(epsilon, i)
|
||||||
{
|
{
|
||||||
scalar tk =
|
const scalar tk =
|
||||||
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
|
Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0));
|
||||||
|
|
||||||
if (tk > SMALL)
|
if (tk > SMALL)
|
||||||
@ -98,11 +97,6 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
kappa_ = 1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,7 +116,7 @@ Foam::combustionModels::PaSR<Type>::Qdot() const
|
|||||||
(
|
(
|
||||||
new volScalarField
|
new volScalarField
|
||||||
(
|
(
|
||||||
IOobject::groupName("PaSR:dQ", this->phaseName_),
|
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||||
kappa_*laminar<Type>::Qdot()
|
kappa_*laminar<Type>::Qdot()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -135,7 +129,6 @@ bool Foam::combustionModels::PaSR<Type>::read()
|
|||||||
if (laminar<Type>::read())
|
if (laminar<Type>::read())
|
||||||
{
|
{
|
||||||
this->coeffs().lookup("Cmix") >> Cmix_;
|
this->coeffs().lookup("Cmix") >> Cmix_;
|
||||||
this->coeffs().lookup("turbulentReaction") >> turbulentReaction_;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,10 +28,11 @@ Group
|
|||||||
grpCombustionModels
|
grpCombustionModels
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Partially stirred reactor combustion model. The model calculates a finite
|
Partially stirred reactor turbulent combustion model.
|
||||||
rate, based on both turbulence and chemistry time scales. Depending on
|
|
||||||
mesh resolution, the Cmix parameter can be used to scale the turbulence
|
This model calculates a finite rate, based on both turbulence and chemistry
|
||||||
mixing time scale.
|
time scales. Depending on mesh resolution, the Cmix parameter can be used
|
||||||
|
to scale the turbulence mixing time scale.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
PaSR.C
|
PaSR.C
|
||||||
@ -64,9 +65,6 @@ class PaSR
|
|||||||
//- Mixing constant
|
//- Mixing constant
|
||||||
scalar Cmix_;
|
scalar Cmix_;
|
||||||
|
|
||||||
//- Turbulent reaction switch
|
|
||||||
Switch turbulentReaction_;
|
|
||||||
|
|
||||||
//- Mixing parameter
|
//- Mixing parameter
|
||||||
volScalarField kappa_;
|
volScalarField kappa_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -170,8 +170,8 @@ bool Foam::combustionModels::laminar<Type>::read()
|
|||||||
{
|
{
|
||||||
if (Type::read())
|
if (Type::read())
|
||||||
{
|
{
|
||||||
this->coeffs().lookup("integrateReactionRate")
|
integrateReactionRate_ =
|
||||||
>> integrateReactionRate_;
|
this->coeffs().lookupOrDefault("integrateReactionRate", true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -52,9 +52,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::~noCombustion()
|
|||||||
|
|
||||||
template<class CombThermoType>
|
template<class CombThermoType>
|
||||||
void Foam::combustionModels::noCombustion<CombThermoType>::correct()
|
void Foam::combustionModels::noCombustion<CombThermoType>::correct()
|
||||||
{
|
{}
|
||||||
// Do Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CombThermoType>
|
template<class CombThermoType>
|
||||||
@ -83,7 +81,7 @@ Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject::groupName("Qdot", this->phaseName_),
|
IOobject::groupName(typeName + ":Qdot", this->phaseName_),
|
||||||
this->mesh().time().timeName(),
|
this->mesh().time().timeName(),
|
||||||
this->mesh(),
|
this->mesh(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -94,4 +94,3 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const refineCell& r)
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1938,7 +1938,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
labelList(mesh_.nCells(), 0)
|
labelList(mesh_.nCells(), 0)
|
||||||
),
|
),
|
||||||
@ -1951,7 +1951,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
labelList(mesh_.nPoints(), 0)
|
labelList(mesh_.nPoints(), 0)
|
||||||
),
|
),
|
||||||
@ -1964,7 +1964,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
dimensionedScalar("level0Edge", dimLength, getLevel0EdgeLength())
|
dimensionedScalar("level0Edge", dimLength, getLevel0EdgeLength())
|
||||||
),
|
),
|
||||||
@ -1977,9 +1977,10 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
(readHistory ? mesh_.nCells() : 0) // All cells visible if not be read
|
// All cells visible if not read or readHistory = false
|
||||||
|
(readHistory ? mesh_.nCells() : 0)
|
||||||
),
|
),
|
||||||
faceRemover_(mesh_, GREAT), // merge boundary faces wherever possible
|
faceRemover_(mesh_, GREAT), // merge boundary faces wherever possible
|
||||||
savedPointLevel_(0),
|
savedPointLevel_(0),
|
||||||
@ -2057,7 +2058,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
cellLevel
|
cellLevel
|
||||||
),
|
),
|
||||||
@ -2070,7 +2071,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
pointLevel
|
pointLevel
|
||||||
),
|
),
|
||||||
@ -2083,7 +2084,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
@ -2101,7 +2102,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
history
|
history
|
||||||
),
|
),
|
||||||
@ -2165,7 +2166,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
cellLevel
|
cellLevel
|
||||||
),
|
),
|
||||||
@ -2178,7 +2179,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
pointLevel
|
pointLevel
|
||||||
),
|
),
|
||||||
@ -2191,7 +2192,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
@ -2209,7 +2210,7 @@ Foam::hexRef8::hexRef8
|
|||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
List<refinementHistory::splitCell8>(0),
|
List<refinementHistory::splitCell8>(0),
|
||||||
labelList(0),
|
labelList(0),
|
||||||
@ -3069,7 +3070,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2
|
|||||||
// fMesh.time().timeName(),
|
// fMesh.time().timeName(),
|
||||||
// fMesh,
|
// fMesh,
|
||||||
// IOobject::NO_READ,
|
// IOobject::NO_READ,
|
||||||
// IOobject::AUTO_WRITE,
|
// IOobject::NO_WRITE,
|
||||||
// false
|
// false
|
||||||
// ),
|
// ),
|
||||||
// fMesh,
|
// fMesh,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -336,7 +336,6 @@ void Foam::refinementHistory::freeSplitCell(const label index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mark entry in splitCells. Recursively mark its parent and subs.
|
|
||||||
void Foam::refinementHistory::markSplit
|
void Foam::refinementHistory::markSplit
|
||||||
(
|
(
|
||||||
const label index,
|
const label index,
|
||||||
@ -373,7 +372,6 @@ void Foam::refinementHistory::markSplit
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mark index and all its descendants
|
|
||||||
void Foam::refinementHistory::mark
|
void Foam::refinementHistory::mark
|
||||||
(
|
(
|
||||||
const label val,
|
const label val,
|
||||||
@ -739,7 +737,6 @@ Foam::refinementHistory::refinementHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct as copy
|
|
||||||
Foam::refinementHistory::refinementHistory
|
Foam::refinementHistory::refinementHistory
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
@ -760,7 +757,6 @@ Foam::refinementHistory::refinementHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from multiple
|
|
||||||
Foam::refinementHistory::refinementHistory
|
Foam::refinementHistory::refinementHistory
|
||||||
(
|
(
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
@ -877,7 +873,6 @@ Foam::refinementHistory::refinementHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct from Istream
|
|
||||||
Foam::refinementHistory::refinementHistory(const IOobject& io, Istream& is)
|
Foam::refinementHistory::refinementHistory(const IOobject& io, Istream& is)
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io),
|
||||||
@ -1154,7 +1149,6 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update numbering for subsetting
|
|
||||||
void Foam::refinementHistory::subset
|
void Foam::refinementHistory::subset
|
||||||
(
|
(
|
||||||
const labelList& pointMap,
|
const labelList& pointMap,
|
||||||
|
|||||||
@ -238,7 +238,6 @@ fvMatrices/fvMatrices.C
|
|||||||
fvMatrices/fvScalarMatrix/fvScalarMatrix.C
|
fvMatrices/fvScalarMatrix/fvScalarMatrix.C
|
||||||
fvMatrices/solvers/MULES/MULES.C
|
fvMatrices/solvers/MULES/MULES.C
|
||||||
fvMatrices/solvers/MULES/CMULES.C
|
fvMatrices/solvers/MULES/CMULES.C
|
||||||
fvMatrices/solvers/MULES/IMULES.C
|
|
||||||
fvMatrices/solvers/GAMGSymSolver/GAMGAgglomerations/faceAreaPairGAMGAgglomeration/faceAreaPairGAMGAgglomeration.C
|
fvMatrices/solvers/GAMGSymSolver/GAMGAgglomerations/faceAreaPairGAMGAgglomeration/faceAreaPairGAMGAgglomeration.C
|
||||||
|
|
||||||
interpolation = interpolation/interpolation
|
interpolation = interpolation/interpolation
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -151,17 +151,17 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
||||||
|
|
||||||
label nLimiterIter
|
const label nLimiterIter
|
||||||
(
|
(
|
||||||
readLabel(MULEScontrols.lookup("nLimiterIter"))
|
readLabel(MULEScontrols.lookup("nLimiterIter"))
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar smoothLimiter
|
const scalar smoothLimiter
|
||||||
(
|
(
|
||||||
MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0)
|
MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar extremaCoeff
|
const scalar extremaCoeff
|
||||||
(
|
(
|
||||||
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0)
|
MULEScontrols.lookupOrDefault<scalar>("extremaCoeff", 0)
|
||||||
);
|
);
|
||||||
@ -207,8 +207,8 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
forAll(phiCorrIf, facei)
|
forAll(phiCorrIf, facei)
|
||||||
{
|
{
|
||||||
label own = owner[facei];
|
const label own = owner[facei];
|
||||||
label nei = neighb[facei];
|
const label nei = neighb[facei];
|
||||||
|
|
||||||
psiMaxn[own] = max(psiMaxn[own], psiIf[nei]);
|
psiMaxn[own] = max(psiMaxn[own], psiIf[nei]);
|
||||||
psiMinn[own] = min(psiMinn[own], psiIf[nei]);
|
psiMinn[own] = min(psiMinn[own], psiIf[nei]);
|
||||||
@ -216,9 +216,9 @@ void Foam::MULES::limiterCorr
|
|||||||
psiMaxn[nei] = max(psiMaxn[nei], psiIf[own]);
|
psiMaxn[nei] = max(psiMaxn[nei], psiIf[own]);
|
||||||
psiMinn[nei] = min(psiMinn[nei], psiIf[own]);
|
psiMinn[nei] = min(psiMinn[nei], psiIf[own]);
|
||||||
|
|
||||||
scalar phiCorrf = phiCorrIf[facei];
|
const scalar phiCorrf = phiCorrIf[facei];
|
||||||
|
|
||||||
if (phiCorrf > 0.0)
|
if (phiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumPhip[own] += phiCorrf;
|
sumPhip[own] += phiCorrf;
|
||||||
mSumPhim[nei] += phiCorrf;
|
mSumPhim[nei] += phiCorrf;
|
||||||
@ -253,7 +253,7 @@ void Foam::MULES::limiterCorr
|
|||||||
{
|
{
|
||||||
forAll(phiCorrPf, pFacei)
|
forAll(phiCorrPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPf[pFacei]);
|
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPf[pFacei]);
|
||||||
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPf[pFacei]);
|
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPf[pFacei]);
|
||||||
@ -262,11 +262,11 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
forAll(phiCorrPf, pFacei)
|
forAll(phiCorrPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
scalar phiCorrf = phiCorrPf[pFacei];
|
const scalar phiCorrf = phiCorrPf[pFacei];
|
||||||
|
|
||||||
if (phiCorrf > 0.0)
|
if (phiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumPhip[pfCelli] += phiCorrf;
|
sumPhip[pfCelli] += phiCorrf;
|
||||||
}
|
}
|
||||||
@ -309,17 +309,17 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
for (int j=0; j<nLimiterIter; j++)
|
for (int j=0; j<nLimiterIter; j++)
|
||||||
{
|
{
|
||||||
sumlPhip = 0.0;
|
sumlPhip = 0;
|
||||||
mSumlPhim = 0.0;
|
mSumlPhim = 0;
|
||||||
|
|
||||||
forAll(lambdaIf, facei)
|
forAll(lambdaIf, facei)
|
||||||
{
|
{
|
||||||
label own = owner[facei];
|
const label own = owner[facei];
|
||||||
label nei = neighb[facei];
|
const label nei = neighb[facei];
|
||||||
|
|
||||||
scalar lambdaPhiCorrf = lambdaIf[facei]*phiCorrIf[facei];
|
const scalar lambdaPhiCorrf = lambdaIf[facei]*phiCorrIf[facei];
|
||||||
|
|
||||||
if (lambdaPhiCorrf > 0.0)
|
if (lambdaPhiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumlPhip[own] += lambdaPhiCorrf;
|
sumlPhip[own] += lambdaPhiCorrf;
|
||||||
mSumlPhim[nei] += lambdaPhiCorrf;
|
mSumlPhim[nei] += lambdaPhiCorrf;
|
||||||
@ -344,7 +344,7 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
scalar lambdaPhiCorrf = lambdaPf[pFacei]*phiCorrfPf[pFacei];
|
scalar lambdaPhiCorrf = lambdaPf[pFacei]*phiCorrfPf[pFacei];
|
||||||
|
|
||||||
if (lambdaPhiCorrf > 0.0)
|
if (lambdaPhiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumlPhip[pfCelli] += lambdaPhiCorrf;
|
sumlPhip[pfCelli] += lambdaPhiCorrf;
|
||||||
}
|
}
|
||||||
@ -379,7 +379,7 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
forAll(lambdaIf, facei)
|
forAll(lambdaIf, facei)
|
||||||
{
|
{
|
||||||
if (phiCorrIf[facei] > 0.0)
|
if (phiCorrIf[facei] > 0)
|
||||||
{
|
{
|
||||||
lambdaIf[facei] = min
|
lambdaIf[facei] = min
|
||||||
(
|
(
|
||||||
@ -415,9 +415,9 @@ void Foam::MULES::limiterCorr
|
|||||||
|
|
||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
if (phiCorrfPf[pFacei] > 0.0)
|
if (phiCorrfPf[pFacei] > 0)
|
||||||
{
|
{
|
||||||
lambdaPf[pFacei] =
|
lambdaPf[pFacei] =
|
||||||
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
||||||
@ -438,11 +438,11 @@ void Foam::MULES::limiterCorr
|
|||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
// Limit outlet faces only
|
// Limit outlet faces only
|
||||||
if (phiPf[pFacei] > SMALL*SMALL)
|
if ((phiPf[pFacei] + phiCorrfPf[pFacei]) > SMALL*SMALL)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
if (phiCorrfPf[pFacei] > 0.0)
|
if (phiCorrfPf[pFacei] > 0)
|
||||||
{
|
{
|
||||||
lambdaPf[pFacei] =
|
lambdaPf[pFacei] =
|
||||||
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
||||||
|
|||||||
@ -1,54 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "IMULES.H"
|
|
||||||
#include "profiling.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::MULES::implicitSolve
|
|
||||||
(
|
|
||||||
volScalarField& psi,
|
|
||||||
const surfaceScalarField& phi,
|
|
||||||
surfaceScalarField& phiPsi,
|
|
||||||
const scalar psiMax,
|
|
||||||
const scalar psiMin
|
|
||||||
)
|
|
||||||
{
|
|
||||||
addProfiling(solve, "MULES::implicitSolve");
|
|
||||||
|
|
||||||
implicitSolve
|
|
||||||
(
|
|
||||||
geometricOneField(),
|
|
||||||
psi,
|
|
||||||
phi,
|
|
||||||
phiPsi,
|
|
||||||
zeroField(), zeroField(),
|
|
||||||
psiMax, psiMin
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Global
|
|
||||||
IMULES
|
|
||||||
|
|
||||||
Description
|
|
||||||
IMULES: Multidimensional universal limiter for implicit solution.
|
|
||||||
|
|
||||||
Solve a convective-only transport equation using an explicit universal
|
|
||||||
multi-dimensional limiter applied to an implicit formulation requiring
|
|
||||||
iteration to guarantee boundedness. The number of iterations required
|
|
||||||
to obtain boundedness increases with the Courant number of the simulation.
|
|
||||||
|
|
||||||
It may be more efficient to use CMULES.
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
IMULES.C
|
|
||||||
IMULESTemplates.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef IMULES_H
|
|
||||||
#define IMULES_H
|
|
||||||
|
|
||||||
#include "MULES.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace MULES
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class RhoType, class SpType, class SuType>
|
|
||||||
void implicitSolve
|
|
||||||
(
|
|
||||||
const RhoType& rho,
|
|
||||||
volScalarField& gamma,
|
|
||||||
const surfaceScalarField& phi,
|
|
||||||
surfaceScalarField& phiCorr,
|
|
||||||
const SpType& Sp,
|
|
||||||
const SuType& Su,
|
|
||||||
const scalar psiMax,
|
|
||||||
const scalar psiMin
|
|
||||||
);
|
|
||||||
|
|
||||||
void implicitSolve
|
|
||||||
(
|
|
||||||
volScalarField& gamma,
|
|
||||||
const surfaceScalarField& phi,
|
|
||||||
surfaceScalarField& phiCorr,
|
|
||||||
const scalar psiMax,
|
|
||||||
const scalar psiMin
|
|
||||||
);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace MULES
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "IMULESTemplates.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,239 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "IMULES.H"
|
|
||||||
#include "gaussConvectionScheme.H"
|
|
||||||
#include "surfaceInterpolate.H"
|
|
||||||
#include "fvmDdt.H"
|
|
||||||
#include "fvmSup.H"
|
|
||||||
#include "fvcDiv.H"
|
|
||||||
#include "profiling.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace MULES
|
|
||||||
{
|
|
||||||
template<class RhoType>
|
|
||||||
inline tmp<surfaceScalarField> interpolate(const RhoType& rho)
|
|
||||||
{
|
|
||||||
NotImplemented;
|
|
||||||
return tmp<surfaceScalarField>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline tmp<surfaceScalarField> interpolate(const volScalarField& rho)
|
|
||||||
{
|
|
||||||
return fvc::interpolate(rho);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class RhoType, class SpType, class SuType>
|
|
||||||
void Foam::MULES::implicitSolve
|
|
||||||
(
|
|
||||||
const RhoType& rho,
|
|
||||||
volScalarField& psi,
|
|
||||||
const surfaceScalarField& phi,
|
|
||||||
surfaceScalarField& phiPsi,
|
|
||||||
const SpType& Sp,
|
|
||||||
const SuType& Su,
|
|
||||||
const scalar psiMax,
|
|
||||||
const scalar psiMin
|
|
||||||
)
|
|
||||||
{
|
|
||||||
addProfiling(solve, "MULES::implicitSolve");
|
|
||||||
|
|
||||||
const fvMesh& mesh = psi.mesh();
|
|
||||||
|
|
||||||
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
|
||||||
|
|
||||||
label maxIter
|
|
||||||
(
|
|
||||||
readLabel(MULEScontrols.lookup("maxIter"))
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar maxUnboundedness
|
|
||||||
(
|
|
||||||
readScalar(MULEScontrols.lookup("maxUnboundedness"))
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar CoCoeff
|
|
||||||
(
|
|
||||||
readScalar(MULEScontrols.lookup("CoCoeff"))
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField allCoLambda(mesh.nFaces());
|
|
||||||
|
|
||||||
{
|
|
||||||
slicedSurfaceScalarField CoLambda
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"CoLambda",
|
|
||||||
mesh.time().timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimless,
|
|
||||||
allCoLambda,
|
|
||||||
false // Use slices for the couples
|
|
||||||
);
|
|
||||||
|
|
||||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
|
||||||
{
|
|
||||||
tmp<surfaceScalarField> Cof =
|
|
||||||
mesh.time().deltaT()*mesh.surfaceInterpolation::deltaCoeffs()
|
|
||||||
*mag(phi/interpolate(rho))/mesh.magSf();
|
|
||||||
|
|
||||||
CoLambda == 1.0/max(CoCoeff*Cof, scalar(1));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp<surfaceScalarField> Cof =
|
|
||||||
mesh.time().deltaT()*mesh.surfaceInterpolation::deltaCoeffs()
|
|
||||||
*mag(phi)/mesh.magSf();
|
|
||||||
|
|
||||||
CoLambda == 1.0/max(CoCoeff*Cof, scalar(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scalarField allLambda(allCoLambda);
|
|
||||||
//scalarField allLambda(mesh.nFaces(), 1.0);
|
|
||||||
|
|
||||||
slicedSurfaceScalarField lambda
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"lambda",
|
|
||||||
mesh.time().timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimless,
|
|
||||||
allLambda,
|
|
||||||
false // Use slices for the couples
|
|
||||||
);
|
|
||||||
|
|
||||||
linear<scalar> CDs(mesh);
|
|
||||||
upwind<scalar> UDs(mesh, phi);
|
|
||||||
//fv::uncorrectedSnGrad<scalar> snGrads(mesh);
|
|
||||||
|
|
||||||
fvScalarMatrix psiConvectionDiffusion
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, psi)
|
|
||||||
+ fv::gaussConvectionScheme<scalar>(mesh, phi, UDs).fvmDiv(phi, psi)
|
|
||||||
//- fv::gaussLaplacianScheme<scalar, scalar>(mesh, CDs, snGrads)
|
|
||||||
//.fvmLaplacian(Dpsif, psi)
|
|
||||||
- fvm::Sp(Sp, psi)
|
|
||||||
- Su
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField phiBD(psiConvectionDiffusion.flux());
|
|
||||||
|
|
||||||
surfaceScalarField& phiCorr = phiPsi;
|
|
||||||
phiCorr -= phiBD;
|
|
||||||
|
|
||||||
for (label i=0; i<maxIter; i++)
|
|
||||||
{
|
|
||||||
if (i != 0 && i < 4)
|
|
||||||
{
|
|
||||||
allLambda = allCoLambda;
|
|
||||||
}
|
|
||||||
|
|
||||||
limiter
|
|
||||||
(
|
|
||||||
allLambda,
|
|
||||||
1.0/mesh.time().deltaTValue(),
|
|
||||||
rho,
|
|
||||||
psi,
|
|
||||||
phiBD,
|
|
||||||
phiCorr,
|
|
||||||
Sp,
|
|
||||||
Su,
|
|
||||||
psiMax,
|
|
||||||
psiMin
|
|
||||||
);
|
|
||||||
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
psiConvectionDiffusion + fvc::div(lambda*phiCorr),
|
|
||||||
MULEScontrols
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar maxPsiM1 = gMax(psi.primitiveField()) - 1.0;
|
|
||||||
scalar minPsi = gMin(psi.primitiveField());
|
|
||||||
|
|
||||||
scalar unboundedness = max(max(maxPsiM1, 0.0), -min(minPsi, 0.0));
|
|
||||||
|
|
||||||
if (unboundedness < maxUnboundedness)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< "MULES: max(" << psi.name() << " - 1) = " << maxPsiM1
|
|
||||||
<< " min(" << psi.name() << ") = " << minPsi << endl;
|
|
||||||
|
|
||||||
phiBD = psiConvectionDiffusion.flux();
|
|
||||||
|
|
||||||
/*
|
|
||||||
word gammaScheme("div(phi,gamma)");
|
|
||||||
word gammarScheme("div(phirb,gamma)");
|
|
||||||
|
|
||||||
const surfaceScalarField& phir =
|
|
||||||
mesh.lookupObject<surfaceScalarField>("phir");
|
|
||||||
|
|
||||||
phiCorr =
|
|
||||||
fvc::flux
|
|
||||||
(
|
|
||||||
phi,
|
|
||||||
psi,
|
|
||||||
gammaScheme
|
|
||||||
)
|
|
||||||
+ fvc::flux
|
|
||||||
(
|
|
||||||
-fvc::flux(-phir, scalar(1) - psi, gammarScheme),
|
|
||||||
psi,
|
|
||||||
gammarScheme
|
|
||||||
)
|
|
||||||
- phiBD;
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
phiPsi = psiConvectionDiffusion.flux() + lambda*phiCorr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -185,12 +185,12 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
const dictionary& MULEScontrols = mesh.solverDict(psi.name());
|
||||||
|
|
||||||
label nLimiterIter
|
const label nLimiterIter
|
||||||
(
|
(
|
||||||
MULEScontrols.lookupOrDefault<label>("nLimiterIter", 3)
|
MULEScontrols.lookupOrDefault<label>("nLimiterIter", 3)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar smoothLimiter
|
const scalar smoothLimiter
|
||||||
(
|
(
|
||||||
MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0)
|
MULEScontrols.lookupOrDefault<scalar>("smoothLimiter", 0)
|
||||||
);
|
);
|
||||||
@ -228,8 +228,7 @@ void Foam::MULES::limiter
|
|||||||
);
|
);
|
||||||
|
|
||||||
scalarField& lambdaIf = lambda;
|
scalarField& lambdaIf = lambda;
|
||||||
surfaceScalarField::Boundary& lambdaBf =
|
surfaceScalarField::Boundary& lambdaBf = lambda.boundaryFieldRef();
|
||||||
lambda.boundaryFieldRef();
|
|
||||||
|
|
||||||
scalarField psiMaxn(psiIf.size(), psiMin);
|
scalarField psiMaxn(psiIf.size(), psiMin);
|
||||||
scalarField psiMinn(psiIf.size(), psiMax);
|
scalarField psiMinn(psiIf.size(), psiMax);
|
||||||
@ -241,8 +240,8 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(phiCorrIf, facei)
|
forAll(phiCorrIf, facei)
|
||||||
{
|
{
|
||||||
label own = owner[facei];
|
const label own = owner[facei];
|
||||||
label nei = neighb[facei];
|
const label nei = neighb[facei];
|
||||||
|
|
||||||
psiMaxn[own] = max(psiMaxn[own], psiIf[nei]);
|
psiMaxn[own] = max(psiMaxn[own], psiIf[nei]);
|
||||||
psiMinn[own] = min(psiMinn[own], psiIf[nei]);
|
psiMinn[own] = min(psiMinn[own], psiIf[nei]);
|
||||||
@ -253,9 +252,9 @@ void Foam::MULES::limiter
|
|||||||
sumPhiBD[own] += phiBDIf[facei];
|
sumPhiBD[own] += phiBDIf[facei];
|
||||||
sumPhiBD[nei] -= phiBDIf[facei];
|
sumPhiBD[nei] -= phiBDIf[facei];
|
||||||
|
|
||||||
scalar phiCorrf = phiCorrIf[facei];
|
const scalar phiCorrf = phiCorrIf[facei];
|
||||||
|
|
||||||
if (phiCorrf > 0.0)
|
if (phiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumPhip[own] += phiCorrf;
|
sumPhip[own] += phiCorrf;
|
||||||
mSumPhim[nei] += phiCorrf;
|
mSumPhim[nei] += phiCorrf;
|
||||||
@ -281,7 +280,7 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(phiCorrPf, pFacei)
|
forAll(phiCorrPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPNf[pFacei]);
|
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPNf[pFacei]);
|
||||||
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPNf[pFacei]);
|
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPNf[pFacei]);
|
||||||
@ -291,7 +290,7 @@ void Foam::MULES::limiter
|
|||||||
{
|
{
|
||||||
forAll(phiCorrPf, pFacei)
|
forAll(phiCorrPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPf[pFacei]);
|
psiMaxn[pfCelli] = max(psiMaxn[pfCelli], psiPf[pFacei]);
|
||||||
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPf[pFacei]);
|
psiMinn[pfCelli] = min(psiMinn[pfCelli], psiPf[pFacei]);
|
||||||
@ -300,13 +299,13 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(phiCorrPf, pFacei)
|
forAll(phiCorrPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
sumPhiBD[pfCelli] += phiBDPf[pFacei];
|
sumPhiBD[pfCelli] += phiBDPf[pFacei];
|
||||||
|
|
||||||
scalar phiCorrf = phiCorrPf[pFacei];
|
const scalar phiCorrf = phiCorrPf[pFacei];
|
||||||
|
|
||||||
if (phiCorrf > 0.0)
|
if (phiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumPhip[pfCelli] += phiCorrf;
|
sumPhip[pfCelli] += phiCorrf;
|
||||||
}
|
}
|
||||||
@ -376,17 +375,17 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
for (int j=0; j<nLimiterIter; j++)
|
for (int j=0; j<nLimiterIter; j++)
|
||||||
{
|
{
|
||||||
sumlPhip = 0.0;
|
sumlPhip = 0;
|
||||||
mSumlPhim = 0.0;
|
mSumlPhim = 0;
|
||||||
|
|
||||||
forAll(lambdaIf, facei)
|
forAll(lambdaIf, facei)
|
||||||
{
|
{
|
||||||
label own = owner[facei];
|
const label own = owner[facei];
|
||||||
label nei = neighb[facei];
|
const label nei = neighb[facei];
|
||||||
|
|
||||||
scalar lambdaPhiCorrf = lambdaIf[facei]*phiCorrIf[facei];
|
scalar lambdaPhiCorrf = lambdaIf[facei]*phiCorrIf[facei];
|
||||||
|
|
||||||
if (lambdaPhiCorrf > 0.0)
|
if (lambdaPhiCorrf > 0)
|
||||||
{
|
{
|
||||||
sumlPhip[own] += lambdaPhiCorrf;
|
sumlPhip[own] += lambdaPhiCorrf;
|
||||||
mSumlPhim[nei] += lambdaPhiCorrf;
|
mSumlPhim[nei] += lambdaPhiCorrf;
|
||||||
@ -407,11 +406,11 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
const scalar lambdaPhiCorrf =
|
||||||
|
lambdaPf[pFacei]*phiCorrfPf[pFacei];
|
||||||
|
|
||||||
scalar lambdaPhiCorrf = lambdaPf[pFacei]*phiCorrfPf[pFacei];
|
if (lambdaPhiCorrf > 0)
|
||||||
|
|
||||||
if (lambdaPhiCorrf > 0.0)
|
|
||||||
{
|
{
|
||||||
sumlPhip[pfCelli] += lambdaPhiCorrf;
|
sumlPhip[pfCelli] += lambdaPhiCorrf;
|
||||||
}
|
}
|
||||||
@ -446,7 +445,7 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(lambdaIf, facei)
|
forAll(lambdaIf, facei)
|
||||||
{
|
{
|
||||||
if (phiCorrIf[facei] > 0.0)
|
if (phiCorrIf[facei] > 0)
|
||||||
{
|
{
|
||||||
lambdaIf[facei] = min
|
lambdaIf[facei] = min
|
||||||
(
|
(
|
||||||
@ -464,7 +463,6 @@ void Foam::MULES::limiter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
forAll(lambdaBf, patchi)
|
forAll(lambdaBf, patchi)
|
||||||
{
|
{
|
||||||
fvsPatchScalarField& lambdaPf = lambdaBf[patchi];
|
fvsPatchScalarField& lambdaPf = lambdaBf[patchi];
|
||||||
@ -482,9 +480,9 @@ void Foam::MULES::limiter
|
|||||||
|
|
||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
const label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
if (phiCorrfPf[pFacei] > 0.0)
|
if (phiCorrfPf[pFacei] > 0)
|
||||||
{
|
{
|
||||||
lambdaPf[pFacei] =
|
lambdaPf[pFacei] =
|
||||||
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
||||||
@ -496,33 +494,6 @@ void Foam::MULES::limiter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
const labelList& pFaceCells =
|
|
||||||
mesh.boundary()[patchi].faceCells();
|
|
||||||
const scalarField& phiBDPf = phiBDBf[patchi];
|
|
||||||
const scalarField& phiCorrPf = phiCorrBf[patchi];
|
|
||||||
|
|
||||||
forAll(lambdaPf, pFacei)
|
|
||||||
{
|
|
||||||
// Limit outlet faces only
|
|
||||||
if ((phiBDPf[pFacei] + phiCorrPf[pFacei]) > SMALL*SMALL)
|
|
||||||
{
|
|
||||||
label pfCelli = pFaceCells[pFacei];
|
|
||||||
|
|
||||||
if (phiCorrfPf[pFacei] > 0.0)
|
|
||||||
{
|
|
||||||
lambdaPf[pFacei] =
|
|
||||||
min(lambdaPf[pFacei], lambdap[pfCelli]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lambdaPf[pFacei] =
|
|
||||||
min(lambdaPf[pFacei], lambdam[pfCelli]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
syncTools::syncFaceList(mesh, allLambda, minEqOp<scalar>());
|
syncTools::syncFaceList(mesh, allLambda, minEqOp<scalar>());
|
||||||
@ -549,6 +520,19 @@ void Foam::MULES::limit
|
|||||||
|
|
||||||
surfaceScalarField phiBD(upwind<scalar>(psi.mesh(), phi).flux(psi));
|
surfaceScalarField phiBD(upwind<scalar>(psi.mesh(), phi).flux(psi));
|
||||||
|
|
||||||
|
surfaceScalarField::Boundary& phiBDBf = phiBD.boundaryFieldRef();
|
||||||
|
const surfaceScalarField::Boundary& phiPsiBf = phiPsi.boundaryField();
|
||||||
|
|
||||||
|
forAll(phiBDBf, patchi)
|
||||||
|
{
|
||||||
|
fvsPatchScalarField& phiBDPf = phiBDBf[patchi];
|
||||||
|
|
||||||
|
if (!phiBDPf.coupled())
|
||||||
|
{
|
||||||
|
phiBDPf = phiPsiBf[patchi];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
surfaceScalarField& phiCorr = phiPsi;
|
surfaceScalarField& phiCorr = phiPsi;
|
||||||
phiCorr -= phiBD;
|
phiCorr -= phiBD;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,9 +71,7 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isA<emptyPolyPatch>(pp))
|
else if (isA<emptyPolyPatch>(pp))
|
||||||
{
|
{}
|
||||||
// Do nothing.
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Do nothing since face itself already in stencil
|
// Do nothing since face itself already in stencil
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,9 +43,7 @@ void Foam::functionObjects::fieldAverage::addMeanFieldType(const label fieldi)
|
|||||||
Log << " Reading/initialising field " << meanFieldName << endl;
|
Log << " Reading/initialising field " << meanFieldName << endl;
|
||||||
|
|
||||||
if (foundObject<Type>(meanFieldName))
|
if (foundObject<Type>(meanFieldName))
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
else if (obr().found(meanFieldName))
|
else if (obr().found(meanFieldName))
|
||||||
{
|
{
|
||||||
Log << " Cannot allocate average field " << meanFieldName
|
Log << " Cannot allocate average field " << meanFieldName
|
||||||
@ -120,9 +118,7 @@ void Foam::functionObjects::fieldAverage::addPrime2MeanFieldType
|
|||||||
Log << " Reading/initialising field " << prime2MeanFieldName << nl;
|
Log << " Reading/initialising field " << prime2MeanFieldName << nl;
|
||||||
|
|
||||||
if (foundObject<Type2>(prime2MeanFieldName))
|
if (foundObject<Type2>(prime2MeanFieldName))
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
else if (obr().found(prime2MeanFieldName))
|
else if (obr().found(prime2MeanFieldName))
|
||||||
{
|
{
|
||||||
Log << " Cannot allocate average field " << prime2MeanFieldName
|
Log << " Cannot allocate average field " << prime2MeanFieldName
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -135,6 +135,8 @@ protected:
|
|||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const word& outputName,
|
const word& outputName,
|
||||||
|
const label minCell,
|
||||||
|
const label maxCell,
|
||||||
const vector& minC,
|
const vector& minC,
|
||||||
const vector& maxC,
|
const vector& maxC,
|
||||||
const label minProci,
|
const label minProci,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,6 +33,8 @@ void Foam::functionObjects::fieldMinMax::output
|
|||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const word& outputName,
|
const word& outputName,
|
||||||
|
const label minCell,
|
||||||
|
const label maxCell,
|
||||||
const vector& minC,
|
const vector& minC,
|
||||||
const vector& maxC,
|
const vector& maxC,
|
||||||
const label minProci,
|
const label minProci,
|
||||||
@ -68,6 +70,7 @@ void Foam::functionObjects::fieldMinMax::output
|
|||||||
file<< endl;
|
file<< endl;
|
||||||
|
|
||||||
Log << " min(" << outputName << ") = " << minValue
|
Log << " min(" << outputName << ") = " << minValue
|
||||||
|
<< " in cell " << minCell
|
||||||
<< " at location " << minC;
|
<< " at location " << minC;
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
@ -76,6 +79,7 @@ void Foam::functionObjects::fieldMinMax::output
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log << nl << " max(" << outputName << ") = " << maxValue
|
Log << nl << " max(" << outputName << ") = " << maxValue
|
||||||
|
<< " in cell " << maxCell
|
||||||
<< " at location " << maxC;
|
<< " at location " << maxC;
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
@ -96,9 +100,11 @@ void Foam::functionObjects::fieldMinMax::output
|
|||||||
// Write state/results information
|
// Write state/results information
|
||||||
word nameStr('(' + outputName + ')');
|
word nameStr('(' + outputName + ')');
|
||||||
this->setResult("min" + nameStr, minValue);
|
this->setResult("min" + nameStr, minValue);
|
||||||
|
this->setResult("min" + nameStr + "_cell", minCell);
|
||||||
this->setResult("min" + nameStr + "_position", minC);
|
this->setResult("min" + nameStr + "_position", minC);
|
||||||
this->setResult("min" + nameStr + "_processor", minProci);
|
this->setResult("min" + nameStr + "_processor", minProci);
|
||||||
this->setResult("max" + nameStr, maxValue);
|
this->setResult("max" + nameStr, maxValue);
|
||||||
|
this->setResult("max" + nameStr + "_cell", maxCell);
|
||||||
this->setResult("max" + nameStr + "_position", maxC);
|
this->setResult("max" + nameStr + "_position", maxC);
|
||||||
this->setResult("max" + nameStr + "_processor", maxProci);
|
this->setResult("max" + nameStr + "_processor", maxProci);
|
||||||
}
|
}
|
||||||
@ -131,17 +137,19 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
magField.boundaryField();
|
magField.boundaryField();
|
||||||
|
|
||||||
scalarList minVs(Pstream::nProcs());
|
scalarList minVs(Pstream::nProcs());
|
||||||
|
labelList minCells(Pstream::nProcs());
|
||||||
List<vector> minCs(Pstream::nProcs());
|
List<vector> minCs(Pstream::nProcs());
|
||||||
label minProci = findMin(magField);
|
label minProci = findMin(magField);
|
||||||
minVs[proci] = magField[minProci];
|
minVs[proci] = magField[minProci];
|
||||||
|
minCells[proci] = minProci;
|
||||||
minCs[proci] = mesh_.C()[minProci];
|
minCs[proci] = mesh_.C()[minProci];
|
||||||
|
|
||||||
|
|
||||||
labelList maxIs(Pstream::nProcs());
|
|
||||||
scalarList maxVs(Pstream::nProcs());
|
scalarList maxVs(Pstream::nProcs());
|
||||||
|
labelList maxCells(Pstream::nProcs());
|
||||||
List<vector> maxCs(Pstream::nProcs());
|
List<vector> maxCs(Pstream::nProcs());
|
||||||
label maxProci = findMax(magField);
|
label maxProci = findMax(magField);
|
||||||
maxVs[proci] = magField[maxProci];
|
maxVs[proci] = magField[maxProci];
|
||||||
|
maxCells[proci] = maxProci;
|
||||||
maxCs[proci] = mesh_.C()[maxProci];
|
maxCs[proci] = mesh_.C()[maxProci];
|
||||||
|
|
||||||
forAll(magFieldBoundary, patchi)
|
forAll(magFieldBoundary, patchi)
|
||||||
@ -151,10 +159,14 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
{
|
{
|
||||||
const vectorField& Cfp = CfBoundary[patchi];
|
const vectorField& Cfp = CfBoundary[patchi];
|
||||||
|
|
||||||
|
const labelList& faceCells =
|
||||||
|
magFieldBoundary[patchi].patch().faceCells();
|
||||||
|
|
||||||
label minPi = findMin(mfp);
|
label minPi = findMin(mfp);
|
||||||
if (mfp[minPi] < minVs[proci])
|
if (mfp[minPi] < minVs[proci])
|
||||||
{
|
{
|
||||||
minVs[proci] = mfp[minPi];
|
minVs[proci] = mfp[minPi];
|
||||||
|
minCells[proci] = faceCells[minPi];
|
||||||
minCs[proci] = Cfp[minPi];
|
minCs[proci] = Cfp[minPi];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,6 +174,7 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
if (mfp[maxPi] > maxVs[proci])
|
if (mfp[maxPi] > maxVs[proci])
|
||||||
{
|
{
|
||||||
maxVs[proci] = mfp[maxPi];
|
maxVs[proci] = mfp[maxPi];
|
||||||
|
maxCells[proci] = faceCells[maxPi];
|
||||||
maxCs[proci] = Cfp[maxPi];
|
maxCs[proci] = Cfp[maxPi];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,11 +182,15 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
|
|
||||||
Pstream::gatherList(minVs);
|
Pstream::gatherList(minVs);
|
||||||
Pstream::scatterList(minVs);
|
Pstream::scatterList(minVs);
|
||||||
|
Pstream::gatherList(minCells);
|
||||||
|
Pstream::scatterList(minCells);
|
||||||
Pstream::gatherList(minCs);
|
Pstream::gatherList(minCs);
|
||||||
Pstream::scatterList(minCs);
|
Pstream::scatterList(minCs);
|
||||||
|
|
||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::scatterList(maxVs);
|
Pstream::scatterList(maxVs);
|
||||||
|
Pstream::gatherList(maxCells);
|
||||||
|
Pstream::scatterList(maxCells);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
Pstream::scatterList(maxCs);
|
Pstream::scatterList(maxCs);
|
||||||
|
|
||||||
@ -189,6 +206,8 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
word("mag(" + fieldName + ")"),
|
word("mag(" + fieldName + ")"),
|
||||||
|
minCell,
|
||||||
|
maxCell,
|
||||||
minC,
|
minC,
|
||||||
maxC,
|
maxC,
|
||||||
mini,
|
mini,
|
||||||
@ -204,31 +223,37 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
fieldBoundary = field.boundaryField();
|
fieldBoundary = field.boundaryField();
|
||||||
|
|
||||||
List<Type> minVs(Pstream::nProcs());
|
List<Type> minVs(Pstream::nProcs());
|
||||||
|
labelList minCells(Pstream::nProcs());
|
||||||
List<vector> minCs(Pstream::nProcs());
|
List<vector> minCs(Pstream::nProcs());
|
||||||
label minProci = findMin(field);
|
label minProci = findMin(field);
|
||||||
minVs[proci] = field[minProci];
|
minVs[proci] = field[minProci];
|
||||||
|
minCells[proci] = minProci;
|
||||||
minCs[proci] = mesh_.C()[minProci];
|
minCs[proci] = mesh_.C()[minProci];
|
||||||
|
|
||||||
Pstream::gatherList(minVs);
|
|
||||||
Pstream::gatherList(minCs);
|
|
||||||
|
|
||||||
List<Type> maxVs(Pstream::nProcs());
|
List<Type> maxVs(Pstream::nProcs());
|
||||||
|
labelList maxCells(Pstream::nProcs());
|
||||||
List<vector> maxCs(Pstream::nProcs());
|
List<vector> maxCs(Pstream::nProcs());
|
||||||
label maxProci = findMax(field);
|
label maxProci = findMax(field);
|
||||||
maxVs[proci] = field[maxProci];
|
maxVs[proci] = field[maxProci];
|
||||||
|
maxCells[proci] = maxProci;
|
||||||
maxCs[proci] = mesh_.C()[maxProci];
|
maxCs[proci] = mesh_.C()[maxProci];
|
||||||
|
|
||||||
forAll(fieldBoundary, patchi)
|
forAll(fieldBoundary, patchi)
|
||||||
{
|
{
|
||||||
const Field<Type>& fp = fieldBoundary[patchi];
|
const Field<Type>& fp = fieldBoundary[patchi];
|
||||||
|
|
||||||
if (fp.size())
|
if (fp.size())
|
||||||
{
|
{
|
||||||
const vectorField& Cfp = CfBoundary[patchi];
|
const vectorField& Cfp = CfBoundary[patchi];
|
||||||
|
|
||||||
|
const labelList& faceCells =
|
||||||
|
fieldBoundary[patchi].patch().faceCells();
|
||||||
|
|
||||||
label minPi = findMin(fp);
|
label minPi = findMin(fp);
|
||||||
if (fp[minPi] < minVs[proci])
|
if (fp[minPi] < minVs[proci])
|
||||||
{
|
{
|
||||||
minVs[proci] = fp[minPi];
|
minVs[proci] = fp[minPi];
|
||||||
|
minCells[proci] = faceCells[minPi];
|
||||||
minCs[proci] = Cfp[minPi];
|
minCs[proci] = Cfp[minPi];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,6 +261,7 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
if (fp[maxPi] > maxVs[proci])
|
if (fp[maxPi] > maxVs[proci])
|
||||||
{
|
{
|
||||||
maxVs[proci] = fp[maxPi];
|
maxVs[proci] = fp[maxPi];
|
||||||
|
maxCells[proci] = faceCells[maxPi];
|
||||||
maxCs[proci] = Cfp[maxPi];
|
maxCs[proci] = Cfp[maxPi];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -243,26 +269,34 @@ void Foam::functionObjects::fieldMinMax::calcMinMaxFields
|
|||||||
|
|
||||||
Pstream::gatherList(minVs);
|
Pstream::gatherList(minVs);
|
||||||
Pstream::scatterList(minVs);
|
Pstream::scatterList(minVs);
|
||||||
|
Pstream::gatherList(minCells);
|
||||||
|
Pstream::scatterList(minCells);
|
||||||
Pstream::gatherList(minCs);
|
Pstream::gatherList(minCs);
|
||||||
Pstream::scatterList(minCs);
|
Pstream::scatterList(minCs);
|
||||||
|
|
||||||
Pstream::gatherList(maxVs);
|
Pstream::gatherList(maxVs);
|
||||||
Pstream::scatterList(maxVs);
|
Pstream::scatterList(maxVs);
|
||||||
|
Pstream::gatherList(maxCells);
|
||||||
|
Pstream::scatterList(maxCells);
|
||||||
Pstream::gatherList(maxCs);
|
Pstream::gatherList(maxCs);
|
||||||
Pstream::scatterList(maxCs);
|
Pstream::scatterList(maxCs);
|
||||||
|
|
||||||
label mini = findMin(minVs);
|
label mini = findMin(minVs);
|
||||||
Type minValue = minVs[mini];
|
Type minValue = minVs[mini];
|
||||||
|
const label minCell = minCells[mini];
|
||||||
const vector& minC = minCs[mini];
|
const vector& minC = minCs[mini];
|
||||||
|
|
||||||
label maxi = findMax(maxVs);
|
label maxi = findMax(maxVs);
|
||||||
Type maxValue = maxVs[maxi];
|
Type maxValue = maxVs[maxi];
|
||||||
|
const label maxCell = maxCells[maxi];
|
||||||
const vector& maxC = maxCs[maxi];
|
const vector& maxC = maxCs[maxi];
|
||||||
|
|
||||||
output
|
output
|
||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
fieldName,
|
fieldName,
|
||||||
|
minCell,
|
||||||
|
maxCell,
|
||||||
minC,
|
minC,
|
||||||
maxC,
|
maxC,
|
||||||
mini,
|
mini,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,17 +42,21 @@ Usage
|
|||||||
writeControl writeTime;
|
writeControl writeTime;
|
||||||
|
|
||||||
setFormat vtk;
|
setFormat vtk;
|
||||||
|
U U;
|
||||||
trackForward yes;
|
trackForward yes;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
U
|
U
|
||||||
p
|
p
|
||||||
);
|
);
|
||||||
|
|
||||||
lifeTime 10000;
|
lifeTime 10000;
|
||||||
trackLength 1e-3;
|
trackLength 1e-3;
|
||||||
nSubCycle 5;
|
nSubCycle 5;
|
||||||
bounds (0.2 -10 -10)(0.22 10 10);
|
bounds (0.2 -10 -10)(0.22 10 10);
|
||||||
cloudName particleTracks;
|
cloudName particleTracks;
|
||||||
|
|
||||||
seedSampleSet uniform;
|
seedSampleSet uniform;
|
||||||
uniformCoeffs
|
uniformCoeffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -291,6 +291,16 @@ bool Foam::functionObjects::codedFunctionObject::read(const dictionary& dict)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!dataPtr && !readPtr && !execPtr && !writePtr && !endPtr)
|
||||||
|
{
|
||||||
|
IOWarningInFunction
|
||||||
|
(
|
||||||
|
dict
|
||||||
|
) << "No critical \"code\" prefixed keywords were found."
|
||||||
|
<< " Please check the code documentation for more details."
|
||||||
|
<< nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
updateLibrary(name_);
|
updateLibrary(name_);
|
||||||
return redirectFunctionObject().read(dict);
|
return redirectFunctionObject().read(dict);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,16 +30,18 @@ Group
|
|||||||
Description
|
Description
|
||||||
Provides a general interface to enable dynamic code compilation.
|
Provides a general interface to enable dynamic code compilation.
|
||||||
|
|
||||||
The entries are
|
The entries are:
|
||||||
codeInclude : include files
|
\plaintable
|
||||||
codeOptions : include paths; inserted into EXE_INC in Make/options
|
codeInclude | include files
|
||||||
codeLibs : link line; inserted into LIB_LIBS in Make/options
|
codeOptions | include paths; inserted into EXE_INC in Make/options
|
||||||
codeData : c++; local member data (null constructed);
|
codeLibs | link line; inserted into LIB_LIBS in Make/options
|
||||||
localCode : c++; local static functions
|
codeData | c++; local member data (null constructed);
|
||||||
codeRead : c++; upon functionObject::read();
|
localCode | c++; local static functions;
|
||||||
codeExecute : c++;upon functionObject::execute();
|
codeRead | c++; upon functionObject::read();
|
||||||
codeWrite : c++; upon functionObject::write()
|
codeExecute | c++; upon functionObject::execute();
|
||||||
codeEnd : c++; upon functionObject::end();
|
codeWrite | c++; upon functionObject::write()
|
||||||
|
codeEnd | c++; upon functionObject::end();
|
||||||
|
\endplaintable
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
Example of function object specification:
|
Example of function object specification:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,9 +91,7 @@ void Foam::fixedTrim::correct
|
|||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
)
|
)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedTrim::correct
|
void Foam::fixedTrim::correct
|
||||||
@ -101,9 +99,7 @@ void Foam::fixedTrim::correct
|
|||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force)
|
vectorField& force)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,4 +47,3 @@ License
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -95,9 +95,7 @@ Foam::CloudFunctionObject<CloudType>::~CloudFunctionObject()
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObject<CloudType>::preEvolve()
|
void Foam::CloudFunctionObject<CloudType>::preEvolve()
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -119,9 +117,7 @@ void Foam::CloudFunctionObject<CloudType>::postMove
|
|||||||
const point&,
|
const point&,
|
||||||
bool&
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -133,9 +129,7 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
|
|||||||
const tetIndices&,
|
const tetIndices&,
|
||||||
bool&
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -145,9 +139,7 @@ void Foam::CloudFunctionObject<CloudType>::postFace
|
|||||||
const label,
|
const label,
|
||||||
bool&
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -171,7 +171,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// set 4 quadrants for single sector cases
|
// Set 4 quadrants for single sector cases
|
||||||
nS = 4;
|
nS = 4;
|
||||||
|
|
||||||
vector tangent = Zero;
|
vector tangent = Zero;
|
||||||
@ -200,7 +200,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
label nPoint = radius_.size()*nPointPerRadius;
|
label nPoint = radius_.size()*nPointPerRadius;
|
||||||
label nFace = radius_.size()*nS;
|
label nFace = radius_.size()*nS;
|
||||||
|
|
||||||
// add origin
|
// Add origin
|
||||||
nPoint++;
|
nPoint++;
|
||||||
|
|
||||||
points_.setSize(nPoint);
|
points_.setSize(nPoint);
|
||||||
@ -213,7 +213,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
|
|
||||||
points_[0] = origin;
|
points_[0] = origin;
|
||||||
|
|
||||||
// points
|
// Points
|
||||||
forAll(radius_, radI)
|
forAll(radius_, radI)
|
||||||
{
|
{
|
||||||
label pointOffset = radI*nPointPerRadius + 1;
|
label pointOffset = radI*nPointPerRadius + 1;
|
||||||
@ -226,7 +226,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// faces
|
// Faces
|
||||||
DynamicList<label> facePts(2*nPointPerSector);
|
DynamicList<label> facePts(2*nPointPerSector);
|
||||||
forAll(radius_, radI)
|
forAll(radius_, radI)
|
||||||
{
|
{
|
||||||
@ -236,7 +236,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
{
|
{
|
||||||
facePts.clear();
|
facePts.clear();
|
||||||
|
|
||||||
// append origin point
|
// Append origin point
|
||||||
facePts.append(0);
|
facePts.append(0);
|
||||||
|
|
||||||
for (label ptI = 0; ptI < nPointPerSector; ptI++)
|
for (label ptI = 0; ptI < nPointPerSector; ptI++)
|
||||||
@ -304,16 +304,16 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
|||||||
|
|
||||||
if (sign(d1) == sign(d2))
|
if (sign(d1) == sign(d2))
|
||||||
{
|
{
|
||||||
// did not cross polygon plane
|
// Did not cross polygon plane
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// intersection point
|
// Intersection point
|
||||||
const point pIntersect = p1 + (d1/(d1 - d2))*(p2 - p1);
|
const point pIntersect = p1 + (d1/(d1 - d2))*(p2 - p1);
|
||||||
|
|
||||||
const List<face>& tris = faceTris_[facei];
|
const List<face>& tris = faceTris_[facei];
|
||||||
|
|
||||||
// identify if point is within poly bounds
|
// Identify if point is within poly bounds
|
||||||
forAll(tris, triI)
|
forAll(tris, triI)
|
||||||
{
|
{
|
||||||
const face& tri = tris[triI];
|
const face& tri = tris[triI];
|
||||||
@ -347,11 +347,11 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
|||||||
|
|
||||||
if (sign(d1) == sign(d2))
|
if (sign(d1) == sign(d2))
|
||||||
{
|
{
|
||||||
// did not cross plane
|
// Did not cross plane
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// intersection point in cylindrical co-ordinate system
|
// Intersection point in cylindrical co-ordinate system
|
||||||
const point pCyl = coordSys_.localPosition(p1 + (d1/(d1 - d2))*(p2 - p1));
|
const point pCyl = coordSys_.localPosition(p1 + (d1/(d1 - d2))*(p2 - p1));
|
||||||
|
|
||||||
scalar r = pCyl[0];
|
scalar r = pCyl[0];
|
||||||
@ -380,6 +380,8 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (secI != -1)
|
||||||
|
{
|
||||||
hitFaceIDs_.append(secI);
|
hitFaceIDs_.append(secI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -657,7 +659,7 @@ void Foam::ParticleCollector<CloudType>::postMove
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// slightly extend end position to avoid falling within tracking tolerances
|
// Slightly extend end position to avoid falling within tracking tolerances
|
||||||
const point position1 = position0 + 1.0001*(p.position() - position0);
|
const point position1 = position0 + 1.0001*(p.position() - position0);
|
||||||
|
|
||||||
hitFaceIDs_.clear();
|
hitFaceIDs_.clear();
|
||||||
@ -675,8 +677,7 @@ void Foam::ParticleCollector<CloudType>::postMove
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -687,15 +688,33 @@ void Foam::ParticleCollector<CloudType>::postMove
|
|||||||
|
|
||||||
if (negateParcelsOppositeNormal_)
|
if (negateParcelsOppositeNormal_)
|
||||||
{
|
{
|
||||||
|
scalar Unormal = 0;
|
||||||
vector Uhat = p.U();
|
vector Uhat = p.U();
|
||||||
Uhat /= mag(Uhat) + ROOTVSMALL;
|
switch (mode_)
|
||||||
if ((Uhat & normal_[facei]) < 0)
|
|
||||||
{
|
{
|
||||||
m *= -1.0;
|
case mtPolygon:
|
||||||
|
{
|
||||||
|
Unormal = Uhat & normal_[facei];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mtConcentricCircle:
|
||||||
|
{
|
||||||
|
Unormal = Uhat & normal_[0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
|
||||||
|
Uhat /= mag(Uhat) + ROOTVSMALL;
|
||||||
|
|
||||||
|
if (Unormal < 0)
|
||||||
|
{
|
||||||
|
m = -m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add mass contribution
|
// Add mass contribution
|
||||||
mass_[facei] += m;
|
mass_[facei] += m;
|
||||||
|
|
||||||
if (nSector_ == 1)
|
if (nSector_ == 1)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,7 +68,6 @@ Foam::vector Foam::NoDispersion<CloudType>::update
|
|||||||
scalar&
|
scalar&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Do nothing
|
|
||||||
return Uc;
|
return Uc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -155,9 +155,7 @@ Foam::InflationInjection<CloudType>::~InflationInjection()
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::InflationInjection<CloudType>::updateMesh()
|
void Foam::InflationInjection<CloudType>::updateMesh()
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -201,29 +201,57 @@ void Foam::patchInjectionBase::setPositionAndCell
|
|||||||
// Position perturbed away from face (into domain)
|
// Position perturbed away from face (into domain)
|
||||||
const scalar a = rnd.position(scalar(0.1), scalar(0.5));
|
const scalar a = rnd.position(scalar(0.1), scalar(0.5));
|
||||||
const vector& pc = mesh.cellCentres()[cellOwner];
|
const vector& pc = mesh.cellCentres()[cellOwner];
|
||||||
const vector d = mag(pf - pc)*patchNormal_[facei];
|
const vector d =
|
||||||
|
mag((pf - pc) & patchNormal_[facei])*patchNormal_[facei];
|
||||||
|
|
||||||
position = pf - a*d;
|
position = pf - a*d;
|
||||||
|
|
||||||
// The position is between the face and cell centre, which could
|
// Try to find tetFacei and tetPti in the current position
|
||||||
// be in any tet of the decomposed cell, so arbitrarily choose the
|
mesh.findTetFacePt(cellOwner, position, tetFacei, tetPti);
|
||||||
// first face of the cell as the tetFace and the first point after
|
|
||||||
// the base point on the face as the tetPt. The tracking will pick
|
|
||||||
// the cell consistent with the motion in the first tracking step
|
|
||||||
//tetFaceI = mesh.cells()[cellOwner][0];
|
|
||||||
//tetPtI = 1;
|
|
||||||
|
|
||||||
//SAF: temporary fix for patchInjection.
|
// tetFacei and tetPti not found, check if the cell has changed
|
||||||
// This function finds both cellOwner and tetFaceI. The particle
|
if (tetFacei == -1 ||tetPti == -1)
|
||||||
// was injected in a non-boundary cell and the tracking function
|
{
|
||||||
// could not find the cellOwner
|
mesh.findCellFacePt(position, cellOwner, tetFacei, tetPti);
|
||||||
mesh.findCellFacePt
|
}
|
||||||
(
|
|
||||||
position,
|
// Both searches failed, choose a random position within
|
||||||
cellOwner,
|
// the original cell
|
||||||
tetFacei,
|
if (tetFacei == -1 ||tetPti == -1)
|
||||||
tetPti
|
{
|
||||||
);
|
// Reset cellOwner
|
||||||
|
cellOwner = cellOwners_[facei];
|
||||||
|
const scalarField& V = mesh.V();
|
||||||
|
|
||||||
|
// Construct cell tet indices
|
||||||
|
const List<tetIndices> cellTetIs =
|
||||||
|
polyMeshTetDecomposition::cellTetIndices(mesh, cellOwner);
|
||||||
|
|
||||||
|
// Construct cell tet volume fractions
|
||||||
|
scalarList cTetVFrac(cellTetIs.size(), 0.0);
|
||||||
|
for (label teti=1; teti<cellTetIs.size()-1; teti++)
|
||||||
|
{
|
||||||
|
cTetVFrac[teti] =
|
||||||
|
cTetVFrac[teti-1]
|
||||||
|
+ cellTetIs[teti].tet(mesh).mag()/V[cellOwner];
|
||||||
|
}
|
||||||
|
cTetVFrac.last() = 1;
|
||||||
|
|
||||||
|
// Set new particle position
|
||||||
|
const scalar volFrac = rnd.sample01<scalar>();
|
||||||
|
label teti = 0;
|
||||||
|
forAll(cTetVFrac, vfI)
|
||||||
|
{
|
||||||
|
if (cTetVFrac[vfI] > volFrac)
|
||||||
|
{
|
||||||
|
teti = vfI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
position = cellTetIs[teti].tet(mesh).randomPoint(rnd);
|
||||||
|
tetFacei = cellTetIs[teti].face();
|
||||||
|
tetPti = cellTetIs[teti].tetPt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,9 +67,7 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,9 +29,7 @@ License
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::NoStochasticCollision<CloudType>::collide(const scalar)
|
void Foam::NoStochasticCollision<CloudType>::collide(const scalar)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -59,9 +59,7 @@ Foam::IsotropyModels::NoIsotropy<CloudType>::~NoIsotropy()
|
|||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::IsotropyModels::NoIsotropy<CloudType>::calculate()
|
void Foam::IsotropyModels::NoIsotropy<CloudType>::calculate()
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,8 +86,7 @@ Foam::scalar Foam::NoSurfaceReaction<CloudType>::calculate
|
|||||||
scalarField&
|
scalarField&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// do nothing
|
return 0;
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,4 +66,3 @@ namespace Foam
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,7 +88,6 @@ bool Foam::NoBreakup<CloudType>::update
|
|||||||
scalar& massChild
|
scalar& massChild
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Do nothing
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,5 +11,3 @@
|
|||||||
}
|
}
|
||||||
rNew = 0.04*n*rs;
|
rNew = 0.04*n*rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,17 +91,16 @@ public:
|
|||||||
enum IOdebugType
|
enum IOdebugType
|
||||||
{
|
{
|
||||||
IOMESH,
|
IOMESH,
|
||||||
//IOSCALARLEVELS,
|
|
||||||
IOOBJINTERSECTIONS,
|
IOOBJINTERSECTIONS,
|
||||||
IOFEATURESEEDS,
|
IOFEATURESEEDS,
|
||||||
IOATTRACTION,
|
IOATTRACTION,
|
||||||
IOLAYERINFO
|
IOLAYERINFO
|
||||||
};
|
};
|
||||||
|
|
||||||
static const NamedEnum<IOdebugType, 5> IOdebugTypeNames;
|
static const NamedEnum<IOdebugType, 5> IOdebugTypeNames;
|
||||||
enum debugType
|
enum debugType
|
||||||
{
|
{
|
||||||
MESH = 1<<IOMESH,
|
MESH = 1<<IOMESH,
|
||||||
//SCALARLEVELS = 1<<IOSCALARLEVELS,
|
|
||||||
OBJINTERSECTIONS = 1<<IOOBJINTERSECTIONS,
|
OBJINTERSECTIONS = 1<<IOOBJINTERSECTIONS,
|
||||||
FEATURESEEDS = 1<<IOFEATURESEEDS,
|
FEATURESEEDS = 1<<IOFEATURESEEDS,
|
||||||
ATTRACTION = 1<< IOATTRACTION,
|
ATTRACTION = 1<< IOATTRACTION,
|
||||||
@ -113,6 +112,7 @@ public:
|
|||||||
{
|
{
|
||||||
IOOUTPUTLAYERINFO
|
IOOUTPUTLAYERINFO
|
||||||
};
|
};
|
||||||
|
|
||||||
static const NamedEnum<IOoutputType, 1> IOoutputTypeNames;
|
static const NamedEnum<IOoutputType, 1> IOoutputTypeNames;
|
||||||
enum outputType
|
enum outputType
|
||||||
{
|
{
|
||||||
@ -123,14 +123,17 @@ public:
|
|||||||
enum IOwriteType
|
enum IOwriteType
|
||||||
{
|
{
|
||||||
IOWRITEMESH,
|
IOWRITEMESH,
|
||||||
|
IONOWRITEREFINEMENT,
|
||||||
IOWRITELEVELS,
|
IOWRITELEVELS,
|
||||||
IOWRITELAYERSETS,
|
IOWRITELAYERSETS,
|
||||||
IOWRITELAYERFIELDS
|
IOWRITELAYERFIELDS
|
||||||
};
|
};
|
||||||
static const NamedEnum<IOwriteType, 4> IOwriteTypeNames;
|
|
||||||
|
static const NamedEnum<IOwriteType, 5> IOwriteTypeNames;
|
||||||
enum writeType
|
enum writeType
|
||||||
{
|
{
|
||||||
WRITEMESH = 1<<IOWRITEMESH,
|
WRITEMESH = 1<<IOWRITEMESH,
|
||||||
|
NOWRITEREFINEMENT = 1<<IONOWRITEREFINEMENT,
|
||||||
WRITELEVELS = 1<<IOWRITELEVELS,
|
WRITELEVELS = 1<<IOWRITELEVELS,
|
||||||
WRITELAYERSETS = 1<<IOWRITELAYERSETS,
|
WRITELAYERSETS = 1<<IOWRITELAYERSETS,
|
||||||
WRITELAYERFIELDS = 1<<IOWRITELAYERFIELDS
|
WRITELAYERFIELDS = 1<<IOWRITELAYERFIELDS
|
||||||
@ -1481,7 +1484,7 @@ public:
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#ifdef NoRepository
|
#ifdef NoRepository
|
||||||
# include "meshRefinementTemplates.C"
|
#include "meshRefinementTemplates.C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -155,9 +155,7 @@ public:
|
|||||||
|
|
||||||
//- Update the rotation for a list of cells
|
//- Update the rotation for a list of cells
|
||||||
virtual void updateCells(const polyMesh&, const labelList&)
|
virtual void updateCells(const polyMesh&, const labelList&)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return local-to-global transformation tensor
|
//- Return local-to-global transformation tensor
|
||||||
virtual const tensor& R() const
|
virtual const tensor& R() const
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user