Merge branch 'master' into cvm

This commit is contained in:
graham 2009-07-09 10:24:23 +01:00
commit db77abe02b
379 changed files with 11316 additions and 5281 deletions

15
.gitignore vendored
View File

@ -27,14 +27,19 @@ core
# dependency files - anywhere
*.dep
# lnInclude folders - anywhere
# lnInclude (symlink) folders - anywhere
lnInclude
# linux build folder(s) - anywhere
linux*Gcc*
# build folder(s) - anywhere
linux*Gcc*/
linux*Icc*/
linuxming*/
SiCortex*Gcc*/
solaris*Gcc*/
SunOS*Gcc*/
# reinstate wmake/rules that look like build folders
!wmake/rules/linux*
# reinstate wmake/rules that might look like build folders
!wmake/rules/*/
# but do continue to ignore the derived wmake files
wmake/rules/*/dirToString

View File

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readCombustionProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"

View File

@ -72,31 +72,31 @@ Description
int main(int argc, char *argv[])
{
# include "setRootCase.H"
#include "setRootCase.H"
# include "createTime.H"
# include "createDynamicFvMesh.H"
# include "readCombustionProperties.H"
# include "readEnvironmentalProperties.H"
# include "createFields.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "readTimeControls.H"
# include "setInitialDeltaT.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "setInitialDeltaT.H"
scalar StCoNum = 0.0;
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
# include "readTimeControls.H"
# include "readPISOControls.H"
# include "CourantNo.H"
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "CourantNo.H"
# include "setDeltaT.H"
#include "setDeltaT.H"
runTime++;
@ -157,7 +157,7 @@ scalar StCoNum = 0.0;
// if (mesh.moving() || meshChanged)
// {
//# include "correctPhi.H"
// #include "correctPhi.H"
// }
// Make the fluxes relative to the mesh motion
@ -165,23 +165,23 @@ scalar StCoNum = 0.0;
}
# include "rhoEqn.H"
# include "UEqn.H"
#include "rhoEqn.H"
#include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
# include "bEqn.H"
# include "ftEqn.H"
# include "huEqn.H"
# include "hEqn.H"
#include "bEqn.H"
#include "ftEqn.H"
#include "huEqn.H"
#include "hEqn.H"
if (!ign.ignited())
{
hu == h;
}
# include "pEqn.H"
#include "pEqn.H"
}
turbulence->correct();

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readCombustionProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"

View File

@ -23,7 +23,7 @@ spray dieselSpray
composition,
gasProperties,
thermo,
environmentalProperties
g
);
scalar gasMass0 = fvc::domainIntegrate(rho).value();

View File

@ -52,7 +52,7 @@ int main(int argc, char *argv[])
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createFields.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readCombustionProperties.H"
#include "createSpray.H"
#include "initContinuityErrs.H"
@ -124,7 +124,10 @@ int main(int argc, char *argv[])
rho = thermo.rho();
runTime.write();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -50,7 +50,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readCombustionProperties.H"
#include "createSpray.H"
#include "initContinuityErrs.H"
@ -114,7 +114,10 @@ int main(int argc, char *argv[])
rho = thermo.rho();
runTime.write();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
@ -86,7 +86,10 @@ int main(int argc, char *argv[])
turbulence->correct();
rho = thermo.rho();
if (runTime.write())
{
chemistry.dQ()().write();
}
runTime.write();

View File

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

View File

@ -0,0 +1,19 @@
EXE_INC = \
-I../XiFoam \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lreactionThermophysicalModels \
-lspecie \
-lbasicThermophysicalModels \
-lchemistryModel \
-lODE \
-lfiniteVolume

View File

@ -0,0 +1,43 @@
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);
{
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
solve
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
kappa*chemistry.RR(i),
mesh.solver("Yi")
);
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

@ -0,0 +1,24 @@
{
Info << "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaT().value(),
runTime.deltaT().value()
);
// turbulent time scale
if (turbulentReaction)
{
volScalarField tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
volScalarField tc = chemistry.tc();
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
}

View File

@ -0,0 +1,85 @@
Info<< nl << "Reading thermophysicalProperties" << endl;
autoPtr<rhoChemistryModel> pChemistry
(
rhoChemistryModel::New(mesh)
);
rhoChemistryModel& chemistry = pChemistry();
hReactionThermo& thermo = chemistry.thermo();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh
),
thermo.rho()
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h();
#include "compressibleCreatePhi.H"
volScalarField kappa
(
IOobject
(
"kappa",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimless, 0.0)
);
Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll (Y, i)
{
fields.add(Y[i]);
}
fields.add(h);

View File

