GIT: conflict resolution

This commit is contained in:
andy
2012-09-17 12:03:11 +01:00
514 changed files with 13454 additions and 11215 deletions

View File

@ -23,7 +23,7 @@ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel, const fluidThermo& thermophysicalModel,
const word& turbulenceModelName, const word& turbulenceModelName,
const word& modelName const word& modelName
) )

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -100,7 +100,7 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel, const fluidThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName, const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName const word& modelName = typeName
); );

View File

@ -60,7 +60,17 @@
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -70,4 +70,7 @@ U = HbyA - (invA & (betav*fvc::grad(p)));
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -13,7 +13,7 @@ EXE_LIBS = \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \

View File

@ -61,7 +61,17 @@
); );
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -70,4 +70,7 @@ U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -14,7 +14,7 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lchemistryModel \ -lchemistryModel \
-lODE \ -lODE \
-lthermophysicalFunctions \ -lthermophysicalFunctions \

View File

@ -33,6 +33,14 @@ fvMesh mesh
List<polyPatch*> patches(1); 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); mesh.addFvPatches(patches);

View File

@ -13,6 +13,6 @@ EXE_LIBS = \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lfiniteVolume -lfiniteVolume

View File

@ -55,7 +55,17 @@
); );
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -13,7 +13,7 @@ EXE_LIBS = \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \

View File

@ -64,4 +64,7 @@ U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solid/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/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/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude \
@ -33,7 +33,7 @@ EXE_LIBS = \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lsolidProperties \ -lsolidProperties \
-lsolidMixtureProperties \ -lsolidMixtureProperties \
-lthermophysicalFunctions \ -lthermophysicalFunctions \

View File

@ -85,7 +85,17 @@
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -52,4 +52,7 @@ p = p_rgh + rho*gh;
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -14,7 +14,7 @@ EXE_LIBS = \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lchemistryModel \ -lchemistryModel \
-lODE \ -lODE \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -62,7 +62,17 @@ reaction->setTurbulence(turbulence());
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -70,4 +70,7 @@ U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -16,7 +16,7 @@ EXE_LIBS = \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lchemistryModel \ -lchemistryModel \
-lODE \ -lODE \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -64,7 +64,17 @@ reaction->setTurbulence(turbulence());
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -89,5 +89,8 @@
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);
}
} }

View File

@ -5,6 +5,6 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie -lspecie

View File

@ -9,7 +9,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lrhoCentralFoam \ -lrhoCentralFoam \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \

View File

@ -10,7 +10,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lrhoCentralFoam \ -lrhoCentralFoam \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \

View File

@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -55,7 +55,17 @@
); );
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -94,4 +94,7 @@ U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -102,7 +102,10 @@ U = HbyA - rAtU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}
// Recalculate density from the relaxed pressure // Recalculate density from the relaxed pressure
rho = thermo.rho(); rho = thermo.rho();

View File

@ -8,7 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -96,4 +96,7 @@ U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lthermalPorousZone \ -lthermalPorousZone \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -6,3 +6,4 @@ fvVectorMatrix UEqn
); );
solve(UEqn == -fvc::grad(p)); solve(UEqn == -fvc::grad(p));
K = 0.5*magSqr(U);

View File

@ -49,3 +49,6 @@
thermo thermo
) )
); );
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));

View File

