Skip to content

Commit

Permalink
Merge pull request #73 from ParticulateFlow/release
Browse files Browse the repository at this point in the history
CFDEMcoupling-PFM 18.10 release
  • Loading branch information
danielque committed Oct 9, 2018
2 parents ca5a69d + 288ddfa commit 382c720
Show file tree
Hide file tree
Showing 338 changed files with 15,190 additions and 5,947 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
log_*
log.*
*~

**/linux*Gcc*/

lnInclude

1 change: 1 addition & 0 deletions applications/solvers/cfdemSolverPiso/Make/options
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ EXE_LIBS = \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)
1 change: 1 addition & 0 deletions applications/solvers/cfdemSolverPiso/UEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ fvVectorMatrix UEqn
+ fvm::div(phi,U) - fvm::Sp(fvc::div(phi),U)
+ particleCloud.divVoidfractionTau(U, voidfraction)
==
fvOptions(U)
- fvm::Sp(Ksl/rho,U)
);

Expand Down
12 changes: 6 additions & 6 deletions applications/solvers/cfdemSolverRhoPimple/EEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
particleCloud.energyContributions(Qsource);
particleCloud.energyCoefficients(QCoeff);

//thDiff=particleCloud.thermCondM().thermDiff();
thCond=particleCloud.thermCondM().thermCond();
//thDiff=particleCloud.thermCondM().thermDiff();
thCond=particleCloud.thermCondM().thermCond();

addSource = fvc::ddt(rhoeps, K) + fvc::div(phi, K)
+ (
Expand Down Expand Up @@ -39,7 +39,7 @@
==
fvOptions(rho, he)
);


EEqn.relax();

Expand All @@ -53,7 +53,7 @@

Info<< "T max/min : " << max(T).value() << " " << min(T).value() << endl;

particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
particleCloud.clockM().start(31,"energySolve");
particleCloud.solve();
particleCloud.clockM().stop("energySolve");
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ int main(int argc, char *argv[])
}
}

particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");

runTime.write();


Expand Down
51 changes: 51 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/EEqn.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// 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);

thCond=particleCloud.thermCondM().thermCond();
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();

fvScalarMatrix EEqn
(
fvm::ddt(rhoeps, he) + fvm::div(phi, he)
+ fvc::ddt(rhoeps, K) + fvc::div(phi, K)
+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), voidfraction*U),
p,
"div(phiv,p)"
)
: -dpdt
)
// net heat transfer from particles to fluid
- Qsource
- fvm::Sp(QCoeff/Cpv, he)
// thermal conduction of the fluid with effective conductivity
- fvm::laplacian(voidfraction*thCond/Cpv,he)
// + particle-fluid energy transfer due to work
// + fluid energy dissipation due to shearing
==
// + combustion->Sh()
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;
Info << "he min/max : " << max(he).value() << " " << min(he).value() << endl;

}
3 changes: 3 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/Make/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cfdemSolverRhoPimpleChem.C

EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoPimpleChem
60 changes: 60 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/Make/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs

PFLAGS+= -Dcompre

EXE_INC = \
$(PFLAGS) \
-I../. \
-I$(CFDEM_OFVERSION_DIR) \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \




EXE_LIBS = \
-L$(CFDEM_LIB_DIR) \
-lfiniteVolume \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lsampling \
-lfvOptions \
-l$(CFDEM_LIB_COMP_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS) \
-lliquidProperties \
-lliquidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiationModels \
-lregionModels \
-lsurfaceFilmModels \
-lODE \
-lcombustionModels
31 changes: 31 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/UEqn.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> tUEqn

(
fvm::ddt(rhoeps,U) + fvm::div(phi, U)
+ particleCloud.divVoidfractionTau(U, voidfraction)
+ fvm::Sp(Ksl,U)
==
fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();

UEqn.relax();

fvOptions.constrain(UEqn);

if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
{
solve(UEqn == -fvc::grad(p)+ Ksl*Us);

fvOptions.correct(U);
K = 0.5*magSqr(U);
}
else if (pimple.momentumPredictor())
{
solve(UEqn == -voidfraction*fvc::grad(p)+ Ksl*Us);

fvOptions.correct(U);
K = 0.5*magSqr(U);
}

75 changes: 75 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/YEqn.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
particleCloud.clockM().start(29,"Y");

tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);

{
combustion->correct();
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);

forAll(Y, i)
{
if (Y[i].name() == inertSpecie) inertIndex = i;
if (Y[i].name() != inertSpecie || propagateInertSpecie)
{
volScalarField& Yi = Y[i];

fvScalarMatrix YiEqn
(
fvm::ddt(rhoeps, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(voidfraction*turbulence->muEff(), Yi)
==
combustion->R(Yi)
+ particleCloud.chemistryM(0).Smi(i)
+ fvOptions(rho, Yi)
);

YiEqn.relax();

fvOptions.constrain(YiEqn);

YiEqn.solve(mesh.solver("Yi"));

fvOptions.correct(Yi);

Yi.max(0.0);
if (Y[i].name() != inertSpecie) Yt += Yi;
}
}

if (inertIndex!=-1)
{
Y[inertIndex].max(inertLowerBound);
Y[inertIndex].min(inertUpperBound);
}

if (propagateInertSpecie)
{
if (inertIndex!=-1) Yt /= (1-Y[inertIndex] + VSMALL);
forAll(Y,i)
{
if (i!=inertIndex)
{
volScalarField& Yi = Y[i];
Yi = Yi/(Yt+VSMALL);
}
}
}
else
{
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}
}
particleCloud.clockM().stop("Y");

0 comments on commit 382c720

Please sign in to comment.