@ -0,0 +1,93 @@
{
rho = thermo.rho();
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p;
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
if (transonic)
{
surfaceScalarField phiv =
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi);
phi = fvc::interpolate(rho)*phiv;
surfaceScalarField phid
(
"phid",
fvc::interpolate(thermo.psi())*phiv
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvc::ddt(rho) + fvc::div(phi)
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p))
- fvm::laplacian(rho*rUA, p)
);
if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr)
{
pEqn.solve(mesh.solver(p.name() + "Final"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
}
else
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
);
if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr)
{
pEqn.solve(mesh.solver(p.name() + "Final"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
}
// Second part of thermodynamic density update
thermo.rho() += psi*p;
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
}

View File

@ -0,0 +1,23 @@
Info<< "Reading chemistry properties\n" << endl;
IOdictionary chemistryProperties
(
IOobject
(
"chemistryProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
);
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
dimensionedScalar Cmix("Cmix", dimless, 1.0);
if (turbulentReaction)
{
chemistryProperties.lookup("Cmix") >> Cmix;
}

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
rhoReactingFoam
Description
Chemical reaction code using density based thermodynamics package.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "hReactionThermo.H"
#include "turbulenceModel.H"
#include "rhoChemistryModel.H"
#include "chemistrySolver.H"
#include "multivariateScheme.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info << "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "chemistry.H"
#include "rhoEqn.H"
#include "UEqn.H"
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
{
#include "YEqn.H"
#include "hEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
#include "pEqn.H"
}
}
turbulence->correct();
rho = thermo.rho();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -58,8 +58,6 @@ else
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
//bool closedVolume = adjustPhi(phi, U, p);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
// Pressure corrector

View File

View File

View File

@ -57,7 +57,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"

View File

@ -57,7 +57,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -7,6 +7,7 @@
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, p);
surfaceScalarField buoyancyPhi =
rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
phi += buoyancyPhi;

View File

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"

View File

@ -42,7 +42,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -9,6 +9,7 @@
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p);
surfaceScalarField buoyancyPhi =
rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
phi += buoyancyPhi;

View File

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H"

View File

@ -4,6 +4,7 @@
PtrList<volScalarField> KFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> DpDtFluid(fluidRegions.size());
@ -95,6 +96,23 @@
)
);
Info<< " Adding to gFluid\n" << endl;
gFluid.set
(
i,
new uniformDimensionedVectorField
(
IOobject
(
"g",
runTime.constant(),
fluidRegions[i],
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
);
Info<< " Adding to turbulence\n" << endl;
turbulence.set
(

View File

@ -19,27 +19,4 @@
)
)
);
// Force calculation of geometric properties to prevent it being done
// later in e.g. some boundary evaluation
//(void)fluidRegions[i].weights();
//(void)fluidRegions[i].deltaCoeffs();
// Attach environmental properties to each region
autoPtr<IOdictionary> environmentalProperties
(
new IOdictionary
(
IOobject
(
"environmentalProperties",
runTime.constant(),
fluidRegions[i],
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
);
environmentalProperties.ptr()->store();
}

View File

@ -5,6 +5,8 @@
volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i];
surfaceScalarField& phi = phiFluid[i];
const dimensionedVector& g = gFluid[i];
compressible::turbulenceModel& turb = turbulence[i];
volScalarField& DpDt = DpDtFluid[i];
@ -13,9 +15,3 @@
volScalarField& h = thermo.h();
const dimensionedScalar massIni("massIni", dimMass, initialMassFluid[i]);
const dictionary& environmentalProperties =
fluidRegions[i].lookupObject<IOdictionary>
("environmentalProperties");
const dimensionedVector g(environmentalProperties.lookup("g"));

View File

@ -1,5 +1,9 @@
{
wordList pcorrTypes(p.boundaryField().types());
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
{

View File

@ -1,10 +1,10 @@
Info<< "\nReading environmentalProperties" << endl;
Info<< "\nReading gravitationalProperties" << endl;
IOdictionary environmentalProperties
IOdictionary gravitationalProperties
(
IOobject
(
"environmentalProperties",
"gravitationalProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
@ -12,10 +12,10 @@ IOdictionary environmentalProperties
)
);
const dimensionedVector g(environmentalProperties.lookup("g"));
const Switch rotating(environmentalProperties.lookup("rotating"));
const dimensionedVector g(gravitationalProperties.lookup("g"));
const Switch rotating(gravitationalProperties.lookup("rotating"));
const dimensionedVector Omega =
rotating ? environmentalProperties.lookup("Omega")
rotating ? gravitationalProperties.lookup("Omega")
: dimensionedVector("Omega", -dimTime, vector(0,0,0));
const dimensionedScalar magg = mag(g);
const dimensionedVector gHat = g/magg;

View File

@ -41,7 +41,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createClouds.H"
#include "createRadiationModel.H"
@ -114,7 +114,10 @@ int main(int argc, char *argv[])
rho = thermo.rho();
runTime.write();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -9,35 +9,10 @@
+ parcels.SU()
);
UEqn.relax();
pZones.addResistance(UEqn);
tmp<volScalarField> trAU;
tmp<volTensorField> trTU;
if (pressureImplicitPorosity)
if (momentumPredictor)
{
tmp<volTensorField> tTU = tensor(I)*UEqn.A();
pZones.addResistance(UEqn, tTU());
trTU = inv(tTU());
trTU().rename("rAU");
volVectorField gradp = fvc::grad(p);
for (int UCorr=0; UCorr<nUCorr; UCorr++)
{
U = trTU() & (UEqn.H() - gradp);
}
U.correctBoundaryConditions();
solve(UEqn == -fvc::grad(p));
}
else
{
pZones.addResistance(UEqn);
trAU = 1.0/UEqn.A();
trAU().rename("rAU");
solve
(
UEqn == -fvc::grad(p)
);
}

View File

@ -43,5 +43,4 @@ tmp<fv::convectionScheme<scalar> > mvConvection
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

@ -73,13 +73,7 @@
)
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt
(
"DpDt",
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
Info<< "Creating multi-variate interpolation scheme\n" << endl;
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll (Y, i)

View File

@ -1,21 +1,3 @@
Info<< "Creating porous zones" << nl << endl;
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
label nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("PISO").found("nUCorrectors"))
{
mesh.solutionDict().subDict("PISO").lookup("nUCorrectors")
>> nUCorr;
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

View File

@ -1,20 +1,51 @@
{
fvScalarMatrix hEqn
tmp<volScalarField> pWork
(
fvm::ddt(rho, h)
+ mvConvection->fvmDiv(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
DpDt
+ parcels.Sh()
+ radiation->Sh(thermo)
new volScalarField
(
IOobject
(
"pWork",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1, -1, -3, 0, 0), 0.0)
)
);
hEqn.relax();
if (dpdt)
{
pWork() += fvc::ddt(p);
}
if (eWork)
{
pWork() = -p*fvc::div(phi/fvc::interpolate(rho));
}
if (hWork)
{
pWork() += fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p));
}
hEqn.solve();
{
solve
(
fvm::ddt(rho, h)
+ mvConvection->fvmDiv(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
pWork()
+ parcels.Sh()
+ radiation->Sh(thermo)
);
thermo.correct();
thermo.correct();
radiation->correct();
radiation->correct();
Info<< "T gas min/max = " << min(T).value() << ", "
<< max(T).value() << endl;
}
}

