ENH: Clean-up after latest Foundation integrations

This commit is contained in:
Andrew Heather 2017-03-28 14:21:07 +01:00
parent 45381b1085
commit e6b67f6790
40 changed files with 364 additions and 517 deletions

View File

@ -1,6 +1,4 @@
{
//const volScalarField& psi = thermo.psi();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
@ -104,9 +102,6 @@
rho = thermo.rho();
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic())
{
rho.relax();

View File

@ -112,8 +112,6 @@ p.correctBoundaryConditions();
// Recalculate density from the relaxed pressure
rho = thermo.rho();
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic())
{

View File

@ -90,9 +90,5 @@
}
rho = thermo.rho();
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
rho.relax();
}

View File

@ -12,9 +12,9 @@
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ Qdot
+ parcels.Sh(he)
+ radiation->Sh(thermo)
+ combustion->Sh()
+ fvOptions(rho, he)
);
@ -25,6 +25,7 @@
EEqn.solve();
fvOptions.correct(he);
thermo.correct();
radiation->correct();

View File

@ -10,10 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
@ -37,11 +34,6 @@ EXE_LIBS = \
-llagrangianTurbulence \
-lspecie \
-lfluidThermophysicalModels \
-lliquidProperties \
-lliquidMixtureProperties \
-lsolidProperties \
-lsolidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \

View File

@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
combustion->correct();
dQ = combustion->dQ();
Qdot = combustion->Qdot();
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)

View File

