Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
d5c65f5532
@ -23,7 +23,7 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermophysicalModel,
|
||||
const fluidThermo& thermophysicalModel,
|
||||
const word& turbulenceModelName,
|
||||
const word& modelName
|
||||
)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -100,7 +100,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermophysicalModel,
|
||||
const fluidThermo& thermophysicalModel,
|
||||
const word& turbulenceModelName = turbulenceModel::typeName,
|
||||
const word& modelName = typeName
|
||||
);
|
||||
|
@ -60,7 +60,17 @@
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -70,4 +70,7 @@ U = HbyA - (invA & (betav*fvc::grad(p)));
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ EXE_LIBS = \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
|
@ -61,7 +61,17 @@
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -70,4 +70,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lcompressibleRASModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lthermophysicalFunctions \
|
||||
|
@ -33,6 +33,14 @@ fvMesh mesh
|
||||
|
||||
List<polyPatch*> patches(1);
|
||||
|
||||
patches[0] = new emptyPolyPatch("boundary", 6, 0, 0, mesh.boundaryMesh());
|
||||
patches[0] = new emptyPolyPatch
|
||||
(
|
||||
"boundary",
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
mesh.boundaryMesh(),
|
||||
emptyPolyPatch::typeName
|
||||
);
|
||||
|
||||
mesh.addFvPatches(patches);
|
||||
|
@ -13,6 +13,6 @@ EXE_LIBS = \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lfiniteVolume
|
||||
|
@ -55,7 +55,17 @@
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -13,7 +13,7 @@ EXE_LIBS = \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
|
@ -64,4 +64,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
@ -33,7 +33,7 @@ EXE_LIBS = \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidProperties \
|
||||
-lsolidMixtureProperties \
|
||||
-lthermophysicalFunctions \
|
||||
|
@ -85,7 +85,17 @@
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -52,4 +52,7 @@ p = p_rgh + rho*gh;
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ EXE_LIBS = \
|
||||
-lcompressibleLESModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume \
|
||||
|
@ -62,7 +62,17 @@ reaction->setTurbulence(turbulence());
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -70,4 +70,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ EXE_LIBS = \
|
||||
-lcompressibleLESModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume \
|
||||
|
@ -64,7 +64,17 @@ reaction->setTurbulence(turbulence());
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -89,5 +89,8 @@
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,6 @@ EXE_INC = \
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie
|
||||
|
||||
|
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lrhoCentralFoam \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
@ -10,7 +10,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lrhoCentralFoam \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
@ -5,7 +5,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -55,7 +55,17 @@
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -94,4 +94,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -102,7 +102,10 @@ U = HbyA - rAtU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
||||
// Recalculate density from the relaxed pressure
|
||||
rho = thermo.rho();
|
||||
|
@ -8,7 +8,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -7,7 +7,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -96,4 +96,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lthermalPorousZone \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
@ -7,7 +7,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
|
@ -4,7 +4,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -6,3 +6,4 @@ fvVectorMatrix UEqn
|
||||
);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
|
@ -49,3 +49,6 @@
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -5,7 +5,7 @@
|
||||
+ fvm::div(phi, e)
|
||||
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||
==
|
||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, volScalarField("Ekp", K + p/rho)))
|
||||
);
|
||||
|
||||
thermo.correct();
|
||||
|
@ -39,3 +39,4 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
@ -7,7 +7,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -56,16 +56,12 @@ int main(int argc, char *argv[])
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
#include "rhoEqn.H"
|
||||
|
||||
#include "UEqn.H"
|
||||
|
||||
#include "eEqn.H"
|
||||
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
#include "eEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -75,7 +75,17 @@
|
||||
p_rgh = p - rho*gh;
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -61,7 +61,10 @@
|
||||
// Second part of thermodynamic density update
|
||||
thermo.rho() += psi*p_rgh;
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
@ -7,7 +7,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
@ -10,7 +10,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
@ -20,8 +20,8 @@ EXE_INC = \
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidThermo \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -8,7 +8,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
|
||||
@ -19,8 +19,8 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lbasicSolidThermo \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidThermo \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
|
@ -174,9 +174,20 @@
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
fvc::ddt(thermoFluid[i].p())
|
||||
runTime.timeName(),
|
||||
fluidRegions[i]
|
||||
),
|
||||
fluidRegions[i],
|
||||
dimensionedScalar
|
||||
(
|
||||
"dpdt",
|
||||
thermoFluid[i].p().dimensions()/dimTime,
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@ -194,5 +205,3 @@
|
||||
new porousZones(fluidRegions[i])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,8 +74,11 @@
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
// Update pressure time derivative
|
||||
// Update pressure time derivative if needed
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
||||
// Solve continuity
|
||||
#include "rhoEqn.H"
|
||||
|
@ -56,6 +56,8 @@ porousU -= rAUPorous*fvc::grad(porousP);
|
||||
porousU.correctBoundaryConditions();
|
||||
porousK = 0.5*magSqr(porousU);
|
||||
|
||||
// Update pressure time derivative
|
||||
porousdpdt = fvc::ddt(porousP);
|
||||
|
||||
// Update pressure time derivative if needed
|
||||
if (porousThermo.dpdt())
|
||||
{
|
||||
porousdpdt = fvc::ddt(porousP);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -37,7 +37,7 @@ EXE_LIBS = \
|
||||
-llagrangianIntermediate \
|
||||
-lcoalCombustion\
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -37,7 +37,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "basicThermoCloud.H"
|
||||
#include "fluidThermoCloud.H"
|
||||
#include "coalCloud.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
@ -9,7 +9,7 @@ coalCloud coalParcels
|
||||
);
|
||||
|
||||
Info<< "\nConstructing limestone cloud" << endl;
|
||||
basicThermoCloud limestoneParcels
|
||||
fluidThermoCloud limestoneParcels
|
||||
(
|
||||
"limestoneCloud1",
|
||||
rho,
|
||||
|
@ -111,7 +111,17 @@
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -82,4 +82,7 @@ sources.correct(U);
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lincompressibleRASModels \
|
||||
|
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
laminarTransport.correct();
|
||||
|
||||
mu = nu*rhoInfValue;
|
||||
mu = laminarTransport.nu()*rhoInfValue;
|
||||
|
||||
kinematicCloud.evolve();
|
||||
|
||||
|
@ -17,7 +17,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lincompressibleRASModels \
|
||||
|
@ -54,8 +54,6 @@
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
const volScalarField nu(laminarTransport.nu());
|
||||
|
||||
volScalarField mu
|
||||
(
|
||||
IOobject
|
||||
@ -66,7 +64,7 @@
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
nu*rhoInfValue
|
||||
laminarTransport.nu()*rhoInfValue
|
||||
);
|
||||
|
||||
word kinematicCloudName("kinematicCloud");
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
laminarTransport.correct();
|
||||
|
||||
mu = nu*rhoInfValue;
|
||||
mu = laminarTransport.nu()*rhoInfValue;
|
||||
|
||||
kinematicCloud.evolve();
|
||||
|
||||
|
@ -35,7 +35,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -95,7 +95,17 @@
|
||||
);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -59,5 +59,8 @@
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ EXE_LIBS = \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lsolidProperties \
|
||||
-lsolidMixtureProperties \
|
||||
-lthermophysicalFunctions \
|
||||
|
@ -65,7 +65,17 @@
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -49,4 +49,7 @@ p = p_rgh + rho*gh;
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -72,7 +72,17 @@
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -77,4 +77,7 @@ U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ EXE_LIBS = \
|
||||
-llagrangianIntermediate \
|
||||
-llagrangianSpray \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -39,7 +39,7 @@ EXE_LIBS = \
|
||||
-llagrangianIntermediate \
|
||||
-llagrangianSpray \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lliquidProperties \
|
||||
-lliquidMixtureProperties \
|
||||
-lsolidProperties \
|
||||
|
@ -77,4 +77,7 @@ U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
@ -374,7 +374,17 @@
|
||||
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K1("K1", 0.5*magSqr(U1));
|
||||
|
@ -180,5 +180,8 @@
|
||||
K1 = 0.5*magSqr(U1);
|
||||
K2 = 0.5*magSqr(U2);
|
||||
|
||||
//***HGW if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
}
|
||||
|
@ -403,11 +403,6 @@ Foam::multiphaseSystem::multiphaseSystem
|
||||
calcAlphas();
|
||||
alphas_.write();
|
||||
|
||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||
{
|
||||
phaseModelTable_.add(iter());
|
||||
}
|
||||
|
||||
interfaceDictTable dragModelsDict(lookup("drag"));
|
||||
|
||||
forAllConstIter(interfaceDictTable, dragModelsDict, iter)
|
||||
@ -418,8 +413,8 @@ Foam::multiphaseSystem::multiphaseSystem
|
||||
dragModel::New
|
||||
(
|
||||
iter(),
|
||||
*phaseModelTable_.find(iter.key().first())(),
|
||||
*phaseModelTable_.find(iter.key().second())()
|
||||
*phases_.lookup(iter.key().first()),
|
||||
*phases_.lookup(iter.key().second())
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
|
@ -159,25 +159,6 @@ private:
|
||||
//- Dictionary of phases
|
||||
PtrDictionary<phaseModel> phases_;
|
||||
|
||||
//- phaseModelTable
|
||||
class phaseModelTable
|
||||
:
|
||||
public HashTable<const phaseModel*>
|
||||
{
|
||||
public:
|
||||
|
||||
phaseModelTable()
|
||||
{}
|
||||
|
||||
void add(const phaseModel& pm)
|
||||
{
|
||||
this->insert(pm.name(), &pm);
|
||||
}
|
||||
};
|
||||
|
||||
//- Phase model table for quick lookup
|
||||
phaseModelTable phaseModelTable_;
|
||||
|
||||
const fvMesh& mesh_;
|
||||
const surfaceScalarField& phi_;
|
||||
|
||||
|
@ -51,7 +51,7 @@ boundaryField
|
||||
inlet_4 { $inactive }
|
||||
inlet_5 "a primitiveEntry is squashed by a directory entry";
|
||||
inlet_5 { $inactive }
|
||||
inlet_6 { $inactive }
|
||||
inlet_6 { $.inactive } // Test scoping
|
||||
inlet_7 { $inactive }
|
||||
inlet_8 { $inactive }
|
||||
|
||||
|
@ -24,7 +24,7 @@ keyY parentValue5;
|
||||
"(.*)Dict"
|
||||
{
|
||||
foo subdictValue0;
|
||||
bar $f.*; // should this really match 'foo'?
|
||||
//bar $f.*; // should this really match 'foo'?
|
||||
|
||||
// result is dependent on insert order!
|
||||
"a.*c" subdictValue3;
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
pointMesh pMesh(mesh);
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
|
||||
pointVectorField U
|
||||
(
|
||||
|
@ -208,7 +208,8 @@ label addPatch(polyMesh& mesh, const word& patchName)
|
||||
0,
|
||||
mesh.nInternalFaces(),
|
||||
patchI,
|
||||
patches
|
||||
patches,
|
||||
emptyPolyPatch::typeName
|
||||
);
|
||||
|
||||
forAll(patches, i)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,8 +60,6 @@ int main(int argc, char *argv[])
|
||||
# include "createMesh.H"
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
pointMesh pMesh(mesh);
|
||||
|
||||
word cellSetName(args.args()[1]);
|
||||
const bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
@ -114,11 +112,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Read point fields
|
||||
PtrList<pointScalarField> psFlds;
|
||||
ReadFields(pMesh, objects, psFlds);
|
||||
ReadFields(pointMesh::New(mesh), objects, psFlds);
|
||||
|
||||
PtrList<pointVectorField> pvFlds;
|
||||
ReadFields(pMesh, objects, pvFlds);
|
||||
|
||||
ReadFields(pointMesh::New(mesh), objects, pvFlds);
|
||||
|
||||
|
||||
// Construct refiner without unrefinement. Read existing point/cell level.
|
||||
@ -164,7 +161,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Update fields
|
||||
mesh.updateMesh(map);
|
||||
pMesh.updateMesh(map);
|
||||
|
||||
// Update numbering of cells/vertices.
|
||||
meshCutter.updateMesh(map);
|
||||
@ -173,7 +169,6 @@ int main(int argc, char *argv[])
|
||||
if (map().hasMotionPoints())
|
||||
{
|
||||
mesh.movePoints(map().preMotionPoints());
|
||||
pMesh.movePoints(map().preMotionPoints());
|
||||
}
|
||||
|
||||
Pout<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>())
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1113,7 +1113,8 @@ int main(int argc, char *argv[])
|
||||
0,
|
||||
0,
|
||||
patchi,
|
||||
mesh.boundaryMesh()
|
||||
mesh.boundaryMesh(),
|
||||
polyPatch::typeName
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
extrudedMesh/extrudedMesh.C
|
||||
extrudeMesh.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/extrudeMesh
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,10 +24,6 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrudedMesh.H"
|
||||
#include "wallPolyPatch.H"
|
||||
#include "meshTools.H"
|
||||
#include "ListOps.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -41,343 +37,4 @@ bool Foam::extrudedMesh::sameOrder(const face& f, const edge& e)
|
||||
}
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
class Face,
|
||||
template<class> class FaceList,
|
||||
class PointField
|
||||
>
|
||||
Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const pointField& surfacePoints = extrudePatch.localPoints();
|
||||
const vectorField& surfaceNormals = extrudePatch.pointNormals();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
pointField ePoints((nLayers + 1)*surfacePoints.size());
|
||||
|
||||
for (label layer=0; layer<=nLayers; layer++)
|
||||
{
|
||||
label offset = layer*surfacePoints.size();
|
||||
|
||||
forAll(surfacePoints, i)
|
||||
{
|
||||
ePoints[offset + i] = model
|
||||
(
|
||||
surfacePoints[i],
|
||||
surfaceNormals[i],
|
||||
layer
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(ePoints);
|
||||
}
|
||||
|
||||
|
||||
template<class Face, template<class> class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const pointField& surfacePoints = extrudePatch.localPoints();
|
||||
const List<face>& surfaceFaces = extrudePatch.localFaces();
|
||||
const edgeList& surfaceEdges = extrudePatch.edges();
|
||||
const label nInternalEdges = extrudePatch.nInternalEdges();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
label nFaces =
|
||||
(nLayers + 1)*surfaceFaces.size() + nLayers*surfaceEdges.size();
|
||||
|
||||
faceList eFaces(nFaces);
|
||||
|
||||
labelList quad(4);
|
||||
label facei = 0;
|
||||
|
||||
// Internal faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
label currentLayerOffset = layer*surfacePoints.size();
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Vertical faces from layer to layer+1
|
||||
for (label edgeI=0; edgeI<nInternalEdges; edgeI++)
|
||||
{
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if
|
||||
(
|
||||
(edgeFaces[0] < edgeFaces[1])
|
||||
== sameOrder(surfaceFaces[edgeFaces[0]], e)
|
||||
)
|
||||
{
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
}
|
||||
|
||||
// Faces between layer and layer+1
|
||||
if (layer < nLayers-1)
|
||||
{
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i] //.reverseFace()
|
||||
+ nextLayerOffset
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// External side faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
label currentLayerOffset = layer*surfacePoints.size();
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Side faces across layer
|
||||
for (label edgeI=nInternalEdges; edgeI<surfaceEdges.size(); edgeI++)
|
||||
{
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if (sameOrder(surfaceFaces[edgeFaces[0]], e))
|
||||
{
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bottom faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] = face(surfaceFaces[i]).reverseFace();
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i]
|
||||
+ nLayers*surfacePoints.size()
|
||||
);
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eFaces);
|
||||
}
|
||||
|
||||
|
||||
template<class Face, template<class> class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const List<face>& surfaceFaces = extrudePatch.localFaces();
|
||||
const edgeList& surfaceEdges = extrudePatch.edges();
|
||||
const label nInternalEdges = extrudePatch.nInternalEdges();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
cellList eCells(nLayers*surfaceFaces.size());
|
||||
|
||||
// Size the cells
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
const face& f = surfaceFaces[i];
|
||||
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
eCells[i + layer*surfaceFaces.size()].setSize(f.size() + 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Current face count per cell.
|
||||
labelList nCellFaces(eCells.size(), 0);
|
||||
|
||||
|
||||
label facei = 0;
|
||||
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
// Side faces from layer to layer+1
|
||||
for (label i=0; i<nInternalEdges; i++)
|
||||
{
|
||||
// Get patch faces using edge
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[i];
|
||||
|
||||
// Get cells on this layer
|
||||
label cell0 = layer*surfaceFaces.size() + edgeFaces[0];
|
||||
label cell1 = layer*surfaceFaces.size() + edgeFaces[1];
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
eCells[cell1][nCellFaces[cell1]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// Faces between layer and layer+1
|
||||
if (layer < nLayers-1)
|
||||
{
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
label cell0 = layer*surfaceFaces.size() + i;
|
||||
label cell1 = (layer+1)*surfaceFaces.size() + i;
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
eCells[cell1][nCellFaces[cell1]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// External side faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
// Side faces across layer
|
||||
for (label i=nInternalEdges; i<surfaceEdges.size(); i++)
|
||||
{
|
||||
// Get patch faces using edge
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[i];
|
||||
|
||||
// Get cells on this layer
|
||||
label cell0 = layer*surfaceFaces.size() + edgeFaces[0];
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eCells[i][nCellFaces[i]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// Bottom faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
label cell0 = (nLayers-1)*surfaceFaces.size() + i;
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eCells);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Face,
|
||||
template<class> class FaceList,
|
||||
class PointField
|
||||
>
|
||||
Foam::extrudedMesh::extrudedMesh
|
||||
(
|
||||
const IOobject& io,
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
:
|
||||
polyMesh
|
||||
(
|
||||
io,
|
||||
extrudedPoints(extrudePatch, model),
|
||||
extrudedFaces(extrudePatch, model),
|
||||
extrudedCells(extrudePatch, model)
|
||||
),
|
||||
model_(model)
|
||||
{
|
||||
List<polyPatch*> patches(3);
|
||||
|
||||
label facei = nInternalFaces();
|
||||
|
||||
label sz =
|
||||
model_.nLayers()
|
||||
*(extrudePatch.nEdges() - extrudePatch.nInternalEdges());
|
||||
|
||||
patches[0] = new wallPolyPatch
|
||||
(
|
||||
"sides",
|
||||
sz,
|
||||
facei,
|
||||
0,
|
||||
boundaryMesh()
|
||||
);
|
||||
|
||||
facei += sz;
|
||||
|
||||
patches[1] = new polyPatch
|
||||
(
|
||||
"originalPatch",
|
||||
extrudePatch.size(),
|
||||
facei,
|
||||
1,
|
||||
boundaryMesh()
|
||||
);
|
||||
|
||||
facei += extrudePatch.size();
|
||||
|
||||
patches[2] = new polyPatch
|
||||
(
|
||||
"otherSide",
|
||||
extrudePatch.size(),
|
||||
facei,
|
||||
2,
|
||||
boundaryMesh()
|
||||
);
|
||||
|
||||
addPatches(patches);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,6 +28,7 @@ Description
|
||||
|
||||
SourceFiles
|
||||
extrudedMesh.C
|
||||
extrudedMeshTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -114,13 +115,11 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "extrudedMesh.C"
|
||||
#else
|
||||
# ifdef xlC
|
||||
# pragma implementation("extrudedMesh.C")
|
||||
# endif
|
||||
# include "extrudedMeshTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -0,0 +1,373 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "extrudedMesh.H"
|
||||
#include "wallPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Face,
|
||||
template<class> class FaceList,
|
||||
class PointField
|
||||
>
|
||||
Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const pointField& surfacePoints = extrudePatch.localPoints();
|
||||
const vectorField& surfaceNormals = extrudePatch.pointNormals();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
pointField ePoints((nLayers + 1)*surfacePoints.size());
|
||||
|
||||
for (label layer=0; layer<=nLayers; layer++)
|
||||
{
|
||||
label offset = layer*surfacePoints.size();
|
||||
|
||||
forAll(surfacePoints, i)
|
||||
{
|
||||
ePoints[offset + i] = model
|
||||
(
|
||||
surfacePoints[i],
|
||||
surfaceNormals[i],
|
||||
layer
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(ePoints);
|
||||
}
|
||||
|
||||
|
||||
template<class Face, template<class> class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const pointField& surfacePoints = extrudePatch.localPoints();
|
||||
const List<face>& surfaceFaces = extrudePatch.localFaces();
|
||||
const edgeList& surfaceEdges = extrudePatch.edges();
|
||||
const label nInternalEdges = extrudePatch.nInternalEdges();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
label nFaces =
|
||||
(nLayers + 1)*surfaceFaces.size() + nLayers*surfaceEdges.size();
|
||||
|
||||
faceList eFaces(nFaces);
|
||||
|
||||
labelList quad(4);
|
||||
label facei = 0;
|
||||
|
||||
// Internal faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
label currentLayerOffset = layer*surfacePoints.size();
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Vertical faces from layer to layer+1
|
||||
for (label edgeI=0; edgeI<nInternalEdges; edgeI++)
|
||||
{
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if
|
||||
(
|
||||
(edgeFaces[0] < edgeFaces[1])
|
||||
== sameOrder(surfaceFaces[edgeFaces[0]], e)
|
||||
)
|
||||
{
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
}
|
||||
|
||||
// Faces between layer and layer+1
|
||||
if (layer < nLayers-1)
|
||||
{
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i] //.reverseFace()
|
||||
+ nextLayerOffset
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// External side faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
label currentLayerOffset = layer*surfacePoints.size();
|
||||
label nextLayerOffset = currentLayerOffset + surfacePoints.size();
|
||||
|
||||
// Side faces across layer
|
||||
for (label edgeI=nInternalEdges; edgeI<surfaceEdges.size(); edgeI++)
|
||||
{
|
||||
const edge& e = surfaceEdges[edgeI];
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[edgeI];
|
||||
|
||||
face& f = eFaces[facei++];
|
||||
f.setSize(4);
|
||||
|
||||
if (sameOrder(surfaceFaces[edgeFaces[0]], e))
|
||||
{
|
||||
f[0] = e[0] + currentLayerOffset;
|
||||
f[1] = e[1] + currentLayerOffset;
|
||||
f[2] = e[1] + nextLayerOffset;
|
||||
f[3] = e[0] + nextLayerOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
f[0] = e[1] + currentLayerOffset;
|
||||
f[1] = e[0] + currentLayerOffset;
|
||||
f[2] = e[0] + nextLayerOffset;
|
||||
f[3] = e[1] + nextLayerOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bottom faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] = face(surfaceFaces[i]).reverseFace();
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eFaces[facei++] =
|
||||
face
|
||||
(
|
||||
surfaceFaces[i]
|
||||
+ nLayers*surfacePoints.size()
|
||||
);
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eFaces);
|
||||
}
|
||||
|
||||
|
||||
template<class Face, template<class> class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
|
||||
(
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
{
|
||||
const List<face>& surfaceFaces = extrudePatch.localFaces();
|
||||
const edgeList& surfaceEdges = extrudePatch.edges();
|
||||
const label nInternalEdges = extrudePatch.nInternalEdges();
|
||||
|
||||
const label nLayers = model.nLayers();
|
||||
|
||||
cellList eCells(nLayers*surfaceFaces.size());
|
||||
|
||||
// Size the cells
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
const face& f = surfaceFaces[i];
|
||||
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
eCells[i + layer*surfaceFaces.size()].setSize(f.size() + 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Current face count per cell.
|
||||
labelList nCellFaces(eCells.size(), 0);
|
||||
|
||||
|
||||
label facei = 0;
|
||||
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
// Side faces from layer to layer+1
|
||||
for (label i=0; i<nInternalEdges; i++)
|
||||
{
|
||||
// Get patch faces using edge
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[i];
|
||||
|
||||
// Get cells on this layer
|
||||
label cell0 = layer*surfaceFaces.size() + edgeFaces[0];
|
||||
label cell1 = layer*surfaceFaces.size() + edgeFaces[1];
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
eCells[cell1][nCellFaces[cell1]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// Faces between layer and layer+1
|
||||
if (layer < nLayers-1)
|
||||
{
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
label cell0 = layer*surfaceFaces.size() + i;
|
||||
label cell1 = (layer+1)*surfaceFaces.size() + i;
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
eCells[cell1][nCellFaces[cell1]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// External side faces
|
||||
for (label layer=0; layer<nLayers; layer++)
|
||||
{
|
||||
// Side faces across layer
|
||||
for (label i=nInternalEdges; i<surfaceEdges.size(); i++)
|
||||
{
|
||||
// Get patch faces using edge
|
||||
const labelList& edgeFaces = extrudePatch.edgeFaces()[i];
|
||||
|
||||
// Get cells on this layer
|
||||
label cell0 = layer*surfaceFaces.size() + edgeFaces[0];
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
}
|
||||
|
||||
// Top faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
eCells[i][nCellFaces[i]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// Bottom faces
|
||||
forAll(surfaceFaces, i)
|
||||
{
|
||||
label cell0 = (nLayers-1)*surfaceFaces.size() + i;
|
||||
|
||||
eCells[cell0][nCellFaces[cell0]++] = facei;
|
||||
|
||||
facei++;
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eCells);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template
|
||||
<
|
||||
class Face,
|
||||
template<class> class FaceList,
|
||||
class PointField
|
||||
>
|
||||
Foam::extrudedMesh::extrudedMesh
|
||||
(
|
||||
const IOobject& io,
|
||||
const PrimitivePatch<Face, FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
)
|
||||
:
|
||||
polyMesh
|
||||
(
|
||||
io,
|
||||
extrudedPoints(extrudePatch, model),
|
||||
extrudedFaces(extrudePatch, model),
|
||||
extrudedCells(extrudePatch, model)
|
||||
),
|
||||
model_(model)
|
||||
{
|
||||
List<polyPatch*> patches(3);
|
||||
|
||||
label facei = nInternalFaces();
|
||||
|
||||
label sz =
|
||||
model_.nLayers()
|
||||
*(extrudePatch.nEdges() - extrudePatch.nInternalEdges());
|
||||
|
||||
patches[0] = new wallPolyPatch
|
||||
(
|
||||
"sides",
|
||||
sz,
|
||||
facei,
|
||||
0,
|
||||
boundaryMesh(),
|
||||
wallPolyPatch::typeName
|
||||
);
|
||||
|
||||
facei += sz;
|
||||
|
||||
patches[1] = new polyPatch
|
||||
(
|
||||
"originalPatch",
|
||||
extrudePatch.size(),
|
||||
facei,
|
||||
1,
|
||||
boundaryMesh(),
|
||||
polyPatch::typeName
|
||||
);
|
||||
|
||||
facei += extrudePatch.size();
|
||||
|
||||
patches[2] = new polyPatch
|
||||
(
|
||||
"otherSide",
|
||||
extrudePatch.size(),
|
||||
facei,
|
||||
2,
|
||||
boundaryMesh(),
|
||||
polyPatch::typeName
|
||||
);
|
||||
|
||||
addPatches(patches);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -213,7 +213,8 @@ int main(int argc, char *argv[])
|
||||
poly2DMesh.patchSizes()[patchI],
|
||||
poly2DMesh.patchStarts()[patchI],
|
||||
patchI,
|
||||
mesh().boundaryMesh()
|
||||
mesh().boundaryMesh(),
|
||||
polyPatch::typeName
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,6 @@ Description
|
||||
#include "snapParameters.H"
|
||||
#include "layerParameters.H"
|
||||
|
||||
#include "faceSet.H"
|
||||
#include "motionSmoother.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -430,7 +428,7 @@ int main(int argc, char *argv[])
|
||||
// Refinement parameters
|
||||
refinementParameters refineParams(refineDict);
|
||||
|
||||
if (!overwrite)
|
||||
if (!overwrite && !debug)
|
||||
{
|
||||
const_cast<Time&>(mesh.time())++;
|
||||
}
|
||||
@ -467,7 +465,7 @@ int main(int argc, char *argv[])
|
||||
curvature = refineParams.curvature();
|
||||
}
|
||||
|
||||
if (!overwrite)
|
||||
if (!overwrite && !debug)
|
||||
{
|
||||
const_cast<Time&>(mesh.time())++;
|
||||
}
|
||||
@ -507,7 +505,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
if (!overwrite)
|
||||
if (!overwrite && !debug)
|
||||
{
|
||||
const_cast<Time&>(mesh.time())++;
|
||||
}
|
||||
|
@ -233,9 +233,17 @@ snapControls
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
//- Highly experimental and wip: number of feature edge snapping
|
||||
// iterations. Leave out altogether to disable.
|
||||
//nFeatureSnapIter 20;
|
||||
// Feature snapping
|
||||
|
||||
//- Number of feature edge snapping iterations.
|
||||
// Leave out altogether to disable.
|
||||
nFeatureSnapIter 10;
|
||||
|
||||
//- Detect (geometric) features by sampling the surface (default=false)
|
||||
implicitFeatureSnap false;
|
||||
|
||||
//- Use castellatedMeshControls::features (default = true)
|
||||
explicitFeatureSnap true;
|
||||
}
|
||||
|
||||
// Settings for the layer addition.
|
||||
|
@ -1,8 +1,8 @@
|
||||
EXE_LIBS = \
|
||||
-lautoMesh \
|
||||
-lbarotropicCompressibilityModel \
|
||||
-lbasicSolidThermo \
|
||||
-lbasicThermophysicalModels \
|
||||
-lsolidThermo \
|
||||
-lfluidThermophysicalModels \
|
||||
-lblockMesh \
|
||||
-lchemistryModel \
|
||||
-lcoalCombustion \
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,14 +94,27 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (args.optionFound("entry"))
|
||||
{
|
||||
wordList entryNames
|
||||
(
|
||||
fileName(args.option("entry")).components(':')
|
||||
);
|
||||
fileName entryName(args.option("entry"));
|
||||
|
||||
const entry* entPtr = NULL;
|
||||
|
||||
if (entryName.find('.') != string::npos)
|
||||
{
|
||||
// New syntax
|
||||
entPtr = dict.lookupScopedEntryPtr
|
||||
(
|
||||
entryName,
|
||||
false,
|
||||
true // wildcards
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Old syntax
|
||||
wordList entryNames(entryName.components(':'));
|
||||
if (dict.found(entryNames[0]))
|
||||
{
|
||||
const entry* entPtr = &dict.lookupEntry
|
||||
entPtr = &dict.lookupEntry
|
||||
(
|
||||
entryNames[0],
|
||||
false,
|
||||
@ -128,7 +141,12 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (entPtr)
|
||||
{
|
||||
if (args.optionFound("keywords"))
|
||||
{
|
||||
/*
|
||||
@ -158,7 +176,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Cannot find entry "
|
||||
<< entryNames[0]
|
||||
<< entryName
|
||||
<< " in dictionary " << dictFileName;
|
||||
FatalError.exit(2);
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Construct the point fields
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
pointMesh pMesh(mesh);
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
|
||||
PtrList<pointScalarField> pointScalarFields;
|
||||
readFields(pMesh, objects, pointScalarFields);
|
||||
|
@ -341,7 +341,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Reconstructing point fields" << nl << endl;
|
||||
|
||||
pointMesh pMesh(mesh);
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
||||
|
||||
forAll(pMeshes, procI)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -195,7 +195,7 @@ void Foam::vtkPV3Foam::convertPointFields
|
||||
}
|
||||
|
||||
// Construct interpolation on the raw mesh
|
||||
pointMesh pMesh(mesh);
|
||||
const pointMesh& pMesh = pointMesh::New(mesh);
|
||||
|
||||
|
||||
convertPointFields<scalar>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user