View File

@ -5,65 +5,13 @@
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p;
if (pressureImplicitPorosity)
volScalarField rAU = 1.0/UEqn.A();
U = rAU*UEqn.H();
if (pZones.size() > 0)
{
U = trTU()&UEqn.H();
}
else
{
U = trAU()*UEqn.H();
}
if (transonic)
{
surfaceScalarField phiv = fvc::interpolate(U) & mesh.Sf();
phi = fvc::interpolate(rho)*phiv;
surfaceScalarField phid("phid", fvc::interpolate(psi)*phiv);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
tmp<fvScalarMatrix> lapTerm;
if (pressureImplicitPorosity)
{
lapTerm = fvm::laplacian(rho*trTU(), p);
}
else
{
lapTerm = fvm::laplacian(rho*trAU(), p);
}
fvScalarMatrix pEqn
(
fvc::ddt(rho) + fvc::div(phi)
+ correction(psi*fvm::ddt(p) + fvm::div(phid, p))
- lapTerm()
==
parcels.Srho()
+ pointMassSources.Su()
);
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi == pEqn.flux();
}
}
// ddtPhiCorr not well defined for cases with porosity
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
}
else
{
@ -71,50 +19,34 @@
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
// + fvc::ddtPhiCorr(trAU(), rho, U, phi)
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
}
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi)
- fvm::laplacian(rho*rAU, p)
==
parcels.Srho()
+ pointMassSources.Su()
);
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
{
tmp<fvScalarMatrix> lapTerm;
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (pressureImplicitPorosity)
{
lapTerm = fvm::laplacian(rho*trTU(), p);
}
else
{
lapTerm = fvm::laplacian(rho*trAU(), p);
}
fvScalarMatrix pEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi)
- lapTerm()
==
parcels.Srho()
+ pointMassSources.Su()
);
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
@ -124,15 +56,6 @@
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
if (pressureImplicitPorosity)
{
U -= trTU()&fvc::grad(p);
}
else
{
U -= trAU()*fvc::grad(p);
}
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
}

View File

@ -23,15 +23,16 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
trackedReactingParcelFoam
porousExplicitSourceReactingParcelFoam
Description
- reacting parcel cloud tracking
- reacting parcel cloud
- porous media
- point mass sources
- polynomial based, incompressible thermodynamics (f(T))
Note: ddtPhiCorr not used here - not well defined for porous calcs
Note: ddtPhiCorr not used here when porous zones are active
- not well defined for porous calcs
\*---------------------------------------------------------------------------*/
@ -55,7 +56,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createRadiationModel.H"
#include "createClouds.H"
@ -74,6 +75,7 @@ int main(int argc, char *argv[])
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "readAdditionalSolutionControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
@ -88,28 +90,23 @@ int main(int argc, char *argv[])
#include "chemistry.H"
#include "rhoEqn.H"
#include "UEqn.H"
#include "YEqn.H"
#include "hEqn.H"
// --- PIMPLE loop
for (int oCorr=1; oCorr<=nOuterCorr; oCorr++)
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "YEqn.H"
#include "hEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
#include "pEqn.H"
}
Info<< "T gas min/max = " << min(T).value() << ", "
<< max(T).value() << endl;
#include "pEqn.H"
}
turbulence->correct();
rho = thermo.rho();
runTime.write();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -0,0 +1,20 @@
dictionary additional = mesh.solutionDict().subDict("additional");
bool dpdt = true;
if (additional.found("dpdt"))
{
additional.lookup("dpdt") >> dpdt;
}
bool eWork = true;
if (additional.found("eWork"))
{
additional.lookup("eWork") >> eWork;
}
bool hWork = true;
if (additional.found("hWork"))
{
additional.lookup("hWork") >> hWork;
}

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createClouds.H"
#include "createRadiationModel.H"
@ -101,7 +101,10 @@ int main(int argc, char *argv[])
rho = thermo.rho();
runTime.write();
if (runTime.write())
{
chemistry.dQ()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"

View File

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "compressibleCourantNo.H"

View File

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -50,7 +50,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
@ -104,12 +104,6 @@ int main(int argc, char *argv[])
#include "meshCourantNo.H"
}
if (mesh.changing())
{
gh = g & mesh.C();
ghf = g & mesh.Cf();
}
turbulence->correct();
// --- Outer-corrector loop

