Tutorial case for rCFD. Minor bug fixes. Some code cleaning.

This commit is contained in:
tlichtenegger
2019-03-28 15:28:33 +01:00
parent 36d253303d
commit 11e53185e7
30 changed files with 67730 additions and 20666 deletions

View File

@ -18,10 +18,8 @@ if(recurrenceBase.recM().endOfPath())
}
recurrenceBase.recM().exportVolScalarField("voidfraction",voidfractionRec);
//recurrenceBase.recM().exportVolScalarFieldAve("rho",rhoRec);
recurrenceBase.recM().exportVolScalarField("p",pRec);
recurrenceBase.recM().exportVolVectorField("Us",UsRec);
//recurrenceBase.recM().exportVolVectorField("U",URec);
recurrenceBase.recM().exportSurfaceScalarField("phi",phiRec);
Info << "current database weights: = " << wList << endl;

View File

@ -41,6 +41,7 @@ $(chemistryModels)/reactantPerParticle/reactantPerParticle.C
$(energyModels)/energyModel/energyModel.C
$(energyModels)/energyModel/newEnergyModel.C
$(energyModels)/heatTransferGunn/heatTransferGunn.C
$(energyModels)/heatTransferRanzMarshall/heatTransferRanzMarshall.C
$(energyModels)/heatTransferGranConduction/heatTransferGranConduction.C
$(energyModels)/reactionHeat/reactionHeat.C

View File