@ -103,18 +103,18 @@ forAll(Y, i)
}
fields.add(thermo.he());
volScalarField dQ
volScalarField Qdot
(
IOobject
(
"dQ",
"Qdot",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
dimensionedScalar("Qdot", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

@ -38,6 +38,9 @@ Description
#include "fvCFD.H"
#include "CMULES.H"
#include "EulerDdtScheme.H"
#include "localEulerDdtScheme.H"
#include "CrankNicolsonDdtScheme.H"
#include "subCycle.H"
#include "immiscibleIncompressibleTwoPhaseMixture.H"
@ -45,7 +48,7 @@ Description
#include "pimpleControl.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "fvcSmooth.H"
#include "basicKinematicMPPICCloud.H"
@ -59,16 +62,22 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createAlphaFluxes.H"
#include "createFvOptions.H"
#include "createTimeControls.H"
#include "correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
if (!LTS)
{
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -76,9 +85,17 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H"
if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "CourantNo.H"
#include "alphaCourantNo.H"
#include "setDeltaT.H"
}
runTime++;
@ -133,6 +150,8 @@ int main(int argc, char *argv[])
#include "alphaControls.H"
#include "alphaEqnSubCycle.H"
mixture.correct();
#include "UEqn.H"
// --- Pressure corrector loop

View File

@ -4,6 +4,7 @@ EXE_INC = \
-I. \
-I./IncompressibleTwoPhaseMixtureTurbulenceModels/lnInclude \
-I$(interFoamPath) \
-I../VoF \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
@ -31,7 +32,7 @@ EXE_LIBS = \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-lthermophysicalFunctions \
-lthermophysicalProperties \
-lspecie \
-lincompressibleTransportModels \
-limmiscibleIncompressibleTwoPhaseMixture \

View File

@ -1,164 +0,0 @@
{
word alphaScheme("div(phi,alpha)");
word alpharScheme("div(phirb,alpha)");
// Standard face-flux compression coefficient
surfaceScalarField phic
(
mixture.cAlpha()*mag(alphaPhic/mesh.magSf())
);
// Add the optional isotropic compression contribution
if (icAlpha > 0)
{
phic *= (1.0 - icAlpha);
phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
}
// Do not compress interface at non-coupled boundary faces
// (inlets, outlets etc.)
surfaceScalarField::Boundary& phicBf = phic.boundaryFieldRef();
forAll(phic.boundaryField(), patchi)
{
fvsPatchScalarField& phicp = phicBf[patchi];
if (!phicp.coupled())
{
phicp == 0;
}
}
tmp<surfaceScalarField> tphiAlpha;
if (MULESCorr)
{
fvScalarMatrix alpha1Eqn
(
fv::EulerDdtScheme<scalar>(mesh).fvmDdt(alphac, alpha1)
+ fv::gaussConvectionScheme<scalar>
(
mesh,
alphaPhic,
upwind<scalar>(mesh, alphaPhic)
).fvmDiv(alphaPhic, alpha1)
- fvm::Sp(fvc::ddt(alphac) + fvc::div(alphaPhic), alpha1)
);
alpha1Eqn.solve();
Info<< "Phase-1 volume fraction = "
<< alpha1.weightedAverage(mesh.Vsc()).value()
<< " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value()
<< endl;
tmp<surfaceScalarField> tphiAlphaUD(alpha1Eqn.flux());
alphaPhi = tphiAlphaUD();
if (alphaApplyPrevCorr && tphiAlphaCorr0.valid())
{
Info<< "Applying the previous iteration compression flux" << endl;
MULES::correct
(
alphac,
alpha1,
alphaPhi,
tphiAlphaCorr0.ref(),
zeroField(), zeroField(),
1, 0
);
alphaPhi += tphiAlphaCorr0();
}
// Cache the upwind-flux
tphiAlphaCorr0 = tphiAlphaUD;
alpha2 = 1.0 - alpha1;
mixture.correct();
}
for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
{
surfaceScalarField phir(phic*mixture.nHatf());
tmp<surfaceScalarField> tphiAlphaUn
(
fvc::flux
(
alphaPhic,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
);
if (MULESCorr)
{
tmp<surfaceScalarField> tphiAlphaCorr(tphiAlphaUn() - alphaPhi);
volScalarField alpha10("alpha10", alpha1);
//MULES::correct(alpha1, tphiAlphaUn(), tphiAlphaCorr(), 1, 0);
MULES::correct
(
alphac,
alpha1,
tphiAlphaUn(),
tphiAlphaCorr.ref(),
zeroField(), zeroField(),
1, 0
);
// Under-relax the correction for all but the 1st corrector
if (aCorr == 0)
{
alphaPhi += tphiAlphaCorr();
}
else
{
alpha1 = 0.5*alpha1 + 0.5*alpha10;
alphaPhi += 0.5*tphiAlphaCorr();
}
}
else
{
alphaPhi = tphiAlphaUn;
MULES::explicitSolve
(
alphac,
alpha1,
alphaPhic,
alphaPhi,
zeroField(), zeroField(),
1, 0
);
}
alpha2 = 1.0 - alpha1;
mixture.correct();
}
rhoPhi = alphaPhi*(rho1 - rho2) + alphaPhic*rho2;
if (alphaApplyPrevCorr && MULESCorr)
{
tphiAlphaCorr0 = alphaPhi - tphiAlphaCorr0;
}
Info<< "Phase-1 volume fraction = "
<< alpha1.weightedAverage(mesh.Vsc()).value()
<< " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value()
<< endl;
}

View File

@ -1,34 +0,0 @@
if (nAlphaSubCycles > 1)
{
dimensionedScalar totalDeltaT = runTime.deltaT();
surfaceScalarField rhoPhiSum
(
IOobject
(
"rhoPhiSum",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("0", rhoPhi.dimensions(), 0)
);
for
(
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
#include "alphaEqn.H"
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
}
rhoPhi = rhoPhiSum;
}
else
{
#include "alphaEqn.H"
}
rho == alpha1*rho1 + alpha2*rho2;
mu = mixture.mu();

View File

@ -1,221 +1,204 @@
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
#include "createRDeltaT.H"
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
Info<< "Reading transportProperties\n" << endl;
immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);
volScalarField& alpha1(mixture.alpha1());
volScalarField& alpha2(mixture.alpha2());
const dimensionedScalar& rho1 = mixture.rho1();
const dimensionedScalar& rho2 = mixture.rho2();
// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*rho1 + alpha2*rho2
);
rho.oldTime();
// Need to store mu as incompressibleTwoPhaseMixture does not store it
volScalarField mu
(
IOobject
(
"mu",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT
),
mixture.mu(),
calculatedFvPatchScalarField::typeName
);
// Mass flux
surfaceScalarField rhoPhi
(
IOobject
(
"rhoPhi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
fvc::interpolate(rho)*phi
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rho*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
mesh.solutionDict().subDict("PIMPLE"),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
// MULES flux from previous time-step
surfaceScalarField alphaPhi
(
IOobject
(
"alphaPhi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
phi*fvc::interpolate(alpha1)
);
tmp<surfaceScalarField> tphiAlphaCorr0;
// alphac must be constructed before the cloud
// so that the drag-models can find it
volScalarField alphac
(
IOobject
(
"alphac",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
"p_rgh",
runTime.timeName(),
mesh,
dimensionedScalar("0", dimless, 0),
zeroGradientFvPatchScalarField::typeName
);
alphac.oldTime();
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField alphacRho(alphac*rho);
alphacRho.oldTime();
Info<< "Constructing kinematicCloud " << endl;
basicKinematicMPPICCloud kinematicCloud
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"kinematicCloud",
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
Info<< "Reading transportProperties\n" << endl;
immiscibleIncompressibleTwoPhaseMixture mixture(U, phi);
volScalarField& alpha1(mixture.alpha1());
volScalarField& alpha2(mixture.alpha2());
const dimensionedScalar& rho1 = mixture.rho1();
const dimensionedScalar& rho2 = mixture.rho2();
// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*rho1 + alpha2*rho2
);
rho.oldTime();
// Need to store mu as incompressibleTwoPhaseMixture does not store it
volScalarField mu
(
IOobject
(
"mu",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT
),
mixture.mu(),
calculatedFvPatchScalarField::typeName
);
// Mass flux
surfaceScalarField rhoPhi
(
IOobject
(
"rhoPhi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
fvc::interpolate(rho)*phi
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rho*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
mesh.solutionDict().subDict("PIMPLE"),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rho*gh;
}
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
// alphac must be constructed before the cloud
// so that the drag-models can find it
volScalarField alphac
(
IOobject
(
"alphac",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("0", dimless, 0),
zeroGradientFvPatchScalarField::typeName
);
alphac.oldTime();
volScalarField alphacRho(alphac*rho);
alphacRho.oldTime();
Info<< "Constructing kinematicCloud " << endl;
basicKinematicMPPICCloud kinematicCloud
(
"kinematicCloud",
rho,
U,
mu,
g
);
// Particle fraction upper limit
scalar alphacMin
(
1.0
- readScalar
(
kinematicCloud.particleProperties().subDict("constantProperties")
.lookup("alphaMax")
)
);
// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
// Phase mass flux
surfaceScalarField alphaRhoPhic("alphaRhoPhic", alphacf*rhoPhi);
// Volumetric phase flux
surfaceScalarField alphaPhic("alphaPhic", alphacf*phi);
autoPtr
<
PhaseCompressibleTurbulenceModel
<
immiscibleIncompressibleTwoPhaseMixture
>
>turbulence
(
PhaseCompressibleTurbulenceModel
<
immiscibleIncompressibleTwoPhaseMixture
>::New
(
alphac,
rho,
U,
mu,
g
);
alphaRhoPhic,
rhoPhi,
mixture
)
);
// Particle fraction upper limit
scalar alphacMin
(
1.0
- readScalar
(
kinematicCloud.particleProperties().subDict("constantProperties")
.lookup("alphaMax")
)
);
// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
surfaceScalarField alphacf("alphacf", fvc::interpolate(alphac));
// Phase mass flux
surfaceScalarField alphaRhoPhic("alphaRhoPhic", alphacf*rhoPhi);
// Volumetric phase flux
surfaceScalarField alphaPhic("alphaPhic", alphacf*phi);
autoPtr
<
PhaseCompressibleTurbulenceModel
<
immiscibleIncompressibleTwoPhaseMixture
>
>turbulence
(
PhaseCompressibleTurbulenceModel
<
immiscibleIncompressibleTwoPhaseMixture
>::New
(
alphac,
rho,
U,
alphaRhoPhic,
rhoPhi,
mixture
)
);
#include "createMRF.H"
#include "createMRF.H"

View File

@ -7,7 +7,7 @@ IOobject alphaPhiHeader
IOobject::AUTO_WRITE
);
const bool alphaRestart = alphaPhiHeader.headerOk();
const bool alphaRestart = alphaPhiHeader.typeHeaderOk<surfaceScalarField>(true);
// MULES flux from previous time-step
surfaceScalarField alphaPhi

View File

@ -124,7 +124,7 @@ int main(int argc, char *argv[])
ghf = (g & mesh.Cf()) - ghRef;
}
if ((mesh.changing() && correctPhi)) || mesh.topoChanging())
if ((mesh.changing() && correctPhi) || mesh.topoChanging())
{
// Calculate absolute flux from the mapped surface velocity
// Note: temporary fix until mapped Uf is assessed

View File

@ -580,17 +580,17 @@ int main(int argc, char *argv[])
// Construct the dimensioned fields
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PtrList<DimensionedField<scalar, volMesh>> dimScalarFields;
readFields(mesh, objects, dimScalarFields, false);
readFields(mesh, objects, dimScalarFields);
PtrList<DimensionedField<vector, volMesh>> dimVectorFields;
readFields(mesh, objects, dimVectorFields, false);
readFields(mesh, objects, dimVectorFields);
PtrList<DimensionedField<sphericalTensor, volMesh>>
dimSphericalTensorFields;
readFields(mesh, objects, dimSphericalTensorFields, false);
readFields(mesh, objects, dimSphericalTensorFields);
PtrList<DimensionedField<symmTensor, volMesh>>
dimSymmTensorFields;
readFields(mesh, objects, dimSymmTensorFields, false);
readFields(mesh, objects, dimSymmTensorFields);
PtrList<DimensionedField<tensor, volMesh>> dimTensorFields;
readFields(mesh, objects, dimTensorFields, false);
readFields(mesh, objects, dimTensorFields);
// Construct the surface fields

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -137,7 +137,7 @@ Foam::parLagrangianRedistributor::redistributeLagrangianPositions
// Allocate transfer buffers
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
{
// List of lists of particles to be transfered for all of the

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -84,7 +84,7 @@ void Foam::ensightCloud::writePositions
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointList points(fromSlave);
forAll(points, pti)
@ -116,7 +116,7 @@ void Foam::ensightCloud::writePositions
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointList points(fromSlave);
forAll(points, pti)
@ -145,7 +145,12 @@ void Foam::ensightCloud::writePositions
}
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< points;
}

View File

@ -3,7 +3,7 @@
\\ / 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.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -74,7 +74,7 @@ bool Foam::ensightCloud::writeCloudField
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
Field<Type> slaveData(fromSlave);
forAll(slaveData, i)
@ -107,7 +107,12 @@ bool Foam::ensightCloud::writeCloudField
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< field;
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -274,7 +274,7 @@ void Foam::ensightMesh::writePolysConnectivity
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList addr(fromSlave);
cellList cellFaces(fromSlave);
@ -283,7 +283,7 @@ void Foam::ensightMesh::writePolysConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster(Pstream::commsTypes::scheduled, Pstream::masterNo());
toMaster
<< addr
<< cellFaces;
@ -303,7 +303,7 @@ void Foam::ensightMesh::writePolysConnectivity
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList addr(fromSlave);
cellList cellFaces(fromSlave);
faceList meshFaces(fromSlave);
@ -319,7 +319,7 @@ void Foam::ensightMesh::writePolysConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster(Pstream::commsTypes::scheduled, Pstream::masterNo());
toMaster
<< addr
<< cellFaces
@ -349,7 +349,7 @@ void Foam::ensightMesh::writePolysConnectivity
// Slaves
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList addr(fromSlave);
cellList cellFaces(fromSlave);
faceList faces(fromSlave);
@ -367,7 +367,7 @@ void Foam::ensightMesh::writePolysConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster(Pstream::commsTypes::scheduled, Pstream::masterNo());
toMaster
<< addr
<< cellFaces
@ -423,7 +423,7 @@ void Foam::ensightMesh::writeCellConnectivity
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
cellShapeList received(fromSlave);
writeCellShapes(received, os);
@ -431,7 +431,12 @@ void Foam::ensightMesh::writeCellConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< shapes;
}
@ -505,7 +510,7 @@ void Foam::ensightMesh::writeFaceConnectivity
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList received(fromSlave);
writeFaceSizes(received, os);
@ -513,7 +518,12 @@ void Foam::ensightMesh::writeFaceConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< faces;
}
@ -527,7 +537,7 @@ void Foam::ensightMesh::writeFaceConnectivity
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList received(fromSlave);
writeFaceList(received, os);
@ -535,7 +545,12 @@ void Foam::ensightMesh::writeFaceConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< faces;
}
@ -573,7 +588,7 @@ void Foam::ensightMesh::writeFaceConnectivity
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList received(fromSlave);
writeFaceSizes(received, os);
@ -581,7 +596,12 @@ void Foam::ensightMesh::writeFaceConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< faces;
}
@ -594,7 +614,7 @@ void Foam::ensightMesh::writeFaceConnectivity
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList received(fromSlave);
writeFaceList(received, os);
@ -602,7 +622,12 @@ void Foam::ensightMesh::writeFaceConnectivity
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< faces;
}
@ -679,7 +704,7 @@ void Foam::ensightMesh::writeAllPoints
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
scalarField received(fromSlave);
os.writeList(received);
}
@ -689,7 +714,12 @@ void Foam::ensightMesh::writeAllPoints
{
for (direction cmpt=0; cmpt < point::nComponents; ++cmpt)
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< uniquePoints.component(cmpt);
}

