Merge branch 'master' of ssh://opencfd:8007/home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2012-11-18 22:44:09 +00:00
260 changed files with 5115 additions and 10569 deletions

View File

@ -1,10 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/randomProcesses/lnInclude \ -I$(LIB_SRC)/randomProcesses/lnInclude
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lrandomProcesses \ -lrandomProcesses
-lsampling \
-lmeshTools

View File

@ -5,7 +5,6 @@ EXE_INC = \
-IPDRModels/dragModels/PDRDragModel \ -IPDRModels/dragModels/PDRDragModel \
-IlaminarFlameSpeed/SCOPE \ -IlaminarFlameSpeed/SCOPE \
-I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -17,5 +17,5 @@ EXE_LIBS = \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \
-lfiniteVolume \ -lmeshTools \
-lmeshTools -lfiniteVolume

View File

@ -20,6 +20,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-lfiniteVolume \ -lfiniteVolume \
-lsampling \
-lmeshTools \ -lmeshTools \
-lfieldSources -lfieldSources

View File

@ -30,7 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "mapDistribute.H"
#include "fvCFD.H" #include "fvCFD.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "basicReactingCloud.H" #include "basicReactingCloud.H"

View File

@ -1,5 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume -lfiniteVolume \
-lsampling

View File

@ -1,11 +0,0 @@
{
DDtU1 =
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1;
DDtU2 =
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2;
}

View File

@ -1,3 +0,0 @@
bubbleFoam.C
EXE = $(FOAM_APPBIN)/bubbleFoam

View File

@ -1,6 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools

View File

@ -1,74 +0,0 @@
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
{
volTensorField Rc1(-nuEff1*(T(fvc::grad(U1))));
Rc1 = Rc1 + (2.0/3.0)*sqr(Ct)*I*k - (2.0/3.0)*I*tr(Rc1);
surfaceScalarField phiR1
(
- fvc::interpolate(nuEff1)
*mesh.magSf()*fvc::snGrad(alpha1)
/fvc::interpolate(alpha1 + scalar(0.001))
);
U1Eqn =
(
(scalar(1) + Cvm*rho2*alpha2/rho1)*
(
fvm::ddt(U1)
+ fvm::div(phi1, U1, "div(phi1,U1)")
- fvm::Sp(fvc::div(phi1), U1)
)
- fvm::laplacian(nuEff1, U1)
+ fvc::div(Rc1)
+ fvm::div(phiR1, U1, "div(phi1,U1)")
- fvm::Sp(fvc::div(phiR1), U1)
+ (fvc::grad(alpha1)/(fvc::average(alpha1) + scalar(0.001)) & Rc1)
==
// g // Buoyancy term transfered to p-equation
- fvm::Sp(alpha2/rho1*dragCoef, U1)
//+ alpha2/rho1*dragCoef*U2 // Explicit drag transfered to p-equation
- alpha2/rho1*(liftCoeff - Cvm*rho2*DDtU2)
);
U1Eqn.relax();
volTensorField Rc2(-nuEff2*T(fvc::grad(U2)));
Rc2 = Rc2 + (2.0/3.0)*I*k - (2.0/3.0)*I*tr(Rc2);
surfaceScalarField phiR2
(
- fvc::interpolate(nuEff2)
*mesh.magSf()*fvc::snGrad(alpha2)
/fvc::interpolate(alpha2 + scalar(0.001))
);
U2Eqn =
(
(scalar(1) + Cvm*rho2*alpha1/rho2)*
(
fvm::ddt(U2)
+ fvm::div(phi2, U2, "div(phi2,U2)")
- fvm::Sp(fvc::div(phi2), U2)
)
- fvm::laplacian(nuEff2, U2)
+ fvc::div(Rc2)
+ fvm::div(phiR2, U2, "div(phi2,U2)")
- fvm::Sp(fvc::div(phiR2), U2)
+ (fvc::grad(alpha2)/(fvc::average(alpha2) + scalar(0.001)) & Rc2)
==
// g // Buoyancy term transfered to p-equation
- fvm::Sp(alpha1/rho2*dragCoef, U2)
//+ alpha1/rho2*dragCoef*U1 // Explicit drag transfered to p-equation
+ alpha1/rho2*(liftCoeff + Cvm*rho2*DDtU1)
);
U2Eqn.relax();
}

View File

@ -1,61 +0,0 @@
{
word scheme("div(phi,alpha1)");
surfaceScalarField phir(phi1 - phi2);
Info<< "Max Ur Courant Number = "
<< (
max
(
mesh.surfaceInterpolation::deltaCoeffs()*mag(phir)
/mesh.magSf()
)*runTime.deltaT()
).value()
<< endl;
for (int acorr=0; acorr<nAlphaCorr; acorr++)
{
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1)
+ fvm::div(phi, alpha1, scheme)
+ fvm::div(-fvc::flux(-phir, alpha2, scheme), alpha1, scheme)
);
alpha1Eqn.relax();
alpha1Eqn.solve();
/*
fvScalarMatrix alpha2Eqn
(
fvm::ddt(alpha2)
+ fvm::div(phi, alpha2, scheme)
+ fvm::div
(
-fvc::flux(phir, scalar(1) - alpha2, scheme),
alpha2,
scheme
)
);
alpha2Eqn.relax();
alpha2Eqn.solve();
alpha1 =
0.5
*(
scalar(1)
+ sqr(scalar(1) - alpha2)
- sqr(scalar(1) - alpha1)
);
*/
alpha2 = scalar(1) - alpha1;
}
Info<< "Dispersed phase volume fraction = "
<< alpha1.weightedAverage(mesh.V()).value()
<< " Min(alpha1) = " << min(alpha1).value()
<< " Max(alpha1) = " << max(alpha1).value()
<< endl;
}
rho = alpha1*rho1 + alpha2*rho2;

View File

