Merge tag '19.02' into feature/recurrenceLib

# Conflicts:
#	applications/solvers/rcfdemSolverRhoSteadyPimple/EEqn.H
#	applications/solvers/rcfdemSolverRhoSteadyPimple/rcfdemSolverRhoSteadyPimple.C
#	doc/CFDEMcoupling_Manual.txt
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.H
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayOne2One/twoWayOne2One.H
#	src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.C
#	src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/SyamlalThermCond/SyamlalThermCond.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/ZehnerSchluenderThermCond/ZehnerSchluenderThermCond.C
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/ZehnerSchluenderThermCond/ZehnerSchluenderThermCond.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/thermCondModel/thermCondModel.H
This commit is contained in:
Daniel Queteschiner
2019-10-22 17:24:33 +02:00
82 changed files with 1116 additions and 314 deletions

1
.gitignore vendored
View File

@ -7,5 +7,6 @@ log.*
*~
**/linux*Gcc*/
**/.vscode
lnInclude

View File

@ -1,7 +1,7 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-I$(CFDEM_OFVERSION_DIR) \
-I$(CFDEM_OFVERSION_DIR) \
-ImultiphaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \

View File

@ -37,9 +37,9 @@ if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
) * voidfraction
+ Ksl*Us
);
fvOptions.correct(U);
}
}
else if (pimple.momentumPredictor())
{
solve

View File

@ -41,6 +41,7 @@ Description
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
@ -71,11 +72,11 @@ int main(int argc, char *argv[])
{
#include "CourantNo.H"
#include "alphaCourantNo.H"
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
particleCloud.clockM().start(2,"Coupling");
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
@ -88,12 +89,12 @@ int main(int argc, char *argv[])
Ksl = particleCloud.momCoupleM(0).impMomSource();
Ksl.correctBoundaryConditions();
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
#include "solverDebugInfo.H"
particleCloud.clockM().stop("Coupling");
@ -101,22 +102,22 @@ int main(int argc, char *argv[])
particleCloud.clockM().start(26,"Flow");
if(particleCloud.solveFlow())
{
{
mixture.solve();
rho = mixture.rho();
rhoEps = rho * voidfraction;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
@ -133,7 +134,7 @@ int main(int argc, char *argv[])
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
particleCloud.clockM().stop("Flow");
particleCloud.clockM().stop("Global");
}

View File

@ -76,17 +76,17 @@ volVectorField U
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
multiphaseMixture mixture(U, phi, voidfraction);

View File

@ -57,12 +57,12 @@ Foam::multiphaseMixture::calcNu() const
tmp<volScalarField> tnu = iter()*iter().nu();
volScalarField& nu = tnu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nu += iter()*iter().nu();
}
return tnu;
}
@ -216,7 +216,7 @@ Foam::multiphaseMixture::multiphaseMixture
calcAlphas();
alphas_.write();
surfaceTensionForce_ = calcStf();
}
@ -300,20 +300,20 @@ Foam::multiphaseMixture::mu(const label patchi) const
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixture::muf() const
{
return nuf()*fvc::interpolate(rho());
// PtrDictionary<phase>::const_iterator iter = phases_.begin();
// tmp<surfaceScalarField> tmuf =
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// surfaceScalarField& muf = tmuf.ref();
// for (++iter; iter != phases_.end(); ++iter)
// {
// muf +=
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// }
// return tmuf;
}
@ -400,7 +400,7 @@ void Foam::multiphaseMixture::solve()
!(++alphaSubCycle).end();
)
{
FatalError << "Sub-cycling of the alpha equation not yet implemented!!" << abort(FatalError);
FatalError << "Sub-cycling of the alpha equation not yet implemented!!" << abort(FatalError);
solveAlphas(cAlpha);
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
}

View File

@ -159,8 +159,8 @@ private:
// Private member functions
void calcAlphas();
tmp<volScalarField> calcNu() const;
tmp<volScalarField> calcNu() const;
void solveAlphas(const scalar cAlpha);
@ -257,7 +257,7 @@ public:
{
return surfaceTensionForce_;
}
//- Indicator of the proximity of the interface
// Field values are 1 near and 0 away for the interface.
tmp<volScalarField> nearInterface() const;

View File

@ -15,10 +15,10 @@ fvOptions.constrain(UEqn);
if (piso.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
{
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
fvOptions.correct(U);
fvOptions.correct(U);
}
else if (piso.momentumPredictor())
{
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
fvOptions.correct(U);
}
}

View File

@ -86,12 +86,12 @@ int main(int argc, char *argv[])
Ksl = particleCloud.momCoupleM(0).impMomSource();
Ksl.correctBoundaryConditions();
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
#include "solverDebugInfo.H"
particleCloud.clockM().stop("Coupling");

View File

@ -96,17 +96,17 @@
#define createPhi_H
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
#endif
@ -123,4 +123,4 @@ surfaceScalarField phi
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
#include "createMRF.H"
#include "createMRF.H"

View File

@ -31,12 +31,12 @@ constrainPressure(p, Uvoidfraction, phiHbyA, rAUvoidfraction, MRF);
while (piso.correctNonOrthogonal())
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rAUvoidfraction, p) == fvc::div(phi) + particleCloud.ddtVoidfraction()
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
@ -55,4 +55,4 @@ else
U = HbyA - voidfraction*rAU*fvc::grad(p) + Ksl/rho*Us*rAU;
U.correctBoundaryConditions();
fvOptions.correct(U);
fvOptions.correct(U);

View File

@ -1,4 +1,4 @@
// get scalar source from DEM
// get scalar source from DEM
particleCloud.forceM(1).manipulateScalarField(Tsource);
Tsource.correctBoundaryConditions();
@ -12,4 +12,4 @@
Tsource
);
TEqn.relax();
TEqn.solve();
TEqn.solve();

View File

@ -81,23 +81,23 @@ int main(int argc, char *argv[])
{
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
}
Info << "update Ksl.internalField()" << endl;
Ksl = particleCloud.momCoupleM(0).impMomSource();
Ksl.correctBoundaryConditions();
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
#include "solverDebugInfo.H"
particleCloud.clockM().stop("Coupling");
particleCloud.clockM().start(26,"Flow");
#include "TEqn.H"
if(particleCloud.solveFlow())

View File

@ -146,17 +146,17 @@
#define createPhi_H
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
#endif
@ -173,4 +173,4 @@ surfaceScalarField phi
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
#include "createMRF.H"
#include "createMRF.H"

View File

@ -20,6 +20,9 @@
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
// correct source for the thermodynamic reference temperature
dimensionedScalar Tref("Tref", dimTemperature, T[0]-he[0]/(Cpv[0]+SMALL));
Qsource += QCoeff*Tref;
fvScalarMatrix EEqn
(

View File

@ -69,8 +69,8 @@ int main(int argc, char *argv[])
#include "checkModelType.H"
turbulence->validate();
// #include "compressibleCourantNo.H"
// #include "setInitialDeltaT.H"
//#include "compressibleCourantNo.H"
//#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -32,7 +32,7 @@ else
// + rhorAUf*fvc::ddtCorr(rho, U, phi)
)
);
// flux without pressure gradient contribution
phi = phiHbyA + phiUs;

View File