View File

@ -3,7 +3,7 @@
\\ / 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.
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -63,7 +63,7 @@ void Foam::ensightOutput::writeFieldContent
for (int slave=1; slave<Pstream::nProcs(); ++slave)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
scalarField received(fromSlave);
os.writeList(received);
}
@ -75,7 +75,12 @@ void Foam::ensightOutput::writeFieldContent
{
const label cmpt = ensightPTraits<Type>::componentOrder[d];
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster
<< fld.component(cmpt);
}

View File

@ -477,14 +477,14 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshTools::newMesh
slave++
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << patchEntries;
}
}
else
{
// Receive patches
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
IPstream fromMaster(Pstream::commsTypes::scheduled, Pstream::masterNo());
fromMaster >> patchEntries;
}

View File

@ -673,7 +673,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
mapDistribute map(segmentI, sendMap.xfer(), constructMap.xfer());
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
for (label domain = 0; domain < Pstream::nProcs(); domain++)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -322,7 +322,7 @@ void Foam::functionObjects::externalCoupled::readColumns
// Get sizes for all processors
const globalIndex globalFaces(nRows);
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
if (Pstream::master())
{
string line;
@ -391,7 +391,7 @@ void Foam::functionObjects::externalCoupled::readLines
// Get sizes for all processors
const globalIndex globalFaces(nRows);
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
if (Pstream::master())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -438,14 +438,24 @@ bool Foam::functionObjects::externalCoupled::writeData
for (label proci = 1; proci < Pstream::nProcs(); proci++)
{
IPstream fromSlave(Pstream::scheduled, proci);
IPstream fromSlave
(
Pstream::commsTypes::scheduled,
proci
);
string str(fromSlave);
masterFilePtr() << str.c_str();
}
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster << os.str();
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,8 +40,8 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
label nReq = Pstream::nRequests();
@ -64,7 +64,7 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
if
(
Pstream::parRun()
&& Pstream::defaultCommsType == Pstream::nonBlocking
&& Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
Pstream::waitRequests(nReq);
@ -84,7 +84,7 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule =
fld.mesh().globalData().patchSchedule();
@ -102,11 +102,11 @@ void Foam::functionObjects::mapFields::evaluateConstraintTypes
{
if (patchSchedule[patchEvali].init)
{
tgtField.initEvaluate(Pstream::scheduled);
tgtField.initEvaluate(Pstream::commsTypes::scheduled);
}
else
{
tgtField.evaluate(Pstream::scheduled);
tgtField.evaluate(Pstream::commsTypes::scheduled);
}
}
}

View File

@ -644,7 +644,7 @@ bool Foam::functionObjects::streamLineBase::write()
allTracks_.shrink();
mapDistributeBase::distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
distMap.schedule(),
distMap.constructSize(),
distMap.subMap(),
@ -662,7 +662,7 @@ bool Foam::functionObjects::streamLineBase::write()
allScalars_[scalari].shrink();
mapDistributeBase::distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
distMap.schedule(),
distMap.constructSize(),
distMap.subMap(),
@ -680,7 +680,7 @@ bool Foam::functionObjects::streamLineBase::write()
allVectors_[vectori].shrink();
mapDistributeBase::distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
distMap.schedule(),
distMap.constructSize(),
distMap.subMap(),

View File

@ -126,7 +126,7 @@ void surfaceNoise::readSurfaceData
if (Pstream::parRun())
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Procedure:
// 1. Master processor reads pressure data for all faces for all times
@ -243,7 +243,7 @@ Foam::scalar surfaceNoise::writeSurfaceData
{
// Collect the surface data so that we can output the surfaces
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
if (!Pstream::master())
{
@ -342,7 +342,7 @@ Foam::scalar surfaceNoise::surfaceAverage
{
// Collect the surface data so that we can output the surfaces
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
if (!Pstream::master())
{

View File

@ -1 +1,3 @@
LIB_LIBS = -lOpenFOAM
EXE_INC =
LIB_LIBS =

View File

@ -24,6 +24,9 @@ License
Class
Foam::logPolynomialTransport
Group
grpSpecieTransport
Description
Transport package using polynomial functions of \c ln(T) for \c mu and
\c kappa:

View File

@ -34,7 +34,7 @@ solvers
minIter 1;
}
pcorr
"pcorr.*"
{
$p;
tolerance 1e-02;

View File

@ -34,7 +34,7 @@ solvers
minIter 1;
}
pcorr
"pcorr.*"
{
$p;
tolerance 1e-2;

View File

@ -33,7 +33,7 @@ solvers
maxIter 100;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;

View File

@ -90,7 +90,7 @@ solvers
maxIter 300;
};
pcorr
"pcorr.*"
{
$p_rgh;
relTol 0;

View File

@ -24,7 +24,7 @@ solvers
cAlpha 1.5;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner

View File

@ -24,7 +24,7 @@ solvers
cAlpha 2;
}
pcorr
"pcorr.*"
{
solver GAMG;
smoother GaussSeidel;

View File

@ -25,7 +25,7 @@ solvers
cAlpha 1;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;

View File

@ -25,7 +25,7 @@ solvers
cAlpha 1;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;

View File

@ -25,7 +25,7 @@ solvers
cAlpha 1;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;

View File

@ -25,7 +25,7 @@ solvers
cAlpha 1;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;

View File

@ -25,7 +25,7 @@ solvers
cAlpha 1;
}
pcorr
"pcorr.*"
{
solver PCG;
preconditioner DIC;