mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -128,9 +128,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~basicSubGrid();
|
||||||
virtual ~basicSubGrid();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -107,9 +107,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~basicSubGrid();
|
||||||
virtual ~basicSubGrid();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -137,9 +137,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~PDRDragModel();
|
||||||
virtual ~PDRDragModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -135,9 +135,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~basic();
|
||||||
virtual ~basic();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -86,9 +86,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~Gulder();
|
||||||
virtual ~Gulder();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -91,9 +91,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~SCOPEBlend();
|
||||||
virtual ~SCOPEBlend();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -96,9 +96,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~SCOPEXiEq();
|
||||||
virtual ~SCOPEXiEq();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -132,9 +132,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~XiEqModel();
|
||||||
virtual ~XiEqModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -90,9 +90,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~instability();
|
||||||
virtual ~instability();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -85,9 +85,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~KTS();
|
||||||
virtual ~KTS();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -129,9 +129,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~XiGModel();
|
||||||
virtual ~XiGModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -94,9 +94,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~instabilityG();
|
||||||
virtual ~instabilityG();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -200,9 +200,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~XiModel();
|
||||||
virtual ~XiModel();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -95,9 +95,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~algebraic();
|
||||||
virtual ~algebraic();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -83,9 +83,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~fixed();
|
||||||
virtual ~fixed();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -95,9 +95,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~transport();
|
||||||
virtual ~transport();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -194,7 +194,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
~SCOPE();
|
~SCOPE();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~infinitelyFastChemistry();
|
||||||
virtual ~infinitelyFastChemistry();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -83,9 +83,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~noCombustion();
|
||||||
virtual ~noCombustion();
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -77,9 +77,8 @@ public:
|
|||||||
regionProperties(const Time& runTime);
|
regionProperties(const Time& runTime);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~regionProperties();
|
||||||
~regionProperties();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -16,6 +16,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
@ -36,4 +37,5 @@ EXE_LIBS = \
|
|||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiation \
|
-lradiation \
|
||||||
|
-lsurfaceFilmModels \
|
||||||
-lODE
|
-lODE
|
||||||
|
|||||||
@ -16,7 +16,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -35,4 +36,5 @@ EXE_LIBS = \
|
|||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiation \
|
-lradiation \
|
||||||
-lODE
|
-lODE \
|
||||||
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
reactingParcelFilmFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/reactingParcelFilmFoam
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
DEV_PATH=./../..
|
||||||
|
|
||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I${LIB_SRC}/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
|
-I$(LIB_SRC)/ODE/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lcompressibleLESModels \
|
||||||
|
-lspecie \
|
||||||
|
-lbasicThermophysicalModels \
|
||||||
|
-lsolids \
|
||||||
|
-lsolidMixture \
|
||||||
|
-lthermophysicalFunctions \
|
||||||
|
-lreactionThermophysicalModels \
|
||||||
|
-lchemistryModel \
|
||||||
|
-lradiation \
|
||||||
|
-lsurfaceFilmModels \
|
||||||
|
-llagrangianIntermediate \
|
||||||
|
-lODE
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
rho.dimensionedInternalField()*g
|
||||||
|
+ parcels.SU()
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (momentumPredictor)
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
tmp<fv::convectionScheme<scalar> > mvConvection
|
||||||
|
(
|
||||||
|
fv::convectionScheme<scalar>::New
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fields,
|
||||||
|
phi,
|
||||||
|
mesh.divScheme("div(phi,Yi_h)")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
label inertIndex = -1;
|
||||||
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
|
for (label i=0; i<Y.size(); i++)
|
||||||
|
{
|
||||||
|
if (Y[i].name() != inertSpecie)
|
||||||
|
{
|
||||||
|
volScalarField& Yi = Y[i];
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, Yi)
|
||||||
|
+ mvConvection->fvmDiv(phi, Yi)
|
||||||
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||||
|
==
|
||||||
|
parcels.Srho(i)
|
||||||
|
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
|
||||||
|
mesh.solver("Yi")
|
||||||
|
);
|
||||||
|
|
||||||
|
Yi.max(0.0);
|
||||||
|
Yt += Yi;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inertIndex = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Y[inertIndex] = scalar(1) - Yt;
|
||||||
|
Y[inertIndex].max(0.0);
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
Info << "Solving chemistry" << endl;
|
||||||
|
|
||||||
|
chemistry.solve
|
||||||
|
(
|
||||||
|
runTime.value() - runTime.deltaTValue(),
|
||||||
|
runTime.deltaTValue()
|
||||||
|
);
|
||||||
|
|
||||||
|
// turbulent time scale
|
||||||
|
if (turbulentReaction)
|
||||||
|
{
|
||||||
|
DimensionedField<scalar, volMesh> tk =
|
||||||
|
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
|
||||||
|
DimensionedField<scalar, volMesh> tc =
|
||||||
|
chemistry.tc()().dimensionedInternalField();
|
||||||
|
|
||||||
|
// Chalmers PaSR model
|
||||||
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kappa = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
|
thermoReactingCloud parcels
|
||||||
|
(
|
||||||
|
"reactingCloud1",
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
g,
|
||||||
|
thermo
|
||||||
|
);
|
||||||
@ -0,0 +1,122 @@
|
|||||||
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
|
autoPtr<psiChemistryModel> pChemistry
|
||||||
|
(
|
||||||
|
psiChemistryModel::New(mesh)
|
||||||
|
);
|
||||||
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
|
|
||||||
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
volScalarField& hs = thermo.hs();
|
||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
Info<< "Creating field rho\n" << endl;
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "\nReading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
Info<< "Creating field kappa\n" << endl;
|
||||||
|
DimensionedField<scalar, volMesh> kappa
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"kappa",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("zero", dimless, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::turbulenceModel::New
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating field DpDt\n" << endl;
|
||||||
|
volScalarField DpDt
|
||||||
|
(
|
||||||
|
"DpDt",
|
||||||
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||||
|
);
|
||||||
|
|
||||||
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
|
forAll(Y, i)
|
||||||
|
{
|
||||||
|
fields.add(Y[i]);
|
||||||
|
}
|
||||||
|
fields.add(hs);
|
||||||
|
|
||||||
|
IOdictionary additionalControlsDict
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"additionalControls",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Switch solvePrimaryRegion
|
||||||
|
(
|
||||||
|
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
Info<< "\nConstructing surface film model" << endl;
|
||||||
|
|
||||||
|
autoPtr<surfaceFilmModels::surfaceFilmModel>
|
||||||
|
tsurfaceFilm(surfaceFilmModels::surfaceFilmModel::New(mesh, g));
|
||||||
|
surfaceFilmModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
|
||||||
|
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ parcels.Sh()
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
|
U = rUA*UEqn.H();
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvm::div(phid, p)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
==
|
||||||
|
parcels.Srho()
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi == pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
phi =
|
||||||
|
fvc::interpolate(rho)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
==
|
||||||
|
parcels.Srho()
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi += pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
U -= rUA*fvc::grad(p);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
reactingParcelFilmFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient PISO solver for compressible, laminar or turbulent flow with
|
||||||
|
reacting Lagrangian parcels, and surface film modelling.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "hCombustionThermo.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
|
#include "BasicReactingCloud.H"
|
||||||
|
#include "surfaceFilmModel.H"
|
||||||
|
#include "psiChemistryModel.H"
|
||||||
|
#include "chemistrySolver.H"
|
||||||
|
#include "radiationModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readChemistryProperties.H"
|
||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "createClouds.H"
|
||||||
|
#include "createRadiationModel.H"
|
||||||
|
#include "createSurfaceFilmModel.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (runTime.run())
|
||||||
|
{
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "readPISOControls.H"
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
parcels.evolve();
|
||||||
|
|
||||||
|
surfaceFilm.evolve();
|
||||||
|
|
||||||
|
if (solvePrimaryRegion)
|
||||||
|
{
|
||||||
|
#include "chemistry.H"
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
|
// --- PIMPLE loop
|
||||||
|
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
#include "YEqn.H"
|
||||||
|
|
||||||
|
// --- PISO loop
|
||||||
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
{
|
||||||
|
#include "hsEqn.H"
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (runTime.write())
|
||||||
|
{
|
||||||
|
chemistry.dQ()().write();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
runTime.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End" << endl;
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
Info<< "Reading chemistry properties\n" << endl;
|
||||||
|
|
||||||
|
IOdictionary chemistryProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistryProperties",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
|
||||||
|
|
||||||
|
dimensionedScalar Cmix("Cmix", dimless, 1.0);
|
||||||
|
|
||||||
|
if (turbulentReaction)
|
||||||
|
{
|
||||||
|
chemistryProperties.lookup("Cmix") >> Cmix;
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||||
|
\\/ 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
|
||||||
|
rhoEqn
|
||||||
|
|
||||||
|
Description
|
||||||
|
Solve the continuity for density.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(rho)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
==
|
||||||
|
parcels.Srho()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -15,7 +15,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
-I$(LIB_SRC)/ODE/lnInclude
|
-I$(LIB_SRC)/ODE/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
@ -34,4 +35,5 @@ EXE_LIBS = \
|
|||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lradiation \
|
-lradiation \
|
||||||
-lODE
|
-lODE \
|
||||||
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -8,6 +8,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
@ -19,4 +20,5 @@ EXE_LIBS = \
|
|||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools
|
-lmeshTools \
|
||||||
|
-lsurfaceFilmModels
|
||||||
|
|||||||
@ -94,10 +94,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~threePhaseMixture()
|
||||||
~threePhaseMixture()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -96,10 +96,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~Kunz()
|
||||||
virtual ~Kunz()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -90,10 +90,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~Merkle()
|
||||||
virtual ~Merkle()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -103,10 +103,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~SchnerrSauer()
|
||||||
virtual ~SchnerrSauer()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -121,10 +121,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~phaseChangeTwoPhaseMixture()
|
||||||
virtual ~phaseChangeTwoPhaseMixture()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -209,10 +209,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~multiphaseMixture()
|
||||||
~multiphaseMixture()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -51,12 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< nl << "And again using STL iterator: " << nl << endl;
|
Info<< nl << "And again using STL iterator: " << nl << endl;
|
||||||
|
|
||||||
for
|
forAllIter(DLList<scalar>, myList, iter)
|
||||||
(
|
|
||||||
DLList<scalar>::iterator iter = myList.begin();
|
|
||||||
iter != myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
@ -64,12 +59,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< nl << "And again using the same STL iterator: " << nl << endl;
|
Info<< nl << "And again using the same STL iterator: " << nl << endl;
|
||||||
|
|
||||||
for
|
forAllIter(DLList<scalar>, myList, iter)
|
||||||
(
|
|
||||||
DLList<scalar>::iterator iter = myList.begin();
|
|
||||||
iter != myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "Removing " << myList.remove(iter) << endl;
|
Info<< "Removing " << myList.remove(iter) << endl;
|
||||||
}
|
}
|
||||||
@ -82,12 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const DLList<scalar>& const_myList = myList;
|
const DLList<scalar>& const_myList = myList;
|
||||||
|
|
||||||
for
|
forAllConstIter(DLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
DLList<scalar>::const_iterator iter = const_myList.begin();
|
|
||||||
iter != const_myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
@ -95,12 +80,7 @@ int main(int argc, char *argv[])
|
|||||||
myList.swapUp(myList.DLListBase::first());
|
myList.swapUp(myList.DLListBase::first());
|
||||||
myList.swapUp(myList.DLListBase::last());
|
myList.swapUp(myList.DLListBase::last());
|
||||||
|
|
||||||
for
|
forAllConstIter(DLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
DLList<scalar>::const_iterator iter = const_myList.begin();
|
|
||||||
iter != const_myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
@ -108,19 +88,14 @@ int main(int argc, char *argv[])
|
|||||||
myList.swapDown(myList.DLListBase::first());
|
myList.swapDown(myList.DLListBase::first());
|
||||||
myList.swapDown(myList.DLListBase::last());
|
myList.swapDown(myList.DLListBase::last());
|
||||||
|
|
||||||
for
|
forAllConstIter(DLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
DLList<scalar>::const_iterator iter = const_myList.begin();
|
|
||||||
iter != const_myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "Testing transfer: " << nl << endl;
|
Info<< nl << "Testing transfer: " << nl << nl
|
||||||
Info<< "original: " << myList << endl;
|
<< "original: " << myList << endl;
|
||||||
|
|
||||||
DLList<scalar> newList;
|
DLList<scalar> newList;
|
||||||
newList.transfer(myList);
|
newList.transfer(myList);
|
||||||
|
|||||||
@ -114,12 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
dict.swapDown(dict.first());
|
dict.swapDown(dict.first());
|
||||||
|
|
||||||
for
|
forAllConstIter(Dictionary<ent>, dict, iter)
|
||||||
(
|
|
||||||
Dictionary<ent>::const_iterator iter = dict.begin();
|
|
||||||
iter != dict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element : " << *iter;
|
Info<< "element : " << *iter;
|
||||||
}
|
}
|
||||||
@ -159,12 +154,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< nl << "scalarDict1: " << endl;
|
Info<< nl << "scalarDict1: " << endl;
|
||||||
for
|
forAllConstIter(PtrDictionary<Scalar>, scalarDict, iter)
|
||||||
(
|
|
||||||
PtrDictionary<Scalar>::const_iterator iter = scalarDict.begin();
|
|
||||||
iter != scalarDict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< " = " << iter() << endl;
|
Info<< " = " << iter() << endl;
|
||||||
}
|
}
|
||||||
@ -176,12 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
scalarDict2.insert(key, new Scalar(1.3*i));
|
scalarDict2.insert(key, new Scalar(1.3*i));
|
||||||
}
|
}
|
||||||
Info<< nl << "scalarDict2: " << endl;
|
Info<< nl << "scalarDict2: " << endl;
|
||||||
for
|
forAllConstIter(PtrDictionary<Scalar>, scalarDict2, iter)
|
||||||
(
|
|
||||||
PtrDictionary<Scalar>::const_iterator iter = scalarDict2.begin();
|
|
||||||
iter != scalarDict2.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "elem = " << *iter << endl;
|
Info<< "elem = " << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -78,12 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< nl << "And again using STL iterator: " << nl << endl;
|
Info<< nl << "And again using STL iterator: " << nl << endl;
|
||||||
|
|
||||||
for
|
forAllIter(SLList<scalar>, myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::iterator iter = myList.begin();
|
|
||||||
iter != myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
@ -92,14 +87,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const ISLList<Scalar>& const_myList = myList;
|
const ISLList<Scalar>& const_myList = myList;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::const_iterator iter2 = const_myList.begin();
|
|
||||||
iter2 != const_myList.end();
|
|
||||||
++iter2
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter2 << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -188,12 +188,7 @@ int main(int argc, char *argv[])
|
|||||||
sum = 0;
|
sum = 0;
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
for (label iter = 0; iter < nIters; ++iter)
|
||||||
{
|
{
|
||||||
for
|
forAllIter(PackedBoolList, packed, it)
|
||||||
(
|
|
||||||
PackedBoolList::iterator it = packed.begin();
|
|
||||||
it != packed.end();
|
|
||||||
++it
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
sum += it;
|
sum += it;
|
||||||
}
|
}
|
||||||
@ -207,12 +202,7 @@ int main(int argc, char *argv[])
|
|||||||
sum = 0;
|
sum = 0;
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
for (label iter = 0; iter < nIters; ++iter)
|
||||||
{
|
{
|
||||||
for
|
forAllConstIter(PackedBoolList, packed, cit)
|
||||||
(
|
|
||||||
PackedBoolList::const_iterator cit = packed.cbegin();
|
|
||||||
cit != packed.cend();
|
|
||||||
++cit
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
sum += cit();
|
sum += cit();
|
||||||
}
|
}
|
||||||
@ -333,12 +323,7 @@ int main(int argc, char *argv[])
|
|||||||
// Write packed
|
// Write packed
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
for (label iter = 0; iter < nIters; ++iter)
|
||||||
{
|
{
|
||||||
for
|
forAllIter(PackedBoolList, packed, it)
|
||||||
(
|
|
||||||
PackedBoolList::iterator it = packed.begin();
|
|
||||||
it != packed.end();
|
|
||||||
++it
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
it() = 1;
|
it() = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,12 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< nl << "And again using STL iterator: " << nl << endl;
|
Info<< nl << "And again using STL iterator: " << nl << endl;
|
||||||
|
|
||||||
for
|
forAllIter(SLList<scalar>, myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::iterator iter = myList.begin();
|
|
||||||
iter != myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
@ -65,39 +60,23 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const SLList<scalar>& const_myList = myList;
|
const SLList<scalar>& const_myList = myList;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::const_iterator iter2 = const_myList.begin();
|
|
||||||
iter2 != const_myList.end();
|
|
||||||
++iter2
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter2 << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllIter(SLList<scalar>, myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::iterator iter = myList.begin();
|
|
||||||
iter != myList.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "Removing element:" << *iter << endl;
|
Info<< "Removing element:" << *iter << endl;
|
||||||
myList.remove(iter);
|
myList.remove(iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<scalar>, const_myList, iter)
|
||||||
(
|
|
||||||
SLList<scalar>::const_iterator iter2 = const_myList.begin();
|
|
||||||
iter2 != const_myList.end();
|
|
||||||
++iter2
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element:" << *iter2 << endl;
|
Info<< "element:" << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i<10; i++)
|
for (int i = 0; i<10; i++)
|
||||||
{
|
{
|
||||||
myList.append(1.3*i);
|
myList.append(1.3*i);
|
||||||
|
|||||||
@ -81,12 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
dict.swapDown(dict.first());
|
dict.swapDown(dict.first());
|
||||||
|
|
||||||
for
|
forAllConstIter(UDictionary<ent>, dict, iter)
|
||||||
(
|
|
||||||
UDictionary<ent>::const_iterator iter = dict.begin();
|
|
||||||
iter != dict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< "element : " << *iter;
|
Info<< "element : " << *iter;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -292,20 +292,14 @@ void addCutNeighbours
|
|||||||
|
|
||||||
labelHashSet addCutFaces(cutCells.size());
|
labelHashSet addCutFaces(cutCells.size());
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, cutCells, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = cutCells.begin();
|
|
||||||
iter != cutCells.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
label cellI = iter.key();
|
const label cellI = iter.key();
|
||||||
|
|
||||||
const labelList& cFaces = mesh.cells()[cellI];
|
const labelList& cFaces = mesh.cells()[cellI];
|
||||||
|
|
||||||
forAll(cFaces, i)
|
forAll(cFaces, i)
|
||||||
{
|
{
|
||||||
label faceI = cFaces[i];
|
const label faceI = cFaces[i];
|
||||||
|
|
||||||
if (mesh.isInternalFace(faceI))
|
if (mesh.isInternalFace(faceI))
|
||||||
{
|
{
|
||||||
@ -331,12 +325,7 @@ void addCutNeighbours
|
|||||||
Info<< " Selected an additional " << addCutFaces.size()
|
Info<< " Selected an additional " << addCutFaces.size()
|
||||||
<< " neighbours of cutCells to refine" << endl;
|
<< " neighbours of cutCells to refine" << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, addCutFaces, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = addCutFaces.begin();
|
|
||||||
iter != addCutFaces.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
cutCells.insert(iter.key());
|
cutCells.insert(iter.key());
|
||||||
}
|
}
|
||||||
@ -386,21 +375,15 @@ bool limitRefinementLevel
|
|||||||
|
|
||||||
labelHashSet addCutCells(cutCells.size());
|
labelHashSet addCutCells(cutCells.size());
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, cutCells, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = cutCells.begin();
|
|
||||||
iter != cutCells.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// cellI will be refined.
|
// cellI will be refined.
|
||||||
label cellI = iter.key();
|
const label cellI = iter.key();
|
||||||
|
|
||||||
const labelList& cCells = mesh.cellCells()[cellI];
|
const labelList& cCells = mesh.cellCells()[cellI];
|
||||||
|
|
||||||
forAll(cCells, i)
|
forAll(cCells, i)
|
||||||
{
|
{
|
||||||
label nbr = cCells[i];
|
const label nbr = cCells[i];
|
||||||
|
|
||||||
if (!excludeCells.found(nbr) && !cutCells.found(nbr))
|
if (!excludeCells.found(nbr) && !cutCells.found(nbr))
|
||||||
{
|
{
|
||||||
@ -419,12 +402,8 @@ bool limitRefinementLevel
|
|||||||
Info<< "Added an additional " << addCutCells.size() << " cells"
|
Info<< "Added an additional " << addCutCells.size() << " cells"
|
||||||
<< " to satisfy 1:" << limitDiff << " refinement level"
|
<< " to satisfy 1:" << limitDiff << " refinement level"
|
||||||
<< endl;
|
<< endl;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(labelHashSet, addCutCells, iter)
|
||||||
labelHashSet::const_iterator iter = addCutCells.begin();
|
|
||||||
iter != addCutCells.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
cutCells.insert(iter.key());
|
cutCells.insert(iter.key());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,9 +108,8 @@ public:
|
|||||||
cellSplitter(const polyMesh& mesh);
|
cellSplitter(const polyMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~cellSplitter();
|
||||||
~cellSplitter();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -112,12 +112,7 @@ int main(int argc, char *argv[])
|
|||||||
<< cells.instance()/cells.local()/cells.name()
|
<< cells.instance()/cells.local()/cells.name()
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(cellSet, cells, iter)
|
||||||
(
|
|
||||||
cellSet::const_iterator iter = cells.begin();
|
|
||||||
iter != cells.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
cutCells.erase(iter.key());
|
cutCells.erase(iter.key());
|
||||||
}
|
}
|
||||||
@ -131,7 +126,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
forAll(meshPoints, pointI)
|
forAll(meshPoints, pointI)
|
||||||
{
|
{
|
||||||
label meshPointI = meshPoints[pointI];
|
const label meshPointI = meshPoints[pointI];
|
||||||
|
|
||||||
vertOnPatch[meshPointI] = true;
|
vertOnPatch[meshPointI] = true;
|
||||||
}
|
}
|
||||||
@ -151,8 +146,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
forAll(pEdges, pEdgeI)
|
forAll(pEdges, pEdgeI)
|
||||||
{
|
{
|
||||||
label edgeI = pEdges[pEdgeI];
|
const label edgeI = pEdges[pEdgeI];
|
||||||
|
|
||||||
const edge& e = mesh.edges()[edgeI];
|
const edge& e = mesh.edges()[edgeI];
|
||||||
|
|
||||||
label otherPointI = e.otherVertex(meshPointI);
|
label otherPointI = e.otherVertex(meshPointI);
|
||||||
|
|||||||
@ -392,15 +392,9 @@ void collectCuts
|
|||||||
boolList edgeIsCut(mesh.nEdges(), false);
|
boolList edgeIsCut(mesh.nEdges(), false);
|
||||||
scalarField edgeWeight(mesh.nEdges(), -GREAT);
|
scalarField edgeWeight(mesh.nEdges(), -GREAT);
|
||||||
|
|
||||||
for
|
forAllConstIter(cellSet, cellsToCut, iter)
|
||||||
(
|
|
||||||
cellSet::const_iterator iter = cellsToCut.begin();
|
|
||||||
iter != cellsToCut.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
label cellI = iter.key();
|
const label cellI = iter.key();
|
||||||
|
|
||||||
const labelList& cEdges = cellEdges[cellI];
|
const labelList& cEdges = cellEdges[cellI];
|
||||||
|
|
||||||
forAll(cEdges, i)
|
forAll(cEdges, i)
|
||||||
|
|||||||
@ -268,13 +268,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
pointField points(slPoints.size());
|
pointField points(slPoints.size());
|
||||||
|
|
||||||
label i=0;
|
label i = 0;
|
||||||
for
|
forAllConstIter(SLList<point>, slPoints, pointIter)
|
||||||
(
|
|
||||||
SLList<point>::iterator pointIter = slPoints.begin();
|
|
||||||
pointIter != slPoints.end();
|
|
||||||
++pointIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Scale points for the given scale factor
|
// Scale points for the given scale factor
|
||||||
points[i++] = scaleFactor * pointIter();
|
points[i++] = scaleFactor * pointIter();
|
||||||
@ -283,13 +278,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList pointMap(maxNodei+1);
|
labelList pointMap(maxNodei+1);
|
||||||
|
|
||||||
i=0;
|
i = 0;
|
||||||
for
|
forAllConstIter(SLList<label>, slPointMap, pointMapIter)
|
||||||
(
|
|
||||||
SLList<label>::iterator pointMapIter = slPointMap.begin();
|
|
||||||
pointMapIter != slPointMap.end();
|
|
||||||
++pointMapIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
pointMap[pointMapIter()] = i++;
|
pointMap[pointMapIter()] = i++;
|
||||||
}
|
}
|
||||||
@ -298,13 +288,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList cellMap(maxCelli+1);
|
labelList cellMap(maxCelli+1);
|
||||||
|
|
||||||
i=0;
|
i = 0;
|
||||||
for
|
forAllConstIter(SLList<label>, slCellMap, cellMapIter)
|
||||||
(
|
|
||||||
SLList<label>::iterator cellMapIter = slCellMap.begin();
|
|
||||||
cellMapIter != slCellMap.end();
|
|
||||||
++cellMapIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
cellMap[cellMapIter()] = i++;
|
cellMap[cellMapIter()] = i++;
|
||||||
}
|
}
|
||||||
@ -323,12 +308,7 @@ int main(int argc, char *argv[])
|
|||||||
cellShapeList cellShapes(slCellLabels.size());
|
cellShapeList cellShapes(slCellLabels.size());
|
||||||
label nCells = 0;
|
label nCells = 0;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLPtrList<labelList>, slCellLabels, cellIter)
|
||||||
(
|
|
||||||
SLPtrList<labelList>::iterator cellIter = slCellLabels.begin();
|
|
||||||
cellIter != slCellLabels.end();
|
|
||||||
++cellIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if // Tetrahedron
|
if // Tetrahedron
|
||||||
(
|
(
|
||||||
|
|||||||
@ -100,9 +100,8 @@ public:
|
|||||||
return autoPtr<block>(NULL);
|
return autoPtr<block>(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~block();
|
||||||
~block();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -327,12 +327,7 @@ if
|
|||||||
{
|
{
|
||||||
scalar minz = GREAT;
|
scalar minz = GREAT;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
|
||||||
(
|
|
||||||
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
|
|
||||||
iter != pFaces[CYLINDERHEAD][0].end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
@ -346,12 +341,7 @@ if
|
|||||||
|
|
||||||
SLList<face> newLinerFaces;
|
SLList<face> newLinerFaces;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<face>, pFaces[LINER][0], iter)
|
||||||
(
|
|
||||||
SLList<face>::iterator iter = pFaces[LINER][0].begin();
|
|
||||||
iter != pFaces[LINER][0].end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
@ -380,12 +370,7 @@ if
|
|||||||
|
|
||||||
SLList<face> newCylinderHeadFaces;
|
SLList<face> newCylinderHeadFaces;
|
||||||
|
|
||||||
for
|
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
|
||||||
(
|
|
||||||
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
|
|
||||||
iter != pFaces[CYLINDERHEAD][0].end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
@ -456,12 +441,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
|
|||||||
{
|
{
|
||||||
pFaces[CYCLIC].setSize(1);
|
pFaces[CYCLIC].setSize(1);
|
||||||
pFaces[CYCLIC][0] = pFaces[WEDGE][0];
|
pFaces[CYCLIC][0] = pFaces[WEDGE][0];
|
||||||
for
|
forAllIter(SLList<face>, pFaces[WEDGE][1], iterb)
|
||||||
(
|
|
||||||
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
|
|
||||||
iterb != pFaces[WEDGE][1].end();
|
|
||||||
++iterb
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
pFaces[CYCLIC][0].append(iterb());
|
pFaces[CYCLIC][0].append(iterb());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -238,9 +238,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~sammMesh();
|
||||||
~sammMesh();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -299,9 +299,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~starMesh();
|
||||||
~starMesh();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -468,12 +468,7 @@ int main(int argc, char *argv[])
|
|||||||
// Print region to patch mapping
|
// Print region to patch mapping
|
||||||
Info<< "Regions:" << endl;
|
Info<< "Regions:" << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(Map<label>, regionToPatch, iter)
|
||||||
(
|
|
||||||
Map<label>::const_iterator iter = regionToPatch.begin();
|
|
||||||
iter != regionToPatch.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< " region:" << iter.key() << '\t' << "patch:"
|
Info<< " region:" << iter.key() << '\t' << "patch:"
|
||||||
<< iter() << endl;
|
<< iter() << endl;
|
||||||
|
|||||||
@ -356,12 +356,7 @@ void writePointCells
|
|||||||
|
|
||||||
label vertI = 0;
|
label vertI = 0;
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, allEdges, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = allEdges.begin();
|
|
||||||
iter != allEdges.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const edge& e = mesh.edges()[iter.key()];
|
const edge& e = mesh.edges()[iter.key()];
|
||||||
|
|
||||||
|
|||||||
@ -143,12 +143,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
@ -183,12 +178,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
@ -209,12 +199,7 @@ void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
@ -1461,7 +1446,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mesh.setInstance(meshInstance);
|
mesh.setInstance(meshInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Change master and slave boundary conditions on originating mesh
|
// Change master and slave boundary conditions on originating mesh
|
||||||
|
|||||||
@ -102,10 +102,9 @@ public:
|
|||||||
mergePolyMesh(const IOobject& io);
|
mergePolyMesh(const IOobject& io);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
virtual ~mergePolyMesh()
|
||||||
virtual ~mergePolyMesh()
|
{}
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -76,9 +76,8 @@ public:
|
|||||||
mirrorFvMesh(const IOobject& io);
|
mirrorFvMesh(const IOobject& io);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~mirrorFvMesh();
|
||||||
~mirrorFvMesh();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -100,12 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Pout<< "pointSets:" << pointObjects.names() << endl;
|
//Pout<< "pointSets:" << pointObjects.names() << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(IOobjectList, pointObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::const_iterator iter = pointObjects.begin();
|
|
||||||
iter != pointObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Not in memory. Load it.
|
// Not in memory. Load it.
|
||||||
pointSet set(*iter());
|
pointSet set(*iter());
|
||||||
@ -149,12 +144,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Pout<< "faceSets:" << faceObjects.names() << endl;
|
//Pout<< "faceSets:" << faceObjects.names() << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(IOobjectList, faceObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::const_iterator iter = faceObjects.begin();
|
|
||||||
iter != faceObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Not in memory. Load it.
|
// Not in memory. Load it.
|
||||||
faceSet set(*iter());
|
faceSet set(*iter());
|
||||||
@ -288,12 +278,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Pout<< "cellSets:" << cellObjects.names() << endl;
|
//Pout<< "cellSets:" << cellObjects.names() << endl;
|
||||||
|
|
||||||
for
|
forAllConstIter(IOobjectList, cellObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::const_iterator iter = cellObjects.begin();
|
|
||||||
iter != cellObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!slaveCellSets.found(iter.key()))
|
if (!slaveCellSets.found(iter.key()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -81,8 +81,7 @@ Foam::label Foam::regionSide::otherEdge
|
|||||||
|
|
||||||
forAll(fEdges, fEdgeI)
|
forAll(fEdges, fEdgeI)
|
||||||
{
|
{
|
||||||
label otherEdgeI = fEdges[fEdgeI];
|
const label otherEdgeI = fEdges[fEdgeI];
|
||||||
|
|
||||||
const edge& otherE = mesh.edges()[otherEdgeI];
|
const edge& otherE = mesh.edges()[otherEdgeI];
|
||||||
|
|
||||||
if
|
if
|
||||||
@ -300,15 +299,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
|||||||
//
|
//
|
||||||
labelHashSet regionEdges(4*regionFaces.size());
|
labelHashSet regionEdges(4*regionFaces.size());
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, regionFaces, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = regionFaces.begin();
|
|
||||||
iter != regionFaces.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
label faceI = iter.key();
|
const label faceI = iter.key();
|
||||||
|
|
||||||
const labelList& fEdges = mesh.faceEdges()[faceI];
|
const labelList& fEdges = mesh.faceEdges()[faceI];
|
||||||
|
|
||||||
forAll(fEdges, fEdgeI)
|
forAll(fEdges, fEdgeI)
|
||||||
@ -326,12 +319,7 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
|||||||
labelHashSet visitedPoint(4*regionFaces.size());
|
labelHashSet visitedPoint(4*regionFaces.size());
|
||||||
|
|
||||||
// Insert fence points so we don't visit them
|
// Insert fence points so we don't visit them
|
||||||
for
|
forAllConstIter(labelHashSet, fencePoints, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = fencePoints.begin();
|
|
||||||
iter != fencePoints.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
visitedPoint.insert(iter.key());
|
visitedPoint.insert(iter.key());
|
||||||
}
|
}
|
||||||
@ -344,14 +332,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
|||||||
Info<< "Excluding visit of points:" << visitedPoint << endl;
|
Info<< "Excluding visit of points:" << visitedPoint << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, regionFaces, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = regionFaces.begin();
|
|
||||||
iter != regionFaces.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
label faceI = iter.key();
|
const label faceI = iter.key();
|
||||||
|
|
||||||
// Get side of face.
|
// Get side of face.
|
||||||
label cellI;
|
label cellI;
|
||||||
@ -459,12 +442,7 @@ Foam::regionSide::regionSide
|
|||||||
|
|
||||||
labelHashSet fencePoints(fenceEdges.size());
|
labelHashSet fencePoints(fenceEdges.size());
|
||||||
|
|
||||||
for
|
forAllConstIter(labelHashSet, fenceEdges, iter)
|
||||||
(
|
|
||||||
labelHashSet::const_iterator iter = fenceEdges.begin();
|
|
||||||
iter != fenceEdges.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const edge& e = mesh.edges()[iter.key()];
|
const edge& e = mesh.edges()[iter.key()];
|
||||||
|
|
||||||
|
|||||||
@ -99,12 +99,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
@ -139,12 +134,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
@ -165,12 +155,7 @@ void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
|
|||||||
mesh.objectRegistry::lookupClass<GeoField>()
|
mesh.objectRegistry::lookupClass<GeoField>()
|
||||||
);
|
);
|
||||||
|
|
||||||
for
|
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
|
||||||
(
|
|
||||||
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
|
|
||||||
iter != flds.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const GeoField& fld = *iter();
|
const GeoField& fld = *iter();
|
||||||
|
|
||||||
|
|||||||
@ -360,7 +360,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList osf(slavePatch.size());
|
labelList osf(slavePatch.size());
|
||||||
|
|
||||||
forAll (osf, i)
|
forAll(osf, i)
|
||||||
{
|
{
|
||||||
osf[i] = slavePatch.start() + i;
|
osf[i] = slavePatch.start() + i;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,12 +76,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.optionFound("keywords") && !args.optionFound("entry"))
|
if (args.optionFound("keywords") && !args.optionFound("entry"))
|
||||||
{
|
{
|
||||||
for
|
forAllConstIter(dictionary, dict, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::iterator iter = dict.begin();
|
|
||||||
iter != dict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< iter().keyword() << endl;
|
Info<< iter().keyword() << endl;
|
||||||
}
|
}
|
||||||
@ -137,13 +132,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const dictionary& dict(entPtr->dict());
|
const dictionary& dict = entPtr->dict();
|
||||||
for
|
forAllConstIter(dictionary, dict, iter)
|
||||||
(
|
|
||||||
IDLList<entry>::const_iterator iter = dict.begin();
|
|
||||||
iter != dict.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Info<< iter().keyword() << endl;
|
Info<< iter().keyword() << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,9 +126,8 @@ public:
|
|||||||
domainDecomposition(const IOobject& io);
|
domainDecomposition(const IOobject& io);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~domainDecomposition();
|
||||||
~domainDecomposition();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -506,12 +506,7 @@ void Foam::domainDecomposition::decomposeMesh()
|
|||||||
// Add internal and boundary faces
|
// Add internal and boundary faces
|
||||||
// Remember to increment the index by one such that the
|
// Remember to increment the index by one such that the
|
||||||
// turning index works properly.
|
// turning index works properly.
|
||||||
for
|
forAllConstIter(SLList<label>, curProcFaces, curProcFacesIter)
|
||||||
(
|
|
||||||
SLList<label>::iterator curProcFacesIter = curProcFaces.begin();
|
|
||||||
curProcFacesIter != curProcFaces.end();
|
|
||||||
++curProcFacesIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
curProcFaceAddressing[nFaces] = curProcFacesIter() + 1;
|
curProcFaceAddressing[nFaces] = curProcFacesIter() + 1;
|
||||||
nFaces++;
|
nFaces++;
|
||||||
@ -564,12 +559,11 @@ void Foam::domainDecomposition::decomposeMesh()
|
|||||||
|
|
||||||
// add faces for this processor boundary
|
// add faces for this processor boundary
|
||||||
|
|
||||||
for
|
forAllConstIter
|
||||||
(
|
(
|
||||||
SLList<label>::iterator curFacesIter =
|
SLList<label>,
|
||||||
curInterProcBFacesIter().begin();
|
curInterProcBFacesIter(),
|
||||||
curFacesIter != curInterProcBFacesIter().end();
|
curFacesIter
|
||||||
++curFacesIter
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// add the face
|
// add the face
|
||||||
|
|||||||
@ -230,9 +230,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~fvFieldDecomposer();
|
||||||
~fvFieldDecomposer();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -55,7 +55,7 @@ Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer
|
|||||||
{
|
{
|
||||||
SLList<indexedParticle*>& particlePtrs = *cellParticles[celli];
|
SLList<indexedParticle*>& particlePtrs = *cellParticles[celli];
|
||||||
|
|
||||||
forAllIter(SLList<indexedParticle*>, particlePtrs, iter)
|
forAllConstIter(SLList<indexedParticle*>, particlePtrs, iter)
|
||||||
{
|
{
|
||||||
const indexedParticle& ppi = *iter();
|
const indexedParticle& ppi = *iter();
|
||||||
particleIndices_[pi++] = ppi.index();
|
particleIndices_[pi++] = ppi.index();
|
||||||
|
|||||||
@ -138,9 +138,8 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
//- Destructor
|
||||||
|
~pointFieldDecomposer();
|
||||||
~pointFieldDecomposer();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -48,22 +48,13 @@ void Foam::readFields
|
|||||||
// Construct the vol scalar fields
|
// Construct the vol scalar fields
|
||||||
fields.setSize(fieldObjects.size());
|
fields.setSize(fieldObjects.size());
|
||||||
|
|
||||||
label fieldi=0;
|
label fieldI = 0;
|
||||||
for
|
forAllIter(IOobjectList, fieldObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::iterator iter = fieldObjects.begin();
|
|
||||||
iter != fieldObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
fields.set
|
fields.set
|
||||||
(
|
(
|
||||||
fieldi++,
|
fieldI++,
|
||||||
new GeoField
|
new GeoField(*iter(), mesh)
|
||||||
(
|
|
||||||
*iter(),
|
|
||||||
mesh
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,34 +110,21 @@ int main(int argc, char *argv[])
|
|||||||
// Search list of objects for volScalarFields
|
// Search list of objects for volScalarFields
|
||||||
IOobjectList scalarFields(objects.lookupClass("volScalarField"));
|
IOobjectList scalarFields(objects.lookupClass("volScalarField"));
|
||||||
|
|
||||||
for
|
forAllIter(IOobjectList, scalarFields, iter)
|
||||||
(
|
|
||||||
IOobjectList::iterator scalarFieldIter = scalarFields.begin();
|
|
||||||
scalarFieldIter != scalarFields.end();
|
|
||||||
++scalarFieldIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Read field
|
// Read field
|
||||||
volScalarField field
|
volScalarField field(*iter(), mesh);
|
||||||
|
|
||||||
|
// lookup field from dictionary and convert field
|
||||||
|
label unitNumber;
|
||||||
|
if
|
||||||
(
|
(
|
||||||
*scalarFieldIter(),
|
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
|
||||||
mesh
|
&& unitNumber > 0
|
||||||
);
|
)
|
||||||
|
|
||||||
// lookup field from dictionary
|
|
||||||
if (foamDataToFluentDict.found(field.name()))
|
|
||||||
{
|
{
|
||||||
label unitNumber
|
Info<< " Converting field " << field.name() << endl;
|
||||||
(
|
writeFluentField(field, unitNumber, fluentDataFile);
|
||||||
readLabel(foamDataToFluentDict.lookup(field.name()))
|
|
||||||
);
|
|
||||||
|
|
||||||
// Convert field
|
|
||||||
if (unitNumber > 0)
|
|
||||||
{
|
|
||||||
Info<< " Converting field " << field.name() << endl;
|
|
||||||
writeFluentField(field, unitNumber, fluentDataFile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,34 +135,21 @@ int main(int argc, char *argv[])
|
|||||||
// Search list of objects for volVectorFields
|
// Search list of objects for volVectorFields
|
||||||
IOobjectList vectorFields(objects.lookupClass("volVectorField"));
|
IOobjectList vectorFields(objects.lookupClass("volVectorField"));
|
||||||
|
|
||||||
for
|
forAllIter(IOobjectList, vectorFields, iter)
|
||||||
(
|
|
||||||
IOobjectList::iterator vectorFieldIter = vectorFields.begin();
|
|
||||||
vectorFieldIter != vectorFields.end();
|
|
||||||
++vectorFieldIter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Read field
|
// Read field
|
||||||
volVectorField field
|
volVectorField field(*iter(), mesh);
|
||||||
|
|
||||||
|
// lookup field from dictionary and convert field
|
||||||
|
label unitNumber;
|
||||||
|
if
|
||||||
(
|
(
|
||||||
*vectorFieldIter(),
|
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
|
||||||
mesh
|
&& unitNumber > 0
|
||||||
);
|
)
|
||||||
|
|
||||||
// lookup field from dictionary
|
|
||||||
if (foamDataToFluentDict.found(field.name()))
|
|
||||||
{
|
{
|
||||||
label unitNumber
|
Info<< " Converting field " << field.name() << endl;
|
||||||
(
|
writeFluentField(field, unitNumber, fluentDataFile);
|
||||||
readLabel(foamDataToFluentDict.lookup(field.name()))
|
|
||||||
);
|
|
||||||
|
|
||||||
// Convert field
|
|
||||||
if (unitNumber > 0)
|
|
||||||
{
|
|
||||||
Info<< " Converting field " << field.name() << endl;
|
|
||||||
writeFluentField(field, unitNumber, fluentDataFile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,11 +22,11 @@ for (label i=0; i < nTypes; i++)
|
|||||||
|
|
||||||
if (fieldTypes[i] == "volScalarField")
|
if (fieldTypes[i] == "volScalarField")
|
||||||
{
|
{
|
||||||
volScalarField gmvScalarField(fieldObject, mesh);
|
volScalarField fld(fieldObject, mesh);
|
||||||
gmvFile << fieldName << " 0" << nl;
|
gmvFile << fieldName << " 0" << nl;
|
||||||
for (label indx=0;indx<mesh.nCells();indx++)
|
for (label indx=0;indx<mesh.nCells();indx++)
|
||||||
{
|
{
|
||||||
gmvFile << gmvScalarField[indx] << " ";
|
gmvFile << fld[indx] << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
}
|
}
|
||||||
@ -35,19 +35,19 @@ for (label i=0; i < nTypes; i++)
|
|||||||
{
|
{
|
||||||
if (fieldName == vComp)
|
if (fieldName == vComp)
|
||||||
{
|
{
|
||||||
volVectorField gmvVectorField(fieldObject, mesh);
|
volVectorField fld(fieldObject, mesh);
|
||||||
gmvFile << "velocity 0" << nl;
|
gmvFile << "velocity 0" << nl;
|
||||||
for (label indx=0;indx<mesh.nCells();indx++)
|
for (label indx=0;indx<mesh.nCells();indx++)
|
||||||
{
|
{
|
||||||
gmvFile << gmvVectorField[indx].x() << " ";
|
gmvFile << fld[indx].x() << " ";
|
||||||
}
|
}
|
||||||
for (label indx=0;indx<mesh.nCells();indx++)
|
for (label indx=0;indx<mesh.nCells();indx++)
|
||||||
{
|
{
|
||||||
gmvFile << gmvVectorField[indx].y() << " ";
|
gmvFile << fld[indx].y() << " ";
|
||||||
}
|
}
|
||||||
for (label indx=0;indx<mesh.nCells();indx++)
|
for (label indx=0;indx<mesh.nCells();indx++)
|
||||||
{
|
{
|
||||||
gmvFile << gmvVectorField[indx].z() << " ";
|
gmvFile << fld[indx].z() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,42 +1,27 @@
|
|||||||
gmvFile << "tracers " << particles.size() << nl;
|
gmvFile << "tracers " << particles.size() << nl;
|
||||||
for
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
(
|
|
||||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().x() << " ";
|
gmvFile << iter().position().x() << ' ';
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
for
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
(
|
|
||||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().y() << " ";
|
gmvFile << iter().position().y() << ' ';
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
for
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
(
|
|
||||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().z() << " ";
|
gmvFile << iter().position().z() << ' ';
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
forAll(lagrangianScalarNames, i)
|
forAll(lagrangianScalarNames, i)
|
||||||
{
|
{
|
||||||
word name = lagrangianScalarNames[i];
|
const word& name = lagrangianScalarNames[i];
|
||||||
|
|
||||||
IOField<scalar> s
|
IOField<scalar> fld
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -49,13 +34,13 @@ forAll(lagrangianScalarNames, i)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (s.size())
|
if (fld.size())
|
||||||
{
|
{
|
||||||
gmvFile << name << nl;
|
gmvFile << name << nl;
|
||||||
|
|
||||||
for (label n = 0; n < s.size(); n++)
|
forAll(fld, n)
|
||||||
{
|
{
|
||||||
gmvFile << s[n] << token::SPACE;
|
gmvFile << fld[n] << token::SPACE;
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
}
|
}
|
||||||
@ -65,9 +50,9 @@ forAll(lagrangianScalarNames, i)
|
|||||||
|
|
||||||
forAll(lagrangianVectorNames, i)
|
forAll(lagrangianVectorNames, i)
|
||||||
{
|
{
|
||||||
word name = lagrangianVectorNames[i];
|
const word& name = lagrangianVectorNames[i];
|
||||||
|
|
||||||
IOField<vector> v
|
IOField<vector> fld
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
@ -80,29 +65,29 @@ forAll(lagrangianVectorNames, i)
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (v.size())
|
if (fld.size())
|
||||||
{
|
{
|
||||||
gmvFile << name + "x" << nl;
|
gmvFile << name + "x" << nl;
|
||||||
|
|
||||||
for (label n = 0; n < v.size(); n++)
|
forAll(fld, n)
|
||||||
{
|
{
|
||||||
gmvFile << v[n].x() << token::SPACE;
|
gmvFile << fld[n].x() << token::SPACE;
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << name + "y" << nl;
|
gmvFile << name + "y" << nl;
|
||||||
|
|
||||||
for (label n = 0; n < v.size(); n++)
|
forAll(fld, n)
|
||||||
{
|
{
|
||||||
gmvFile << v[n].y() << token::SPACE;
|
gmvFile << fld[n].y() << token::SPACE;
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << name + "z" << nl;
|
gmvFile << name + "z" << nl;
|
||||||
|
|
||||||
for (label n = 0; n < v.size(); n++)
|
forAll(fld, n)
|
||||||
{
|
{
|
||||||
gmvFile << v[n].z() << token::SPACE;
|
gmvFile << fld[n].z() << token::SPACE;
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,81 +1,48 @@
|
|||||||
gmvFile << "tracers " << particles.size() << nl;
|
gmvFile << "tracers " << particles.size() << nl;
|
||||||
for
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
(
|
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().x() << " ";
|
gmvFile << iter().position().x() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().y() << " ";
|
gmvFile << iter().position().y() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().z() << " ";
|
gmvFile << iter().position().z() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << "U" << nl;
|
gmvFile << "U" << nl;
|
||||||
for
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
(
|
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().velocity().x() << " ";
|
gmvFile << iter().velocity().x() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << "V" << nl;
|
gmvFile << "V" << nl;
|
||||||
for
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
(
|
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().velocity().y() << " ";
|
gmvFile << iter().velocity().y() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << "W" << nl;
|
gmvFile << "W" << nl;
|
||||||
for
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
(
|
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().velocity().z() << " ";
|
{
|
||||||
|
gmvFile << iter().velocity().z() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
gmvFile << "Diam" << nl;
|
gmvFile << "Diam" << nl;
|
||||||
|
forAllConstIter(discretePhase, particles, iter)
|
||||||
for
|
|
||||||
(
|
|
||||||
discretePhase::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().d() << " ";
|
gmvFile << iter().d() << " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gmvFile << "endtrace"<< nl;
|
gmvFile << "endtrace"<< nl;
|
||||||
|
|||||||
@ -1,32 +1,19 @@
|
|||||||
gmvFile << "tracers " << particles.size() << nl;
|
gmvFile << "tracers " << particles.size() << nl;
|
||||||
for
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
(
|
|
||||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().x() << " ";
|
gmvFile << iter().position().x() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().y() << " ";
|
gmvFile << iter().position().y() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||||
Cloud<passiveParticles>::iterator elmnt = particles.begin();
|
|
||||||
elmnt != particles.end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
gmvFile << elmnt().position().z() << " ";
|
gmvFile << iter().position().z() << " ";
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
|
|
||||||
@ -51,15 +38,13 @@ forAll(lagrangianScalarNames, i)
|
|||||||
{
|
{
|
||||||
gmvFile << name << nl;
|
gmvFile << name << nl;
|
||||||
|
|
||||||
for (label n = 0; n < s.size(); n++)
|
forAll(s, n)
|
||||||
{
|
{
|
||||||
gmvFile << s[n] << token::SPACE;
|
gmvFile << s[n] << token::SPACE;
|
||||||
}
|
}
|
||||||
gmvFile << nl;
|
gmvFile << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gmvFile << "endtrace"<< nl;
|
gmvFile << "endtrace"<< nl;
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
gmvFile << "probtime " << runTime.timeName() << nl;
|
gmvFile
|
||||||
gmvFile << "endgmv" << nl;
|
<< "probtime " << runTime.timeName() << nl
|
||||||
|
<< "endgmv" << nl;
|
||||||
|
|||||||
@ -26,13 +26,14 @@ word format
|
|||||||
conversionProperties.lookup("format")
|
conversionProperties.lookup("format")
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( (format != "ascii") && (format != "ieeei4r8") )
|
if ((format != "ascii") && (format != "ieeei4r8"))
|
||||||
{
|
{
|
||||||
FatalError << "format type: " << format << " unknown."
|
FatalError << "format type: " << format << " unknown."
|
||||||
<< " Valid options are: ascii ieeei4r8"
|
<< " Valid options are: ascii ieeei4r8"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
word cells
|
word cells
|
||||||
(
|
(
|
||||||
conversionProperties.lookup("cells")
|
conversionProperties.lookup("cells")
|
||||||
|
|||||||
@ -50,12 +50,7 @@ void readFields
|
|||||||
label nFields = fields.size();
|
label nFields = fields.size();
|
||||||
fields.setSize(nFields + fieldObjects.size());
|
fields.setSize(nFields + fieldObjects.size());
|
||||||
|
|
||||||
for
|
forAllIter(IOobjectList, fieldObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::iterator iter = fieldObjects.begin();
|
|
||||||
iter != fieldObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,12 +50,7 @@ void readFields
|
|||||||
fields.setSize(fieldObjects.size());
|
fields.setSize(fieldObjects.size());
|
||||||
label nFields = 0;
|
label nFields = 0;
|
||||||
|
|
||||||
for
|
forAllIter(IOobjectList, fieldObjects, iter)
|
||||||
(
|
|
||||||
IOobjectList::iterator iter = fieldObjects.begin();
|
|
||||||
iter != fieldObjects.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,14 +27,9 @@ License
|
|||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "writeFuns.H"
|
#include "writeFuns.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void writeFaceSet
|
void Foam::writeFaceSet
|
||||||
(
|
(
|
||||||
const bool binary,
|
const bool binary,
|
||||||
const vtkMesh& vMesh,
|
const vtkMesh& vMesh,
|
||||||
@ -73,12 +68,7 @@ void writeFaceSet
|
|||||||
labelList setFaceLabels(set.size());
|
labelList setFaceLabels(set.size());
|
||||||
label setFaceI = 0;
|
label setFaceI = 0;
|
||||||
|
|
||||||
for
|
forAllConstIter(faceSet, set, iter)
|
||||||
(
|
|
||||||
faceSet::const_iterator iter = set.begin();
|
|
||||||
iter != set.end();
|
|
||||||
++iter
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
setFaceLabels[setFaceI] = iter.key();
|
setFaceLabels[setFaceI] = iter.key();
|
||||||
setFaces[setFaceI] = faces[iter.key()];
|
setFaces[setFaceI] = faces[iter.key()];
|
||||||
@ -139,8 +129,5 @@ void writeFaceSet
|
|||||||
writeFuns::write(pStream, binary, setFaceLabels);
|
writeFuns::write(pStream, binary, setFaceLabels);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -187,7 +187,6 @@ protected:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Get the mesh/fields for a particular time
|
//- Get the mesh/fields for a particular time
|
||||||
//- Destructor
|
|
||||||
virtual int RequestData
|
virtual int RequestData
|
||||||
(
|
(
|
||||||
vtkInformation*,
|
vtkInformation*,
|
||||||
|
|||||||
@ -693,8 +693,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
~vtkPV3Foam();
|
||||||
~vtkPV3Foam();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -312,8 +312,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
~vtkPV3blockMesh();
|
||||||
~vtkPV3blockMesh();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -47,19 +47,13 @@ int USERD_get_part_coords
|
|||||||
}
|
}
|
||||||
else if (part_number == nPatches+2)
|
else if (part_number == nPatches+2)
|
||||||
{
|
{
|
||||||
|
|
||||||
label indx = 1;
|
label indx = 1;
|
||||||
|
|
||||||
for
|
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||||
(
|
|
||||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
|
||||||
elmnt != sprayPtr->end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
coord_array[0][indx] = (float)elmnt().position().x();
|
coord_array[0][indx] = (float)iter().position().x();
|
||||||
coord_array[1][indx] = (float)elmnt().position().y();
|
coord_array[1][indx] = (float)iter().position().y();
|
||||||
coord_array[2][indx] = (float)elmnt().position().z();
|
coord_array[2][indx] = (float)iter().position().z();
|
||||||
indx++;
|
indx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ int USERD_get_part_node_ids
|
|||||||
nodeid_array[indx] = indx + 1;
|
nodeid_array[indx] = indx + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (part_number < nPatches+2)
|
else if (part_number < nPatches+2)
|
||||||
{
|
{
|
||||||
|
|
||||||
label patchi = part_number-2;
|
label patchi = part_number-2;
|
||||||
@ -32,18 +32,14 @@ int USERD_get_part_node_ids
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (part_number == nPatches+2)
|
else if (part_number == nPatches+2)
|
||||||
{
|
{
|
||||||
label indx = 0;
|
label indx = 0;
|
||||||
for
|
|
||||||
(
|
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
|
||||||
elmnt != sprayPtr->end();
|
|
||||||
++elmnt
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
nodeid_array[indx] = indx + 1;
|
nodeid_array[indx] = indx + 1;
|
||||||
indx++;
|
indx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user