@ -14,4 +14,4 @@
fvOptions.correct(rho);
}
// ************************************************************************* //
// ************************************************************************* //

View File

@ -8,6 +8,10 @@ particleCloud.energyCoefficients(QCoeff);
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
// correct source for the thermodynamic reference temperature
dimensionedScalar Tref("Tref", dimTemperature, T[0]-he[0]/(Cpv[0]+SMALL));
Qsource += QCoeff*Tref;
fvScalarMatrix EEqn
(
fvm::ddt(rhoeps, he) + fvm::div(phi, he)

View File

@ -0,0 +1,57 @@
// contributions to internal energy equation can be found in
// Crowe et al.: "Multiphase flows with droplets and particles", CRC Press 1998
{
// dim he = J / kg
volScalarField& he = thermo.he();
particleCloud.energyContributions(Qsource);
particleCloud.energyCoefficients(QCoeff);
addSource =
(
he.name() == "e"
?
fvc::div(phi, K) +
fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), voidfraction*U),
p,
"div(phiv,p)"
)
: fvc::div(phi, K)
);
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
// correct source for the thermodynamic reference temperature
dimensionedScalar Tref("Tref", dimTemperature, T[0]-he[0]/(Cpv[0]+SMALL));
Qsource += QCoeff*Tref;
fvScalarMatrix EEqn
(
fvm::div(phi, he)
+ addSource
- Qsource
- fvm::Sp(QCoeff/Cpv, he)
- fvm::laplacian(voidfraction*thCond/Cpv,he)
==
fvOptions(rho, he)
);
EEqn.relax();
fvOptions.constrain(EEqn);
EEqn.solve();
fvOptions.correct(he);
thermo.correct();
Info<< "T max/min : " << max(T).value() << " " << min(T).value() << endl;
particleCloud.clockM().start(31,"energySolve");
particleCloud.solve();
particleCloud.clockM().stop("energySolve");
}

View File

@ -0,0 +1,3 @@
cfdemSolverRhoSimple.C
EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoSimple

View File