View File

@ -46,11 +46,6 @@
#include "createPhi.H"
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi);
@ -134,7 +129,11 @@
);
wordList pcorrTypes(p.boundaryField().types());
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
{

View File

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"

View File

@ -1,5 +1,5 @@
{
# include "continuityErrs.H"
#include "continuityErrs.H"
volScalarField pcorr
(
@ -36,5 +36,5 @@
}
}
# include "continuityErrs.H"
#include "continuityErrs.H"
}

View File

@ -92,7 +92,11 @@
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
);
wordList pcorrTypes(p.boundaryField().types());
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
{

View File

@ -48,7 +48,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
@ -86,9 +86,6 @@ int main(int argc, char *argv[])
<< " s" << endl;
}
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
if (mesh.changing() && correctPhi)
{
#include "correctPhi.H"

View File

@ -5,19 +5,19 @@
U = rAU*UEqn.H();
surfaceScalarField phiU("phiU", (fvc::interpolate(U) & mesh.Sf()));
if (p.needReference())
{
fvc::makeRelative(phiU, U);
adjustPhi(phiU, U, p);
fvc::makeAbsolute(phiU, U);
}
phi = phiU +
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
+ fvc::interpolate(rho)*(g & mesh.Sf())
)*rAUf;
if (p.needReference())
{
fvc::makeRelative(phi, U);
adjustPhi(phi, U, p);
fvc::makeAbsolute(phi, U);
}
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn

View File

@ -1,7 +1,11 @@
{
# include "continuityErrs.H"
#include "continuityErrs.H"
wordList pcorrTypes(p.boundaryField().types());
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
{
@ -46,5 +50,5 @@
}
}
# include "continuityErrs.H"
#include "continuityErrs.H"
}

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"

View File

@ -7,17 +7,18 @@
surfaceScalarField phiU
(
"phiU",
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
adjustPhi(phiU, U, p);
phi = phiU +
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
+ fvc::interpolate(rho)*(g & mesh.Sf())
)*rUAf;
adjustPhi(phi, U, p);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn

View File

@ -1,7 +1,11 @@
{
# include "continuityErrs.H"
#include "continuityErrs.H"
wordList pcorrTypes(p.boundaryField().types());
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
for (label i=0; i<p.boundaryField().size(); i++)
{

View File

@ -53,7 +53,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"

View File

@ -11,14 +11,14 @@
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
adjustPhi(phiU, U, p);
phi = phiU +
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
+ fvc::interpolate(rho)*(g & mesh.Sf())
)*rUAf;
adjustPhi(phi, U, p);
Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP();
const volScalarField& vDotcP = vDotP[0]();
const volScalarField& vDotvP = vDotP[1]();

View File

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readPISOControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"

View File

@ -10,14 +10,14 @@
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
);
adjustPhi(phiU, U, p);
phi = phiU +
(
mixture.surfaceTensionForce()*mesh.magSf()
+ fvc::interpolate(rho)*(g & mesh.Sf())
)*rUAf;
adjustPhi(phi, U, p);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn

View File

@ -47,7 +47,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -43,7 +43,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "readPIMPLEControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "readEnvironmentalProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "readPPProperties.H"
#include "initContinuityErrs.H"

View File

View File

View File