@ -271,7 +271,7 @@ inline int ** cfdemCloud::particleTypes() const
inline label cfdemCloud::particleType(label index) const
{
if(!getParticleDensities_) return -1;
if(!getParticleTypes_) return -1;
else
{
return particleTypes_[index][0];

View File

@ -45,6 +45,8 @@ heatTransferGranConduction::heatTransferGranConduction
propsDict_(dict.subDict(typeName + "Props")),
multiTypes_(false),
verbose_(propsDict_.lookupOrDefault<bool>("verbose",false)),
calcTotalHeatFlux_(propsDict_.lookupOrDefault<bool>("calcTotalHeatFlux",false)),
totalHeatFlux_(0.0),
QPartPartName_(propsDict_.lookupOrDefault<word>("QPartPartName","QPartPart")),
QPartPart_
( IOobject
@ -108,7 +110,7 @@ heatTransferGranConduction::heatTransferGranConduction
multiTypes_ = true;
}
if (multiTypes_ = true && !particleCloud_.getParticleTypes())
if (multiTypes_ && !particleCloud_.getParticleTypes())
{
FatalError << "heatTransferGranConduction needs data for more than one type, but types are not communicated." << abort(FatalError);
}
@ -153,6 +155,8 @@ void heatTransferGranConduction::calcEnergyContribution()
scalar QPartPart(0);
scalar voidfraction(1);
totalHeatFlux_ = 0.0;
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{
cellI = particleCloud_.cellIDs()[index][0];
@ -166,6 +170,7 @@ void heatTransferGranConduction::calcEnergyContribution()
QPartPart = QPartPart_[cellI];
heatFlux(index, partVolume, voidfraction, QPartPart);
if (calcTotalHeatFlux_) totalHeatFlux_ += partHeatFlux_[index][0];
}
}
}
@ -227,7 +232,11 @@ void heatTransferGranConduction::heatFlux(label index, scalar vol, scalar voidfr
void heatTransferGranConduction::giveData()
{
Info << "total conductive particle-particle heat flux [W] (Eulerian) = " << gSum(QPartPart_*1.0*QPartPart_.mesh().V()) << endl;
if (calcTotalHeatFlux_)
{
reduce(totalHeatFlux_, sumOp<scalar>());
Info << "total conductive particle-particle heat flux [W] (Eulerian) = " << totalHeatFlux_ << endl;
}
particleCloud_.dataExchangeM().giveData(partHeatFluxName_,"scalar-atom", partHeatFlux_);
}

View File

@ -50,6 +50,10 @@ protected:
bool verbose_;
bool calcTotalHeatFlux_;
scalar totalHeatFlux_;
word QPartPartName_;
volScalarField QPartPart_;

View File

@ -47,6 +47,9 @@ heatTransferGunn::heatTransferGunn
expNusselt_(propsDict_.lookupOrDefault<bool>("expNusselt",false)),
interpolation_(propsDict_.lookupOrDefault<bool>("interpolation",false)),
verbose_(propsDict_.lookupOrDefault<bool>("verbose",false)),
calcTotalHeatFlux_(propsDict_.lookupOrDefault<bool>("calcTotalHeatFlux",true)),
totalHeatFlux_(0.0),
NusseltScalingFactor_(1.0),
implicit_(propsDict_.lookupOrDefault<bool>("implicit",true)),
QPartFluidName_(propsDict_.lookupOrDefault<word>("QPartFluidName","QPartFluid")),
QPartFluid_
@ -125,8 +128,7 @@ heatTransferGunn::heatTransferGunn
),
partRefTemp_("partRefTemp", dimensionSet(0,0,0,1,0,0,0), 0.0),
calcPartTempField_(propsDict_.lookupOrDefault<bool>("calcPartTempField",false)),
calcPartTempAve_(propsDict_.lookupOrDefault<bool>("calcPartTempAve",false)),
partTempAve_(0.0),
partTempAve_("partTempAve", dimensionSet(0,0,0,1,0,0,0), 0.0),
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
@ -148,6 +150,12 @@ heatTransferGunn::heatTransferGunn
{
allocateMyArrays();
if (propsDict_.found("NusseltScalingFactor"))
{
NusseltScalingFactor_=readScalar(propsDict_.lookup ("NusseltScalingFactor"));
Info << "NusseltScalingFactor set to: " << NusseltScalingFactor_ << endl;
}
if (propsDict_.found("maxSource"))
{
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
@ -156,7 +164,6 @@ heatTransferGunn::heatTransferGunn
if (calcPartTempField_)
{
calcPartTempAve_ = true;
if (propsDict_.found("partRefTemp"))
{
partRefTemp_.value()=readScalar(propsDict_.lookup ("partRefTemp"));
@ -185,6 +192,13 @@ heatTransferGunn::heatTransferGunn
}
}
if (expNusselt_)
{
NuField_.writeOpt() = IOobject::AUTO_WRITE;
NuField_.write();
Info << "Using predefined Nusselt number field." << endl;
}
if (propsDict_.found("scale") && typeCG_.size()==1)
{
// if "scale" is specified and there's only one single type, use "scale"
@ -241,25 +255,6 @@ void heatTransferGunn::calcEnergyContribution()
// get DEM data
particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_);
if(calcPartTempField_)
{
partTempField_.primitiveFieldRef() = 0.0;
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
partTempField_,
partTemp_,
particleCloud_.particleWeights(),
particleCloud_.averagingM().UsWeightField(),
NULL
);
volScalarField sumTp (particleCloud_.averagingM().UsWeightField() * partTempField_);
dimensionedScalar aveTemp("aveTemp",dimensionSet(0,0,0,1,0,0,0), gSum(sumTp) / particleCloud_.numberOfParticles());
partRelTempField_ = (partTempField_ - aveTemp) / (aveTemp - partRefTemp_);
Info << "heatTransferGunn: average part. temp = " << aveTemp.value() << endl;
}
#ifdef compre
const volScalarField mufField = particleCloud_.turbulence().mu();
#else
@ -291,6 +286,7 @@ void heatTransferGunn::calcEnergyContribution()
scalar Pr(0);
scalar Nup(0);
scalar Tsum(0.0);
scalar Nsum(0.0);
scalar cg = typeCG_[0];
label partType = 1;
@ -299,6 +295,8 @@ void heatTransferGunn::calcEnergyContribution()
interpolationCellPoint<vector> UInterpolator_(U_);
interpolationCellPoint<scalar> TInterpolator_(tempField_);
totalHeatFlux_ = 0.0;
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{
cellI = particleCloud_.cellIDs()[index][0];
@ -328,23 +326,38 @@ void heatTransferGunn::calcEnergyContribution()
scaleDia3 = cg*cg*cg;
}
// calc relative velocity
Us = particleCloud_.velocity(index);
magUr = mag(Ufluid - Us);
ds = 2.*particleCloud_.radius(index);
ds_scaled = ds/cg;
if (expNusselt_)
{
Nup = NuField_[cellI];
if (Nup < 2.0)
Nup = 2.0;
}
else
{
Us = particleCloud_.velocity(index);
magUr = mag(Ufluid - Us);
muf = mufField[cellI];
Rep = ds_scaled * magUr * voidfraction * rho_[cellI]/ muf;
Pr = max(SMALL, Cp_ * muf / kf0_);
Nup = Nusselt(voidfraction, Rep, Pr);
}
Nup *= NusseltScalingFactor_;
Tsum += partTemp_[index][0];
Nsum += 1.0;
scalar h = kf0_ * Nup / ds_scaled;
scalar As = ds_scaled * ds_scaled * M_PI; // surface area of sphere
// calc convective heat flux [W]
heatFlux(index, h, As, Tfluid, scaleDia3);
if (calcTotalHeatFlux_ & !implicit_)
{
totalHeatFlux_ += partHeatFlux_[index][0];
}
if(verbose_)
{
@ -368,16 +381,14 @@ void heatTransferGunn::calcEnergyContribution()
}
}
// gather particle temperature sums and obtain average
if(calcPartTempAve_)
if(calcPartTempField_)
{
reduce(Tsum, sumOp<scalar>());
partTempAve_ = Tsum / particleCloud_.numberOfParticles();
Info << "mean particle temperature = " << partTempAve_ << endl;
reduce(Nsum, sumOp<scalar>());
partTempAve_.value() = Tsum / Nsum;
partTempField();
}
if(calcPartTempField_) partTempField();
particleCloud_.averagingM().setScalarSum
(
QPartFluid_,
@ -489,8 +500,12 @@ void heatTransferGunn::heatFlux(label index, scalar h, scalar As, scalar Tfluid,
void heatTransferGunn::giveData()
{
Info << "total convective particle-fluid heat flux [W] (Eulerian) = " << gSum(QPartFluid_*1.0*QPartFluid_.mesh().V()) << endl;
// Info << "total convective particle-fluid heat flux [W] (Eulerian) = " << gSum(QPartFluid_*1.0*QPartFluid_.mesh().V()) << endl;
if (calcTotalHeatFlux_)
{
reduce(totalHeatFlux_, sumOp<scalar>());
Info << "total convective particle-fluid heat flux [W] = " << totalHeatFlux_ << endl;
}
particleCloud_.dataExchangeM().giveData(partHeatFluxName_,"scalar-atom", partHeatFlux_);
}
@ -503,6 +518,8 @@ void heatTransferGunn::postFlow()
scalar Tpart(0.0);
interpolationCellPoint<scalar> TInterpolator_(tempField_);
totalHeatFlux_ = 0.0;
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{
cellI = particleCloud_.cellIDs()[index][0];
@ -520,16 +537,16 @@ void heatTransferGunn::postFlow()
Tpart = partTemp_[index][0];
partHeatFlux_[index][0] = (Tfluid - Tpart) * partHeatFluxCoeff_[index][0];
if (calcTotalHeatFlux_)
{
totalHeatFlux_ += partHeatFlux_[index][0];
}
}
}
}
giveData();
}
scalar heatTransferGunn::aveTpart() const
{
return partTempAve_;
}
void heatTransferGunn::partTempField()
{
@ -544,8 +561,11 @@ void heatTransferGunn::partTempField()
NULL
);
dimensionedScalar aveTemp("aveTemp",dimensionSet(0,0,0,1,0,0,0), partTempAve_);
partRelTempField_ = (partTempField_ - aveTemp) / (aveTemp - partRefTemp_);
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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -55,6 +55,12 @@ protected:
bool implicit_;
bool calcTotalHeatFlux_;
scalar totalHeatFlux_;
scalar NusseltScalingFactor_;
word QPartFluidName_;
volScalarField QPartFluid_;
@ -75,9 +81,7 @@ protected:
bool calcPartTempField_;
bool calcPartTempAve_;
scalar partTempAve_;
dimensionedScalar partTempAve_;
word tempFieldName_;
@ -154,8 +158,6 @@ public:
void calcEnergyContribution();
void postFlow();
scalar aveTpart() const;
};

