Skip to content

Commit

Permalink
Merge pull request #100 from ParticulateFlow/release
Browse files Browse the repository at this point in the history
Release 20.05
  • Loading branch information
danielque committed Jun 17, 2020
2 parents e3765ec + 9e38718 commit bba5d13
Show file tree
Hide file tree
Showing 908 changed files with 8,127,509 additions and 32,784 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:

- run:
name: Make project and user dir
command: mkdir -p /root/CFDEM/CFDEMcoupling && mkdir -p /root/CFDEM/-4.1
command: mkdir -p /root/CFDEM/CFDEMcoupling && mkdir -p /root/CFDEM/-6

- checkout:
path: /root/CFDEM/CFDEMcoupling

- run:
name: Add OpenFOAM package repository
command: sudo apt-get install -y software-properties-common wget apt-transport-https && sudo add-apt-repository http://dl.openfoam.org/ubuntu && sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
command: sudo apt-get install -y software-properties-common wget apt-transport-https && sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" && sudo add-apt-repository http://dl.openfoam.org/ubuntu

- run:
name: Install OpenFOAM 4.1
command: sudo apt-get update && sudo apt-get -y install openfoam4
name: Install OpenFOAM 6
command: sudo apt-get update && sudo apt-get -y install openfoam6

- run:
name: Clone LIGGGHTS repository
Expand All @@ -42,7 +42,7 @@ jobs:
name: Build LIGGGHTS
command: >
shopt -s expand_aliases &&
source /opt/openfoam4/etc/bashrc &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileLIGGGHTS.sh
no_output_timeout: 30m
Expand All @@ -51,22 +51,22 @@ jobs:
name: Build CFDEMcoupling library
command: >
shopt -s expand_aliases &&
source /opt/openfoam4/etc/bashrc &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_src.sh
- run:
name: Build CFDEMcoupling solvers
command: >
shopt -s expand_aliases &&
source /opt/openfoam4/etc/bashrc &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_sol.sh
- run:
name: Build CFDEMcoupling utilities
command: >
shopt -s expand_aliases &&
source /opt/openfoam4/etc/bashrc &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_uti.sh
4 changes: 4 additions & 0 deletions applications/solvers/cfdemSolverMultiphase/Make/options
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)

include $(CFDEM_ADD_LIBS_DIR)/additionalLibs

EXE_INC = \
$(PFLAGS) \
-I$(CFDEM_OFVERSION_DIR) \
-ImultiphaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Description

int main(int argc, char *argv[])
{

#if OPENFOAM_VERSION_MAJOR >= 6
FatalError << "cfdemSolverMultiphase requires OpenFOAM 4.x or 5.x to work properly" << exit(FatalError);
#endif

#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)

EXE_INC = \
$(PFLAGS) \
-IalphaContactAngle \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,13 @@ void Foam::multiphaseMixture::solveAlphas
alphaPhiCorr,
zeroField(),
zeroField(),
#if OPENFOAM_VERSION_MAJOR < 6
1,
0,
#else
oneField(),
zeroField(),
#endif
true
);

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

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

addSource = fvc::ddt(rhoeps, K) + fvc::div(phi, K)
+ (
he.name() == "e"
Expand All @@ -35,7 +32,6 @@
- Qsource
- fvm::Sp(QCoeff/Cpv, he)
// thermal conduction of the fluid with effective conductivity
// - fvm::laplacian(rhoeps*thDiff,he)
- fvm::laplacian(voidfraction*thCond/Cpv,he)
// + particle-fluid energy transfer due to work
// + fluid energy dissipation due to shearing
Expand All @@ -54,9 +50,6 @@

thermo.correct();

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

particleCloud.clockM().start(31,"energySolve");
Expand Down
2 changes: 2 additions & 0 deletions applications/solvers/cfdemSolverRhoPimple/Make/options
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs

FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
PFLAGS+= -Dcompre

EXE_INC = \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(int argc, char *argv[])
particleCloud.clockM().start(2,"Coupling");
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);