@ -78,6 +78,7 @@ int main(int argc, char *argv[])
if (sourceType == "patch")
{
fileName sourceCasePath(dict.lookup("sourceCase"));
sourceCasePath.expand();
fileName sourceRootDir = sourceCasePath.path();
fileName sourceCaseDir = sourceCasePath.name();
word patchName(dict.lookup("sourcePatch"));

View File

@ -1,16 +0,0 @@
argList::validArgs.clear();
argList::noParallel();
argList::validOptions.insert("sourceCase", "source case");
argList::validOptions.insert("sourcePatch", "source patch");
argList::validOptions.insert("surface", "surface file");
argList::validOptions.insert("mergeFaces", "");
argList args(argc, argv);
if (!args.check())
{
FatalError.exit();
}

View File

@ -209,6 +209,8 @@ snapControls
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
@ -230,14 +232,13 @@ addLayersControls
//- Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// is the thickness of the layer furthest away from the wall.
// See relativeSizes parameter.
finalLayerThickness 0.3;
//- Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
minThickness 0.25;
//- If points get not extruded do nGrow layers of connected faces that are

View File

@ -38,7 +38,7 @@ Description
#include "Time.H"
#include "timeSelector.H"
#include "OFstream.H"
#include "passiveParticle.H"
#include "passiveParticleCloud.H"
using namespace Foam;
@ -61,7 +61,8 @@ int main(int argc, char *argv[])
fileName vtkPath(runTime.path()/"VTK");
mkDir(vtkPath);
Info<< "Scanning times to determine track data" << nl << endl;
Info<< "Scanning times to determine track data for cloud " << cloudName
<< nl << endl;
labelList maxIds(Pstream::nProcs(), -1);
forAll(timeDirs, timeI)
@ -69,35 +70,33 @@ int main(int argc, char *argv[])
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time = " << runTime.timeName() << endl;
IOobject positionsHeader
(
"positions",
runTime.timeName(),
cloud::prefix/cloudName,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
);
Info<< " Reading particle positions" << endl;
passiveParticleCloud myCloud(mesh, cloudName);
Info<< " Read " << returnReduce(myCloud.size(), sumOp<label>())
<< " particles" << endl;
if (positionsHeader.headerOk())
forAllConstIter(passiveParticleCloud, myCloud, iter)
{
Info<< " Reading particle positions" << endl;
Cloud<passiveParticle> myCloud(mesh, cloudName, false);
label origId = iter().origId();
label origProc = iter().origProc();
forAllConstIter(Cloud<passiveParticle>, myCloud, iter)
{
label origId = iter().origId();
label origProc = iter().origProc();
maxIds[origProc] = max(maxIds[origProc], origId);
}
maxIds[origProc] = max(maxIds[origProc], origId);
}
}
Pstream::listCombineGather(maxIds, maxOp<label>());
Pstream::listCombineGather(maxIds, maxEqOp<label>());
Pstream::listCombineScatter(maxIds);
labelList numIds = maxIds + 1;
Info<< nl << "Particle statistics:" << endl;
forAll(maxIds, procI)
{
Info<< " Found " << numIds[procI] << " particles originating"
<< " from processor " << procI << endl;
}
Info<< nl << endl;
// calc starting ids for particles on each processor
List<label> startIds(numIds.size(), 0);
for (label i = 0; i < numIds.size()-1; i++)
@ -106,98 +105,87 @@ int main(int argc, char *argv[])
}
label nParticle = startIds[startIds.size()-1] + numIds[startIds.size()-1];
// number of tracks to generate
label nTracks = nParticle/sampleFrequency;
// storage for all particle tracks
List<DynamicList<vector> > allTracks(nTracks);
Info<< "\nGenerating " << nTracks << " particle tracks" << nl << endl;
Info<< "\nGenerating " << nTracks << " particle tracks for cloud "
<< cloudName << nl << endl;
forAll(timeDirs, timeI)
{
runTime.setTime(timeDirs[timeI], timeI);
Info<< "Time = " << runTime.timeName() << endl;
IOobject positionsHeader
List<pointField> allPositions(Pstream::nProcs());
List<labelField> allOrigIds(Pstream::nProcs());
List<labelField> allOrigProcs(Pstream::nProcs());
// Read particles. Will be size 0 if no particles.
Info<< " Reading particle positions" << endl;
passiveParticleCloud myCloud(mesh, cloudName);
// collect the track data on all processors that have positions
allPositions[Pstream::myProcNo()].setSize
(
"positions",
runTime.timeName(),
cloud::prefix/cloudName,
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
myCloud.size(),
point::zero
);
allOrigIds[Pstream::myProcNo()].setSize(myCloud.size(), 0);
allOrigProcs[Pstream::myProcNo()].setSize(myCloud.size(), 0);
if (positionsHeader.headerOk())
label i = 0;
forAllConstIter(passiveParticleCloud, myCloud, iter)
{
Info<< " Reading particle positions" << endl;
Cloud<passiveParticle> myCloud(mesh, cloudName, false);
allPositions[Pstream::myProcNo()][i] = iter().position();
allOrigIds[Pstream::myProcNo()][i] = iter().origId();
allOrigProcs[Pstream::myProcNo()][i] = iter().origProc();
i++;
}
// collect the track data on the master processor
List<pointField> allPositions(Pstream::nProcs());
allPositions[Pstream::myProcNo()].setSize
(
myCloud.size(),
point::zero
);
// collect the track data on the master processor
Pstream::gatherList(allPositions);
Pstream::gatherList(allOrigIds);
Pstream::gatherList(allOrigProcs);
List<labelField> allOrigIds(Pstream::nProcs());
allOrigIds[Pstream::myProcNo()].setSize(myCloud.size(), 0);
List<labelField> allOrigProcs(Pstream::nProcs());
allOrigProcs[Pstream::myProcNo()].setSize(myCloud.size(), 0);
label i = 0;
forAllConstIter(Cloud<passiveParticle>, myCloud, iter)
Info<< " Constructing tracks" << nl << endl;
if (Pstream::master())
{
forAll(allPositions, procI)
{
allPositions[Pstream::myProcNo()][i] = iter().position();
allOrigIds[Pstream::myProcNo()][i] = iter().origId();
allOrigProcs[Pstream::myProcNo()][i] = iter().origProc();
i++;
}
Pstream::gatherList(allPositions);
Pstream::gatherList(allOrigIds);
Pstream::gatherList(allOrigProcs);
Info<< " Constructing tracks" << nl << endl;
if (Pstream::master())
{
forAll(allPositions, procI)
forAll(allPositions[procI], i)
{
forAll(allPositions[procI], i)
{
label globalId =
startIds[allOrigProcs[procI][i]]
+ allOrigIds[procI][i];
label globalId =
startIds[allOrigProcs[procI][i]]
+ allOrigIds[procI][i];
if (globalId % sampleFrequency == 0)
if (globalId % sampleFrequency == 0)
{
label trackId = globalId/sampleFrequency;
if (allTracks[trackId].size() < maxPositions)
{
label trackId = globalId/sampleFrequency;
if (allTracks[trackId].size() < maxPositions)
{
allTracks[trackId].append
(
allPositions[procI][i]
);
}
allTracks[trackId].append
(
allPositions[procI][i]
);
}
}
}
}
}
else
{
Info<< " No particles read" << nl << endl;
}
}
if (Pstream::master())
{
Info<< "\nWriting particle tracks" << nl << endl;
OFstream vtkTracks(vtkPath/"particleTracks.vtk");
Info<< "\nWriting particle tracks to " << vtkTracks.name()
<< nl << endl;
// Total number of points in tracks + 1 per track
label nPoints = 0;
forAll(allTracks, trackI)

View File

View File

View File

View File

0
bin/foamTemplates/sourceTemplate/newSourceTemplate Normal file → Executable file
View File

View File

@ -173,7 +173,16 @@ addQtSupport()
if [ -n "$QMAKE_PATH" ]
then
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH
if [ -x "$QMAKE_PATH" ]
then
addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH
else
echo
echo "specified QMAKE_PATH does not exist on this machine"
echo " QMAKE_PATH=$QMAKE_PATH"
echo "leaving unspecified"
echo
fi
fi
}

View File

@ -74,7 +74,7 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Operating System/Platform

View File

@ -424,7 +424,7 @@ DebugSwitches
filteredLinear3 0;
filteredLinear3V 0;
fixedEnthalpy 0;
fixedFluxBuoyantPressure 0;
buoyantPressure 0;
fixedFluxBoussinesqBuoyantPressure 0;
fixedFluxPressure 0;
fixedGradient 0;

View File

@ -68,7 +68,7 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty
setenv WM_THIRD_PARTY_DIR $WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Operating System/Platform

View File

@ -449,7 +449,11 @@ meshTools = meshes/meshTools
$(meshTools)/matchPoints.C
$(meshTools)/mergePoints.C
fields/UniformDimensionedFields/uniformDimensionedFields.C
fields/cloud/cloud.C
Fields = fields/Fields
$(Fields)/labelField/labelField.C
$(Fields)/scalarField/scalarField.C
$(Fields)/sphericalTensorField/sphericalTensorField.C
@ -458,8 +462,6 @@ $(Fields)/symmTensorField/symmTensorField.C
$(Fields)/tensorField/tensorField.C
$(Fields)/complexFields/complexFields.C
fields/cloud/cloud.C
$(Fields)/labelField/labelIOField.C
$(Fields)/scalarField/scalarIOField.C
$(Fields)/vectorField/vectorIOField.C

View File

@ -63,17 +63,28 @@ class OutputFilterFunctionObject
{
// Private data
//- Output filter name
word name_;
//- Reference to the time database
const Time& time_;
//- Input dictionary
dictionary dict_;
//- Name of region
word regionName_;
//- Optional dictionary name to supply required inputs
word dictName_;
//- Switch for the execution of the functionObject
bool enabled_;
//- Output controls
outputFilterOutputControl outputControl_;
//- Pointer to the output filter
autoPtr<OutputFilter> ptr_;
@ -108,31 +119,78 @@ public:
// Member Functions
//- Return name
virtual const word& name() const
{
return name_;
}
// Access
//- Switch the function object on
virtual void on();
//- Return name
virtual const word& name() const
{
return name_;
}
//- Switch the function object off
virtual void off();
//- Return time database
virtual const Time& time() const
{
return time_;
}
//- Return the input dictionary
virtual const dictionary& dict() const
{
return dict_;
}
//- Return the region name
virtual const word& regionName() const
{
return regionName_;
}
//- Return the optional dictionary name
virtual const word& dictName() const
{
return dictName_;
}
//- Return the enabled flag
virtual bool enabled() const
{
return enabled_;
}
//- Return the output control object
virtual const outputFilterOutputControl& outputControl() const
{
return outputControl_;
}
//- Return the output filter
virtual const OutputFilter& outputFilter() const
{
return ptr_();
}
//- Called at the start of the time-loop
virtual bool start();
// Function object control
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Switch the function object on
virtual void on();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Switch the function object off
virtual void off();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
};

View File

@ -217,9 +217,8 @@ public:
tmp<DimensionedField<Type, GeoMesh> > clone() const;
// Destructor
~DimensionedField();
//- Destructor
virtual ~DimensionedField();
// Member Functions

View File

@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "UniformDimensionedField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::UniformDimensionedField<Type>::UniformDimensionedField
(
const IOobject& io,
const dimensioned<Type>& dt
)
:
regIOobject(io),
dimensioned<Type>(dt)
{}
template<class Type>
Foam::UniformDimensionedField<Type>::UniformDimensionedField
(
const UniformDimensionedField<Type>& rdt
)
:
regIOobject(rdt),
dimensioned<Type>(rdt)
{}
template<class Type>
Foam::UniformDimensionedField<Type>::UniformDimensionedField
(
const IOobject& io
)
:
regIOobject(io),
dimensioned<Type>(regIOobject::name(), dimless, pTraits<Type>::zero)
{
dictionary dict(readStream(typeName));
this->dimensions().reset(dict.lookup("dimensions"));
this->value() = dict.lookup("value");
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Type>
Foam::UniformDimensionedField<Type>::~UniformDimensionedField()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
bool Foam::UniformDimensionedField<Type>::writeData(Ostream& os) const
{
os.writeKeyword("dimensions") << this->dimensions() << token::END_STATEMENT
<< nl;
os.writeKeyword("value") << this->value() << token::END_STATEMENT
<< nl << nl;
return (os.good());
}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
template<class Type>
void Foam::UniformDimensionedField<Type>::operator=
(
const UniformDimensionedField<Type>& rhs
)
{
dimensioned<Type>::operator=(rhs);
}
template<class Type>
void Foam::UniformDimensionedField<Type>::operator=
(
const dimensioned<Type>& rhs
)
{
dimensioned<Type>::operator=(rhs);
}
// ************************************************************************* //

View File

@ -0,0 +1,118 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::UniformDimensionedField
Description
Dimensioned<Type> registered with the database as a registered IOobject
which has the functionality of a uniform field and allows values from the
top-level code to be passed to boundary conditions etc.
SourceFiles
UniformDimensionedField.C
\*---------------------------------------------------------------------------*/
#ifndef UniformDimensionedField_H
#define UniformDimensionedField_H
#include "regIOobject.H"
#include "dimensionedType.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class UniformDimensionedField Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class UniformDimensionedField
:
public regIOobject,
public dimensioned<Type>
{
public:
//- Runtime type information
TypeName("UniformDimensionedField");
// Constructors
//- Construct null
UniformDimensionedField();
//- Construct from components
UniformDimensionedField(const IOobject&, const dimensioned<Type>&);
//- Construct as copy
UniformDimensionedField(const UniformDimensionedField<Type>&);
//- Construct from Istream
UniformDimensionedField(const IOobject&);
//- Destructor
virtual ~UniformDimensionedField();
// Member Functions
//- Name function provided to resolve the ambiguity between the
// name functions in regIOobject and dimensioned<Type>
virtual const word& name() const
{
return dimensioned<Type>::name();
}
bool writeData(Ostream&) const;
// Member Operators
void operator=(const UniformDimensionedField<Type>&);
void operator=(const dimensioned<Type>&);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "UniformDimensionedField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "uniformDimensionedFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTemplateTypeNameAndDebug(uniformDimensionedScalarField, 0);
defineTemplateTypeNameAndDebug(uniformDimensionedVectorField, 0);
defineTemplateTypeNameAndDebug(uniformDimensionedSphericalTensorField, 0);
defineTemplateTypeNameAndDebug(uniformDimensionedSymmTensorField, 0);
defineTemplateTypeNameAndDebug(uniformDimensionedTensorField, 0);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,62 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::UniformDimensionedField
Description
SourceFiles
uniformDimensionedFields.C
\*---------------------------------------------------------------------------*/
#ifndef UniformDimensionedFields_H
#define UniformDimensionedFields_H
#include "UniformDimensionedField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
typedef UniformDimensionedField<scalar> uniformDimensionedScalarField;
typedef UniformDimensionedField<vector> uniformDimensionedVectorField;
typedef UniformDimensionedField<sphericalTensor> uniformDimensionedSphericalTensorField;
typedef UniformDimensionedField<symmTensor> uniformDimensionedSymmTensorField;
typedef UniformDimensionedField<tensor> uniformDimensionedTensorField;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -113,7 +113,7 @@ Foam::label Foam::meshRefinement::createBaffle
true, // face flip
neiPatch, // patch for face
zoneID, // zone for face
zoneFlip // face flip in zone
!zoneFlip // face flip in zone
)
);
}