View File

@ -153,9 +153,6 @@ void directedDiffusiveRelaxation::setForce() const
relaxStream_ = DField_ * fvc::grad(correctedField_ - voidfractionRec_);
// explicit evaluation?
// relaxStream_ = DField_ * fvc::grad(voidfraction_ - voidfractionRec_);
vector position(0,0,0);
scalar voidfraction(0.0);
vector flucU(0,0,0);
@ -169,7 +166,7 @@ void directedDiffusiveRelaxation::setForce() const
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{
cellI = particleCloud_.cellIDs()[index][0];
if (cellI > -1 && !ignoreCell(cellI)) // particle found
if (cellI > -1 && !ignoreCell(cellI))
{
{
if (interpolate_)

View File

@ -56,6 +56,9 @@ freeStreaming::freeStreaming
forceModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
interpolate_(propsDict_.lookupOrDefault<bool>("interpolation", false)),
ignoreCellsName_(propsDict_.lookupOrDefault<word>("ignoreCellsName","none")),
ignoreCells_(),
existIgnoreCells_(true),
UsRecFieldName_(propsDict_.lookupOrDefault<word>("granVelRecFieldName","UsRec")),
UsRec_(sm.mesh().lookupObject<volVectorField> (UsRecFieldName_)),
voidfractionRecFieldName_(propsDict_.lookupOrDefault<word>("voidfractionRecFieldName","voidfractionRec")),
@ -65,21 +68,13 @@ freeStreaming::freeStreaming
particleDensity_(propsDict_.lookupOrDefault<scalar>("particleDensity",0.0)),
gravAcc_(propsDict_.lookupOrDefault<vector>("g",vector(0.0,0.0,-9.81)))
{
// forceSubModels_.setSize(1, "recU");
// forceSubModels_.append("recF");
// delete[] forceSubModel_;
// forceSubModel_ = new autoPtr<forceSubModel>[nrForceSubModels()];
// Info << "nrForceSubModels()=" << nrForceSubModels() << endl;
// for (int i=0;i<nrForceSubModels();i++)
// {
// forceSubModel_[i] = forceSubModel::New
// (
// dict,
// particleCloud_,
// *this,
// forceSubModels_[i]
// );
// }
if(ignoreCellsName_ != "none")
{
ignoreCells_.set(new cellSet(particleCloud_.mesh(),ignoreCellsName_));
Info << "isotropicFluctuations: ignoring fluctuations in cellSet " << ignoreCells_().name() <<
" with " << ignoreCells_().size() << " cells." << endl;
}
else existIgnoreCells_ = false;
}
@ -89,6 +84,13 @@ freeStreaming::freeStreaming
freeStreaming::~freeStreaming()
{}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
bool freeStreaming::ignoreCell(label cell) const
{
if (!existIgnoreCells_) return false;
else return ignoreCells_()[cell];
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -107,7 +109,7 @@ void freeStreaming::setForce() const
{
cellI = particleCloud_.cellIDs()[index][0];
UNew =vector(0,0,0);
if (cellI > -1) // particle found
if (cellI > -1 && !ignoreCell(cellI)) // particle found
{
// let particles in empty regions follow trajectories subject to gravity, otherwise stream
if(voidfractionRec_[cellI] < critVoidfraction_)
@ -129,7 +131,6 @@ void freeStreaming::setForce() const
radius = particleCloud_.radius(index);
mass = 4.188790205*radius*radius*radius * particleDensity_;
grav = mass*gravAcc_;
// forceSubM(1).partToArray(index,grav,vector::zero);
for(int j=0;j<3;j++)
{
particleCloud_.DEMForces()[index][j] += grav[j];
@ -141,7 +142,6 @@ void freeStreaming::setForce() const
{
particleCloud_.particleConvVels()[index][j] += UNew[j];
}
// forceSubM(0).partToArray(index,UNew,vector::zero);
}
}

View File

@ -27,6 +27,7 @@ License
#include "forceModel.H"
#include "interpolationCellPoint.H"
#include "cellSet.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -46,6 +47,13 @@ private:
bool interpolate_;
// ignore streaming velocity in region
word ignoreCellsName_;
autoPtr<cellSet> ignoreCells_;
bool existIgnoreCells_;
word UsRecFieldName_;
const volVectorField& UsRec_;
@ -63,6 +71,8 @@ private:
const vector gravAcc_;
bool ignoreCell(label) const;
public:
//- Runtime type information

View File

@ -39,6 +39,7 @@ $(chemistryModels)/reactantPerParticle/reactantPerParticle.C
$(energyModels)/energyModel/energyModel.C
$(energyModels)/energyModel/newEnergyModel.C
$(energyModels)/heatTransferGunn/heatTransferGunn.C
$(energyModels)/heatTransferRanzMarshall/heatTransferRanzMarshall.C
$(energyModels)/heatTransferGranConduction/heatTransferGranConduction.C
$(energyModels)/reactionHeat/reactionHeat.C

View File

@ -85,6 +85,12 @@ void diffNorm::computeRecMatrix()
label totNumRecSteps = base_.recM().numRecFields();
SymmetricSquareMatrix<scalar>& recurrenceMatrix( base_.recM().recurrenceMatrix() );
if (totNumRecSteps == 1)
{
recurrenceMatrix[0][0]=0.0;
return;
}
scalar normIJ(0.0);
scalar maxNormIJ(0.0);
@ -193,6 +199,11 @@ void diffNorm::computeRecMatrix()
// normalize matrix and copy lower to upper half
if (normConstant_ > 0.0) maxNormIJ = normConstant_;
if (maxNormIJ < SMALL)
{
Info << "Small normalization constant detected. Setting maxNormIJ = 1.0." << endl;
maxNormIJ = 1.0;
}
for(label ti=0;ti<totNumRecSteps;ti++)
{

View File

@ -61,6 +61,7 @@ MarkovPath::MarkovPath
minIntervalSteps_(propsDict_.lookupOrDefault<label>("minIntervalSteps",0)),
numIntervals_(base.recM().numIntervals()),
recSteps_(0),
startIndex_(propsDict_.lookupOrDefault<label>("startIndex",0)),
intervalSizes_(numIntervals_),
intervalSizesCumulative_(numIntervals_),
Pjump_(0.0),
@ -188,6 +189,10 @@ void MarkovPath::extendPath()
virtualTimeIndex = seqStart;
}
else
{
seqStart=startIndex_;
}
// take a series of consecutive steps
bool takeAnotherStep = true;

View File

@ -70,6 +70,8 @@ protected:
label recSteps_;
label startIndex_;
labelList intervalSizes_;
labelList intervalSizesCumulative_;

View File

@ -1,4 +1,4 @@
1.) creation of databases
go to folder db1 and execute run.sh; once finished, go to folder db2 and execute run.sh
go to folder db1 and execute run.sh; once finished, execute postrun.sh; same for folder db2
2.) rCFD run
first transfer and decompose the databases by execute prerun.sh; for the actual rCFD run, execute run.sh
first transfer and decompose the databases by executing prerun.sh; for the actual rCFD run, execute run.sh

View File

@ -38,7 +38,7 @@ boundaryField
(-9.9 (0 0 0.4))
)
;
value uniform (0 0 0);
value uniform (0 0 0.4);
}
outlet
{

View File

@ -1,36 +1,6 @@
cd CFD
#cp system/controlDict_equil system/controlDict
#decomposePar -force
#mpirun -np 4 cfdemSolverRhoPimple -parallel
#cp system/controlDict_record system/controlDict
#mpirun -np 4 cfdemSolverRhoPimple -parallel
reconstructPar
# make sure that time 0 folder is called 0
mv ./*e-1[0-9]* 0
# remove uniform folder
find . -name \uniform -type d -exec rm -rf {} \;
# make database
mkdir dataBase1
mv [0-2]* dataBase1/
cd dataBase1
for t in [0-2]*
do
cd $t
mv NuFieldMean NuField
mv phiMean phi
mv pMean p
mv UsMean Us
mv voidfractionMean voidfraction
rm UMean
rm rhoMean
cd ..
done
cp -r 0 ../
#rm -rf proc*
#rm -rf ./-0.*
cp system/controlDict_equil system/controlDict
decomposePar -force
mpirun -np 4 cfdemSolverRhoPimple -parallel
cp system/controlDict_record system/controlDict
mpirun -np 4 cfdemSolverRhoPimple -parallel

View File

@ -1,36 +1,6 @@
cd CFD
#cp system/controlDict_equil system/controlDict
#decomposePar -force
#mpirun -np 4 cfdemSolverRhoPimple -parallel
#cp system/controlDict_record system/controlDict
#mpirun -np 4 cfdemSolverRhoPimple -parallel
reconstructPar
# make sure that time 0 folder is called 0
mv ./*e-1[0-9]* 0
# remove uniform folder
find . -name \uniform -type d -exec rm -rf {} \;
# make database
mkdir dataBase1
mv [0-2]* dataBase1/
cd dataBase1
for t in [0-2]*
do
cd $t
mv NuFieldMean NuField
mv phiMean phi
mv pMean p
mv UsMean Us
mv voidfractionMean voidfraction
rm UMean
rm rhoMean
cd ..
done
cp -r 0 ../
#rm -rf proc*
#rm -rf ./-0.*
cp system/controlDict_equil system/controlDict
decomposePar -force
mpirun -np 4 cfdemSolverRhoPimple -parallel
cp system/controlDict_record system/controlDict
mpirun -np 4 cfdemSolverRhoPimple -parallel

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object UsMean;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object pMean;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type uniformFixedValue;
uniformValue constant 100000;
value uniform 100000;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField uniform 1.0;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1.748;
}
outlet
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object voidfractionMean;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 1;
}
outlet
{
type fixedValue;
value uniform 1;
}
}
// ************************************************************************* //

View File

@ -40,7 +40,7 @@ regionModel allRegion;
IOModel "off";
dataExchangeModel twoWayOne2One;
dataExchangeModel twoWayMPI;
averagingModel dense;
@ -64,13 +64,13 @@ energyModels
);
// in current branch, only one chem model can be chosen
/*
chemistryModels
(
off
);
*/
chemistryModel off;
//chemistryModel off;
thermCondModel SyamlalThermCond;
@ -165,12 +165,9 @@ engineSearchMany2ManyProps
}
}
twoWayOne2OneProps
twoWayMPIProps
{
useCellIdComm true;
useStaticProcMap true;
liggghtsPath "../DEM/in.liggghts_run";
boundingBoxScalingFactor 1.00001;
}