@ -0,0 +1,32 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
PFLAGS+= -Dcompre
EXE_INC = \
$(PFLAGS) \
-I$(CFDEM_OFVERSION_DIR) \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lfvOptions \
-l$(CFDEM_LIB_COMP_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,30 @@
// Solve the Momentum equation
particleCloud.otherForces(fOther);
tmp<fvVectorMatrix> tUEqn
(
fvm::div(phi, U)
+ particleCloud.divVoidfractionTau(U, voidfraction)
+ fvm::Sp(Ksl,U)
- fOther
==
fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();
UEqn.relax();
fvOptions.constrain(UEqn);
if (modelType=="B" || modelType=="Bfull")
{
solve(UEqn == -fvc::grad(p)+ Ksl*Us);
}
else
{
solve(UEqn == -voidfraction*fvc::grad(p)+ Ksl*Us);
}
fvOptions.correct(U);
K = 0.5*magSqr(U);

View File

@ -0,0 +1,140 @@
/*---------------------------------------------------------------------------*\
License
This is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This code 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 this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
Application
cfdemSolverRhoSimple
Description
Steady-state solver for turbulent flow of compressible fluids based on
rhoSimpleFoam where functionality for CFD-DEM coupling has been added.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "bound.H"
#include "simpleControl.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
#include "cfdemCloudEnergy.H"
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
#include "thermCondModel.H"
#include "energyModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
// create cfdemCloud
#include "readGravitationalAcceleration.H"
cfdemCloudEnergy particleCloud(mesh);
#include "checkModelType.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (simple.loop())
{
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
// do particle stuff
particleCloud.clockM().start(2,"Coupling");
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
if(hasEvolved)
{
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
}
Info << "update Ksl.internalField()" << endl;
Ksl = particleCloud.momCoupleM(0).impMomSource();
Ksl.correctBoundaryConditions();
//Force Checks
vector fTotal(0,0,0);
vector fImpTotal = sum(mesh.V()*Ksl.primitiveFieldRef()*(Us.primitiveFieldRef()-U.primitiveFieldRef()));
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
#include "solverDebugInfo.H"
particleCloud.clockM().stop("Coupling");
particleCloud.clockM().start(26,"Flow");
volScalarField rhoeps("rhoeps",rho*voidfraction);
// Pressure-velocity SIMPLE corrector
#include "UEqn.H"
// besides this pEqn, OF offers a "simple consistent"-option
#include "pEqn.H"
rhoeps=rho*voidfraction;
#include "EEqn.H"
turbulence->correct();
particleCloud.clockM().start(32,"postFlow");
if(hasEvolved) particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
particleCloud.clockM().stop("Flow");
particleCloud.clockM().stop("Global");
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,2 @@
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();

View File

@ -0,0 +1,243 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiThermo> pThermo
(
psiThermo::New(mesh)
);
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField& p = thermo.p();
Info<< "Reading field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo.rho()
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField addSource
(
IOobject
(
"addSource",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "\nCreating fluid-particle heat flux field\n" << endl;
volScalarField Qsource
(
IOobject
(
"Qsource",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,-1,-3,0,0,0,0), 0.0)
);
Info<< "\nCreating fluid-particle heat flux coefficient field\n" << endl;
volScalarField QCoeff
(
IOobject
(
"QCoeff",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,-1,-3,-1,0,0,0), 0.0)
);
Info<< "\nCreating thermal conductivity field\n" << endl;
volScalarField thCond
(
IOobject
(
"thCond",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0),
"zeroGradient"
);
Info<< "\nCreating heat capacity field\n" << endl;
volScalarField Cpv
(
IOobject
(
"Cpv",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-2,-1,0,0,0), 0.0)
);
Info<< "\nCreating body force field\n" << endl;
volVectorField fOther
(
IOobject
(
"fOther",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedVector("zero", dimensionSet(1,-2,-2,0,0,0,0), vector::zero)
);
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(rho*U*voidfraction) & mesh.Sf()
);
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
)
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
Info<< "\nReading momentum exchange field Ksl\n" << endl;
volScalarField Ksl
(
IOobject
(
"Ksl",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
//dimensionedScalar("0", dimensionSet(1, -3, -1, 0, 0), 1.0)
);
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//===============================

View File

@ -0,0 +1,81 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rhoeps*rAU));
if (modelType=="A")
{
rhorAUf *= fvc::interpolate(voidfraction);
}
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phiUs("phiUs", fvc::interpolate(rhoeps*rAU*Ksl*Us)& mesh.Sf());
if (simple.transonic())
{
// transonic version not implemented yet
}
else
{
surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rhoeps*HbyA)
)
);
// flux without pressure gradient contribution
phi = phiHbyA + phiUs;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rhoeps, U, phi, rhorAUf);
while (simple.correctNonOrthogonal())
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvc::div(phi)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (simple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
}
}
// Explicitly relax pressure for momentum corrector
p.relax();
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
if (modelType=="A")
{
U = HbyA - rAU*(voidfraction*fvc::grad(p)-Ksl*Us);
}
else
{
U = HbyA - rAU*(fvc::grad(p)-Ksl*Us);
}
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);

View File

@ -5,11 +5,11 @@
volScalarField& he = thermo.he();
particleCloud.energyContributions(Qsource);
particleCloud.energyCoefficients(QCoeff);
addSource =
addSource =
(
he.name() == "e"
?
?
fvc::div(phi, K) +
fvc::div
(

View File

@ -28,7 +28,7 @@ else
fvc::flux(rhoeps*HbyA)
)
);
// flux without pressure gradient contribution
phi = phiHbyA + phiUs;

View File

@ -84,7 +84,7 @@ int main(int argc, char *argv[])
particleCloud.dataExchangeM().allocateArray(particleV_,0.,1);
particleCloud.get_cellIDs(cellIDs_); // get ref to cellIDs
//particleCloud.dataExchangeM().allocateArray(cellIDs_,0.,1);
while (runTime.loop())
{

View File

@ -28,7 +28,7 @@ Application
writeUfluidwriteUfluid
Description
Writes the the cell center fluid velocity to particles in the lagrangian
Writes the the cell center fluid velocity to particles in the lagrangian
time directory.
\*---------------------------------------------------------------------------*/
@ -76,13 +76,13 @@ int nParticle=0;
{
volVectorField U(UHeader,mesh);
passiveParticleCloud myCloud(mesh, cloudName);
myCloud.write();
myCloud.write();
nParticle = myCloud.size();
IOField<vector> Ufluid(myCloud.fieldIOobject("Ufluid",IOobject::NO_READ),nParticle);
IOField<vector> Ufluid(myCloud.fieldIOobject("Ufluid",IOobject::NO_READ),nParticle);
label i = 0;
forAllConstIter(passiveParticleCloud, myCloud, iter)
{
Ufluid[i]=U[iter().cell()];
Ufluid[i]=U[iter().cell()];
i++;
}
Ufluid.write();

View File

@ -89,3 +89,5 @@ END_RST -->
:link(of,http://www.openfoam.org)
:link(lig,http://www.cfdem.com)

View File

@ -189,7 +189,7 @@ cfdemCompLIG :pre
If the compilation fails with a message like
No rule to make target `/usr/lib/libpython2.7.so' :pre
No rule to make target '/usr/lib/libpython2.7.so' :pre
you probably need to create a symbolic link to the library in question.

View File

@ -38,7 +38,7 @@ models used for chemical reaction calculations.
"diffusionCoefficients"_chemistryModel_diffusionCoefficients.html,
"massTransferCoeff"_chemistryModel_massTransferCoeff.html,
"off"_chemistryModel_noChemistry.html,
reactantPerParticle,
"reactantPerParticle"_chemistryModel_reactantPerParticle.html,
"species"_chemistryModel_species.html :tb(c=2,ea=c)
@ -60,7 +60,8 @@ that performs the data exchange between the DEM code and the CFD code.
"oneWayVTK"_dataExchangeModel_oneWayVTK.html,
"twoWayFiles"_dataExchangeModel_twoWayFiles.html,
"twoWayMPI"_dataExchangeModel_twoWayMPI.html,
"twoWayMany2Many"_dataExchangeModel_twoWayMany2Many.html :tb(c=2,ea=c)
"twoWayMany2Many"_dataExchangeModel_twoWayMany2Many.html,
"twoWayOne2One"_dataExchangeModel_twoWayOne2One.html :tb(c=2,ea=c)
6.6 Energy models :h4

View File

@ -13,7 +13,7 @@ This section lists all CFDEMcoupling solvers alphabetically.
"cfdemSolverMultiphase"_cfdemSolverMultiphase.html,
"cfdemSolverPiso"_cfdemSolverPiso.html,
"cfdemSolverPisoScalar"_cfdemSolverPisoScalar.html,
cfdemSolverRhoPimple,
cfdemSolverRhoPimpleChem,
cfdemSolverRhoSimple :tb(c=2,ea=c)
"cfdemSolverRhoPimple"_cfdemSolverRhoPimple.html,
"cfdemSolverRhoPimpleChem"_cfdemSolverRhoPimpleChem.html,
"cfdemSolverRhoSimple"_cfdemSolverRhoSimple.html :tb(c=2,ea=c)

View File

@ -33,7 +33,7 @@ For more details, see "Vångö et al. (2018)"_#Vångö2018.
:link(Vångö2018)
[(Vångö2018)] M. Vångö, S. Pirker, T. Lichtenegger. (2018):
"Unresolved CFDDEM modeling of multiphase flow in densely packed particle beds",
"Unresolved CFD-DEM modeling of multiphase flow in densely packed particle beds",
Applied Mathematical Modelling
:line

View File

@ -0,0 +1,59 @@
<!-- HTML_ONLY -->
<HEAD>
<META CHARSET="utf-8">
</HEAD>
<!-- END_HTML_ONLY -->
"CFDEMproject Website"_lws - "Main Page"_main :c
:link(lws,http://www.cfdem.com)
:link(main,CFDEMcoupling_Manual.html)
:line
cfdemSolverRhoPimple command :h3
[Description:]
<!-- HTML_ONLY -->
"cfdemSolverRhoPimple" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM&reg;(*) solver rhoPimpleFoam, this is a
transient solver for compressible flow using the flexible PIMPLE (PISO-SIMPLE)
algorithm, coupled with the DEM code LIGGGHTS for solid particles.
<!-- END_HTML_ONLY -->
<!-- RST
"cfdemSolverRhoPimple" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM\ |reg|\ (*) solver rhoPimpleFoam, this is a
transient solver for compressible flow using the flexible PIMPLE (PISO-SIMPLE)
algorithm, coupled with the DEM code LIGGGHTS for solid particles.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->
:line
<!-- HTML_ONLY -->
NOTE:
(*) This offering is not approved or endorsed by OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com, and owner of the
OPENFOAM&reg; and OpenCFD&reg; trade marks.
OPENFOAM&reg; is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
<!-- END_HTML_ONLY -->
<!-- RST
.. note::
(*) This offering is not approved or endorsed by OpenCFD Limited, producer
and distributor of the OpenFOAM software via www.openfoam.com, and owner of
the OPENFOAM\ |reg| and OpenCFD\ |reg| trade marks.
OPENFOAM\ |reg| is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->

View File

@ -0,0 +1,63 @@
<!-- HTML_ONLY -->
<HEAD>
<META CHARSET="utf-8">
</HEAD>
<!-- END_HTML_ONLY -->
"CFDEMproject Website"_lws - "Main Page"_main :c
:link(lws,http://www.cfdem.com)
:link(main,CFDEMcoupling_Manual.html)
:line
cfdemSolverRhoPimpleChem command :h3
[Description:]
<!-- HTML_ONLY -->
"cfdemSolverRhoPimpleChem" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM&reg;(*) solver rhoPimpleFoam, this is a
transient solver for compressible flow using the flexible PIMPLE (PISO-SIMPLE)
algorithm, coupled with the DEM code LIGGGHTS for solid particles.
Compared to cfdemSolverRhoPimple this solver adds functionality for chemical
reactions.
<!-- END_HTML_ONLY -->
<!-- RST
"cfdemSolverRhoPimpleChem" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM\ |reg|\ (*) solver rhoPimpleFoam, this is a
transient solver for compressible flow using the flexible PIMPLE (PISO-SIMPLE)
algorithm, coupled with the DEM code LIGGGHTS for solid particles.
Compared to cfdemSolverRhoPimple this solver adds functionality for chemical
reactions.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->
:line
<!-- HTML_ONLY -->
NOTE:
(*) This offering is not approved or endorsed by OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com, and owner of the
OPENFOAM&reg; and OpenCFD&reg; trade marks.
OPENFOAM&reg; is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
<!-- END_HTML_ONLY -->
<!-- RST
.. note::
(*) This offering is not approved or endorsed by OpenCFD Limited, producer
and distributor of the OpenFOAM software via www.openfoam.com, and owner of
the OPENFOAM\ |reg| and OpenCFD\ |reg| trade marks.
OPENFOAM\ |reg| is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->

View File

@ -0,0 +1,59 @@
<!-- HTML_ONLY -->
<HEAD>
<META CHARSET="utf-8">
</HEAD>
<!-- END_HTML_ONLY -->
"CFDEMproject Website"_lws - "Main Page"_main :c
:link(lws,http://www.cfdem.com)
:link(main,CFDEMcoupling_Manual.html)
:line
cfdemSolverRhoSimple command :h3
[Description:]
<!-- HTML_ONLY -->
"cfdemSolverRhoSimple" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM&reg;(*) solver rhoSimpleFoam, this is a
steady-state solver for turbulent flow of compressible fluids coupled with the
DEM code LIGGGHTS for solid particles.
<!-- END_HTML_ONLY -->
<!-- RST
"cfdemSolverRhoSimple" is a coupled CFD-DEM solver using the CFDEMcoupling
framework. Based on the OpenFOAM\ |reg|\ (*) solver rhoSimpleFoam, this is a
steady-state solver for turbulent flow of compressible fluids coupled with the
DEM code LIGGGHTS for solid particles.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->
:line
<!-- HTML_ONLY -->
NOTE:
(*) This offering is not approved or endorsed by OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com, and owner of the
OPENFOAM&reg; and OpenCFD&reg; trade marks.
OPENFOAM&reg; is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
<!-- END_HTML_ONLY -->
<!-- RST
.. note::
(*) This offering is not approved or endorsed by OpenCFD Limited, producer
and distributor of the OpenFOAM software via www.openfoam.com, and owner of
the OPENFOAM\ |reg| and OpenCFD\ |reg| trade marks.
OPENFOAM\ |reg| is a registered trade mark of OpenCFD Limited, producer and
distributor of the OpenFOAM software via www.openfoam.com.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
END_RST -->

View File

@ -23,7 +23,7 @@ diffusionCoefficientsProps
diffusantGasNames ( speciesNames );
\} :pre
{switch1} = (optional, normally off) flag to give information :ulb,l
{switch1} = (optional, default false) flag to output verbose information :ulb,l
{ChemistryFile} = path to file, where the reacting species are listed :l
{diffusantGasNames} = list of gas field names that are the reactant gases :l
:ule

View File

@ -21,7 +21,7 @@ massTransferCoeffProps
verbose switch1;
\} :pre
{switch1} = (optional, normally off) flag to give information :l
{switch1} = (optional, default false) flag to output verbose information :l
:ule
[Examples:]

View File

@ -0,0 +1,54 @@
"CFDEMproject Website"_lws - "Main Page"_main :c
:link(lws,http://www.cfdem.com)
:link(main,CFDEMcoupling_Manual.html)
:line
chemistryModel reactantPerParticle command :h3
[Syntax:]
Defined in "couplingProperties"_CFDEMcoupling_dicts.html#couplingProperties
dictionary.
chemistryModels
(
reactantPerParticle
);
reactantPerParticleProps
\{
voidfractionFieldName "voidfraction";
Nevery number1;
\} :pre
{voidfraction} = (optional, default "voidfraction") name of the finite volume void fraction field :l
{number1} = (optional, default 1) number to adjust execution interval :l
:ule
[Examples:]
chemistryModels
(
reactantPerParticle
);
reactantPerParticleProps
\{
voidfractionFieldName "voidfraction";
Nevery 1;
\} :pre
[Description:]
The chemistry model performs the calculation of chemical reactional effects
acting on each DEM particle. The reactantPerParticle model is the model to
communicate the available reactant per particle.
[Restrictions:]
none
[Related commands:]
"chemistryModel"_chemistryModel.html

View File

@ -26,16 +26,18 @@ speciesProps
partTempName "partTemp";
partRhoName "partRho";
verbose switch1;
Nevery number1;
\} :pre
{ChemistryFile} = path to file, where the reacting species are listed :ulb,l
{T} = name of the finite volume temperature field, it is already added in default and doesn't need to be specified if name is the same :l
{rho} = name of the finite volume density field, it is already added in default and doesn't need to be specified if name is the same :l
{voidfraction} = name of the finite volume void fraction field, it is already added in default and doesn't need to be specified if name is the same :l
{molarConc} = name of the finite volume molar concentration field, it is already added in default and doesn't need to be specified if name is the same :l
{partTemp} = name of the finite volume cell averaged particle temperature field, it is already added in default and doesn't need to be specified if name is the same :l
{partRho} = name of the finite volume cell averaged density temperature field, it is already added in default and doesn't need to be specified if name is the same :l
{switch1} = (optional, normally off) flag to give information :l
{T} = (optional, default "T") name of the finite volume temperature field :l
{rho} = (optional, default "rho") name of the finite volume density field :l
{voidfraction} = (optional, default "voidfraction") name of the finite volume void fraction field :l
{molarConc} = (optional, default "molarConc") name of the finite volume molar concentration field :l
{partTemp} = (optional, default "partTemp") name of the finite volume cell averaged particle temperature field :l
{partRho} = (optional, default "partRho") name of the finite volume cell averaged density temperature field :l
{switch1} = (optional, default false) flag to output verbose information :l
{number1} = (optional, default 1) number to adjust execution interval :l
:ule
[Examples:]

View File

@ -1,46 +0,0 @@
<HTML>
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
</CENTER>
<HR>
<H3>dataExchangeModel_twoWayOne2One command
</H3>
<P><B>Syntax:</B>
</P>
<P>Defined in couplingProperties dictionary.
</P>
<PRE>dataExchangeModel twoWayOne2One;
twoWayOne2OneProps
{
liggghtsPath "path";
};
</PRE>
<UL><LI><I>path</I> = path to the DEM simulation input file
</UL>
<P><B>Examples:</B>
</P>
<PRE>dataExchangeModel twoWayOne2One;
twoWayOne2OneProps
{
liggghtsPath "../DEM/in.liggghts_init";
}
</PRE>
<P><B>Description:</B>
</P>
<P>The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayOne2One model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using a more sophisticated mapping scheme than twoWayMPI / all2all and scales much better for large systems and many cores. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
</P>
<P><B>Restrictions:</B>
</P>
<P>Must be used in combination with the engineSearchMany2Many locate model! Use the "one2one" cfd datacoupling option in fix couple/cfd in LIGGGHTS!
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "dataExchangeModel.html">dataExchangeModel</A>
</P>
</HTML>

View File

@ -14,10 +14,12 @@ Defined in couplingProperties dictionary.
dataExchangeModel twoWayOne2One;
twoWayOne2OneProps
\{
liggghtsPath "path";
liggghtsPath "path";
useStaticProcMap switch1;
\}; :pre
{path} = path to the DEM simulation input file :ulb,l
{path} = path to the DEM simulation input file :ulb,l
{switch1} = (optional, default no) switch to determine if the map is built once (yes) or every coupling step (no) :l
:ule
[Examples:]
@ -25,17 +27,20 @@ twoWayOne2OneProps
dataExchangeModel twoWayOne2One;
twoWayOne2OneProps
\{
liggghtsPath "../DEM/in.liggghts_init";
liggghtsPath "../DEM/in.liggghts_init";
useStaticProcMap yes;
\} :pre
[Description:]
The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayOne2One model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using a more sophisticated mapping scheme than twoWayMPI / all2all and scales much better for large systems and many cores. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayOne2One model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using a more sophisticated mapping scheme than twoWayMPI / all2all and scales much better for large systems and many cores. The DEM run is executed by the coupling model, via a liggghtsCommandModel object. Only use staticProcMap yes if no load balancing is employed.
[Restrictions:]
Must be used in combination with the engineSearchMany2Many locate model! Use the "one2one" cfd datacoupling option in fix couple/cfd in LIGGGHTS!
Some warnings may be given for particles that have not been located - this is due to LIGGGHTS' treatment of domain crossers.
[Related commands:]
"dataExchangeModel"_dataExchangeModel.html

View File

@ -47,7 +47,7 @@ performed on a separate (smooth) field which uses the calculated (un-smooth)
field as a reference.
Thus its usage is limited and CANNOT be used to smooth the exchange fields
similar to other smoothing models.
For further information see Vångö et al., "Unresolved CFDDEM modeling of
For further information see Vångö et al., "Unresolved CFD-DEM modeling of
multiphase flow in densely packed particle beds", Appl. Math. Model. (2018).
[Restrictions:]

View File

@ -17,7 +17,7 @@
#------------------------------------------------------------------------------
export CFDEM_PROJECT=CFDEM
export CFDEM_VERSION=18.10
export CFDEM_VERSION=19.02
################################################################################
# USER EDITABLE PART: Changes made here may be lost with the next upgrade

View File

@ -15,7 +15,7 @@
#------------------------------------------------------------------------------
setenv CFDEM_PROJECT CFDEM
setenv CFDEM_VERSION 18.10
setenv CFDEM_VERSION 19.02
################################################################################
# USER EDITABLE PART: Changes made here may be lost with the next upgrade

View File

@ -4,10 +4,10 @@ rcfdemSolverCoupledHeattransfer/dir
rStatAnalysis/dir
rcfdemSolverBase/dir
rtfmSolverSpecies/dir
cfdemSolverRhoPimple/dir
cfdemSolverPisoMS/dir
cfdemSolverPiso/dir
cfdemSolverRhoPimple/dir
cfdemSolverRhoSimple/dir
cfdemSolverIB/dir
cfdemSolverPisoScalar/dir
cfdemSolverRhoPimpleChem/dir

View File

@ -159,6 +159,8 @@ $(dataExchangeModels)/oneWayVTK/oneWayVTK.C
$(dataExchangeModels)/twoWayFiles/twoWayFiles.C
$(dataExchangeModels)/noDataExchange/noDataExchange.C
$(dataExchangeModels)/twoWayMPI/twoWayMPI.C
$(dataExchangeModels)/twoWayOne2One/twoWayOne2One.C
$(dataExchangeModels)/twoWayOne2One/one2one.C
$(averagingModels)/averagingModel/averagingModel.C
$(averagingModels)/averagingModel/newAveragingModel.C

View File

@ -34,8 +34,8 @@ Description
#ifndef versionInfo_H
#define versionInfo_H
word CFDEMversion="PFM 18.10";
word compatibleLIGGGHTSversion="PFM 18.10";
word CFDEMversion="PFM 19.02";
word compatibleLIGGGHTSversion="PFM 19.02";
word OFversion="4.x";
Info << "\nCFDEMcoupling version: " << CFDEMversion << endl;

View File

@ -312,7 +312,7 @@ void diffusionCoefficient::execute()
TotalFraction_[i] += Xfluid_[j]/dBinary_;
// dCoeff -- diffusion component of diffusant gas
MixtureBinaryDiffusion_[i] = (1.0-XfluidDiffusant_[i])/TotalFraction_[i];
MixtureBinaryDiffusion_[i] = (1.0-XfluidDiffusant_[i])/TotalFraction_[i];
if(verbose_)
{

View File

@ -72,7 +72,7 @@ private:
// gas pressure at particle location
word pressureFieldName_;
const volScalarField& P_;
const volScalarField& P_;
word partPressureName_;

View File

@ -109,8 +109,6 @@ void reactantPerParticle::reAllocMyArrays() const
void reactantPerParticle::execute()
{
loopCounter_++;
if (loopCounter_ % Nevery_ != 0)
{
@ -121,7 +119,7 @@ void reactantPerParticle::execute()
particlesPerCell_ *= 0.0;
label cellI=0;
label cellI=0;
scalar voidfraction(1);
scalar cellvolume(0.0);
scalar particlesPerCell(1.0);
@ -133,7 +131,7 @@ void reactantPerParticle::execute()
if (cellI >= 0)
{
particlesPerCell_[cellI] += 1.0;
}
}
}
// no fill array and communicate it
@ -151,7 +149,7 @@ void reactantPerParticle::execute()
// give DEM data
particleCloud_.dataExchangeM().giveData("reactantPerParticle", "scalar-atom", reactantPerParticle_);
Info << "give data done" << endl;
}

View File

@ -245,20 +245,20 @@ public:
virtual int getNumberOfTypes() const;
virtual double* getTypeVol() const;
inline void setPositions(label n,double* pos) const
inline void setPositions(label n,double* pos)
{
for (int i=0;i<n;i++)
for (int j=0;j<3;j++)
particleCloud_.positions_[i][j]=pos[i*3+j];
}
inline void setCellIDs(label n,int* ID) const
inline void setCellIDs(label n,int* ID)
{
for (int i=0;i<n;i++)
particleCloud_.cellIDs_[i][0]=ID[i];
}
inline void setCellIDs(DynamicList<label> const& ids) const
inline void setCellIDs(DynamicList<label> const& ids)
{
for (int i = 0; i < ids.size(); i++)
{

View File

@ -213,7 +213,7 @@ void One2One::exchange(T *&src, T *&dst, int data_length)
if (offset_local > -1)
{
const int max_locali = nlocal_ * data_length;
for
for
(
int locali = 0;
locali < max_locali;
@ -283,4 +283,4 @@ void One2One::deallocate()
delete [] request_;
delete [] status_;
}
}

View File

@ -23,7 +23,7 @@ Copyright 2018- Paul Kieckhefen, TUHH
#include <mpi.h>
class One2One
class One2One
{
public:
One2One(MPI_Comm);

View File

@ -161,7 +161,7 @@ twoWayOne2One::twoWayOne2One
}
}
void twoWayOne2One::createProcMap() const
void twoWayOne2One::createProcMap()
{
List<treeBoundBox> foamBoxes(Pstream::nProcs());
foamBoxes[Pstream::myProcNo()] = thisFoamBox_;
@ -529,7 +529,7 @@ void inline twoWayOne2One::destroy(int* array) const
}
//==============
bool twoWayOne2One::couple(int i) const
bool twoWayOne2One::couple(int i)
{
bool coupleNow = false;
if (i==0)
@ -554,11 +554,11 @@ bool twoWayOne2One::couple(int i) const
// Check if exact timing is needed
// get time for execution
// store time for execution in list
if(particleCloud_.liggghtsCommand()[i]().exactTiming())
if(particleCloud_.liggghtsCommand(i).exactTiming())
{
exactTiming = true;
DynamicList<scalar> h
= particleCloud_.liggghtsCommand()[i]().executionsWithinPeriod
DynamicList<scalar> h
= particleCloud_.liggghtsCommand(i).executionsWithinPeriod
(
TSstart(),
TSend()
@ -594,7 +594,7 @@ bool twoWayOne2One::couple(int i) const
<< endl;
}
if(particleCloud_.liggghtsCommand()[i]().type() == "runLiggghts")
if(particleCloud_.liggghtsCommand(i).type() == "runLiggghts")
{
runComNr = i;
}
@ -613,22 +613,22 @@ bool twoWayOne2One::couple(int i) const
{
// set run command till interrupt
DEMstepsRun += DEMstepsToInterrupt[j];
particleCloud_.liggghtsCommand()[runComNr]().set(DEMstepsToInterrupt[j]);
const char* command = particleCloud_.liggghtsCommand()[runComNr]().command(0);
particleCloud_.liggghtsCommand(runComNr).set(DEMstepsToInterrupt[j]);
const char* command = particleCloud_.liggghtsCommand(runComNr).command(0);
Info<< "Executing run command: '"<< command <<"'"<< endl;
lmp->input->one(command);
// run liggghts command with exact timing
command = particleCloud_.liggghtsCommand()[lcModel[j]]().command(0);
command = particleCloud_.liggghtsCommand(lcModel[j]).command(0);
Info << "Executing command: '"<< command <<"'"<< endl;
lmp->input->one(command);
}
// do the run
if(particleCloud_.liggghtsCommand()[runComNr]().runCommand(couplingStep()))
if(particleCloud_.liggghtsCommand(runComNr).runCommand(couplingStep()))
{
particleCloud_.liggghtsCommand()[runComNr]().set(couplingInterval() - DEMstepsRun);
const char* command = particleCloud_.liggghtsCommand()[runComNr]().command(0);
particleCloud_.liggghtsCommand(runComNr).set(couplingInterval() - DEMstepsRun);
const char* command = particleCloud_.liggghtsCommand(runComNr).command(0);
Info<< "Executing run command: '"<< command <<"'"<< endl;
lmp->input->one(command);
}
@ -638,14 +638,14 @@ bool twoWayOne2One::couple(int i) const
{
if
(
! particleCloud_.liggghtsCommand()[i]().exactTiming() &&
particleCloud_.liggghtsCommand()[i]().runCommand(couplingStep())
! particleCloud_.liggghtsCommand(i).exactTiming() &&
particleCloud_.liggghtsCommand(i).runCommand(couplingStep())
)
{
commandLines=particleCloud_.liggghtsCommand()[i]().commandLines();
commandLines=particleCloud_.liggghtsCommand(i).commandLines();
for(int j=0;j<commandLines;j++)
{
const char* command = particleCloud_.liggghtsCommand()[i]().command(j);
const char* command = particleCloud_.liggghtsCommand(i).command(j);
Info << "Executing command: '"<< command <<"'"<< endl;
lmp->input->one(command);
}
@ -657,12 +657,12 @@ bool twoWayOne2One::couple(int i) const
{
forAll(particleCloud_.liggghtsCommandModelList(),i)
{
if(particleCloud_.liggghtsCommand()[i]().runCommand(couplingStep()))
if(particleCloud_.liggghtsCommand(i).runCommand(couplingStep()))
{
commandLines=particleCloud_.liggghtsCommand()[i]().commandLines();
commandLines=particleCloud_.liggghtsCommand(i).commandLines();
for(int j=0;j<commandLines;j++)
{
const char* command = particleCloud_.liggghtsCommand()[i]().command(j);
const char* command = particleCloud_.liggghtsCommand(i).command(j);
Info << "Executing command: '"<< command <<"'"<< endl;
lmp->input->one(command);
}
@ -700,7 +700,7 @@ bool twoWayOne2One::couple(int i) const
return coupleNow;
}
void twoWayOne2One::setupLig2FoamCommunication() const
void twoWayOne2One::setupLig2FoamCommunication()
{
int* src_procs = new int[thisLigPartner_.size()];
for (int proci = 0; proci < thisLigPartner_.size(); proci++)
@ -738,7 +738,7 @@ void twoWayOne2One::setupLig2FoamCommunication() const
}
void twoWayOne2One::locateParticles() const
void twoWayOne2One::locateParticles()
{
// get positions for locate
double** my_positions = static_cast<double**>(lmp->atom->x);
@ -823,7 +823,7 @@ void twoWayOne2One::locateParticles() const
<< " ouf of " << returnReduce(lmp->atom->nlocal, sumOp<label>())
<< " particles in FOAM. "
<< endl;
}
}
// copy positions/cellids/ids of located particles into arrays
allocateArray(lig2foam_ids_, 0, getNumberOfParticles());
@ -847,7 +847,7 @@ void twoWayOne2One::locateParticles() const
setCellIDs(cellIds);
}
void twoWayOne2One::setupFoam2LigCommunication() const
void twoWayOne2One::setupFoam2LigCommunication()
{
int* src_procs = new int[thisFoamPartner_.size()];
for (int proci = 0; proci < thisFoamPartner_.size(); proci++)
@ -955,12 +955,6 @@ void twoWayOne2One::extractCollected(T*& src, T**& dst, int width) const
}
}
int twoWayOne2One::getNumberOfParticles() const
{
return particleCloud_.numberOfParticles();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -28,8 +28,8 @@ Description
enhanced two way DEM-CFD coupling via MPI.
Compared to twoWayMPI, no Allreduces are used for communication.
Instead, a geomatric map between FOAM and LIG domains is created and
subsequently used for communication.
Instead, a geometric map between FOAM and LIG domains is created and
subsequently used for communication.
Class
twoWayOne2One
@ -67,7 +67,7 @@ Contributing authors
#include <atom.h>
#include <memory.h>
#include <library.h>
#include <library_cfd_coupling_one2one.h>
#include <library_cfd_coupling.h>
#include <update.h>
#include <comm.h>
#include <fix.h>
@ -92,20 +92,20 @@ private:
// private data
dictionary propsDict_;
mutable MPI_Comm comm_liggghts_;
MPI_Comm comm_liggghts_;
// LIG ranks from which to retrieve particle data
mutable labelList thisLigPartner_;
mutable labelList thisFoamPartner_;
labelList thisLigPartner_;
labelList thisFoamPartner_;
mutable One2One* lig2foam_;
mutable One2One* foam2lig_;
One2One* lig2foam_;
One2One* foam2lig_;
mutable bool* lig2foam_mask_;
bool* lig2foam_mask_;
mutable int* lig2foam_ids_;
mutable int* foam2lig_ids_;
int* lig2foam_ids_;
int* foam2lig_ids_;
mutable double* lig2foam_vec_tmp_;
mutable double* lig2foam_scl_tmp_;
@ -113,11 +113,11 @@ private:
mutable double* foam2lig_vec_tmp_;
mutable double* foam2lig_scl_tmp_;
mutable Switch staticProcMap_;
mutable Switch cellIdComm_;
mutable double* prev_cell_ids_;
mutable double** dbl_cell_ids_;
mutable LAMMPS_NS::FixPropertyAtom* my_prev_cell_ids_fix_;
Switch staticProcMap_;
Switch cellIdComm_;
double* prev_cell_ids_;
double** dbl_cell_ids_;
LAMMPS_NS::FixPropertyAtom* my_prev_cell_ids_fix_;
const scalar boundBoxMargin_;
@ -129,16 +129,16 @@ private:
// private member functions
//- creates a geometric mapping between FOAM and LIG domains
void createProcMap() const;
void createProcMap();
//- create a One2One communicator which transfers from LIG to FOAM
void setupLig2FoamCommunication() const;
void setupLig2FoamCommunication();
//- locates particles received from Lig
void locateParticles() const;
void locateParticles();
//- create a One2One communicator which transfers from FOAM to LIG
void setupFoam2LigCommunication() const;
void setupFoam2LigCommunication();
protected:
LAMMPS_NS::LAMMPS *lmp;
@ -210,11 +210,11 @@ public:
void inline destroy(int*) const;
//==============
bool couple(int) const;
bool couple(int);
//- extractCollected takes the collected data from Lig
// present in this Foam domain and applies the mask.
// the width parameter can be used for reshaping.
// the width parameter can be used for reshaping.
template <typename T>
void extractCollected(T**&, T**&, int width=1) const;
template <typename T>
@ -222,9 +222,7 @@ public:
template <typename T>
void extractCollected(T*&, T**&, int width=1) const;
int getNumberOfParticles() const;
void setCG() { particleCloud_.setCG(lmp->force->cg()); }
scalar getCG() const { return lmp->force->cg(); }
};

View File

@ -74,7 +74,7 @@ energyModel::~energyModel()
scalar energyModel::Cp() const
{
return Cp_;
return Cp_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -43,13 +43,13 @@ protected:
const dictionary& dict_;
cfdemCloudEnergy& particleCloud_;
IOdictionary transportProperties_;
scalar kf0_; // fluid thermal conductivity [W/(m*K)]
scalar Cp_; // specific heat capacity [W*s/(kg*K)]
IOdictionary transportProperties_;
scalar kf0_; // fluid thermal conductivity [W/(m*K)]
scalar Cp_; // specific heat capacity [W*s/(kg*K)]
public:
//- Runtime type information
@ -76,7 +76,7 @@ public:
energyModel
(
const dictionary& dict,
cfdemCloudEnergy& sm
cfdemCloudEnergy& sm
);
@ -98,16 +98,16 @@ public:
// Member Functions
virtual void addEnergyContribution(volScalarField&) const = 0;
virtual void addEnergyCoefficient(volScalarField&) const = 0;
virtual void calcEnergyContribution() = 0;
virtual void postFlow() {}
virtual void solve() {}
scalar Cp() const;
virtual void addEnergyCoefficient(volScalarField&) const = 0;
virtual void calcEnergyContribution() = 0;
virtual void postFlow() {}
virtual void solve() {}
scalar Cp() const;
virtual scalar aveTpart() const
{

View File

@ -21,6 +21,7 @@ License
#include "error.H"
#include "heatTransferGunn.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -481,7 +482,7 @@ void heatTransferGunn::heatFlux(label index, scalar h, scalar As, scalar Tfluid,
{
scalar hAs = h * As * cg3;
if (particleCloud_.getParticleEffVolFactors())
if (particleCloud_.getParticleEffVolFactors())
{
scalar effVolFac = particleCloud_.particleEffVolFactor(index);
hAs *= effVolFac;
@ -550,22 +551,22 @@ void heatTransferGunn::postFlow()
void heatTransferGunn::partTempField()
{
partTempField_.primitiveFieldRef() = 0.0;
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
partTempField_,
partTemp_,
particleCloud_.particleWeights(),
particleCloud_.averagingM().UsWeightField(),
NULL
);
partTempField_.primitiveFieldRef() = 0.0;
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
partTempField_,
partTemp_,
particleCloud_.particleWeights(),
particleCloud_.averagingM().UsWeightField(),
NULL
);
dimensionedScalar denom = partTempAve_ - partRefTemp_;
if (denom.value() < SMALL && denom.value() > -SMALL) denom.value() = SMALL;
partRelTempField_ = (partTempField_ - partTempAve_) / denom;
dimensionedScalar denom = partTempAve_ - partRefTemp_;
if (denom.value() < SMALL && denom.value() > -SMALL) denom.value() = SMALL;
partRelTempField_ = (partTempField_ - partTempAve_) / denom;
Info << "heatTransferGunn: average part. temp = " << partTempAve_.value() << endl;
Info << "heatTransferGunn: average part. temp = " << partTempAve_.value() << endl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -28,6 +28,7 @@ License
#include "fvCFD.H"
#include "cfdemCloudEnergy.H"
#include "energyModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -85,13 +86,13 @@ protected:
word tempFieldName_;
const volScalarField& tempField_; // ref to temperature field
const volScalarField& tempField_; // ref to temperature field
word voidfractionFieldName_;
const volScalarField& voidfraction_; // ref to voidfraction field
const volScalarField& voidfraction_; // ref to voidfraction field
scalar maxSource_; // max (limited) value of src field
scalar maxSource_; // max (limited) value of src field
word velFieldName_;
@ -153,11 +154,11 @@ public:
void addEnergyContribution(volScalarField&) const;
void addEnergyCoefficient(volScalarField&) const;
void addEnergyCoefficient(volScalarField&) const;
void calcEnergyContribution();
void calcEnergyContribution();
void postFlow();
void postFlow();
};

View File

@ -45,7 +45,7 @@ heatTransferGunnPartField::heatTransferGunnPartField
:
heatTransferGunn(dict,sm),
partCpField_
(
(
IOobject
(
"partCp",
@ -82,15 +82,15 @@ heatTransferGunnPartField::heatTransferGunnPartField
{
FatalError << "heatTransferGunnPartField: provide list of specific heat capacities." << abort(FatalError);
}
if (propsDict_.found("pTMax"))
{
pTMax_.value()=scalar(readScalar(propsDict_.lookup("pTMax")));
pTMax_.value()=scalar(readScalar(propsDict_.lookup("pTMax")));
}
if (propsDict_.found("pTMin"))
{
pTMin_.value()=scalar(readScalar(propsDict_.lookup("pTMin")));
pTMin_.value()=scalar(readScalar(propsDict_.lookup("pTMin")));
}
partTempField_.writeOpt() = IOobject::AUTO_WRITE;

View File

@ -15,7 +15,7 @@ License
along with this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
Description
Correlation for Nusselt number according to
Gunn, D. J. International Journal of Heat and Mass Transfer 21.4 (1978)
@ -30,6 +30,7 @@ License
#include "heatTransferGunn.H"
#include "fvOptions.H"
#include "scalarList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -88,9 +89,9 @@ public:
// Member Functions
void addEnergyContribution(volScalarField&) const;
void calcEnergyContribution();
void calcEnergyContribution();
void postFlow();
void postFlow();
void solve();

View File

@ -22,6 +22,7 @@ License
#include "reactionHeat.H"
#include "addToRunTimeSelectionTable.H"
#include "dataExchangeModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -24,6 +24,7 @@ License
#include "fvCFD.H"
#include "cfdemCloudEnergy.H"
#include "energyModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -66,24 +67,24 @@ public:
// Constructors
//- Construct from components
reactionHeat
(
const dictionary& dict,
cfdemCloudEnergy& sm
);
//- Construct from components
reactionHeat
(
const dictionary& dict,
cfdemCloudEnergy& sm
);
// Destructor
virtual ~reactionHeat();
virtual ~reactionHeat();
// Member Functions
void addEnergyContribution(volScalarField&) const;
void addEnergyContribution(volScalarField&) const;
void addEnergyCoefficient(volScalarField&) const {}
void addEnergyCoefficient(volScalarField&) const {}
void calcEnergyContribution();
void calcEnergyContribution();
};

View File

@ -19,6 +19,7 @@ License
#include "expParticleForces.H"
#include "mathExtra.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -26,6 +26,7 @@ SourceFiles
#define expParticleForces_H
#include "otherForceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -19,6 +19,7 @@ License
#include "gravity.H"
#include "mathExtra.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -26,6 +26,7 @@ SourceFiles
#define gravity_H
#include "otherForceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -18,6 +18,7 @@ License
#include "error.H"
#include "otherForceModel.H"
#include "mathExtra.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -28,6 +28,7 @@ SourceFiles
#include "fvCFD.H"
#include "cfdemCloud.H"
#include "probeModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -19,6 +19,7 @@ License
#include "weightSecondaryPhase.H"
#include "mathExtra.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -82,11 +83,11 @@ tmp<volVectorField> weightSecondaryPhase::exportForceField()
)
)
);
volVectorField& source = tsource.ref();
source = rho_ * alpha_ * g_;
return tsource;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -26,6 +26,7 @@ SourceFiles
#define weightSecondaryPhase_H
#include "otherForceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -48,12 +49,12 @@ protected:
word volfracFieldName_;
const volScalarField& alpha_;
dimensionedScalar rho_;
const dimensionedVector g_;
public:
//- Runtime type information
@ -74,7 +75,6 @@ public:
virtual ~weightSecondaryPhase();
// Member Functions

View File

@ -6,7 +6,7 @@
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
Copyright (C) 2013- Graz University of
Copyright (C) 2013- Graz University of
Technology, IPPT
-------------------------------------------------------------------------------
License
@ -91,7 +91,7 @@ public:
bool doSmoothing() const;
//void dSmoothing(volScalarField&) const;
void smoothen(volScalarField&) const;
void smoothen(volVectorField&) const;

View File

@ -57,9 +57,9 @@ temporalSmoothing::temporalSmoothing
gamma_(readScalar(propsDict_.lookup("gamma")))
{
if(propsDict_.found("verbose"))
if(propsDict_.found("verbose"))
verbose_ = true;
checkFields(sSmoothField_);
checkFields(vSmoothField_);
}
@ -80,14 +80,14 @@ void Foam::temporalSmoothing::smoothen(volScalarField& fieldSrc) const
{
// Create scalar smooth field from virgin scalar smooth field template
volScalarField sSmoothField = sSmoothField_;
sSmoothField.dimensions().reset(fieldSrc.dimensions());
sSmoothField.ref()=fieldSrc.internalField();
sSmoothField.correctBoundaryConditions();
sSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions());
sSmoothField.oldTime()=fieldSrc;
sSmoothField.oldTime().correctBoundaryConditions();
volScalarField refField = particleCloud_.mesh().lookupObject<volScalarField>(refFieldName_);
// do smoothing
@ -103,8 +103,8 @@ void Foam::temporalSmoothing::smoothen(volScalarField& fieldSrc) const
forAll(sSmoothField,cellI)
{
sSmoothField[cellI]=max(lowerLimit_,min(upperLimit_,sSmoothField[cellI]));
}
}
// get data from working sSmoothField - will copy only values at new time
fieldSrc=sSmoothField;
fieldSrc.correctBoundaryConditions();
@ -122,16 +122,16 @@ void Foam::temporalSmoothing::smoothen(volVectorField& fieldSrc) const
{
// Create scalar smooth field from virgin scalar smooth field template
volVectorField vSmoothField = vSmoothField_;
vSmoothField.dimensions().reset(fieldSrc.dimensions());
vSmoothField.ref()=fieldSrc.internalField();
vSmoothField.correctBoundaryConditions();
vSmoothField.oldTime().dimensions().reset(fieldSrc.dimensions());
vSmoothField.oldTime()=fieldSrc;
vSmoothField.oldTime().correctBoundaryConditions();
volVectorField refField = particleCloud_.mesh().lookupObject<volVectorField>(refFieldName_);
dimensionedScalar deltaT = vSmoothField.mesh().time().deltaT();
solve
(
@ -142,7 +142,7 @@ void Foam::temporalSmoothing::smoothen(volVectorField& fieldSrc) const
// get data from working vSmoothField
fieldSrc=vSmoothField;
fieldSrc.correctBoundaryConditions();
fieldSrc.correctBoundaryConditions();
if(verbose_)
{
@ -150,7 +150,7 @@ void Foam::temporalSmoothing::smoothen(volVectorField& fieldSrc) const
Info << "min/max(fieldSrc): " << min(fieldSrc) << tab << max(fieldSrc) << endl;
Info << "min/max(fieldSrc.oldTime): " << min(fieldSrc.oldTime()) << tab << max(fieldSrc.oldTime()) << endl;
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -79,7 +79,7 @@ public:
bool doSmoothing() const;
//void dSmoothing(volScalarField&) const;
void smoothen(volScalarField&) const;
void smoothen(volVectorField&) const;

View File

@ -48,24 +48,24 @@ class SyamlalThermCond
:
public thermCondModel
{
private:
dictionary propsDict_;
word thermCondFieldName_;
volScalarField& thermCondField_;
word voidfractionFieldName_;
const volScalarField& voidfraction_;
word wallQFactorName_;
// ratio of half-cell-size and near-wall film
mutable volScalarField wallQFactor_;
bool hasWallQFactor_;
public:

View File

@ -49,9 +49,9 @@ class ZehnerSchluenderThermCond
:
public thermCondModel
{
private:
dictionary propsDict_;
word partKsFieldName_;
@ -59,18 +59,18 @@ private:
volScalarField& partKsField_;
word voidfractionFieldName_;
const volScalarField& voidfraction_;
scalarList typeKs_;
mutable double **partKs_;
word wallQFactorName_;
// ratio of half-cell-size and near-wall film
mutable volScalarField wallQFactor_;
bool hasWallQFactor_;
void allocateMyArrays() const;

View File

@ -22,6 +22,7 @@ License
#include "noThermCond.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -33,6 +33,7 @@ SourceFiles
#include "fvCFD.H"
#include "cfdemCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -51,10 +52,10 @@ protected:
const dictionary& dict_;
cfdemCloud& particleCloud_;
IOdictionary transportProperties_;
dimensionedScalar kf0_;
IOdictionary transportProperties_;
dimensionedScalar kf0_;
public:
@ -103,7 +104,7 @@ public:
// Member Functions
virtual void calcThermCond() {}
};