mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: Multiple changes - first clean build after latest merge - UNTESTED
This commit is contained in:
@ -28,9 +28,9 @@ Group
|
||||
grpBasicSolvers
|
||||
|
||||
Description
|
||||
Potential flow solver which solves for the velocity potential
|
||||
from which the flux-field is obtained and velocity field by reconstructing
|
||||
the flux.
|
||||
Potential flow solver which solves for the velocity potential, to
|
||||
calculate the flux-field, from which the velocity field is obtained by
|
||||
reconstructing the flux.
|
||||
|
||||
\heading Solver details
|
||||
The potential flow solution is typically employed to generate initial fields
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,25 +67,26 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createControl.H"
|
||||
#include "readCombustionProperties.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createRhoUf.H"
|
||||
#include "createControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "readTimeControls.H"
|
||||
#include "readTimeControls.H"
|
||||
|
||||
bool correctPhi =
|
||||
pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
||||
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
||||
|
||||
bool checkMeshCourantNo =
|
||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
||||
checkMeshCourantNo =
|
||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
||||
|
||||
@ -18,8 +18,6 @@ volScalarField rho
|
||||
);
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
|
||||
@ -41,8 +41,6 @@
|
||||
p_rghDDtEqn =
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
|
||||
==
|
||||
fvOptions(psi, p_rgh, rho.name())
|
||||
);
|
||||
}
|
||||
|
||||
@ -53,6 +51,8 @@
|
||||
p_rghDDtEqn()
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p_rgh)
|
||||
==
|
||||
fvOptions(psi, p_rgh, rho.name())
|
||||
);
|
||||
|
||||
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||
|
||||
@ -11,7 +11,7 @@ IOobject turbulencePropertiesHeader
|
||||
false
|
||||
);
|
||||
|
||||
if (turbulencePropertiesHeader.headerOk())
|
||||
if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(false))
|
||||
{
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
|
||||
33
applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
Normal file
33
applications/solvers/lagrangian/simpleCoalParcelFoam/EEqn.H
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
mvConvection->fvmDiv(phi, he)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
|
||||
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ combustion->Sh()
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
fvOptions.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
fvOptions.correct(he);
|
||||
thermo.correct();
|
||||
radiation->correct();
|
||||
|
||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||
<< max(T).value() << endl;
|
||||
}
|
||||
@ -24,8 +24,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
21
applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
Normal file
21
applications/solvers/lagrangian/simpleCoalParcelFoam/UEqn.H
Normal file
@ -0,0 +1,21 @@
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
rho()*g
|
||||
+ parcels.SU(U)
|
||||
+ fvOptions(rho, U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
fvOptions.correct(U);
|
||||
48
applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
Normal file
48
applications/solvers/lagrangian/simpleCoalParcelFoam/YEqn.H
Normal file
@ -0,0 +1,48 @@
|
||||
tmp<fv::convectionScheme<scalar>> mvConvection
|
||||
(
|
||||
fv::convectionScheme<scalar>::New
|
||||
(
|
||||
mesh,
|
||||
fields,
|
||||
phi,
|
||||
mesh.divScheme("div(phi,Yi_h)")
|
||||
)
|
||||
);
|
||||
|
||||
{
|
||||
combustion->correct();
|
||||
dQ = combustion->dQ();
|
||||
volScalarField Yt(0.0*Y[0]);
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (i != inertIndex && composition.active(i))
|
||||
{
|
||||
volScalarField& Yi = Y[i];
|
||||
|
||||
fvScalarMatrix YEqn
|
||||
(
|
||||
mvConvection->fvmDiv(phi, Yi)
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
parcels.SYi(i, Yi)
|
||||
+ combustion->R(Yi)
|
||||
+ fvOptions(rho, Yi)
|
||||
);
|
||||
|
||||
YEqn.relax();
|
||||
|
||||
fvOptions.constrain(YEqn);
|
||||
|
||||
YEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
fvOptions.correct(Yi);
|
||||
|
||||
Yi.max(0.0);
|
||||
Yt += Yi;
|
||||
}
|
||||
}
|
||||
|
||||
Y[inertIndex] = scalar(1) - Yt;
|
||||
Y[inertIndex].max(0.0);
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
const volScalarField& psi = thermo.psi();
|
||||
const volScalarField& T = thermo.T();
|
||||
const label inertIndex(composition.species()[inertSpecie]);
|
||||
@ -0,0 +1,122 @@
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = combustion->thermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
SLGThermo slgThermo(mesh, thermo);
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
if (!composition.species().found(inertSpecie))
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), thermo)
|
||||
<< "Inert specie " << inertSpecie << " not found in available species "
|
||||
<< composition.species()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMax",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
GREAT
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMin
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMin",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
volScalarField dQ
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dQ",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "createClouds.H"
|
||||
57
applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
Normal file
57
applications/solvers/lagrangian/simpleCoalParcelFoam/pEqn.H
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
// 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 rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
tUEqn.clear();
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
parcels.Srho()
|
||||
+ fvOptions(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
p.relax();
|
||||
|
||||
// Second part of thermodynamic density update
|
||||
thermo.rho() += psi*p;
|
||||
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,13 +24,12 @@ License
|
||||
Application
|
||||
simpleReactingParcelFoam
|
||||
|
||||
Description
|
||||
Steady state SIMPLE solver for laminar or turbulent flow with coal
|
||||
Lagrangian parcels.
|
||||
Group
|
||||
grpLagrangianSolvers
|
||||
|
||||
Note:
|
||||
- including run-time selectable finite volume options,e.g. sources,
|
||||
constraints
|
||||
Description
|
||||
Steady state solver for compressible, turbulent flow with coal particle
|
||||
clouds and optional sources/constraints.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -49,21 +48,19 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "createClouds.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
@ -32,6 +32,15 @@ License
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
|
||||
makeTurbulenceModelTypes
|
||||
(
|
||||
volScalarField,
|
||||
geometricOneField,
|
||||
incompressibleTurbulenceModel,
|
||||
PhaseCompressibleTurbulenceModel,
|
||||
immiscibleIncompressibleTwoPhaseMixture
|
||||
);
|
||||
|
||||
makeBaseTurbulenceModel
|
||||
(
|
||||
volScalarField,
|
||||
|
||||
@ -30,7 +30,7 @@ Description
|
||||
The momentum and other fluid properties are of the "mixture" and a single
|
||||
momentum equation is solved.
|
||||
|
||||
It includes MRF and MPPIC clouds
|
||||
It includes MRF and an MPPIC cloud.
|
||||
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
|
||||
@ -53,26 +53,22 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createTimeControls.H"
|
||||
#include "createControl.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
@ -126,7 +122,7 @@ int main(int argc, char *argv[])
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
);
|
||||
|
||||
cloudVolSUSu.internalField() = -cloudSU.source()/mesh.V();
|
||||
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||
cloudVolSUSu.correctBoundaryConditions();
|
||||
|
||||
cloudSU.source() = vector::zero;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
interFoamPath = $(FOAM_SOLVERS)/multiphase/interFoam
|
||||
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I./IncompressibleTwoPhaseMixtureTurbulenceModels/lnInclude \
|
||||
-I$(interFoamPath) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
|
||||
@ -17,9 +17,10 @@
|
||||
|
||||
// Do not compress interface at non-coupled boundary faces
|
||||
// (inlets, outlets etc.)
|
||||
surfaceScalarField::Boundary& phicBf = phic.boundaryFieldRef();
|
||||
forAll(phic.boundaryField(), patchi)
|
||||
{
|
||||
fvsPatchScalarField& phicp = phic.boundaryField()[patchi];
|
||||
fvsPatchScalarField& phicp = phicBf[patchi];
|
||||
|
||||
if (!phicp.coupled())
|
||||
{
|
||||
|
||||
@ -217,3 +217,5 @@
|
||||
mixture
|
||||
)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
@ -42,7 +42,7 @@ namespace Foam
|
||||
|
||||
void Foam::twoPhaseMixtureEThermo::eBoundaryCorrection(volScalarField& h)
|
||||
{
|
||||
volScalarField::GeometricBoundaryField& hbf = h.boundaryField();
|
||||
volScalarField::Boundary& hbf = h.boundaryFieldRef();
|
||||
|
||||
forAll(hbf, patchi)
|
||||
{
|
||||
@ -59,6 +59,7 @@ void Foam::twoPhaseMixtureEThermo::eBoundaryCorrection(volScalarField& h)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::twoPhaseMixtureEThermo::init()
|
||||
{
|
||||
const volScalarField alpha1Rho1(alpha1()*rho1());
|
||||
@ -74,6 +75,7 @@ void Foam::twoPhaseMixtureEThermo::init()
|
||||
e_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoPhaseMixtureEThermo::twoPhaseMixtureEThermo
|
||||
@ -117,11 +119,13 @@ Foam::twoPhaseMixtureEThermo::twoPhaseMixtureEThermo
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::twoPhaseMixtureEThermo::~twoPhaseMixtureEThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::twoPhaseMixtureEThermo::correct()
|
||||
@ -226,10 +230,8 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::he
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::hc() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::hc() const
|
||||
{
|
||||
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
return tmp<volScalarField>
|
||||
@ -277,8 +279,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::THE
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::Cp() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cp() const
|
||||
{
|
||||
const volScalarField limitedAlpha1
|
||||
(
|
||||
@ -317,8 +318,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cp
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::rho() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::rho() const
|
||||
{
|
||||
const volScalarField limitedAlpha1
|
||||
(
|
||||
@ -337,8 +337,7 @@ Foam::twoPhaseMixtureEThermo::rho() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::rho
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::rho
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
@ -357,8 +356,7 @@ Foam::twoPhaseMixtureEThermo::rho
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::Cv() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cv() const
|
||||
{
|
||||
const volScalarField limitedAlpha1
|
||||
(
|
||||
@ -376,8 +374,7 @@ Foam::twoPhaseMixtureEThermo::Cv() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::Cv
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
@ -398,8 +395,7 @@ Foam::twoPhaseMixtureEThermo::Cv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::gamma() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::gamma() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
@ -422,8 +418,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::gamma
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::Cpv() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::Cpv() const
|
||||
{
|
||||
// This is an e thermo (Cpv = Cv)
|
||||
return Cv();
|
||||
@ -442,16 +437,14 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cpv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::CpByCpv() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::CpByCpv() const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<Foam::volScalarField>();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::CpByCpv
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
@ -463,8 +456,7 @@ Foam::twoPhaseMixtureEThermo::CpByCpv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::kappa() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::kappa() const
|
||||
{
|
||||
const volScalarField limitedAlpha1
|
||||
(
|
||||
@ -482,8 +474,10 @@ Foam::twoPhaseMixtureEThermo::kappa() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::kappa(const label patchi) const
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::kappa
|
||||
(
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
const volScalarField limitedAlpha1
|
||||
(
|
||||
@ -496,8 +490,7 @@ Foam::twoPhaseMixtureEThermo::kappa(const label patchi) const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
(
|
||||
const volScalarField& kappat
|
||||
) const
|
||||
@ -508,8 +501,7 @@ Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
(
|
||||
const scalarField& kappat,
|
||||
const label patchi
|
||||
@ -528,8 +520,7 @@ Foam::twoPhaseMixtureEThermo::kappaEff
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const
|
||||
@ -539,12 +530,11 @@ Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
alpha1_*rho1() + (1.0 - alpha1_)*rho2()
|
||||
);
|
||||
|
||||
|
||||
return (kappa()/Cp()/rho + alphat);
|
||||
}
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
@ -575,6 +565,7 @@ Foam::twoPhaseMixtureEThermo::alphaEff
|
||||
return kappa/Cp/rho + alphat;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::twoPhaseMixtureEThermo::read()
|
||||
{
|
||||
if (basicThermo::read() && thermoIncompressibleTwoPhaseMixture::read())
|
||||
@ -589,4 +580,5 @@ bool Foam::twoPhaseMixtureEThermo::read()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -12,7 +12,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lcompressibleTurbulenceModels
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lreactingPhaseSystem \
|
||||
-lreactingMultiphaseSystem \
|
||||
-lreactingEulerianInterfacialModels \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
autoRefineMesh.C
|
||||
snappyRefineMesh.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/autoRefineMesh
|
||||
EXE = $(FOAM_APPBIN)/snappyRefineMesh
|
||||
|
||||
|
||||
@ -1316,14 +1316,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< surfaces.names()[surfi] << ':' << nl << nl;
|
||||
|
||||
const word& fzName = surfaces.surfZones()[surfI].faceZoneName();
|
||||
const word& fzName = surfaces.surfZones()[surfi].faceZoneName();
|
||||
|
||||
if (fzName.empty())
|
||||
{
|
||||
// 'Normal' surface
|
||||
forAll(regNames, i)
|
||||
{
|
||||
label globalRegioni = surfaces.globalRegion(surfI, i);
|
||||
label globalRegioni = surfaces.globalRegion(surfi, i);
|
||||
|
||||
label patchi;
|
||||
|
||||
|
||||
@ -392,7 +392,7 @@ Foam::label Foam::checkTopology
|
||||
// Already marked
|
||||
regionDisconnected[regioni] = false;
|
||||
}
|
||||
else if (pRegion != regionI)
|
||||
else if (pRegion != regioni)
|
||||
{
|
||||
// Multiple regions
|
||||
regionDisconnected[regioni] = false;
|
||||
|
||||
@ -326,7 +326,7 @@ int main(int argc, char *argv[])
|
||||
// Create mesh subsetting engine
|
||||
fvMeshSubset subsetter(mesh);
|
||||
|
||||
label patchi = -1;
|
||||
labelList exposedPatchIDs;
|
||||
|
||||
if (args.optionFound("patch"))
|
||||
{
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
|
||||
[ "${FFTW_ARCH_PATH##*-}" = system -a -f "/usr/include/fftw3.h" ]
|
||||
then
|
||||
export LINK_FLAGS="-lrandomProcesses"
|
||||
fi
|
||||
wmake
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1151,10 +1151,6 @@ int main(int argc, char *argv[])
|
||||
// For the first region of a multi-region case additionally
|
||||
// decompose the "uniform" directory in the time directory
|
||||
if (regionNames.size() > 1 && regioni == 0)
|
||||
|
||||
// If no fields have been decomposed the destination
|
||||
// directory will not have been created so make sure.
|
||||
mkDir(timePath);
|
||||
{
|
||||
decomposeUniform(copyUniform, mesh, processorDb);
|
||||
}
|
||||
|
||||
@ -615,7 +615,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
|
||||
label zonei = faceToZone[curF];
|
||||
|
||||
if (zoneI >= 0)
|
||||
if (zonei >= 0)
|
||||
{
|
||||
// Single zone. Add the face
|
||||
zoneFaces[zonei].append(facei);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -125,12 +125,8 @@ Foam::parFvFieldReconstructor::reconstructFvVolumeField
|
||||
|
||||
PtrList<fvPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
||||
|
||||
const typename GeometricField
|
||||
<
|
||||
Type,
|
||||
fvPatchField,
|
||||
volMesh
|
||||
>::GeometricBoundaryField& bfld = fld.boundaryField();
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
|
||||
bfld = fld.boundaryField();
|
||||
|
||||
forAll(bfld, patchI)
|
||||
{
|
||||
@ -292,12 +288,8 @@ Foam::parFvFieldReconstructor::reconstructFvSurfaceField
|
||||
|
||||
PtrList<fvsPatchField<Type>> patchFields(fld.mesh().boundary().size());
|
||||
|
||||
const typename GeometricField
|
||||
<
|
||||
Type,
|
||||
fvsPatchField,
|
||||
surfaceMesh
|
||||
>::GeometricBoundaryField& bfld = fld.boundaryField();
|
||||
const typename GeometricField<Type, fvsPatchField, surfaceMesh>::Boundary&
|
||||
bfld = fld.boundaryField();
|
||||
|
||||
forAll(bfld, patchI)
|
||||
{
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -716,8 +716,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
{
|
||||
GeoField& fld = *iter();
|
||||
|
||||
typename GeoField::GeometricBoundaryField& bfld =
|
||||
fld.boundaryField();
|
||||
typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
|
||||
if
|
||||
(
|
||||
Pstream::defaultCommsType == Pstream::blocking
|
||||
@ -728,7 +727,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
typename GeoField::PatchFieldType& pfld = bfld[patchi];
|
||||
typename GeoField::Patch& pfld = bfld[patchi];
|
||||
|
||||
//if (pfld.coupled())
|
||||
//if (isA<CoupledPatchType>(pfld))
|
||||
@ -750,7 +749,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
typename GeoField::PatchFieldType& pfld = bfld[patchi];
|
||||
typename GeoField::Patch& pfld = bfld[patchi];
|
||||
|
||||
//if (pfld.coupled())
|
||||
//if (isA<CoupledPatchType>(pfld))
|
||||
@ -768,7 +767,7 @@ void correctCoupledBoundaryConditions(fvMesh& mesh)
|
||||
forAll(patchSchedule, patchEvali)
|
||||
{
|
||||
label patchi = patchSchedule[patchEvali].patch;
|
||||
typename GeoField::PatchFieldType& pfld = bfld[patchi];
|
||||
typename GeoField::Patch& pfld = bfld[patchi];
|
||||
|
||||
//if (pfld.coupled())
|
||||
//if (isA<CoupledPatchType>(pfld))
|
||||
|
||||
@ -70,12 +70,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>>
|
||||
volField
|
||||
(
|
||||
const fvMeshSubset& meshSubsetter,
|
||||
const typename GeometricField
|
||||
<
|
||||
Type,
|
||||
fvPatchField,
|
||||
volMesh
|
||||
>::DimensionedInternalField& df
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>::Internal& df
|
||||
)
|
||||
{
|
||||
// Construct volField (with zeroGradient) from dimensioned field
|
||||
@ -93,7 +88,7 @@ volField
|
||||
zeroGradientFvPatchField<scalar>::typeName
|
||||
)
|
||||
);
|
||||
tvf.ref().internalField() = df;
|
||||
tvf.ref().primitiveFieldRef() = df;
|
||||
tvf.ref().correctBoundaryConditions();
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf = tvf();
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,7 +60,7 @@ volField
|
||||
Type,
|
||||
Foam::fvPatchField,
|
||||
Foam::volMesh
|
||||
>::DimensionedInternalField& df
|
||||
>::Internal& df
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -186,11 +186,11 @@ int main(int argc, char *argv[])
|
||||
volSymmTensorField::typeName,
|
||||
volTensorField::typeName,
|
||||
|
||||
volScalarField::DimensionedInternalField::typeName,
|
||||
volVectorField::DimensionedInternalField::typeName,
|
||||
volSphericalTensorField::DimensionedInternalField::typeName,
|
||||
volSymmTensorField::DimensionedInternalField::typeName,
|
||||
volTensorField::DimensionedInternalField::typeName
|
||||
volScalarField::Internal::typeName,
|
||||
volVectorField::Internal::typeName,
|
||||
volSphericalTensorField::Internal::typeName,
|
||||
volSymmTensorField::Internal::typeName,
|
||||
volTensorField::Internal::typeName
|
||||
};
|
||||
|
||||
// Path to EnSight directory at case level only
|
||||
@ -562,15 +562,10 @@ int main(int argc, char *argv[])
|
||||
// DimensionedFields
|
||||
else if
|
||||
(
|
||||
volFieldTypes[i]
|
||||
== volScalarField::DimensionedInternalField::typeName
|
||||
volFieldTypes[i] == volScalarField::Internal::typeName
|
||||
)
|
||||
{
|
||||
volScalarField::DimensionedInternalField df
|
||||
(
|
||||
fieldObject,
|
||||
mesh
|
||||
);
|
||||
volScalarField::Internal df(fieldObject, mesh);
|
||||
ensightField<scalar>
|
||||
(
|
||||
volField<scalar>(meshSubsetter, df),
|
||||
@ -585,15 +580,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if
|
||||
(
|
||||
volFieldTypes[i]
|
||||
== volVectorField::DimensionedInternalField::typeName
|
||||
volFieldTypes[i] == volVectorField::Internal::typeName
|
||||
)
|
||||
{
|
||||
volVectorField::DimensionedInternalField df
|
||||
(
|
||||
fieldObject,
|
||||
mesh
|
||||
);
|
||||
volVectorField::Internal df(fieldObject, mesh);
|
||||
ensightField<vector>
|
||||
(
|
||||
volField<vector>(meshSubsetter, df),
|
||||
@ -609,14 +599,10 @@ int main(int argc, char *argv[])
|
||||
else if
|
||||
(
|
||||
volFieldTypes[i]
|
||||
== volSphericalTensorField::DimensionedInternalField::typeName
|
||||
== volSphericalTensorField::Internal::typeName
|
||||
)
|
||||
{
|
||||
volSphericalTensorField::DimensionedInternalField df
|
||||
(
|
||||
fieldObject,
|
||||
mesh
|
||||
);
|
||||
volSphericalTensorField::Internal df(fieldObject, mesh);
|
||||
ensightField<sphericalTensor>
|
||||
(
|
||||
volField<sphericalTensor>(meshSubsetter, df),
|
||||
@ -631,15 +617,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if
|
||||
(
|
||||
volFieldTypes[i]
|
||||
== volSymmTensorField::DimensionedInternalField::typeName
|
||||
volFieldTypes[i] == volSymmTensorField::Internal::typeName
|
||||
)
|
||||
{
|
||||
volSymmTensorField::DimensionedInternalField df
|
||||
(
|
||||
fieldObject,
|
||||
mesh
|
||||
);
|
||||
volSymmTensorField::Internal df(fieldObject, mesh);
|
||||
ensightField<symmTensor>
|
||||
(
|
||||
volField<symmTensor>(meshSubsetter, df),
|
||||
@ -654,15 +635,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if
|
||||
(
|
||||
volFieldTypes[i]
|
||||
== volTensorField::DimensionedInternalField::typeName
|
||||
volFieldTypes[i] == volTensorField::Internal::typeName
|
||||
)
|
||||
{
|
||||
volTensorField::DimensionedInternalField df
|
||||
(
|
||||
fieldObject,
|
||||
mesh
|
||||
);
|
||||
volTensorField::Internal df(fieldObject, mesh);
|
||||
ensightField<tensor>
|
||||
(
|
||||
volField<tensor>(meshSubsetter, df),
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -618,11 +618,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Construct dimensioned fields
|
||||
PtrList<volScalarField::DimensionedInternalField> dsf;
|
||||
PtrList<volVectorField::DimensionedInternalField> dvf;
|
||||
PtrList<volSphericalTensorField::DimensionedInternalField> dSpheretf;
|
||||
PtrList<volSymmTensorField::DimensionedInternalField> dSymmtf;
|
||||
PtrList<volTensorField::DimensionedInternalField> dtf;
|
||||
PtrList<const volScalarField::Internal> dsf;
|
||||
PtrList<const volVectorField::Internal> dvf;
|
||||
PtrList<const volSphericalTensorField::Internal> dSpheretf;
|
||||
PtrList<const volSymmTensorField::Internal> dSymmtf;
|
||||
PtrList<const volTensorField::Internal> dtf;
|
||||
|
||||
if (!specifiedFields || selectedFields.size())
|
||||
{
|
||||
|
||||
@ -98,7 +98,7 @@ public:
|
||||
template<class Type, class GeoMesh>
|
||||
void write
|
||||
(
|
||||
const PtrList<DimensionedField<Type, volMesh>>& flds
|
||||
const PtrList<const DimensionedField<Type, volMesh>>& flds
|
||||
);
|
||||
|
||||
//- Interpolate and write volFields
|
||||
@ -114,7 +114,7 @@ public:
|
||||
void write
|
||||
(
|
||||
const volPointInterpolation&,
|
||||
const PtrList<DimensionedField<Type, volMesh>>&
|
||||
const PtrList<const DimensionedField<Type, volMesh>>&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ void Foam::internalWriter::write
|
||||
template<class Type, class GeoMesh>
|
||||
void Foam::internalWriter::write
|
||||
(
|
||||
const PtrList<DimensionedField<Type, volMesh>>& flds
|
||||
const PtrList<const DimensionedField<Type, volMesh>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, i)
|
||||
@ -79,7 +79,7 @@ template<class Type, class GeoMesh>
|
||||
void Foam::internalWriter::write
|
||||
(
|
||||
const volPointInterpolation& pInterp,
|
||||
const PtrList<DimensionedField<Type, volMesh>>& flds
|
||||
const PtrList<const DimensionedField<Type, volMesh>>& flds
|
||||
)
|
||||
{
|
||||
forAll(flds, i)
|
||||
|
||||
@ -64,7 +64,7 @@ void Foam::writeFuns::write
|
||||
(
|
||||
std::ostream& os,
|
||||
const bool binary,
|
||||
const DimensionedField<Type, volMesh>& vvf,
|
||||
const DimensionedField<Type, volMesh>& df,
|
||||
const vtkMesh& vMesh
|
||||
)
|
||||
{
|
||||
@ -74,19 +74,19 @@ void Foam::writeFuns::write
|
||||
|
||||
label nValues = mesh.nCells() + superCells.size();
|
||||
|
||||
os << vvf.name() << ' '
|
||||
os << df.name() << ' '
|
||||
<< int(pTraits<Type>::nComponents) << ' '
|
||||
<< nValues << " float" << std::endl;
|
||||
|
||||
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
|
||||
|
||||
insert(vvf.primitiveField(), fField);
|
||||
insert(df.field(), fField);
|
||||
|
||||
forAll(superCells, superCelli)
|
||||
{
|
||||
label origCelli = superCells[superCelli];
|
||||
|
||||
insert(vvf[origCelli], fField);
|
||||
insert(df[origCelli], fField);
|
||||
}
|
||||
write(os, binary, fField);
|
||||
}
|
||||
|
||||
@ -116,11 +116,11 @@ void Foam::writeVTKFields
|
||||
Info<< " writing field " << fieldNames[fieldi] << endl;
|
||||
os << nl << fieldNames[fieldi] << ' '
|
||||
<< int(pTraits<Type>::nComponents) << ' '
|
||||
<< values[fieldI].size() << " float" << nl;
|
||||
<< values[fieldi].size() << " float" << nl;
|
||||
label offset = 0;
|
||||
forAll(addr, trackI)
|
||||
forAll(addr, tracki)
|
||||
{
|
||||
const List<label> ids(addr[trackI]);
|
||||
const List<label> ids(addr[tracki]);
|
||||
|
||||
List<Type> data(UIndirectList<Type>(values[fieldi], ids));
|
||||
label nData = data.size() - 1;
|
||||
|
||||
@ -93,7 +93,7 @@ void correctProcessorPatches(volScalarField& vf)
|
||||
// Not possible to use correctBoundaryConditions on fields as they may
|
||||
// use local info as opposed to the constraint values employed here,
|
||||
// but still need to update processor patches
|
||||
volScalarField::GeometricBoundaryField& bf = vf.boundaryField();
|
||||
volScalarField::Boundary& bf = vf.boundaryFieldRef();
|
||||
|
||||
forAll(bf, patchI)
|
||||
{
|
||||
@ -134,8 +134,8 @@ void blendField
|
||||
if (fieldHeader.typeHeaderOk<volScalarField>(true))
|
||||
{
|
||||
volScalarField fld(fieldHeader, mesh);
|
||||
scalarField& internalField = fld.internalField();
|
||||
internalField = (1 - mask)*internalField + mask*boundaryLayerField;
|
||||
scalarField& pf = fld.primitiveFieldRef();
|
||||
pf = (1 - mask)*pf + mask*boundaryLayerField;
|
||||
fld.max(SMALL);
|
||||
|
||||
// Do not correct BC
|
||||
@ -172,10 +172,9 @@ void calcOmegaField
|
||||
if (omegaHeader.typeHeaderOk<volScalarField>(true))
|
||||
{
|
||||
volScalarField omega(omegaHeader, mesh);
|
||||
scalarField& internalField = omega.internalField();
|
||||
scalarField& pf = omega.primitiveFieldRef();
|
||||
|
||||
internalField =
|
||||
(1 - mask)*internalField + mask*epsilonBL/(Cmu*kBL + SMALL);
|
||||
pf = (1 - mask)*pf + mask*epsilonBL/(Cmu*kBL + SMALL);
|
||||
omega.max(SMALL);
|
||||
|
||||
// Do not correct BC
|
||||
|
||||
@ -52,7 +52,7 @@ volScalarField y
|
||||
dimensionedScalar("zero", dimLength, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
y.internalField() = wallDist::New(mesh).y().internalField();
|
||||
y.primitiveFieldRef() = wallDist::New(mesh).y().primitiveField();
|
||||
y.correctBoundaryConditions();
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/postProcessing/functionObjects/jobControl/lnInclude
|
||||
-I$(LIB_SRC)/functionObjects/field/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-ljobControl
|
||||
-lfieldFunctionObjects
|
||||
|
||||
@ -56,12 +56,12 @@ Note:
|
||||
used for face addressing starts at index 0.
|
||||
|
||||
See also
|
||||
externalCoupledFunctionObject
|
||||
functionObjects::externalCoupled
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "externalCoupledFunctionObject.H"
|
||||
#include "externalCoupled.H"
|
||||
#include "IOobjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -119,7 +119,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
externalCoupledFunctionObject::writeGeometry
|
||||
functionObjects::externalCoupled::writeGeometry
|
||||
(
|
||||
UPtrList<const fvMesh>(meshes),
|
||||
commsDir,
|
||||
|
||||
@ -786,6 +786,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
label compactI = 0;
|
||||
|
||||
volScalarField::Boundary& vfbf = viewFactorField.boundaryFieldRef();
|
||||
forAll(viewFactorsPatches, i)
|
||||
{
|
||||
label patchID = viewFactorsPatches[i];
|
||||
@ -805,7 +807,7 @@ int main(int argc, char *argv[])
|
||||
forAll(fineFaces, fineId)
|
||||
{
|
||||
const label faceID = fineFaces[fineId];
|
||||
viewFactorField.boundaryField()[patchID][faceID] = Fij;
|
||||
vfbf[patchID][faceID] = Fij;
|
||||
}
|
||||
compactI++;
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ void writeParts
|
||||
{
|
||||
boolList includeMap(surf.size(), false);
|
||||
|
||||
forAll(faceZone, faceI)
|
||||
forAll(faceZone, facei)
|
||||
{
|
||||
if (faceZone[facei] == zone)
|
||||
{
|
||||
@ -651,7 +651,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< " close unconnected points "
|
||||
<< pti << ' ' << localPoints[pti]
|
||||
<< " and " << prevPtI << ' '
|
||||
<< " and " << prevPti << ' '
|
||||
<< localPoints[prevPti]
|
||||
<< " distance:"
|
||||
<< mag(localPoints[pti] - localPoints[prevPti])
|
||||
@ -660,8 +660,8 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
Info<< " small edge between points "
|
||||
<< ptI << ' ' << localPoints[pti]
|
||||
<< " and " << prevPtI << ' '
|
||||
<< pti << ' ' << localPoints[pti]
|
||||
<< " and " << prevPti << ' '
|
||||
<< localPoints[prevPti]
|
||||
<< " distance:"
|
||||
<< mag(localPoints[pti] - localPoints[prevPti])
|
||||
@ -837,7 +837,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
label nInt = 0;
|
||||
|
||||
forAll(surf.edges(), edgeI)
|
||||
forAll(surf.edges(), edgei)
|
||||
{
|
||||
const edge& e = surf.edges()[edgei];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user