View File

@ -31,20 +31,17 @@ recModel standardRecModel;
recNorm EuclideanNorm;
//recPath predefinedPath;
recPath MarkovPath;
volScalarFields
(
voidfraction
// rho
p
NuField
);
volVectorFields
(
// U
Us
);

View File

@ -25,7 +25,7 @@ stopAt endTime;
endTime 800.0;
deltaT 0.0025;
deltaT 0.00025;
writeControl timeStep;

View File

@ -1,3 +1,5 @@
shell mkdir ../DEM/post
# variables
# material parameters
@ -92,8 +94,12 @@ fix walls all wall/reflect xlo EDGE xhi EDGE ylo EDGE yhi EDGE zlo EDGE zhi EDGE
#cfd coupling
fix cellids all property/atom prev_cell_ids scalar yes yes no -1
fix cfd all couple/cfd couple_every 1 one2one
# couping fixes for one-2-one communication
#fix cellids all property/atom prev_cell_ids scalar yes yes no -1
#fix cfd all couple/cfd couple_every 1 one2one
# couping fixes for all-2-all communication
fix cfd all couple/cfd couple_every 1 mpi
fix cfd2 all couple/cfd/recurrence transfer_force yes transfer_fluctuations yes
# this one invokes heat transfer calculation, transfers per-particle temperature and adds convective heat flux to particles
@ -129,4 +135,6 @@ dump dmp all custom/vtk 10000 ../DEM/post/dump*.liggghts_coupled.vtk id type x
run 1
set region total property/atom Temp ${Tpart}
neigh_modify delay 0 no_build yes
# for one-2-one communication
#neigh_modify delay 0 no_build yes

View File

@ -1,10 +1,6 @@
mv ../db1/DEM/liggghts.restartCFDEM_-0.005000 DEM/liggghts.restart
cd CFD
cp ../../db1/CFD/0/phi 0/phiRec
cp ../../db1/CFD/0/p 0/pRec
cp ../../db1/CFD/0/Us 0/UsRec
cp ../../db1/CFD/0/voidfraction 0/voidfractionRec
mv ../../db1/CFD/dataBase1 .
mv ../../db2/CFD/dataBase2 .

View File

@ -1,2 +1,3 @@
cd CFD
foamJob mpirun -np 4 rcfdemSolverCoupledHeattransfer -parallel
rm -r dynamicCode
mpirun -np 4 rcfdemSolverCoupledHeattransfer -parallel | tee run.log