@ -5,7 +5,7 @@
+ fvm::div(phi, e) + fvm::div(phi, e)
- fvm::laplacian(turbulence->alphaEff(), 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(); thermo.correct();

View File

@ -39,3 +39,4 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
U = HbyA - rAU*fvc::grad(p); U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -56,16 +56,12 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "rhoEqn.H" #include "rhoEqn.H"
#include "UEqn.H" #include "UEqn.H"
#include "eEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=0; corr<nCorr; corr++) for (int corr=0; corr<nCorr; corr++)
{ {
#include "eEqn.H"
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -5,7 +5,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -75,7 +75,17 @@
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -61,7 +61,10 @@
// Second part of thermodynamic density update // Second part of thermodynamic density update
thermo.rho() += psi*p_rgh; thermo.rho() += psi*p_rgh;
if (thermo.dpdt())
{
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);
}
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"

View File

@ -7,7 +7,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lradiationModels \ -lradiationModels \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \

View File

@ -10,7 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/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/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
@ -20,8 +20,8 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lbasicSolidThermo \ -lsolidThermo \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -8,7 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/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)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
@ -19,8 +19,8 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lbasicSolidThermo \ -lsolidThermo \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \
-lcompressibleRASModels \ -lcompressibleRASModels \

View File

@ -174,9 +174,20 @@
( (
i, i,
new volScalarField new volScalarField
(
IOobject
( (
"dpdt", "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]) new porousZones(fluidRegions[i])
); );
} }

View File

@ -74,8 +74,11 @@
p = p_rgh + rho*gh; p = p_rgh + rho*gh;
// Update pressure time derivative // Update pressure time derivative if needed
if (thermo.dpdt())
{
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);
}
// Solve continuity // Solve continuity
#include "rhoEqn.H" #include "rhoEqn.H"

View File

@ -56,6 +56,8 @@ porousU -= rAUPorous*fvc::grad(porousP);
porousU.correctBoundaryConditions(); porousU.correctBoundaryConditions();
porousK = 0.5*magSqr(porousU); porousK = 0.5*magSqr(porousU);
// Update pressure time derivative // Update pressure time derivative if needed
porousdpdt = fvc::ddt(porousP); if (porousThermo.dpdt())
{
porousdpdt = fvc::ddt(porousP);
}

View File

@ -34,7 +34,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -37,7 +37,7 @@ EXE_LIBS = \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lcoalCombustion\ -lcoalCombustion\
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "basicThermoCloud.H" #include "fluidThermoCloud.H"
#include "coalCloud.H" #include "coalCloud.H"
#include "psiCombustionModel.H" #include "psiCombustionModel.H"
#include "IObasicSourceList.H" #include "IObasicSourceList.H"

View File

@ -9,7 +9,7 @@ coalCloud coalParcels
); );
Info<< "\nConstructing limestone cloud" << endl; Info<< "\nConstructing limestone cloud" << endl;
basicThermoCloud limestoneParcels fluidThermoCloud limestoneParcels
( (
"limestoneCloud1", "limestoneCloud1",
rho, rho,

View File

@ -111,7 +111,17 @@
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -82,4 +82,7 @@ sources.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -21,7 +21,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lradiationModels \ -lradiationModels \
-lincompressibleRASModels \ -lincompressibleRASModels \

View File

@ -72,7 +72,7 @@ int main(int argc, char *argv[])
laminarTransport.correct(); laminarTransport.correct();
mu = nu*rhoInfValue; mu = laminarTransport.nu()*rhoInfValue;
kinematicCloud.evolve(); kinematicCloud.evolve();

View File

@ -17,7 +17,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lradiationModels \ -lradiationModels \
-lincompressibleRASModels \ -lincompressibleRASModels \

View File

@ -54,8 +54,6 @@
incompressible::turbulenceModel::New(U, phi, laminarTransport) incompressible::turbulenceModel::New(U, phi, laminarTransport)
); );
const volScalarField nu(laminarTransport.nu());
volScalarField mu volScalarField mu
( (
IOobject IOobject
@ -66,7 +64,7 @@
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
nu*rhoInfValue laminarTransport.nu()*rhoInfValue
); );
word kinematicCloudName("kinematicCloud"); word kinematicCloudName("kinematicCloud");

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
laminarTransport.correct(); laminarTransport.correct();
mu = nu*rhoInfValue; mu = laminarTransport.nu()*rhoInfValue;
kinematicCloud.evolve(); kinematicCloud.evolve();

View File

@ -35,7 +35,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -95,7 +95,17 @@
); );
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -59,5 +59,8 @@
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);
}
} }

View File