if(hasEvolved)
if(hasEvolved && smoothenForces)
{
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
}
Expand All @@ -113,7 +113,11 @@ int main(int argc, char *argv[])

particleCloud.clockM().start(26,"Flow");

#if OPENFOAM_VERSION_MAJOR < 6
if (pimple.nCorrPIMPLE() <= 1)
#else
if (pimple.nCorrPimple() <= 1)
#endif
{
#include "rhoEqn.H"
}
Expand Down
36 changes: 17 additions & 19 deletions applications/solvers/cfdemSolverRhoPimple/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ Info<< "Reading thermophysical properties\n" << endl;
"addSource",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh
mesh,
dimensionedScalar("zero", dimensionSet(1,-1,-3,0,0,0,0), 0.0)
);

Info<< "\nCreating fluid-particle heat flux field\n" << endl;
Expand Down Expand Up @@ -94,21 +95,6 @@ Info<< "Reading thermophysical properties\n" << endl;
dimensionedScalar("zero", dimensionSet(1,-1,-3,-1,0,0,0), 0.0)
);

/* Info<< "\nCreating thermal diffusivity field\n" << endl;
volScalarField thDiff
(
IOobject
(
"thDiff",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
);
*/
Info<< "\nCreating thermal conductivity field\n" << endl;
volScalarField thCond
(
Expand All @@ -117,11 +103,12 @@ Info<< "Reading thermophysical properties\n" << endl;
"thCond",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0)
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0),
"zeroGradient"
);

Info<< "\nCreating heat capacity field\n" << endl;
Expand Down Expand Up @@ -190,6 +177,17 @@ Info<< "Reading thermophysical properties\n" << endl;
)
);

bool smoothenForces
(
pimple.dict().lookupOrDefault<bool>
(
"smoothenForces",
false
)
);
if (smoothenForces) Info << "Smoothening implicit particle forces.\n" << endl;
else Info << "Not smoothening implicit particle forces.\n" << endl;

Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
Expand Down
1 change: 0 additions & 1 deletion applications/solvers/cfdemSolverRhoPimpleChem/EEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ volScalarField& he = thermo.he();
particleCloud.energyContributions(Qsource);
particleCloud.energyCoefficients(QCoeff);

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

// correct source for the thermodynamic reference temperature
Expand Down
9 changes: 2 additions & 7 deletions applications/solvers/cfdemSolverRhoPimpleChem/Make/options
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs

FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
PFLAGS+= -Dcompre

EXE_INC = \
Expand All @@ -19,12 +21,8 @@ EXE_INC = \
-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 \
Expand All @@ -48,9 +46,6 @@ EXE_LIBS = \
-l$(CFDEM_LIB_COMP_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS) \
-lliquidProperties \
-lliquidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiationModels \
Expand Down
5 changes: 5 additions & 0 deletions applications/solvers/cfdemSolverRhoPimpleChem/YEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ tmp<fv::convectionScheme<scalar> > mvConvection

{
combustion->correct();
#if OPENFOAM_VERSION_MAJOR < 5
dQ = combustion->dQ();
#else
Qdot = combustion->Qdot();
#endif
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);

Expand Down Expand Up @@ -72,4 +76,5 @@ tmp<fv::convectionScheme<scalar> > mvConvection
Y[inertIndex].max(0.0);
}
}

particleCloud.clockM().stop("Y");
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ Description

#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#if OPENFOAM_VERSION_MAJOR < 6
#include "rhoCombustionModel.H"
#else
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#endif
#include "bound.H"
#include "pimpleControl.H"
#include "fvOptions.H"
Expand Down Expand Up @@ -115,7 +120,11 @@ int main(int argc, char *argv[])

particleCloud.clockM().start(26,"Flow");

#if OPENFOAM_VERSION_MAJOR < 6
if (pimple.nCorrPIMPLE() <= 1)
#else
if (pimple.nCorrPimple() <= 1)
#endif
{
#include "rhoEqn.H"
}
Expand Down

0 comments on commit bba5d13

Please sign in to comment.