@ -1,110 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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/>.
Application
bubbleFoam
Description
Solver for a system of 2 incompressible fluid phases with one phase
dispersed, e.g. gas bubbles in a liquid.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
#include "Switch.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
pimpleControl pimple(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readBubbleFoamControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "alphaEqn.H"
#include "liftDragCoeffs.H"
#include "UEqns.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
if (correctAlpha && !pimple.finalIter())
{
#include "alphaEqn.H"
}
}
#include "DDtU.H"
if (pimple.turbCorr())
{
#include "kEpsilon.H"
nuEff1 = sqr(Ct)*nut2 + nu1;
}
}
#include "write.H"
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,195 +0,0 @@
Info<< "Reading field alpha1\n" << endl;
volScalarField alpha1
(
IOobject
(
"alpha1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField alpha2
(
IOobject
(
"alpha2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
scalar(1) - alpha1
//,alpha1.boundaryField().types()
);
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U1\n" << endl;
volVectorField U1
(
IOobject
(
"U1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U2\n" << endl;
volVectorField U2
(
IOobject
(
"U2",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
alpha1*U1 + alpha2*U2
);
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar rho1
(
transportProperties.lookup("rho1")
);
dimensionedScalar rho2
(
transportProperties.lookup("rho2")
);
dimensionedScalar nu1
(
transportProperties.lookup("nu1")
);
dimensionedScalar nu2
(
transportProperties.lookup("nu2")
);
dimensionedScalar d1
(
transportProperties.lookup("d1")
);
dimensionedScalar d2
(
transportProperties.lookup("d2")
);
dimensionedScalar Cvm
(
transportProperties.lookup("Cvm")
);
dimensionedScalar Cl
(
transportProperties.lookup("Cl")
);
dimensionedScalar Ct
(
transportProperties.lookup("Ct")
);
#include "createPhi1.H"
#include "createPhi2.H"
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh
),
fvc::interpolate(alpha1)*phi1
+ fvc::interpolate(alpha2)*phi2
);
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh
),
alpha1*rho1 + alpha2*rho2
);
#include "createRASTurbulence.H"
Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
volVectorField DDtU1
(
fvc::ddt(U1)
+ fvc::div(phi1, U1)
- fvc::div(phi1)*U1
);
volVectorField DDtU2
(
fvc::ddt(U2)
+ fvc::div(phi2, U2)
- fvc::div(phi2)*U2
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);

View File

@ -1,67 +0,0 @@
IOobject phi1Header
(
"phi1",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
autoPtr<surfaceScalarField> phi1Ptr(NULL);
if (phi1Header.headerOk())
{
Info<< "Reading face flux field phi1\n" << endl;
phi1Ptr.reset
(
new surfaceScalarField
(
IOobject
(
"phi1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
else
{
Info<< "Calculating face flux field phi1\n" << endl;
wordList phiTypes
(
U1.boundaryField().size(),
calculatedFvPatchScalarField::typeName
);
forAll(U1.boundaryField(), i)
{
if (isA<fixedValueFvPatchVectorField>(U1.boundaryField()[i]))
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
}
}
phi1Ptr.reset
(
new surfaceScalarField
(
IOobject
(
"phi1",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::interpolate(U1) & mesh.Sf(),
phiTypes
)
);
}
surfaceScalarField& phi1 = phi1Ptr();

View File

@ -1,67 +0,0 @@
IOobject phi2Header
(
"phi2",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
autoPtr<surfaceScalarField> phi2Ptr(NULL);
if (phi2Header.headerOk())
{
Info<< "Reading face flux field phi2\n" << endl;
phi2Ptr.reset
(
new surfaceScalarField
(
IOobject
(
"phi2",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
else
{
Info<< "Calculating face flux field phi2\n" << endl;
wordList phiTypes
(
U2.boundaryField().size(),
calculatedFvPatchScalarField::typeName
);
forAll(U2.boundaryField(), i)
{
if (isA<fixedValueFvPatchVectorField>(U2.boundaryField()[i]))
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
}
}
phi2Ptr.reset
(
new surfaceScalarField
(
IOobject
(
"phi2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::interpolate(U2) & mesh.Sf(),
phiTypes
)
);
}
surfaceScalarField& phi2 = phi2Ptr();

View File

@ -1,23 +0,0 @@
volVectorField Ur(U1 - U2);
volScalarField magUr(mag(Ur));
volScalarField Cd1MagUr
(
(24.0*nu2/d1)*(scalar(1) + 0.15*pow(d1*magUr/nu2, 0.687))
);
volScalarField Cd2MagUr
(
(24.0*nu1/d2)*(scalar(1) + 0.15*pow(d2*magUr/nu1, 0.687))
);
volScalarField dragCoef
(
"Cd",
0.75*(alpha2*rho2*Cd1MagUr/d1 + alpha1*rho1*Cd2MagUr/d2)
);
volVectorField liftCoeff
(
Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
);

View File

@ -1,94 +0,0 @@
{
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField alpha2f(scalar(1) - alpha1f);
volScalarField rAU1(1.0/U1Eqn.A());
volScalarField rAU2(1.0/U2Eqn.A());
surfaceScalarField rAU1f(fvc::interpolate(rAU1));
surfaceScalarField rAU2f(fvc::interpolate(rAU2));
volVectorField HbyA1("HbyA1", U1);
HbyA1 = rAU1*U1Eqn.H();
volVectorField HbyA2("HbyA2", U2);
HbyA2 = rAU2*U2Eqn.H();
surfaceScalarField phiDrag1
(
fvc::interpolate(alpha2/rho1*dragCoef*rAU1)*phi2
+ rAU1f*(g & mesh.Sf())
);
surfaceScalarField phiDrag2
(
fvc::interpolate(alpha1/rho2*dragCoef*rAU2)*phi1
+ rAU2f*(g & mesh.Sf())
);
forAll(p.boundaryField(), patchi)
{
if (isA<zeroGradientFvPatchScalarField>(p.boundaryField()[patchi]))
{
phiDrag1.boundaryField()[patchi] = 0.0;
phiDrag2.boundaryField()[patchi] = 0.0;
}
}
surfaceScalarField phiHbyA1
(
(fvc::interpolate(HbyA1) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU1, U1, phi1)
);
surfaceScalarField phiHbyA2
(
(fvc::interpolate(HbyA2) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU2, U2, phi2)
);
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
phiHbyA1 += phiDrag1;
phiHbyA2 += phiDrag2;
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
surfaceScalarField Dp
(
"Dp",
alpha1f*rAU1f/rho1 + alpha2f*rAU2f/rho2
);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::laplacian(Dp, p) == fvc::div(phiHbyA)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
surfaceScalarField SfGradp(pEqn.flux()/Dp);
phi1 = phiHbyA1 - rAU1f*SfGradp/rho1;
phi2 = phiHbyA2 - rAU2f*SfGradp/rho2;
phi = alpha1f*phi1 + alpha2f*phi2;
p.relax();
SfGradp = pEqn.flux()/Dp;
U1 = HbyA1 + (fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1));
U1.correctBoundaryConditions();
U2 = HbyA2 + (fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2));
U2.correctBoundaryConditions();
U = alpha1*U1 + alpha2*U2;
}
}
}
#include "continuityErrs.H"

View File

@ -1,4 +0,0 @@
int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));

View File

@ -1,17 +0,0 @@
if (runTime.outputTime())
{
volVectorField Ur
(
IOobject
(
"Ur",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
U1 - U2
);
runTime.write();
}

View File

@ -12,12 +12,12 @@
mesh mesh
); );
Info<< "Reading field alpha\n" << endl; Info<< "Reading field Alpha\n" << endl;
volScalarField alpha volScalarField Alpha
( (
IOobject IOobject
( (
"alpha", "Alpha",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -100,21 +100,20 @@
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::NO_WRITE
), ),
(scalar(1) - alpha)*rhoc + alpha*rhod rhoc/(scalar(1) + (rhoc/rhod - 1.0)*Alpha)
); );
volScalarField Alpha volScalarField alpha
( (
IOobject IOobject
( (
"Alpha", "alpha",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
alpha*rhod/rho, rho*Alpha/rhod
alpha.boundaryField().types()
); );
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"

View File

@ -1,5 +1,4 @@
EXE_INC = \ EXE_INC = \
-I../bubbleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \ -IturbulenceModel \

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

View File

@ -5,4 +5,5 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-lsampling \
-ldynamicMesh -ldynamicMesh

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
@ -53,105 +53,19 @@ Description
#include "polyMesh.H" #include "polyMesh.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "unitConversion.H" #include "unitConversion.H"
#include "motionSmoother.H"
using namespace Foam; using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Same check as snapMesh
void checkSnapMesh
(
const Time& runTime,
const polyMesh& mesh,
labelHashSet& wrongFaces
)
{
IOdictionary snapDict
(
IOobject
(
"snapMeshDict",
runTime.system(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
// Max nonorthogonality allowed
scalar maxNonOrtho(readScalar(snapDict.lookup("maxNonOrtho")));
// Max concaveness allowed.
scalar maxConcave(readScalar(snapDict.lookup("maxConcave")));
// Min volume allowed (factor of minimum cellVolume)
scalar relMinVol(readScalar(snapDict.lookup("minVol")));
const scalar minCellVol = min(mesh.cellVolumes());
const scalar minPyrVol = relMinVol*minCellVol;
// Min area
scalar minArea(readScalar(snapDict.lookup("minArea")));
if (maxNonOrtho < 180.0-SMALL)
{
Pout<< "Checking non orthogonality" << endl;
label nOldSize = wrongFaces.size();
mesh.setNonOrthThreshold(maxNonOrtho);
mesh.checkFaceOrthogonality(false, &wrongFaces);
Pout<< "Detected " << wrongFaces.size() - nOldSize
<< " faces with non-orthogonality > " << maxNonOrtho << " degrees"
<< endl;
}
if (minPyrVol > -GREAT)
{
Pout<< "Checking face pyramids" << endl;
label nOldSize = wrongFaces.size();
mesh.checkFacePyramids(false, minPyrVol, &wrongFaces);
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with illegal face pyramids" << endl;
}
if (maxConcave < 180.0-SMALL)
{
Pout<< "Checking face angles" << endl;
label nOldSize = wrongFaces.size();
mesh.checkFaceAngles(false, maxConcave, &wrongFaces);
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with concavity > " << maxConcave << " degrees"
<< endl;
}
if (minArea > -SMALL)
{
Pout<< "Checking face areas" << endl;
label nOldSize = wrongFaces.size();
const scalarField magFaceAreas(mag(mesh.faceAreas()));
forAll(magFaceAreas, faceI)
{
if (magFaceAreas[faceI] < minArea)
{
wrongFaces.insert(faceI);
}
}
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with area < " << minArea << " m^2" << endl;
}
}
// Merge faces on the same patch (usually from exposing refinement) // Merge faces on the same patch (usually from exposing refinement)
// Can undo merges if these cause problems. // Can undo merges if these cause problems.
label mergePatchFaces label mergePatchFaces
( (
const scalar minCos, const scalar minCos,
const scalar concaveSin, const scalar concaveSin,
const bool snapMeshDict, const autoPtr<IOdictionary>& qualDictPtr,
const Time& runTime, const Time& runTime,
polyMesh& mesh polyMesh& mesh
) )
@ -212,9 +126,9 @@ label mergePatchFaces
// Faces in error. // Faces in error.
labelHashSet errorFaces; labelHashSet errorFaces;
if (snapMeshDict) if (qualDictPtr.valid())
{ {
checkSnapMesh(runTime, mesh, errorFaces); motionSmoother::checkMesh(false, mesh, qualDictPtr(), errorFaces);
} }
else else
{ {
@ -437,8 +351,8 @@ int main(int argc, char *argv[])
); );
argList::addBoolOption argList::addBoolOption
( (
"snapMesh", "meshQuality",
"use system/snapMeshDict" "read user-defined mesh quality criterions from system/meshQualityDict"
); );
# include "setRootCase.H" # include "setRootCase.H"
@ -455,8 +369,8 @@ int main(int argc, char *argv[])
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0); scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
scalar concaveSin = Foam::sin(degToRad(concaveAngle)); scalar concaveSin = Foam::sin(degToRad(concaveAngle));
const bool snapMeshDict = args.optionFound("snapMesh");
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");
const bool meshQuality = args.optionFound("meshQuality");
Info<< "Merging all faces of a cell" << nl Info<< "Merging all faces of a cell" << nl
<< " - which are on the same patch" << nl << " - which are on the same patch" << nl
@ -468,23 +382,47 @@ int main(int argc, char *argv[])
<< " (sin:" << concaveSin << ')' << nl << " (sin:" << concaveSin << ')' << nl
<< endl; << endl;
autoPtr<IOdictionary> qualDict;
if (meshQuality)
{
Info<< "Enabling user-defined geometry checks." << nl << endl;
qualDict.reset
(
new IOdictionary
(
IOobject
(
"meshQualityDict",
mesh.time().system(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
);
}
if (!overwrite) if (!overwrite)
{ {
runTime++; runTime++;
} }
// Merge faces on same patch // Merge faces on same patch
label nChanged = mergePatchFaces label nChanged = mergePatchFaces
( (
minCos, minCos,
concaveSin, concaveSin,
snapMeshDict, qualDict,
runTime, runTime,
mesh mesh
); );
// Merge points on straight edges and remove unused points // Merge points on straight edges and remove unused points
if (snapMeshDict) if (qualDict.valid())
{ {
Info<< "Merging all 'loose' points on surface edges, " Info<< "Merging all 'loose' points on surface edges, "
<< "regardless of the angle they make." << endl; << "regardless of the angle they make." << endl;

View File

@ -17,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude -I$(LIB_SRC)/triSurface/lnInclude
@ -29,5 +30,6 @@ EXE_LIBS = \
-ldecompositionMethods \ -ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \
-ledgeMesh \ -ledgeMesh \
-lfileFormats \
-ltriSurface \ -ltriSurface \
-ldynamicMesh -ldynamicMesh

View File

@ -17,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I../vectorTools -I../vectorTools
@ -24,5 +25,6 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-ledgeMesh \ -ledgeMesh \
-lfileFormats \
-ltriSurface \ -ltriSurface \
-ldynamicMesh -ldynamicMesh

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
@ -36,6 +36,7 @@ Description
#include "argList.H" #include "argList.H"
#include "conformalVoronoiMesh.H" #include "conformalVoronoiMesh.H"
#include "vtkSetWriter.H"
using namespace Foam; using namespace Foam;
@ -48,6 +49,11 @@ int main(int argc, char *argv[])
"noFilter", "noFilter",
"Do not filter the mesh" "Do not filter the mesh"
); );
Foam::argList::addBoolOption
(
"checkGeometry",
"check all surface geometry for quality"
);
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
@ -55,6 +61,7 @@ int main(int argc, char *argv[])
runTime.functionObjects().off(); runTime.functionObjects().off();
const bool noFilter = !args.optionFound("noFilter"); const bool noFilter = !args.optionFound("noFilter");
const bool checkGeometry = args.optionFound("checkGeometry");
Info<< "Mesh filtering is " << (noFilter ? "on" : "off") << endl; Info<< "Mesh filtering is " << (noFilter ? "on" : "off") << endl;
@ -74,6 +81,29 @@ int main(int argc, char *argv[])
conformalVoronoiMesh mesh(runTime, cvMeshDict); conformalVoronoiMesh mesh(runTime, cvMeshDict);
if (checkGeometry)
{
const searchableSurfaces& allGeometry = mesh.allGeometry();
// Write some stats
allGeometry.writeStats(List<wordList>(0), Info);
// Check topology
allGeometry.checkTopology(true);
// Check geometry
allGeometry.checkGeometry
(
100.0, // max size ratio
1e-9, // intersection tolerance
autoPtr<writer<scalar> >(new vtkSetWriter<scalar>()),
0.01, // min triangle quality
true
);
return 0;
}
while (runTime.loop()) while (runTime.loop())
{ {
Info<< nl << "Time = " << runTime.timeName() << endl; Info<< nl << "Time = " << runTime.timeName() << endl;

View File

@ -11,10 +11,11 @@ EXE_INC = \
-I../conformalVoronoiMesh/lnInclude \ -I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
@ -24,8 +25,9 @@ EXE_LIBS = \
-lconformalVoronoiMesh \ -lconformalVoronoiMesh \
-ldecompositionMethods /* -L$(FOAM_LIBBIN)/dummy -lscotchDecomp */ \ -ldecompositionMethods /* -L$(FOAM_LIBBIN)/dummy -lscotchDecomp */ \
-ledgeMesh \ -ledgeMesh \
-lsampling \
-ltriSurface \ -ltriSurface \
-lmeshTools \ -lmeshTools \
-lfileFormats \
-lsampling \
-ldynamicMesh \ -ldynamicMesh \
-lfiniteVolume -lfiniteVolume

View File

@ -9,6 +9,7 @@ EXE_INC = \
-I$(FASTDUALOCTREE_SRC_PATH) \ -I$(FASTDUALOCTREE_SRC_PATH) \
-I../conformalVoronoiMesh/lnInclude \ -I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
@ -21,6 +22,7 @@ EXE_LIBS = \
-lconformalVoronoiMesh \ -lconformalVoronoiMesh \
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \ -ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \
-ledgeMesh \ -ledgeMesh \
-lfileFormats \
-ltriSurface \ -ltriSurface \
-lmeshTools \ -lmeshTools \
-ldynamicMesh -ldynamicMesh

View File

@ -3,6 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/mesh/autoMesh/lnInclude \ -I$(LIB_SRC)/mesh/autoMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \ -I$(LIB_SRC)/edgeMesh/lnInclude \
@ -13,5 +14,6 @@ EXE_LIBS = \
-ldecompositionMethods \ -ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \
-lmeshTools \ -lmeshTools \
-lfileFormats \
-ldynamicMesh \ -ldynamicMesh \
-lautoMesh -lautoMesh

View File

@ -46,7 +46,7 @@ Description
#include "refinementParameters.H" #include "refinementParameters.H"
#include "snapParameters.H" #include "snapParameters.H"
#include "layerParameters.H" #include "layerParameters.H"
#include "vtkSetWriter.H"
using namespace Foam; using namespace Foam;
@ -122,6 +122,12 @@ void writeMesh
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
# include "addOverwriteOption.H" # include "addOverwriteOption.H"
Foam::argList::addBoolOption
(
"checkGeometry",
"check all surface geometry for quality"
);
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
runTime.functionObjects().off(); runTime.functionObjects().off();
@ -131,6 +137,7 @@ int main(int argc, char *argv[])
<< runTime.cpuTimeIncrement() << " s" << endl; << runTime.cpuTimeIncrement() << " s" << endl;
const bool overwrite = args.optionFound("overwrite"); const bool overwrite = args.optionFound("overwrite");
const bool checkGeometry = args.optionFound("checkGeometry");
// Check patches and faceZones are synchronised // Check patches and faceZones are synchronised
mesh.boundaryMesh().checkParallelSync(true); mesh.boundaryMesh().checkParallelSync(true);
@ -244,6 +251,56 @@ int main(int argc, char *argv[])
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl; << mesh.time().cpuTimeIncrement() << " s" << nl << endl;
// Checking only?
if (checkGeometry)
{
// Extract patchInfo
List<wordList> patchTypes(allGeometry.size());
const PtrList<dictionary>& patchInfo = surfaces.patchInfo();
const labelList& surfaceGeometry = surfaces.surfaces();
forAll(surfaceGeometry, surfI)
{
label geomI = surfaceGeometry[surfI];
const wordList& regNames = allGeometry.regionNames()[geomI];
patchTypes[geomI].setSize(regNames.size());
forAll(regNames, regionI)
{
label globalRegionI = surfaces.globalRegion(surfI, regionI);
if (patchInfo.set(globalRegionI))
{
patchTypes[geomI][regionI] =
word(patchInfo[globalRegionI].lookup("type"));
}
else
{
patchTypes[geomI][regionI] = wallPolyPatch::typeName;
}
}
}
// Write some stats
allGeometry.writeStats(patchTypes, Info);
// Check topology
allGeometry.checkTopology(true);
// Check geometry
allGeometry.checkGeometry
(
100.0, // max size ratio
1e-9, // intersection tolerance
autoPtr<writer<scalar> >(new vtkSetWriter<scalar>()),
0.01, // min triangle quality
true
);
return 0;
}
// Read refinement shells // Read refinement shells
// ~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -2,4 +2,5 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lmeshTools -lmeshTools \
-lsampling

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
@ -48,6 +48,7 @@ Description
#include "IFstream.H" #include "IFstream.H"
#include "IOobjectList.H" #include "IOobjectList.H"
#include "SortableList.H" #include "SortableList.H"
#include "timeSelector.H"
using namespace Foam; using namespace Foam;
@ -57,6 +58,7 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
timeSelector::addOptions(true, false);
argList::addNote argList::addNote
( (
"add point/face/cell Zones from similar named point/face/cell Sets" "add point/face/cell Zones from similar named point/face/cell Sets"
@ -76,15 +78,7 @@ int main(int argc, char *argv[])
const bool noFlipMap = args.optionFound("noFlipMap"); const bool noFlipMap = args.optionFound("noFlipMap");
// Get times list // Get times list
instantList Times = runTime.times(); (void)timeSelector::selectIfPresent(runTime, args);
label startTime = Times.size()-1;
label endTime = Times.size();
// check -time and -latestTime options
#include "checkTimeOption.H"
runTime.setTime(Times[startTime], startTime);
#include "createNamedPolyMesh.H" #include "createNamedPolyMesh.H"

View File

@ -1,15 +1,9 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/lagrangian/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/browser/lnInclude \
-I$(LIB_SRC)/foam/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \

View File

@ -446,13 +446,6 @@ class vtkPV3Foam
template<class PatchType> template<class PatchType>
vtkPolyData* patchVTKMesh(const word& name, const PatchType&); vtkPolyData* patchVTKMesh(const word& name, const PatchType&);
//- Add face zone mesh
vtkPolyData* faceZoneVTKMesh
(
const fvMesh&,
const labelList& faceLabels
);
//- Add point zone //- Add point zone
vtkPolyData* pointZoneVTKMesh vtkPolyData* pointZoneVTKMesh
( (

View File

@ -450,7 +450,8 @@ void Foam::vtkPV3Foam::convertMeshFaceZones
<< zoneName << endl; << zoneName << endl;
} }
vtkPolyData* vtkmesh = faceZoneVTKMesh(mesh, zMesh[zoneId]); vtkPolyData* vtkmesh = patchVTKMesh(zoneName, zMesh[zoneId]());
if (vtkmesh) if (vtkmesh)
{ {
AddToBlock(output, vtkmesh, range, datasetNo, zoneName); AddToBlock(output, vtkmesh, range, datasetNo, zoneName);

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
@ -35,78 +35,6 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
vtkPolyData* Foam::vtkPV3Foam::faceZoneVTKMesh
(
const fvMesh& mesh,
const labelList& faceLabels
)
{
vtkPolyData* vtkmesh = vtkPolyData::New();
if (debug)
{
Info<< "<beg> Foam::vtkPV3Foam::faceZoneVTKMesh" << endl;
printMemory();
}
// Construct primitivePatch of faces in faceZone
const faceList& meshFaces = mesh.faces();
faceList patchFaces(faceLabels.size());
forAll(faceLabels, faceI)
{
patchFaces[faceI] = meshFaces[faceLabels[faceI]];
}
primitiveFacePatch p(patchFaces, mesh.points());
// The balance of this routine should be identical to patchVTKMesh
// Convert OpenFOAM mesh vertices to VTK
const pointField& points = p.localPoints();
vtkPoints* vtkpoints = vtkPoints::New();
vtkpoints->Allocate(points.size());
forAll(points, i)
{
vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
}
vtkmesh->SetPoints(vtkpoints);
vtkpoints->Delete();
// Add faces as polygons
const faceList& faces = p.localFaces();
vtkCellArray* vtkcells = vtkCellArray::New();
vtkcells->Allocate(faces.size());
forAll(faces, faceI)
{
const face& f = faces[faceI];
vtkIdType nodeIds[f.size()];
forAll(f, fp)
{
nodeIds[fp] = f[fp];
}
vtkcells->InsertNextCell(f.size(), nodeIds);
}
vtkmesh->SetPolys(vtkcells);
vtkcells->Delete();
if (debug)
{
Info<< "<end> Foam::vtkPV3Foam::faceZoneVTKMesh" << endl;
printMemory();
}
return vtkmesh;
}
vtkPolyData* Foam::vtkPV3Foam::pointZoneVTKMesh vtkPolyData* Foam::vtkPV3Foam::pointZoneVTKMesh
( (
const fvMesh& mesh, const fvMesh& mesh,

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
@ -129,6 +129,42 @@ void Foam::vtkPV3Foam::convertPointFields
datasetNo datasetNo
); );
} }
//
// Convert faceZones - if activated
//
for
(
int partId = arrayRangeFaceZones_.start();
partId < arrayRangeFaceZones_.end();
++partId
)
{
const word zoneName = getPartName(partId);
const label datasetNo = partDataset_[partId];
const label zoneId = mesh.faceZones().findZoneID(zoneName);
if (!partStatus_[partId] || datasetNo < 0 || zoneId < 0)
{
continue;
}
// Extract the field on the zone
Field<Type> fld
(
ptf.internalField(),
mesh.faceZones()[zoneId]().meshPoints()
);
convertPatchPointField
(
fieldName,
fld,
output,
arrayRangeFaceZones_,
datasetNo
);
}
} }
} }

View File

@ -1,12 +1,12 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lsampling \ -lfileFormats \
-lgenericPatchFields \ -lgenericPatchFields \
-llagrangian -llagrangian

View File

@ -1,6 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/lagrangian/basic/lnInclude
@ -9,6 +10,7 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lgenericPatchFields \ -lgenericPatchFields \
-lmeshTools \ -lmeshTools \
-lfileFormats \
-lsampling \ -lsampling \
-lsurfMesh \ -lsurfMesh \
-llagrangian -llagrangian

View File

@ -5,8 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \ $(FOAM_LIBBIN)/postCalc.o \

View File

@ -1,10 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/randomProcesses/lnInclude \ -I$(LIB_SRC)/randomProcesses/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lrandomProcesses \ -lrandomProcesses \
-lsampling \
-lmeshTools \
-lfiniteVolume -lfiniteVolume

View File

@ -101,7 +101,7 @@ cleanCase()
rm -rf constant/tetDualMesh > /dev/null 2>&1 rm -rf constant/tetDualMesh > /dev/null 2>&1
rm -rf VTK > /dev/null 2>&1 rm -rf VTK > /dev/null 2>&1
rm -f 0/cellLevel 0/pointLevel rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
if [ -e constant/polyMesh/blockMeshDict.m4 ] if [ -e constant/polyMesh/blockMeshDict.m4 ]
then then

View File

@ -526,7 +526,7 @@ $(Fields)/symmTensorField/symmTensorField.C
$(Fields)/tensorField/tensorField.C $(Fields)/tensorField/tensorField.C
$(Fields)/complexFields/complexFields.C $(Fields)/complexFields/complexFields.C
$(Fields)/labelField/labelIOField. $(Fields)/labelField/labelIOField.C
$(Fields)/labelField/labelFieldIOField.C $(Fields)/labelField/labelFieldIOField.C
$(Fields)/scalarField/scalarIOField.C $(Fields)/scalarField/scalarIOField.C
$(Fields)/scalarField/scalarFieldIOField.C $(Fields)/scalarField/scalarFieldIOField.C

View File

@ -51,8 +51,13 @@ class subCycleField
//- Reference to the field being sub-cycled //- Reference to the field being sub-cycled
GeometricField& gf_; GeometricField& gf_;
//- Reference to the field old-time field being sub-cycled
// Needed to avoid calls to oldTime() which may cause
// unexpected updates of the old-time field
GeometricField& gf0_;
//- Copy of the "real" old-time value of the field //- Copy of the "real" old-time value of the field
GeometricField gf0_; GeometricField gf_0_;
public: public:
@ -63,19 +68,33 @@ public:
subCycleField(GeometricField& gf) subCycleField(GeometricField& gf)
: :
gf_(gf), gf_(gf),
gf0_(gf.oldTime()) gf0_(gf.oldTime()),
gf_0_(gf0_.name() + "_", gf0_)
{} {}
//- Destructor //- Destructor
~subCycleField() ~subCycleField()
{ {
// Reset the old-time field
gf0_ = gf_0_;
// Correct the time index of the field to correspond to the global time // Correct the time index of the field to correspond to the global time
gf_.timeIndex() = gf_.time().timeIndex(); gf_.timeIndex() = gf_.time().timeIndex();
gf0_.timeIndex() = gf_.time().timeIndex();
}
// Reset the old-time field value
gf_.oldTime() = gf0_; //- Correct the time index of the field to correspond to
gf_.oldTime().timeIndex() = gf0_.timeIndex(); // the sub-cycling time.
//
// The time index is incremented to protect the old-time value from
// being updated at the beginning of the time-loop in the case of
// outer iteration
void updateTimeIndex()
{
gf_.timeIndex() = gf_.time().timeIndex() + 1;
gf0_.timeIndex() = gf_.time().timeIndex() + 1;
} }
}; };
@ -106,16 +125,18 @@ public:
//- Construct field and number of sub-cycles //- Construct field and number of sub-cycles
subCycle(GeometricField& gf, const label nSubCycles) subCycle(GeometricField& gf, const label nSubCycles)
: :
subCycleField<GeometricField>(gf), subCycleField<GeometricField>(gf),
subCycleTime(const_cast<Time&>(gf.time()), nSubCycles) subCycleTime(const_cast<Time&>(gf.time()), nSubCycles)
{} {
// Update the field time index to correspond to the sub-cycle time
this->updateTimeIndex();
}
//- Destructor //- Destructor
// End the subCycleTime, which restores the time state
~subCycle() ~subCycle()
{ {
// End the subCycleTime, which restores the time state
endSubCycle(); endSubCycle();
} }
}; };

View File

@ -324,6 +324,7 @@ Foam::Time::Time
secondaryWriteControl_(wcTimeStep), secondaryWriteControl_(wcTimeStep),
secondaryWriteInterval_(labelMax/10.0), // bit less to allow calculations secondaryWriteInterval_(labelMax/10.0), // bit less to allow calculations
purgeWrite_(0), purgeWrite_(0),
secondaryPurgeWrite_(0),
writeOnce_(false), writeOnce_(false),
subCycling_(false), subCycling_(false),
sigWriteNow_(true, *this), sigWriteNow_(true, *this),
@ -416,6 +417,7 @@ Foam::Time::Time
secondaryWriteControl_(wcTimeStep), secondaryWriteControl_(wcTimeStep),
secondaryWriteInterval_(labelMax/10.0), secondaryWriteInterval_(labelMax/10.0),
purgeWrite_(0), purgeWrite_(0),
secondaryPurgeWrite_(0),
writeOnce_(false), writeOnce_(false),
subCycling_(false), subCycling_(false),
sigWriteNow_(true, *this), sigWriteNow_(true, *this),
@ -511,6 +513,7 @@ Foam::Time::Time
secondaryWriteControl_(wcTimeStep), secondaryWriteControl_(wcTimeStep),
secondaryWriteInterval_(labelMax/10.0), secondaryWriteInterval_(labelMax/10.0),
purgeWrite_(0), purgeWrite_(0),
secondaryPurgeWrite_(0),
writeOnce_(false), writeOnce_(false),
subCycling_(false), subCycling_(false),
sigWriteNow_(true, *this), sigWriteNow_(true, *this),
@ -608,6 +611,7 @@ Foam::Time::Time
secondaryWriteControl_(wcTimeStep), secondaryWriteControl_(wcTimeStep),
secondaryWriteInterval_(labelMax/10.0), secondaryWriteInterval_(labelMax/10.0),
purgeWrite_(0), purgeWrite_(0),
secondaryPurgeWrite_(0),
writeOnce_(false), writeOnce_(false),
subCycling_(false), subCycling_(false),
@ -1070,11 +1074,13 @@ Foam::Time& Foam::Time::operator++()
outputTime_ = false; outputTime_ = false;
primaryOutputTime_ = false;
secondaryOutputTime_ = false;
switch (writeControl_) switch (writeControl_)
{ {
case wcTimeStep: case wcTimeStep:
outputTime_ = !(timeIndex_ % label(writeInterval_)); primaryOutputTime_ = !(timeIndex_ % label(writeInterval_));
break; break;
case wcRunTime: case wcRunTime:
@ -1088,7 +1094,7 @@ Foam::Time& Foam::Time::operator++()
if (outputIndex > outputTimeIndex_) if (outputIndex > outputTimeIndex_)
{ {
outputTime_ = true; primaryOutputTime_ = true;
outputTimeIndex_ = outputIndex; outputTimeIndex_ = outputIndex;
} }
} }
@ -1103,7 +1109,7 @@ Foam::Time& Foam::Time::operator++()
); );
if (outputIndex > outputTimeIndex_) if (outputIndex > outputTimeIndex_)
{ {
outputTime_ = true; primaryOutputTime_ = true;
outputTimeIndex_ = outputIndex; outputTimeIndex_ = outputIndex;
} }
} }
@ -1118,7 +1124,7 @@ Foam::Time& Foam::Time::operator++()
); );
if (outputIndex > outputTimeIndex_) if (outputIndex > outputTimeIndex_)
{ {
outputTime_ = true; primaryOutputTime_ = true;
outputTimeIndex_ = outputIndex; outputTimeIndex_ = outputIndex;
} }
} }
@ -1130,9 +1136,8 @@ Foam::Time& Foam::Time::operator++()
switch (secondaryWriteControl_) switch (secondaryWriteControl_)
{ {
case wcTimeStep: case wcTimeStep:
outputTime_ = secondaryOutputTime_ =
outputTime_ !(timeIndex_ % label(secondaryWriteInterval_));
|| !(timeIndex_ % label(secondaryWriteInterval_));
break; break;
case wcRunTime: case wcRunTime:
@ -1146,7 +1151,7 @@ Foam::Time& Foam::Time::operator++()
if (outputIndex > secondaryOutputTimeIndex_) if (outputIndex > secondaryOutputTimeIndex_)
{ {
outputTime_ = true; secondaryOutputTime_ = true;
secondaryOutputTimeIndex_ = outputIndex; secondaryOutputTimeIndex_ = outputIndex;
} }
} }
@ -1161,7 +1166,7 @@ Foam::Time& Foam::Time::operator++()
); );
if (outputIndex > secondaryOutputTimeIndex_) if (outputIndex > secondaryOutputTimeIndex_)
{ {
outputTime_ = true; secondaryOutputTime_ = true;
secondaryOutputTimeIndex_ = outputIndex; secondaryOutputTimeIndex_ = outputIndex;
} }
} }
@ -1176,7 +1181,7 @@ Foam::Time& Foam::Time::operator++()
); );
if (outputIndex > secondaryOutputTimeIndex_) if (outputIndex > secondaryOutputTimeIndex_)
{ {
outputTime_ = true; secondaryOutputTime_ = true;
secondaryOutputTimeIndex_ = outputIndex; secondaryOutputTimeIndex_ = outputIndex;
} }
} }
@ -1184,6 +1189,9 @@ Foam::Time& Foam::Time::operator++()
} }
outputTime_ = primaryOutputTime_ || secondaryOutputTime_;
// see if endTime needs adjustment to stop at the next run()/end() check // see if endTime needs adjustment to stop at the next run()/end() check
if (!end()) if (!end())
{ {
@ -1195,6 +1203,7 @@ Foam::Time& Foam::Time::operator++()
{ {
endTime_ = value(); endTime_ = value();
outputTime_ = true; outputTime_ = true;
primaryOutputTime_ = true;
} }
else if (stopAt_ == saNextWrite && outputTime_ == true) else if (stopAt_ == saNextWrite && outputTime_ == true)
{ {
@ -1205,6 +1214,7 @@ Foam::Time& Foam::Time::operator++()
// Override outputTime if one-shot writing // Override outputTime if one-shot writing
if (writeOnce_) if (writeOnce_)
{ {
primaryOutputTime_ = true;
outputTime_ = true; outputTime_ = true;
writeOnce_ = false; writeOnce_ = false;
} }

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
@ -138,10 +138,15 @@ protected:
scalar secondaryWriteInterval_; scalar secondaryWriteInterval_;
label purgeWrite_; label purgeWrite_;
mutable FIFOStack<word> previousOutputTimes_; mutable FIFOStack<word> previousOutputTimes_;
// Additional purging
label secondaryPurgeWrite_;
mutable FIFOStack<word> previousSecondaryOutputTimes_;
// One-shot writing // One-shot writing
bool writeOnce_; bool writeOnce_;

View File

@ -160,6 +160,20 @@ void Foam::Time::readDict()
} }
} }
if (controlDict_.readIfPresent("secondaryPurgeWrite", secondaryPurgeWrite_))
{
if (secondaryPurgeWrite_ < 0)
{
WarningIn("Time::readDict()")
<< "invalid value for secondaryPurgeWrite "
<< secondaryPurgeWrite_
<< ", should be >= 0, setting to 0"
<< endl;
secondaryPurgeWrite_ = 0;
}
}
if (controlDict_.found("timeFormat")) if (controlDict_.found("timeFormat"))
{ {
const word formatName(controlDict_.lookup("timeFormat")); const word formatName(controlDict_.lookup("timeFormat"));
@ -347,13 +361,45 @@ bool Foam::Time::writeObject
timeDict.regIOobject::writeObject(fmt, ver, cmp); timeDict.regIOobject::writeObject(fmt, ver, cmp);
bool writeOK = objectRegistry::writeObject(fmt, ver, cmp); bool writeOK = objectRegistry::writeObject(fmt, ver, cmp);
if (writeOK && purgeWrite_) if (writeOK)
{ {
previousOutputTimes_.push(tmName); // Does primary or secondary time trigger purging?
// Note that primary times can only be purged by primary
while (previousOutputTimes_.size() > purgeWrite_) // purging. Secondary times can be purged by either primary
// or secondary purging.
if (primaryOutputTime_ && purgeWrite_)
{ {
rmDir(objectRegistry::path(previousOutputTimes_.pop())); previousOutputTimes_.push(tmName);
while (previousOutputTimes_.size() > purgeWrite_)
{
rmDir(objectRegistry::path(previousOutputTimes_.pop()));
}
}
if
(
!primaryOutputTime_
&& secondaryOutputTime_
&& secondaryPurgeWrite_
)
{
// Writing due to secondary
previousSecondaryOutputTimes_.push(tmName);
while
(
previousSecondaryOutputTimes_.size()
> secondaryPurgeWrite_
)
{
rmDir
(
objectRegistry::path
(
previousSecondaryOutputTimes_.pop()
)
);
}
} }
} }
@ -368,6 +414,7 @@ bool Foam::Time::writeObject
bool Foam::Time::writeNow() bool Foam::Time::writeNow()
{ {
primaryOutputTime_ = true;
outputTime_ = true; outputTime_ = true;
return write(); return write();
} }

View File

@ -37,7 +37,9 @@ Foam::TimeState::TimeState()
deltaT0_(0), deltaT0_(0),
deltaTchanged_(false), deltaTchanged_(false),
outputTimeIndex_(0), outputTimeIndex_(0),
primaryOutputTime_(false),
secondaryOutputTimeIndex_(0), secondaryOutputTimeIndex_(0),
secondaryOutputTime_(false),
outputTime_(false) outputTime_(false)
{} {}

View File

@ -61,8 +61,14 @@ protected:
bool deltaTchanged_; bool deltaTchanged_;
label outputTimeIndex_; label outputTimeIndex_;
//- Is outputTime because of primary?
bool primaryOutputTime_;
label secondaryOutputTimeIndex_; label secondaryOutputTimeIndex_;
bool outputTime_; //- Is outputTime because of secondary?
bool secondaryOutputTime_;
bool outputTime_;
public: public:
@ -112,7 +118,7 @@ public:
// Check // Check
//- Return true if this is an output time //- Return true if this is an output time (primary or secondary)
bool outputTime() const; bool outputTime() const;
}; };

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
@ -30,11 +30,8 @@ License
namespace Foam namespace Foam
{ {
template<> template<>
const char* Foam::NamedEnum const char* NamedEnum<outputFilterOutputControl::outputControls, 2>::
< names[] =
Foam::outputFilterOutputControl::outputControls,
2
>::names[] =
{ {
"timeStep", "timeStep",
"outputTime" "outputTime"

View File

@ -372,6 +372,12 @@ Foam::dimensionSet Foam::sqrt(const dimensionSet& ds)
} }
Foam::dimensionSet Foam::cbrt(const dimensionSet& ds)
{
return pow(ds, 1.0/3.0);
}
Foam::dimensionSet Foam::magSqr(const dimensionSet& ds) Foam::dimensionSet Foam::magSqr(const dimensionSet& ds)
{ {
return pow(ds, 2); return pow(ds, 2);

View File

@ -76,6 +76,7 @@ dimensionSet pow6(const dimensionSet&);
dimensionSet pow025(const dimensionSet&); dimensionSet pow025(const dimensionSet&);
dimensionSet sqrt(const dimensionSet&); dimensionSet sqrt(const dimensionSet&);
dimensionSet cbrt(const dimensionSet&);
dimensionSet magSqr(const dimensionSet&); dimensionSet magSqr(const dimensionSet&);
dimensionSet mag(const dimensionSet&); dimensionSet mag(const dimensionSet&);
dimensionSet sign(const dimensionSet&); dimensionSet sign(const dimensionSet&);

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
@ -377,6 +377,7 @@ UNARY_FUNCTION(scalar, scalar, pow5, pow5)
UNARY_FUNCTION(scalar, scalar, pow6, pow6) UNARY_FUNCTION(scalar, scalar, pow6, pow6)
UNARY_FUNCTION(scalar, scalar, pow025, pow025) UNARY_FUNCTION(scalar, scalar, pow025, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, sign, sign)
UNARY_FUNCTION(scalar, scalar, pos, pos) UNARY_FUNCTION(scalar, scalar, pos, pos)
UNARY_FUNCTION(scalar, scalar, neg, neg) UNARY_FUNCTION(scalar, scalar, neg, neg)

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
@ -85,6 +85,7 @@ UNARY_FUNCTION(scalar, scalar, pow5, pow5)
UNARY_FUNCTION(scalar, scalar, pow6, pow6) UNARY_FUNCTION(scalar, scalar, pow6, pow6)
UNARY_FUNCTION(scalar, scalar, pow025, pow025) UNARY_FUNCTION(scalar, scalar, pow025, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, sign, sign)
UNARY_FUNCTION(scalar, scalar, pos, pos) UNARY_FUNCTION(scalar, scalar, pos, pos)
UNARY_FUNCTION(scalar, scalar, neg, neg) UNARY_FUNCTION(scalar, scalar, neg, neg)

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
@ -105,6 +105,7 @@ UNARY_FUNCTION(scalar, scalar, pow5)
UNARY_FUNCTION(scalar, scalar, pow6) UNARY_FUNCTION(scalar, scalar, pow6)
UNARY_FUNCTION(scalar, scalar, pow025) UNARY_FUNCTION(scalar, scalar, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt)
UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, sign)
UNARY_FUNCTION(scalar, scalar, pos) UNARY_FUNCTION(scalar, scalar, pos)
UNARY_FUNCTION(scalar, scalar, neg) UNARY_FUNCTION(scalar, scalar, neg)

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
@ -98,6 +98,7 @@ UNARY_FUNCTION(scalar, scalar, pow5)
UNARY_FUNCTION(scalar, scalar, pow6) UNARY_FUNCTION(scalar, scalar, pow6)
UNARY_FUNCTION(scalar, scalar, pow025) UNARY_FUNCTION(scalar, scalar, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt)
UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, sign)
UNARY_FUNCTION(scalar, scalar, pos) UNARY_FUNCTION(scalar, scalar, pos)
UNARY_FUNCTION(scalar, scalar, neg) UNARY_FUNCTION(scalar, scalar, neg)

View File

@ -128,6 +128,7 @@ UNARY_FUNCTION(scalar, scalar, pow5)
UNARY_FUNCTION(scalar, scalar, pow6) UNARY_FUNCTION(scalar, scalar, pow6)
UNARY_FUNCTION(scalar, scalar, pow025) UNARY_FUNCTION(scalar, scalar, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt)
UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, sign)
UNARY_FUNCTION(scalar, scalar, pos) UNARY_FUNCTION(scalar, scalar, pos)
UNARY_FUNCTION(scalar, scalar, neg) UNARY_FUNCTION(scalar, scalar, neg)

View File

@ -103,6 +103,7 @@ UNARY_FUNCTION(scalar, scalar, pow5)
UNARY_FUNCTION(scalar, scalar, pow6) UNARY_FUNCTION(scalar, scalar, pow6)
UNARY_FUNCTION(scalar, scalar, pow025) UNARY_FUNCTION(scalar, scalar, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt)
UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, sign)
UNARY_FUNCTION(scalar, scalar, pos) UNARY_FUNCTION(scalar, scalar, pos)
UNARY_FUNCTION(scalar, scalar, neg) UNARY_FUNCTION(scalar, scalar, neg)