@ -29,7 +29,7 @@ EXE_LIBS = \
-lcompressibleRASModels \ -lcompressibleRASModels \
-lcompressibleLESModels \ -lcompressibleLESModels \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lsolidProperties \ -lsolidProperties \
-lsolidMixtureProperties \ -lsolidMixtureProperties \
-lthermophysicalFunctions \ -lthermophysicalFunctions \

View File

@ -65,7 +65,17 @@
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -49,4 +49,7 @@ p = p_rgh + rho*gh;
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -35,7 +35,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -72,7 +72,17 @@
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));

View File

@ -77,4 +77,7 @@ U.correctBoundaryConditions();
sources.correct(U); sources.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -37,7 +37,7 @@ EXE_LIBS = \
-llagrangianIntermediate \ -llagrangianIntermediate \
-llagrangianSpray \ -llagrangianSpray \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -39,7 +39,7 @@ EXE_LIBS = \
-llagrangianIntermediate \ -llagrangianIntermediate \
-llagrangianSpray \ -llagrangianSpray \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lliquidProperties \ -lliquidProperties \
-lliquidMixtureProperties \ -lliquidMixtureProperties \
-lsolidProperties \ -lsolidProperties \

View File

@ -77,4 +77,7 @@ U.correctBoundaryConditions();
sources.correct(U); sources.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
dpdt = fvc::ddt(p); if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}

View File

@ -15,7 +15,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianIntermediate \ -llagrangianIntermediate \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lradiationModels \ -lradiationModels \
-lcompressibleTurbulenceModel \ -lcompressibleTurbulenceModel \

View File

@ -374,7 +374,17 @@
Info<< "Creating field dpdt\n" << endl; 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; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K1("K1", 0.5*magSqr(U1)); volScalarField K1("K1", 0.5*magSqr(U1));

View File

@ -180,5 +180,8 @@
K1 = 0.5*magSqr(U1); K1 = 0.5*magSqr(U1);
K2 = 0.5*magSqr(U2); K2 = 0.5*magSqr(U2);
//***HGW if (thermo.dpdt())
{
dpdt = fvc::ddt(p); dpdt = fvc::ddt(p);
}
} }

View File

@ -403,11 +403,6 @@ Foam::multiphaseSystem::multiphaseSystem
calcAlphas(); calcAlphas();
alphas_.write(); alphas_.write();
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
{
phaseModelTable_.add(iter());
}
interfaceDictTable dragModelsDict(lookup("drag")); interfaceDictTable dragModelsDict(lookup("drag"));
forAllConstIter(interfaceDictTable, dragModelsDict, iter) forAllConstIter(interfaceDictTable, dragModelsDict, iter)
@ -418,8 +413,8 @@ Foam::multiphaseSystem::multiphaseSystem
dragModel::New dragModel::New
( (
iter(), iter(),
*phaseModelTable_.find(iter.key().first())(), *phases_.lookup(iter.key().first()),
*phaseModelTable_.find(iter.key().second())() *phases_.lookup(iter.key().second())
).ptr() ).ptr()
); );
} }

View File

@ -159,25 +159,6 @@ private:
//- Dictionary of phases //- Dictionary of phases
PtrDictionary<phaseModel> 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 fvMesh& mesh_;
const surfaceScalarField& phi_; const surfaceScalarField& phi_;

View File

@ -51,7 +51,7 @@ boundaryField
inlet_4 { $inactive } inlet_4 { $inactive }
inlet_5 "a primitiveEntry is squashed by a directory entry"; inlet_5 "a primitiveEntry is squashed by a directory entry";
inlet_5 { $inactive } inlet_5 { $inactive }
inlet_6 { $inactive } inlet_6 { $.inactive } // Test scoping
inlet_7 { $inactive } inlet_7 { $inactive }
inlet_8 { $inactive } inlet_8 { $inactive }

View File