View File

@ -56,7 +56,7 @@ Foam::trackedParticle::trackedParticle
bool readFields
)
:
ExactParticle<trackedParticle>(c, is)
ExactParticle<trackedParticle>(c, is, readFields)
{
if (readFields)
{

View File

@ -108,7 +108,7 @@ $(derivedFvPatchFields)/advective/advectiveFvPatchFields.C
$(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFields.C
$(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C
$(derivedFvPatchFields)/fan/fanFvPatchFields.C
$(derivedFvPatchFields)/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C
$(derivedFvPatchFields)/buoyantPressure/buoyantPressureFvPatchScalarField.C
$(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
$(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C
$(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C

View File

@ -9,6 +9,7 @@
#include "fvMatrices.H"
#include "fvm.H"
#include "linear.H"
#include "uniformDimensionedFields.H"
#include "calculatedFvPatchFields.H"
#include "fixedValueFvPatchFields.H"
#include "adjustPhi.H"

View File

@ -1,15 +0,0 @@
Info << "\nReading environmentalProperties" << endl;
IOdictionary environmentalProperties
(
IOobject
(
"environmentalProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
dimensionedVector g(environmentalProperties.lookup("g"));

View File

@ -0,0 +1,12 @@
Info << "\nReading g" << endl;
uniformDimensionedVectorField g
(
IOobject
(
"g",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

View File

@ -13,7 +13,3 @@
int nOuterCorr =
piso.lookupOrDefault<int>("nOuterCorrectors", 1);
bool ddtPhiCorr =
piso.lookupOrDefault<Switch>("ddtPhiCorr", false);

View File

@ -24,10 +24,11 @@ License
\*---------------------------------------------------------------------------*/
#include "fixedFluxBuoyantPressureFvPatchScalarField.H"
#include "buoyantPressureFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "uniformDimensionedFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -36,8 +37,8 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
fixedFluxBuoyantPressureFvPatchScalarField::
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField::
buoyantPressureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -48,8 +49,8 @@ fixedFluxBuoyantPressureFvPatchScalarField
{}
fixedFluxBuoyantPressureFvPatchScalarField::
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField::
buoyantPressureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -64,10 +65,10 @@ fixedFluxBuoyantPressureFvPatchScalarField
}
fixedFluxBuoyantPressureFvPatchScalarField::
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField::
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField& ptf,
const buoyantPressureFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
@ -78,10 +79,10 @@ fixedFluxBuoyantPressureFvPatchScalarField
{}
fixedFluxBuoyantPressureFvPatchScalarField::
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField::
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField& ptf
const buoyantPressureFvPatchScalarField& ptf
)
:
fixedGradientFvPatchScalarField(ptf),
@ -89,10 +90,10 @@ fixedFluxBuoyantPressureFvPatchScalarField
{}
fixedFluxBuoyantPressureFvPatchScalarField::
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField::
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField& ptf,
const buoyantPressureFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
@ -103,17 +104,15 @@ fixedFluxBuoyantPressureFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void fixedFluxBuoyantPressureFvPatchScalarField::updateCoeffs()
void buoyantPressureFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const dictionary& environmentalProperties
= db().lookupObject<IOdictionary>("environmentalProperties");
dimensionedVector g(environmentalProperties.lookup("g"));
const uniformDimensionedVectorField& g =
db().lookupObject<uniformDimensionedVectorField>("g");
const fvPatchField<scalar>& rho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
@ -134,7 +133,7 @@ void fixedFluxBuoyantPressureFvPatchScalarField::updateCoeffs()
}
void fixedFluxBuoyantPressureFvPatchScalarField::write(Ostream& os) const
void buoyantPressureFvPatchScalarField::write(Ostream& os) const
{
fixedGradientFvPatchScalarField::write(os);
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
@ -147,7 +146,7 @@ void fixedFluxBuoyantPressureFvPatchScalarField::write(Ostream& os) const
makePatchTypeField
(
fvPatchScalarField,
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::fixedFluxBuoyantPressureFvPatchScalarField
Foam::buoyantPressureFvPatchScalarField
Description
Set the pressure gradient boundary condition appropriately for buoyant flow.
@ -32,12 +32,12 @@ Description
appropriately. Otherwise assume the variable is the static pressure.
SourceFiles
fixedFluxBuoyantPressureFvPatchScalarField.C
buoyantPressureFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef fixedFluxBuoyantPressureFvPatchScalarFields_H
#define fixedFluxBuoyantPressureFvPatchScalarFields_H
#ifndef buoyantPressureFvPatchScalarFields_H
#define buoyantPressureFvPatchScalarFields_H
#include "fvPatchFields.H"
#include "fixedGradientFvPatchFields.H"
@ -48,10 +48,10 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class fixedFluxBuoyantPressureFvPatch Declaration
Class buoyantPressureFvPatch Declaration
\*---------------------------------------------------------------------------*/
class fixedFluxBuoyantPressureFvPatchScalarField
class buoyantPressureFvPatchScalarField
:
public fixedGradientFvPatchScalarField
{
@ -64,20 +64,20 @@ class fixedFluxBuoyantPressureFvPatchScalarField
public:
//- Runtime type information
TypeName("fixedFluxBuoyantPressure");
TypeName("buoyantPressure");
// Constructors
//- Construct from patch and internal field
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
@ -85,19 +85,19 @@ public:
);
//- Construct by mapping given
// fixedFluxBuoyantPressureFvPatchScalarField onto a new patch
fixedFluxBuoyantPressureFvPatchScalarField
// buoyantPressureFvPatchScalarField onto a new patch
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField&,
const buoyantPressureFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField&
const buoyantPressureFvPatchScalarField&
);
//- Construct and return a clone
@ -105,14 +105,14 @@ public:
{
return tmp<fvPatchScalarField>
(
new fixedFluxBuoyantPressureFvPatchScalarField(*this)
new buoyantPressureFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
fixedFluxBuoyantPressureFvPatchScalarField
buoyantPressureFvPatchScalarField
(
const fixedFluxBuoyantPressureFvPatchScalarField&,
const buoyantPressureFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
@ -124,7 +124,7 @@ public:
{
return tmp<fvPatchScalarField>
(
new fixedFluxBuoyantPressureFvPatchScalarField(*this, iF)
new buoyantPressureFvPatchScalarField(*this, iF)
);
}

View File

@ -29,7 +29,7 @@ License
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "uniformDimensionedFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -126,10 +126,8 @@ void Foam::uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs()
return;
}
const dictionary& environmentalProperties
= db().lookupObject<IOdictionary>("environmentalProperties");
dimensionedVector g(environmentalProperties.lookup("g"));
const uniformDimensionedVectorField& g =
db().lookupObject<uniformDimensionedVectorField>("g");
operator==
(

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