View File

@ -47,7 +47,7 @@ GeometricBoundaryField
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const BoundaryMesh&, " "GeometricBoundaryField(const BoundaryMesh&, "
"const Field<Type>&, const word&)" "const DimensionedField<Type>&, const word&)"
<< endl; << endl;
} }
@ -84,8 +84,13 @@ GeometricBoundaryField
{ {
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const BoundaryMesh&, " "GeometricBoundaryField"
"const Field<Type>&, const wordList&, const wordList&)" "("
"const BoundaryMesh&, "
"const DimensionedField<Type>&, "
"const wordList&, "
"const wordList&"
")"
<< endl; << endl;
} }
@ -99,8 +104,13 @@ GeometricBoundaryField
( (
"GeometricField<Type, PatchField, GeoMesh>::" "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const BoundaryMesh&, " "GeometricBoundaryField"
"const Field<Type>&, const wordList&, const wordList&)" "("
"const BoundaryMesh&, "
"const DimensionedField<Type>&, "
"const wordList&, "
"const wordList&"
")"
) << "Incorrect number of patch type specifications given" << nl ) << "Incorrect number of patch type specifications given" << nl
<< " Number of patches in mesh = " << bmesh.size() << " Number of patches in mesh = " << bmesh.size()
<< " number of patch type specifications = " << " number of patch type specifications = "
@ -160,8 +170,12 @@ GeometricBoundaryField
{ {
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const BoundaryMesh&, " "GeometricBoundaryField"
"const Field<Type>&, const PatchField<Type>List&)" "("
"const BoundaryMesh&, "
"const DimensionedField<Type, GeoMesh>&, "
"const PtrLIst<PatchField<Type> >&"
")"
<< endl; << endl;
} }
@ -188,8 +202,12 @@ GeometricBoundaryField
{ {
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const GeometricBoundaryField<Type, " "GeometricBoundaryField"
"PatchField, BoundaryMesh>&)" "("
"const DimensionedField<Type, GeoMesh>&, "
"const typename GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField&"
")"
<< endl; << endl;
} }
@ -220,8 +238,11 @@ GeometricBoundaryField
{ {
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField(const GeometricBoundaryField<Type, " "GeometricBoundaryField"
"PatchField, BoundaryMesh>&)" "("
"const GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField&"
")"
<< endl; << endl;
} }
} }
@ -244,7 +265,11 @@ GeometricBoundaryField
Info<< "GeometricField<Type, PatchField, GeoMesh>::" Info<< "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::" "GeometricBoundaryField::"
"GeometricBoundaryField" "GeometricBoundaryField"
"(const BoundaryMesh&, const Field<Type>&, const dictionary&)" "("
"const BoundaryMesh&, "
"const DimensionedField<Type, GeoMesh>&, "
"const dictionary&"
")"
<< endl; << endl;
} }
@ -326,12 +351,13 @@ GeometricBoundaryField
{ {
FatalIOErrorIn FatalIOErrorIn
( (
"GeometricField<Type, PatchField, GeoMesh>::\n" "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::GeometricBoundaryField\n" "GeometricBoundaryField::"
"(\n" "GeometricBoundaryField"
" const BoundaryMesh&,\n" "("
" const DimensionedField<Type, GeoMesh>&,\n" "const BoundaryMesh&, "
" const dictionary&\n" "const DimensionedField<Type, GeoMesh>&, "
"const dictionary&"
")", ")",
dict dict
) << "Cannot find patchField entry for cyclic " ) << "Cannot find patchField entry for cyclic "
@ -344,12 +370,13 @@ GeometricBoundaryField
{ {
FatalIOErrorIn FatalIOErrorIn
( (
"GeometricField<Type, PatchField, GeoMesh>::\n" "GeometricField<Type, PatchField, GeoMesh>::"
"GeometricBoundaryField::GeometricBoundaryField\n" "GeometricBoundaryField::"
"(\n" "GeometricBoundaryField"
" const BoundaryMesh&,\n" "("
" const DimensionedField<Type, GeoMesh>&,\n" "const BoundaryMesh&, "
" const dictionary&\n" "const DimensionedField<Type, GeoMesh>&, "
"const dictionary&"
")", ")",
dict dict
) << "Cannot find patchField entry for " ) << "Cannot find patchField entry for "

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
@ -448,6 +448,7 @@ UNARY_FUNCTION(scalar, scalar, pow5, pow5)
UNARY_FUNCTION(scalar, scalar, pow6, pow6) UNARY_FUNCTION(scalar, scalar, pow6, pow6)
UNARY_FUNCTION(scalar, scalar, pow025, pow025) UNARY_FUNCTION(scalar, scalar, pow025, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, sign, sign)
UNARY_FUNCTION(scalar, scalar, pos, pos) UNARY_FUNCTION(scalar, scalar, pos, pos)
UNARY_FUNCTION(scalar, scalar, neg, neg) UNARY_FUNCTION(scalar, scalar, neg, neg)

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
@ -93,6 +93,7 @@ UNARY_FUNCTION(scalar, scalar, pow5, pow5)
UNARY_FUNCTION(scalar, scalar, pow6, pow6) UNARY_FUNCTION(scalar, scalar, pow6, pow6)
UNARY_FUNCTION(scalar, scalar, pow025, pow025) UNARY_FUNCTION(scalar, scalar, pow025, pow025)
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, sign, sign)
UNARY_FUNCTION(scalar, scalar, pos, pos) UNARY_FUNCTION(scalar, scalar, pos, pos)
UNARY_FUNCTION(scalar, scalar, neg, neg) UNARY_FUNCTION(scalar, scalar, neg, neg)

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,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "SlicedGeometricField.H" #include "SlicedGeometricField.H"
#include "processorFvPatch.H"
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * //
@ -40,7 +41,8 @@ slicedBoundaryField
( (
const Mesh& mesh, const Mesh& mesh,
const Field<Type>& completeField, const Field<Type>& completeField,
const bool preserveCouples const bool preserveCouples,
const bool preserveProcessorOnly
) )
{ {
tmp<FieldField<PatchField, Type> > tbf tmp<FieldField<PatchField, Type> > tbf
@ -52,7 +54,15 @@ slicedBoundaryField
forAll(mesh.boundary(), patchi) forAll(mesh.boundary(), patchi)
{ {
if (preserveCouples && mesh.boundary()[patchi].coupled()) if
(
preserveCouples
&& mesh.boundary()[patchi].coupled()
&& (
!preserveProcessorOnly
|| isA<processorFvPatch>(mesh.boundary()[patchi])
)
)
{ {
// For coupled patched construct the correct patch field type // For coupled patched construct the correct patch field type
bf.set bf.set
@ -243,7 +253,8 @@ SlicedGeometricField
const dimensionSet& ds, const dimensionSet& ds,
const Field<Type>& completeIField, const Field<Type>& completeIField,
const Field<Type>& completeBField, const Field<Type>& completeBField,
const bool preserveCouples const bool preserveCouples,
const bool preserveProcessorOnly
) )
: :
GeometricField<Type, PatchField, GeoMesh> GeometricField<Type, PatchField, GeoMesh>
@ -252,7 +263,13 @@ SlicedGeometricField
mesh, mesh,
ds, ds,
Field<Type>(), Field<Type>(),
slicedBoundaryField(mesh, completeBField, preserveCouples) slicedBoundaryField
(
mesh,
completeBField,
preserveCouples,
preserveProcessorOnly
)
) )
{ {
// Set the internalField to the slice of the complete field // Set the internalField to the slice of the complete field

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
@ -83,7 +83,8 @@ private:
( (
const Mesh& mesh, const Mesh& mesh,
const Field<Type>& completeField, const Field<Type>& completeField,
const bool preserveCouples const bool preserveCouples,
const bool preserveProcessorOnly = false
); );
//- Slice the given field and a create a PtrList of SlicedPatchField //- Slice the given field and a create a PtrList of SlicedPatchField
@ -133,7 +134,8 @@ public:
const dimensionSet&, const dimensionSet&,
const Field<Type>& completeIField, const Field<Type>& completeIField,
const Field<Type>& completeBField, const Field<Type>& completeBField,
const bool preserveCouples=true const bool preserveCouples=true,
const bool preserveProcessorOnly = false
); );
//- Construct from GeometricField. Reuses full internal and //- Construct from GeometricField. Reuses full internal and

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
@ -303,14 +303,12 @@ void Foam::meshReader::createPolyBoundary()
Info<< "Added " << nMissingFaces << " unmatched faces" << endl; Info<< "Added " << nMissingFaces << " unmatched faces" << endl;
// Add missing faces to last patch ('Default_Empty' etc.)
if (nMissingFaces > 0) if (nMissingFaces > 0)
{ {
patchSizes_.last() = nMissingFaces; patchSizes_.last() = nMissingFaces;
} }
else
{
patchStarts_.setSize(patchStarts_.size() - 1);
}
// reset the size of the face list // reset the size of the face list
meshFaces_.setSize(nCreatedFaces); meshFaces_.setSize(nCreatedFaces);

View File

@ -2,12 +2,10 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/fvMotionSolver/lnInclude \ -I$(LIB_SRC)/fvMotionSolver/lnInclude
-I$(LIB_SRC)/sampling/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-ldynamicMesh \ -ldynamicMesh \
-lfvMotionSolvers \ -lfvMotionSolvers
-lsampling

View File

@ -41,8 +41,18 @@ namespace Foam
fixedTemperatureSource, fixedTemperatureSource,
dictionary dictionary
); );
template<>
const char* NamedEnum<fixedTemperatureSource::temperatureMode, 2>::names[] =
{
"constant",
"lookup"
};
} }
const Foam::NamedEnum<Foam::fixedTemperatureSource::temperatureMode, 2>
Foam::fixedTemperatureSource::temperatureModeNames_;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -55,8 +65,29 @@ Foam::fixedTemperatureSource::fixedTemperatureSource
) )
: :
basicSource(name, modelType, dict, mesh), basicSource(name, modelType, dict, mesh),
T_(readScalar(coeffs_.lookup("temperature"))) mode_(temperatureModeNames_.read(coeffs_.lookup("mode"))),
Tconstant_(0.0),
TName_("T")
{ {
switch (mode_)
{
case tmConstant:
{
coeffs_.lookup("temperature") >> Tconstant_;
break;
}
case tmLookup:
{
TName_ = coeffs_.lookupOrDefault<word>("TName", "T");
break;
}
default:
{
// error handling done by NamedEnum
}
}
fieldNames_.setSize(1, "energy"); fieldNames_.setSize(1, "energy");
applied_.setSize(1, false); applied_.setSize(1, false);
} }
@ -81,8 +112,31 @@ void Foam::fixedTemperatureSource::setValue
if (eqn.psi().name() == thermo.he().name()) if (eqn.psi().name() == thermo.he().name())
{ {
const scalarField Tfield(cells_.size(), T_); switch (mode_)
eqn.setValues(cells_, thermo.he(thermo.p(), Tfield, cells_)); {
case tmConstant:
{
scalarField Tconst(cells_.size(), Tconstant_);
eqn.setValues(cells_, thermo.he(thermo.p(), Tconst, cells_));
break;
}
case tmLookup:
{
const volScalarField& T =
mesh().lookupObject<volScalarField>(TName_);
scalarField Tlookup(T, cells_);
eqn.setValues(cells_, thermo.he(thermo.p(), Tlookup, cells_));
break;
}
default:
{
// error handling done by NamedEnum
}
}
} }
} }
@ -98,7 +152,8 @@ bool Foam::fixedTemperatureSource::read(const dictionary& dict)
{ {
if (basicSource::read(dict)) if (basicSource::read(dict))
{ {
coeffs_.readIfPresent("T", T_); coeffs_.readIfPresent("temperature", Tconstant_);
coeffs_.readIfPresent("TName", TName_);
return true; return true;
} }

View File

@ -33,7 +33,13 @@ Description
fixedTemperatureSourceCoeffs fixedTemperatureSourceCoeffs
{ {
fieldNames (h e hs); // names of fields to apply source fieldNames (h e hs); // names of fields to apply source
mode constant; // constant or lookup
// constant option
temperature 500; // fixed temperature [K] temperature 500; // fixed temperature [K]
// loolup option
// TName T; // optional temperature field name
} }
@ -46,6 +52,7 @@ SourceFiles
#define fixedTemperatureSource_H #define fixedTemperatureSource_H
#include "basicSource.H" #include "basicSource.H"
#include "NamedEnum.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,12 +68,32 @@ class fixedTemperatureSource
public basicSource public basicSource
{ {
public:
//- Temperature mode
enum temperatureMode
{
tmConstant,
tmLookup
};
//- String representation of temperatureMode enums
static const NamedEnum<temperatureMode, 2> temperatureModeNames_;
protected: protected:
// Protected data // Protected data
//- Fixed temperature [K] //- Operation mode
scalar T_; temperatureMode mode_;
//- Constant temperature [K]
scalar Tconstant_;
//- Temperature field name
word TName_;
private: private:

View File

@ -2,4 +2,17 @@ vtk/vtkUnstructuredReader.C
nas/NASCore.C nas/NASCore.C
starcd/STARCDCore.C starcd/STARCDCore.C
coordSet/coordSet.C
setWriters = sampledSetWriters
$(setWriters)/writers.C
$(setWriters)/ensight/ensightSetWriterRunTime.C
$(setWriters)/gnuplot/gnuplotSetWriterRunTime.C
$(setWriters)/jplot/jplotSetWriterRunTime.C
$(setWriters)/raw/rawSetWriterRunTime.C
$(setWriters)/vtk/vtkSetWriterRunTime.C
$(setWriters)/xmgrace/xmgraceSetWriterRunTime.C
$(setWriters)/csv/csvSetWriterRunTime.C
LIB = $(FOAM_LIBBIN)/libfileFormats LIB = $(FOAM_LIBBIN)/libfileFormats

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

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

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

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

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

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

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

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

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,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "gnuplotSetWriter.H" #include "gnuplotSetWriter.H"
#include "clock.H"
#include "coordSet.H" #include "coordSet.H"
#include "fileName.H" #include "fileName.H"
#include "OFstream.H" #include "OFstream.H"

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

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

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

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

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

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

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

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

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

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

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

View File

@ -166,7 +166,6 @@ void Foam::writer<Type>::write
{ {
valueSetPtrs[i] = &valueSets[i]; valueSetPtrs[i] = &valueSets[i];
} }
write(points, valueSetNames, valueSetPtrs, os); write(points, valueSetNames, valueSetPtrs, os);
} }

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

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

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

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

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

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