@ -24,7 +24,7 @@ keyY parentValue5;
"(.*)Dict" "(.*)Dict"
{ {
foo subdictValue0; foo subdictValue0;
bar $f.*; // should this really match 'foo'? //bar $f.*; // should this really match 'foo'?
// result is dependent on insert order! // result is dependent on insert order!
"a.*c" subdictValue3; "a.*c" subdictValue3;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
# include "createTime.H" # include "createTime.H"
# include "createMesh.H" # include "createMesh.H"
pointMesh pMesh(mesh); const pointMesh& pMesh = pointMesh::New(mesh);
pointVectorField U pointVectorField U
( (

View File

@ -208,7 +208,8 @@ label addPatch(polyMesh& mesh, const word& patchName)
0, 0,
mesh.nInternalFaces(), mesh.nInternalFaces(),
patchI, patchI,
patches patches,
emptyPolyPatch::typeName
); );
forAll(patches, i) forAll(patches, i)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,8 +60,6 @@ int main(int argc, char *argv[])
# include "createMesh.H" # include "createMesh.H"
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
pointMesh pMesh(mesh);
word cellSetName(args.args()[1]); word cellSetName(args.args()[1]);
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");
@ -114,11 +112,10 @@ int main(int argc, char *argv[])
// Read point fields // Read point fields
PtrList<pointScalarField> psFlds; PtrList<pointScalarField> psFlds;
ReadFields(pMesh, objects, psFlds); ReadFields(pointMesh::New(mesh), objects, psFlds);
PtrList<pointVectorField> pvFlds; PtrList<pointVectorField> pvFlds;
ReadFields(pMesh, objects, pvFlds); ReadFields(pointMesh::New(mesh), objects, pvFlds);
// Construct refiner without unrefinement. Read existing point/cell level. // Construct refiner without unrefinement. Read existing point/cell level.
@ -164,7 +161,6 @@ int main(int argc, char *argv[])
// Update fields // Update fields
mesh.updateMesh(map); mesh.updateMesh(map);
pMesh.updateMesh(map);
// Update numbering of cells/vertices. // Update numbering of cells/vertices.
meshCutter.updateMesh(map); meshCutter.updateMesh(map);
@ -173,7 +169,6 @@ int main(int argc, char *argv[])
if (map().hasMotionPoints()) if (map().hasMotionPoints())
{ {
mesh.movePoints(map().preMotionPoints()); mesh.movePoints(map().preMotionPoints());
pMesh.movePoints(map().preMotionPoints());
} }
Pout<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>()) Pout<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -1113,7 +1113,8 @@ int main(int argc, char *argv[])
0, 0,
0, 0,
patchi, patchi,
mesh.boundaryMesh() mesh.boundaryMesh(),
polyPatch::typeName
); );
} }
} }

View File

@ -1,3 +1,4 @@
extrudedMesh/extrudedMesh.C
extrudeMesh.C extrudeMesh.C
EXE = $(FOAM_APPBIN)/extrudeMesh EXE = $(FOAM_APPBIN)/extrudeMesh

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,10 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "extrudedMesh.H" #include "extrudedMesh.H"
#include "wallPolyPatch.H"
#include "meshTools.H"
#include "ListOps.H"
#include "OFstream.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * 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);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,6 +28,7 @@ Description
SourceFiles SourceFiles
extrudedMesh.C extrudedMesh.C
extrudedMeshTemplates.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -114,13 +115,11 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "extrudedMesh.C" # include "extrudedMeshTemplates.C"
#else
# ifdef xlC
# pragma implementation("extrudedMesh.C")
# endif
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -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);
}
// ************************************************************************* //

View File

@ -213,7 +213,8 @@ int main(int argc, char *argv[])
poly2DMesh.patchSizes()[patchI], poly2DMesh.patchSizes()[patchI],
poly2DMesh.patchStarts()[patchI], poly2DMesh.patchStarts()[patchI],
patchI, patchI,
mesh().boundaryMesh() mesh().boundaryMesh(),
polyPatch::typeName
); );
} }

View File

@ -47,8 +47,6 @@ Description
#include "snapParameters.H" #include "snapParameters.H"
#include "layerParameters.H" #include "layerParameters.H"
#include "faceSet.H"
#include "motionSmoother.H"
using namespace Foam; using namespace Foam;
@ -430,7 +428,7 @@ int main(int argc, char *argv[])
// Refinement parameters // Refinement parameters
refinementParameters refineParams(refineDict); refinementParameters refineParams(refineDict);
if (!overwrite) if (!overwrite && !debug)
{ {
const_cast<Time&>(mesh.time())++; const_cast<Time&>(mesh.time())++;
} }
@ -467,7 +465,7 @@ int main(int argc, char *argv[])
curvature = refineParams.curvature(); curvature = refineParams.curvature();
} }
if (!overwrite) if (!overwrite && !debug)
{ {
const_cast<Time&>(mesh.time())++; 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())++; const_cast<Time&>(mesh.time())++;
} }

View File

@ -233,9 +233,17 @@ snapControls
// before upon reaching a correct mesh. // before upon reaching a correct mesh.
nRelaxIter 5; nRelaxIter 5;
//- Highly experimental and wip: number of feature edge snapping // Feature snapping
// iterations. Leave out altogether to disable.
//nFeatureSnapIter 20; //- 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. // Settings for the layer addition.

View File

@ -1,8 +1,8 @@
EXE_LIBS = \ EXE_LIBS = \
-lautoMesh \ -lautoMesh \
-lbarotropicCompressibilityModel \ -lbarotropicCompressibilityModel \
-lbasicSolidThermo \ -lsolidThermo \
-lbasicThermophysicalModels \ -lfluidThermophysicalModels \
-lblockMesh \ -lblockMesh \
-lchemistryModel \ -lchemistryModel \
-lcoalCombustion \ -lcoalCombustion \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,14 +94,27 @@ int main(int argc, char *argv[])
if (args.optionFound("entry")) if (args.optionFound("entry"))
{ {
wordList entryNames fileName entryName(args.option("entry"));
(
fileName(args.option("entry")).components(':')
);
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])) if (dict.found(entryNames[0]))
{ {
const entry* entPtr = &dict.lookupEntry entPtr = &dict.lookupEntry
( (
entryNames[0], entryNames[0],
false, false,
@ -128,7 +141,12 @@ int main(int argc, char *argv[])
FatalError.exit(3); FatalError.exit(3);
} }
} }
}
}
if (entPtr)
{
if (args.optionFound("keywords")) if (args.optionFound("keywords"))
{ {
/* /*
@ -158,7 +176,7 @@ int main(int argc, char *argv[])
{ {
FatalErrorIn(args.executable()) FatalErrorIn(args.executable())
<< "Cannot find entry " << "Cannot find entry "
<< entryNames[0] << entryName
<< " in dictionary " << dictFileName; << " in dictionary " << dictFileName;
FatalError.exit(2); FatalError.exit(2);
} }

View File

@ -395,7 +395,7 @@ int main(int argc, char *argv[])
// Construct the point fields // Construct the point fields
// ~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~
pointMesh pMesh(mesh); const pointMesh& pMesh = pointMesh::New(mesh);
PtrList<pointScalarField> pointScalarFields; PtrList<pointScalarField> pointScalarFields;
readFields(pMesh, objects, pointScalarFields); readFields(pMesh, objects, pointScalarFields);

View File

@ -341,7 +341,7 @@ int main(int argc, char *argv[])
{ {
Info<< "Reconstructing point fields" << nl << endl; Info<< "Reconstructing point fields" << nl << endl;
pointMesh pMesh(mesh); const pointMesh& pMesh = pointMesh::New(mesh);
PtrList<pointMesh> pMeshes(procMeshes.meshes().size()); PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
forAll(pMeshes, procI) forAll(pMeshes, procI)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -195,7 +195,7 @@ void Foam::vtkPV3Foam::convertPointFields
} }
// Construct interpolation on the raw mesh // Construct interpolation on the raw mesh
pointMesh pMesh(mesh); const pointMesh& pMesh = pointMesh::New(mesh);
convertPointFields<scalar> convertPointFields<scalar>

Some files were not shown because too many files have changed in this diff Show More