Merge pull request #29 from ParticulateFlow/feature/cherry_pick_PUBLIC

Feature/cherry pick public
This commit is contained in:
Daniel
2017-08-31 16:19:05 +02:00
committed by GitHub
44 changed files with 370 additions and 369 deletions

View File

@ -81,6 +81,7 @@ cfdemCloud::cfdemCloud
solveFlow_(true),
verbose_(false),
ignore_(false),
allowCFDsubTimestep_(true),
limitDEMForces_(false),
modelType_(couplingProperties_.lookup("modelType")),
positions_(NULL),
@ -251,17 +252,6 @@ cfdemCloud::cfdemCloud
else
Info << "ignoring ddt(voidfraction)" << endl;
forceModel_ = new autoPtr<forceModel>[nrForceModels()];
for (int i=0;i<nrForceModels();i++)
{
forceModel_[i] = forceModel::New
(
couplingProperties_,
*this,
forceModels_[i]
);
}
momCoupleModel_ = new autoPtr<momCoupleModel>[momCoupleModels_.size()];
for (int i=0;i<momCoupleModels_.size();i++)
{
@ -273,6 +263,17 @@ cfdemCloud::cfdemCloud
);
}
forceModel_ = new autoPtr<forceModel>[nrForceModels()];
for (int i=0;i<nrForceModels();i++)
{
forceModel_[i] = forceModel::New
(
couplingProperties_,
*this,
forceModels_[i]
);
}
// run liggghts commands from cfdem
liggghtsCommand_ = new autoPtr<liggghtsCommandModel>[liggghtsCommandModelList_.size()];
for (int i=0;i<liggghtsCommandModelList_.size();i++)
@ -324,7 +325,14 @@ cfdemCloud::cfdemCloud
{
checkPeriodicCells_ = true;
}
else if (nPatchesCyclic > 0 && nPatchesNonCyclic > 0)
//hard set checkperiodic cells if wished
if(this->couplingProperties().found("checkPeriodicCells"))
{
checkPeriodicCells_ = couplingProperties().lookupOrDefault<Switch>("checkPeriodicCells", checkPeriodicCells_);
}
if (nPatchesCyclic > 0 && nPatchesNonCyclic > 0)
{
if (verbose_) Info << "nPatchesNonCyclic=" << nPatchesNonCyclic << ", nPatchesCyclic=" << nPatchesCyclic << endl;
Warning << "Periodic handing is disabled because the domain is not fully periodic!\n" << endl;
@ -612,6 +620,10 @@ bool cfdemCloud::evolve
// IMPLICIT FORCE CONTRIBUTION AND SOLVER USE EXACTLY THE SAME AVERAGED
// QUANTITIES AT THE GRID!
Info << "\n timeStepFraction() = " << dataExchangeM().timeStepFraction() << endl;
if(dataExchangeM().timeStepFraction() > 1.0000001)
{
FatalError << "cfdemCloud::dataExchangeM().timeStepFraction()>1: Do not do this, since dangerous. This might be due to the fact that you used a adjustable CFD time step. Please use a fixed CFD time step." << abort(FatalError);
}
clockM().start(24,"interpolateEulerFields");
// update voidFractionField

View File

@ -92,6 +92,8 @@ protected:
bool ignore_;
bool allowCFDsubTimestep_;
bool limitDEMForces_;
scalar maxDEMForce_;
@ -226,6 +228,10 @@ public:
// public Member Functions
// Access
bool allowCFDsubTimestep() { return allowCFDsubTimestep_; }
void setAllowCFDsubTimestep(bool b) { allowCFDsubTimestep_ = b; }
void checkCG(bool);
void setPos(double **&);

View File

@ -328,20 +328,12 @@ void averagingModel::undoWeightFields(double**const& mask) const
tmp<volVectorField> averagingModel::UsInterp() const
{
if (particleCloud_.dataExchangeM().couplingStep() > 1)
{
return tmp<volVectorField>
(
new volVectorField("Us_averagingModel", (1. - particleCloud_.dataExchangeM().timeStepFraction()) * UsPrev_ + particleCloud_.dataExchangeM().timeStepFraction() * UsNext_)
);
}
else
{
return tmp<volVectorField>
(
new volVectorField("Us_averagingModel", UsNext_)
);
}
const scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
return tmp<volVectorField>
(
new volVectorField("Us_averagingModel", (1. - tsf) * UsPrev_ + tsf * UsNext_)
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -209,12 +209,7 @@ bool dataExchangeModel::couple(int i) const
scalar dataExchangeModel::timeStepFraction() const
{
//return fraction between previous coupling TS and actual TS
//scalar DEMtime = DEMts_ * couplingInterval_;
//scalar frac = ( ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() ) - (couplingStep_) * DEMtime) / DEMtime; //Chr 05.03.2013
scalar frac = ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() - couplingStep_ * couplingTime() ) / couplingTime();
if (frac < 1e-4) frac = 1.;
return frac;
return ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() - (couplingStep_-1) * couplingTime() ) / couplingTime();
}
int dataExchangeModel::getNumberOfParticles() const

View File

@ -198,22 +198,29 @@ public:
inline void checkTSsize() const
{
if(particleCloud_.mesh().time().deltaT().value() > couplingInterval_ * DEMts_ + SMALL)
if (particleCloud_.mesh().time().deltaT().value() > couplingInterval_ * DEMts_ + SMALL)
{
Info << "particleCloud_.mesh().time().deltaT().value() = " << particleCloud_.mesh().time().deltaT().value() << endl;
Info << "couplingInterval_ = " << couplingInterval_ << endl;
Info << "DEMts_ = " << DEMts_ << endl;
FatalError<<"\nError - TS bigger than coupling interval!\n"<< abort(FatalError);
FatalError << "\nError - CFD time-step bigger than coupling time (= DEM time step * coupling interval)!\n" << abort(FatalError);
}
if (std::fabs((round(couplingTime()/particleCloud_.mesh().time().deltaT().value())*particleCloud_.mesh().time().deltaT().value())-couplingTime()) > SMALL)
{
Info << "particleCloud_.mesh().time().deltaT().value() = " << particleCloud_.mesh().time().deltaT().value() << endl;
Info << "couplingInterval_ = " << couplingInterval_ << endl;
Info << "DEMts_ = " << DEMts_ << endl;
Warning << "\nWarning - Coupling time (= DEM time step * coupling interval) is not a multiple of CFD time-step!\n" << endl;
}
if (!particleCloud_.allowCFDsubTimestep())
if (particleCloud_.mesh().time().deltaT().value() < couplingInterval_ * DEMts_ + SMALL)
FatalError << "\nYour models require: CFD time-step = coupling interval (= DEM time step * coupling interval)! \n" << abort(FatalError);
// warn if sub-TS
if (particleCloud_.mesh().time().deltaT().value() < couplingTime() - SMALL)
Warning << "You are using sub-time-steps (i.e. CFD TS < coupling time)! Check your settings properly." << endl;
}
/*inline bool checkExactTiming() const
{
return false;
}*/
//void checkNClumpTypes() const {};
inline void readDEMtsfromDict(dictionary& propsDict)
{
DEMts_ = readScalar(propsDict.lookup("DEMts"));
@ -222,10 +229,8 @@ public:
inline bool doCoupleNow() const
{
if (particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value()
- ((1+couplingStep_)*(DEMts_*couplingInterval_))
+ 1e-10 > 0) // Chr 27.03.2013 : first coupling after DEMts_*couplingInterval_
// > particleCloud_.mesh().time().deltaT().value()/2) // Chr 27.03.2013
if (particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value()-SMALL
> couplingStep_*DEMts_*couplingInterval_)
{
return true;
}

View File

@ -104,6 +104,13 @@ void liggghtsCommandModel::checkTimeMode(dictionary& propsDict)
}
}
}
if(verbose_){
Info << "runFirst = " << runFirst_ << endl;
Info << "runLast = " << runLast_ << endl;
Info << "runEveryCouplingStep = " << runEveryCouplingStep_ << endl;
Info << "runEveryWriteStep = " << runEveryWriteStep_ << endl;
}
}
void liggghtsCommandModel::checkTimeSettings(const dictionary& propsDict)
@ -112,11 +119,12 @@ void liggghtsCommandModel::checkTimeSettings(const dictionary& propsDict)
{
scalar DEMts = particleCloud_.dataExchangeM().DEMts();
scalar couplingInterval = particleCloud_.dataExchangeM().couplingInterval();
scalar simStartTime = particleCloud_.mesh().time().startTime().value();
if(runLast_) // last run
{
// read time options from subdict
endTime_ = particleCloud_.mesh().time().endTime().value()-particleCloud_.mesh().time().startTime().value();
endTime_ = particleCloud_.mesh().time().endTime().value()-simStartTime;
startTime_ = endTime_;
timeInterval_ = -1;
@ -136,9 +144,9 @@ void liggghtsCommandModel::checkTimeSettings(const dictionary& propsDict)
// calculate coupling times
// if this makes troubles try floor((startTime_+SMALL)/.. as above
firstCouplingStep_ = floor(startTime_/DEMts/couplingInterval)+1;
lastCouplingStep_ = floor(endTime_/DEMts/couplingInterval)+1;
couplingStepInterval_ = floor(timeInterval_/DEMts/couplingInterval)+1;
firstCouplingStep_ = floor((startTime_+SMALL-simStartTime)/DEMts/couplingInterval);
lastCouplingStep_ = floor((endTime_+SMALL-simStartTime)/DEMts/couplingInterval);
couplingStepInterval_ = floor(timeInterval_+SMALL/DEMts/couplingInterval);
}
else //runEveryCouplingStep or writeStep
{

View File

@ -108,9 +108,13 @@ explicitCouple::~explicitCouple()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volVectorField> explicitCouple::expMomSource() const
{
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
const scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
if (1. - tsf < 1e-4) //tsf==1
// calc Ksl
// update KslNext in first subTS
// NOTE: without following if we could update f every subTS (based on current values) and use this value
if(tsf < particleCloud_.mesh().time().deltaT().value()/particleCloud_.dataExchangeM().couplingTime() + 0.000001 )
{
// calc fNext
forAll(fNext_,cellI)
@ -124,18 +128,12 @@ tmp<volVectorField> explicitCouple::expMomSource() const
if (magF > fLimit_[i]) fNext_[cellI][i] *= fLimit_[i]/magF;
}
}
return tmp<volVectorField>
(
new volVectorField("f_explicitCouple", fPrev_)
);
}
else
{
return tmp<volVectorField>
(
new volVectorField("f_explicitCouple", (1. - tsf) * fPrev_ + tsf * fNext_)
);
}
return tmp<volVectorField>
(
new volVectorField("f_explicitCouple", (1. - tsf) * fPrev_ + tsf * fNext_)
);
}
void explicitCouple::resetMomSourceField() const

View File

@ -122,11 +122,13 @@ implicitCouple::~implicitCouple()
tmp<volScalarField> implicitCouple::impMomSource() const
{
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
const scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
// calc Ksl
if (1. - tsf < 1e-4) //tsf==1
// update KslNext in first subTS
// NOTE: without following if we could update Ksl every subTS (based on current values) and use this value
if(tsf < particleCloud_.mesh().time().deltaT().value()/particleCloud_.dataExchangeM().couplingTime() + 0.000001 )
{
scalar Ur;
@ -136,6 +138,8 @@ tmp<volScalarField> implicitCouple::impMomSource() const
if (Ur > SMALL && alpha_[cellI] < maxAlpha_) //momentum exchange switched off if alpha too big
{
// NOTE: impParticleForces() are calculated at coupling step based on current values
// therefore the use of Next fields in forceM and here is recommended
KslNext_[cellI] = mag(particleCloud_.forceM(0).impParticleForces()[cellI])
/ Ur
/ particleCloud_.mesh().V()[cellI];
@ -145,18 +149,12 @@ tmp<volScalarField> implicitCouple::impMomSource() const
// limiter
if (KslNext_[cellI] > KslLimit_) KslNext_[cellI] = KslLimit_;
}
return tmp<volScalarField>
(
new volScalarField("Ksl_implicitCouple", KslPrev_)
);
}
else
{
return tmp<volScalarField>
(
new volScalarField("Ksl_implicitCouple", (1. - tsf) * KslPrev_ + tsf * KslNext_)
);
}
return tmp<volScalarField>
(
new volScalarField("Ksl_implicitCouple", (1. - tsf) * KslPrev_ + tsf * KslNext_)
);
}
void implicitCouple::resetMomSourceField() const

View File

@ -71,7 +71,7 @@ SyamlalThermCond::SyamlalThermCond
{
if (wallQFactor_.headerOk())
{
Info << "Found field for scaling wall heat flux.\n" << endl;
Info << "Found field for scaling wall heat flux.\n" << endl;
hasWallQFactor_ = true;
}
}
@ -100,13 +100,14 @@ tmp<volScalarField> SyamlalThermCond::thermCond() const
IOobject::NO_WRITE
),
voidfraction_.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)
)
);
volScalarField& svf = tvf.ref();
svf = (1-sqrt(1-voidfraction_)) / (voidfraction_) * kf0_;
svf = (1-sqrt(1-voidfraction_+SMALL)) / (voidfraction_) * kf0_;
// if a wallQFactor field is present, use it to scale heat transport through a patch
if (hasWallQFactor_)
{
@ -114,7 +115,7 @@ tmp<volScalarField> SyamlalThermCond::thermCond() const
forAll(wallQFactor_.boundaryField(), patchi)
svf.boundaryFieldRef()[patchi] *= wallQFactor_.boundaryField()[patchi];
}
return tvf;
}

View File

@ -102,22 +102,12 @@ voidFractionModel::~voidFractionModel()
// * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> voidFractionModel::voidFractionInterp() const
{
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
const scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
if (1. - tsf < 1e-4 && particleCloud_.dataExchangeM().couplingStep() > 1) //tsf==1
{
return tmp<volScalarField>
(
new volScalarField("alpha_voidFractionModel", voidfractionPrev_)
);
}
else
{
return tmp<volScalarField>
(
new volScalarField("alpha_voidFractionModel", (1. - tsf) * voidfractionPrev_ + tsf * voidfractionNext_)
);
}
return tmp<volScalarField>
(
new volScalarField("alpha_voidFractionModel", (1. - tsf) * voidfractionPrev_ + tsf * voidfractionNext_)
);
}
void voidFractionModel::resetVoidFractions() const

View File

@ -1,65 +1,64 @@
# Pour granular particles into chute container, then induce flow
echo both
atom_style granular
atom_modify map array
communicate single vel yes
# Fill granular particles into a cylinder
echo both
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
boundary m m m
newton off
units si
units si
region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
create_box 1 reg
region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
neighbor 0.001 bin
neigh_modify delay 0
#Material properties required for new pair styles
#material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#pair style
pair_style gran model hertz tangential history
pair_coeff * *
pair_style gran model hertz tangential history
pair_coeff * *
#timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
#walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.0138 0. 0.
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.0138 0. 0.
#cfd coupling
#fix cfd all couple/cfd
#fix cfd all couple/cfd
#particle insertion
region bc cylinder z 0.0 0.0 0.012 0.02 0.03 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 200 radius constant 0.001
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
region bc cylinder z 0.0 0.0 0.012 0.02 0.03 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 200 radius constant 0.001
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc
#apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
fix integr all nve/sphere
#screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
run 1
dump dmp all custom 1000 post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
run 1
dump dmp all custom 1000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
run 3000 upto
#write_restart liggghts.restart
run 3000 upto

View File

@ -73,8 +73,8 @@ functions
fields ( particleForces );
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}

View File

@ -73,8 +73,8 @@ functions
fields ( particleForces );
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}

View File

@ -19,8 +19,7 @@ neighbor 0.3 bin
neigh_modify delay 0 binsize 0.01
# Material properties required for new pair styles
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e7
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.9
@ -49,8 +48,8 @@ fix cfd2 all couple/cfd/force
# create single partciles
create_atoms 1 single .5 .5 3.5 units box
create_atoms 1 single .5 .5 3.16 units box
create_atoms 1 single 0.5 0.5 3.5 units box
create_atoms 1 single 0.5 0.5 3.16 units box
set atom 1 diameter 0.167 density 1.5 vx 0 vy 0 vz 0
set atom 2 diameter 0.167 density 1.5 vx 0 vy 0 vz 0
@ -85,7 +84,7 @@ thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -13,67 +13,67 @@ variable nPorg equal 71000
variable nPscal equal ${nPorg}/(${cg}*${cg}*${cg})
#######################################################
atom_style granular
atom_modify map array
communicate single vel yes
coarsegraining ${cg}
atom_style granular
atom_modify map array
communicate single vel yes
coarsegraining ${cg}
boundary m m m
newton off
boundary m m m
newton off
units si
processors 2 2 1
units si
processors 2 2 1
region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
create_box 1 reg
region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
neighbor 0.001 bin
neigh_modify delay 0
#Material properties required for new pair styles
#Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#pair style
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff * *
pair_style gran model hertz tangential history
pair_coeff * *
#timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
#walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
#particle distributions and insertion
region bc cylinder z 0.0 0.0 0.012 0. 0.055 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 7000 radius constant ${r0}
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
region bc cylinder z 0.0 0.0 0.012 0. 0.055 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 7000 radius constant ${r0}
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region ${nPscal} region bc
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1. insert_every once overlapcheck yes all_in yes particles_in_region ${nPscal} region bc
#apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
fix integr all nve/sphere
#screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]
run 10000 upto
write_restart ./post/restart/liggghts.restart_coarseGraining_${cg}
run 10000 upto
write_restart ./post/restart/liggghts.restart_coarseGraining_${cg}

View File

@ -14,70 +14,69 @@ variable nPorg equal 71000
variable nPscal equal ${nPorg}/(${cg}*${cg}*${cg})
#######################################################
atom_style granular
atom_modify map array
communicate single vel yes
coarsegraining ${cg}
atom_style granular
atom_modify map array
communicate single vel yes
coarsegraining ${cg}
boundary m m m
newton off
boundary m m m
newton off
units si
processors 2 2 1
units si
processors 2 2 1
#read the restart file
read_restart ../DEM/post/restart/liggghts.restart_coarseGraining_${cg}
read_restart ../DEM/post/restart/liggghts.restart_coarseGraining_${cg}
#_coarseGraining_${cg}
neighbor 0.001 bin
neigh_modify delay 0
neighbor 0.001 bin
neigh_modify delay 0
#Material properties required for new pair styles
#Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#pair style
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff * *
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff * *
#timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
#walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
#cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force #/implicit
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force #/implicit
#apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
fix integr all nve/sphere
#center of mass
compute centerOfMass all com
#compute total dragforce
#compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
#compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
#screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol c_centerOfMass[3] #c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] #c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
dump myDump all stl 1 post/dump_*.stl
#run 1
dump dmp all custom 1000 ../DEM/post/dump*.liggghts_restart id type type x y z vx vy vz fx fy fz radius #f_dragforce[1] f_dragforce[2] f_dragforce[3]
undump myDump
dump myDump all stl 1 post/dump_*.stl
dump dmp all custom 1000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz radius
undump myDump
run 1
run 1

View File

@ -89,8 +89,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
echo both
atom_style granular
atom_modify map array
@ -24,7 +24,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -55,7 +55,7 @@ compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
@ -26,7 +26,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -34,8 +34,8 @@ timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
# change the particles density
@ -63,6 +63,6 @@ thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -186,8 +186,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
echo both
atom_style granular
atom_modify map array
@ -24,7 +24,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -55,7 +55,7 @@ compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
@ -26,7 +26,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -61,6 +61,6 @@ thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -89,8 +89,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -89,8 +89,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -89,8 +89,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
echo both
atom_style granular
atom_modify map array
@ -24,7 +24,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -32,8 +32,8 @@ timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
# particle distributions and insertion
@ -55,7 +55,7 @@ compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
@ -26,7 +26,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -60,6 +60,6 @@ thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
@ -26,7 +26,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -60,6 +60,6 @@ thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -27,7 +27,7 @@ fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#fix m5 all property/global characteristicVelocity scalar 2.0
# pair style
pair_style gran model hertz tangential history # hertz without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -68,6 +68,6 @@ compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 1000 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 1000 ../DEM/post/dump.liggghts_run id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
run 1 upto

View File

@ -89,8 +89,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -90,8 +90,8 @@ functions
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
/*pressureDrop

View File

@ -72,8 +72,8 @@ functions
fields ( p T);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -1,4 +1,4 @@
# Particle packing by insertion and successive growing of particles
# heattransfer in packed bed
atom_style granular
atom_modify map array
@ -26,7 +26,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
timestep 0.00001
@ -65,7 +65,7 @@ compute_modify thermo_temp dynamic yes
#insert the first particles
run 1
dump dmp all custom 1000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_heattransfer[0] f_heatFlux[0]
dump dmp all custom 1000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius f_heattransfer[0] f_heatFlux[0]
run 150000

View File

@ -70,6 +70,6 @@ thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
run 1

View File

@ -89,8 +89,8 @@ functions
fields ( p U T voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
writeControl timeStep;//outputTime;
writeInterval 1;
}
}

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
echo both
atom_style granular
atom_modify map array
@ -24,7 +24,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
@ -55,7 +55,7 @@ compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 5000 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]

View File

@ -1,4 +1,4 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
@ -40,7 +40,7 @@ fix cylwalls all wall/gran model hertz tangential history primitive type
# heat transfer
fix ftco all property/global thermalConductivity peratomtype 1. # lambda in [W/(K*m)]
fix ftca all property/global thermalCapacity peratomtype 1000. # cp in [J/(kg*K)]
fix ftca all property/global thermalCapacity peratomtype 1000. # cp in [J/(kg*K)]
fix heattransfer all heat/gran initial_temperature 300.
# set particle temperature for the bed
@ -54,7 +54,7 @@ set group all density 2000
# cfd coupling
fix cfd all couple/cfd couple_every 25 mpi
fix cfd2 all couple/cfd/force/implicit
fix cfd3 all couple/cfd/convection T0 300
fix cfd3 all couple/cfd/convection T0 300
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
@ -72,6 +72,6 @@ thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom/vtk 10000 ../DEM/post/dump*.liggghts_run.vtk id type radius x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] f_Temp[0]
dump dmp all custom/vtk 10000 ../DEM/post/dump*.liggghts_run.vtk id type radius x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] f_Temp[0]
run 1

View File

@ -1,19 +1,19 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
###############################################
#variables
# DEM-parameters
variable partDens equal 1732 # density
variable partRad equal 0.00184 # particle radius
variable partDens equal 1732 # density
variable partRad equal 0.00184 # particle radius
variable partVol equal 4*3.14/3*${partRad}^3
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.25 # Poisson ratio
variable rest equal 0.66 # coefficient of restitution
variable fric equal 0.95 # coefficient of friction
variable roll equal 0.15 # for particles and walls with friction
variable noRoll equal 0 # for frictionless walls
variable cV equal 0.1 # characteristic velocity
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.25 # Poisson ratio
variable rest equal 0.66 # coefficient of restitution
variable fric equal 0.95 # coefficient of friction
variable roll equal 0.15 # for particles and walls with friction
variable noRoll equal 0 # for frictionless walls
variable cV equal 0.1 # characteristic velocity
# Geometry
variable cylrad equal 0.05
@ -22,7 +22,7 @@ variable fillV equal ${fillH}*${cylrad}^2*3.14
variable nPart equal ceil(${fillV}*0.7/${partVol})
#variable nPart equal 1
#variable partDens equal 1.13 # density
#variable partDens equal 1.13 # density
variable dt equal 0.00005
variable skin equal 0.005
@ -33,39 +33,39 @@ variable skin equal 0.005
variable vthre equal 0.0005
###############################################
atom_style granular
atom_modify map array
communicate single vel yes
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
boundary f f f
newton off
units si
processors 1 1 4
region reg block -${cylrad} ${cylrad} -${cylrad} ${cylrad} 0.0 0.9 units box
create_box 1 reg
region reg block -${cylrad} ${cylrad} -${cylrad} ${cylrad} 0.0 0.9 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
neighbor 0.001 bin
neigh_modify delay 0
#Material properties required for new pair styles
#Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
fix m5 all property/global coefficientRollingFriction peratomtypepair 1 ${roll}
fix m6 all property/global characteristicVelocity scalar ${cV}
#pair style
pair_style gran model hertz tangential history rolling_friction cdt
pair_style gran model hertz tangential history rolling_friction cdt
pair_coeff * *
#timestep, gravity
timestep ${dt}
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
fix zwall all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwall all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder ${cylrad} 0. 0.
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant ${partDens} radius constant ${partRad}
@ -73,20 +73,20 @@ fix pdd1 all particledistribution/discrete 1.0 1 pts1 1.0
region insReg cylinder z 0. 0. ${cylrad} 0.5 0.9 units box
fix ins all insert/rate/region seed 1001 distributiontemplate pdd1 nparticles ${nPart} particlerate 10000 insert_every 1000 vel constant 0. 0. -0.1 overlapcheck yes all_in yes region insReg ntry_mc 10000
fix ins all insert/rate/region seed 1001 distributiontemplate pdd1 nparticles ${nPart} particlerate 10000 insert_every 1000 vel constant 0. 0. -0.1 overlapcheck yes all_in yes region insReg ntry_mc 10000
#fix loadBalancing all balance 10000 z 10 1.05
#fix loadBalancing all balance 10000 z 10 1.05
fix integr all nve/sphere
fix integr all nve/sphere
fix ts_check all check/timestep/gran 10000 0.1 0.1
fix ts_check all check/timestep/gran 10000 0.1 0.1
#screen output
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol
thermo 10000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 10000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#======================================================================
#- settling
@ -98,14 +98,14 @@ variable vcmz equal vcm(all,z)
variable vave equal sqrt(v_vcmx*v_vcmx+v_vcmy*v_vcmy+v_vcmz*v_vcmz)
print ${vave}
dump dmp1 all custom/vtk 20000 ../DEM/post/dump*.liggghts_filling.vtk id type type x y z vx vy vz fx fy fz radius
dump dmp1 all custom/vtk 20000 ../DEM/post/dump*.liggghts_filling.vtk id type x y z vx vy vz fx fy fz radius
run 200000
label loop
print "-----> Checking Velocity..."
if "${vave}<${vthre}" then "jump in.liggghts_init endloop"
print "-----> v ave ${vave}, v threshold ${vthre}, continuing run"
print "-----> v ave ${vave}, v threshold ${vthre}, continuing run"
run 10000
jump in.liggghts_init loop
@ -117,7 +117,7 @@ label endloop
region delReg block -${cylrad} ${cylrad} -${cylrad} ${cylrad} ${fillH} INF units box
run 1 every 1 "delete_atoms region delReg"
#write_restart liggghts.restart.prelim
#write_restart liggghts.restart.prelim
run 10000
write_restart liggghts.restart_${partRad}
write_restart liggghts.restart_${partRad}
print "everything done"

View File

@ -1,18 +1,18 @@
# Pour granular particles into chute container, then induce flow
# Pour granular particles into a cylinder, then induce flow
#variables
# DEM-parameters
variable partDens equal 1732 # density
variable partRad equal 0.00184 # particle radius
variable partDens equal 1732 # density
variable partRad equal 0.00184 # particle radius
variable partVol equal 4*3.14/3*${partRad}^3
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.25 # Poisson ratio
variable rest equal 0.66 # coefficient of restitution
variable fric equal 0.95 # coefficient of friction
variable roll equal 0.15 # for particles and walls with friction
variable noRoll equal 0 # for frictionless walls
variable cV equal 0.1 # characteristic velocity
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.25 # Poisson ratio
variable rest equal 0.66 # coefficient of restitution
variable fric equal 0.95 # coefficient of friction
variable roll equal 0.15 # for particles and walls with friction
variable noRoll equal 0 # for frictionless walls
variable cV equal 0.1 # characteristic velocity
variable Tpart equal 293
# Geometry
@ -24,73 +24,72 @@ variable skin equal 0.005
atom_style granular
atom_modify map array
communicate single vel yes
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
boundary f f f
newton off
units si
processors 1 1 4
read_restart ../DEM/liggghts.restart_${partRad}
reset_timestep 0
read_restart ../DEM/liggghts.restart_${partRad}
reset_timestep 0
neighbor 0.01 bin
neigh_modify delay 0
neighbor 0.01 bin
neigh_modify delay 0
#Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
#Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
fix m5 all property/global coefficientRollingFriction peratomtypepair 1 ${roll}
fix m6 all property/global characteristicVelocity scalar ${cV}
fix ftco all property/global thermalConductivity peratomtype 1.4
fix ftca all property/global thermalCapacity peratomtype 840.
fix heattransfer all heat/gran initial_temperature 293.
fix ftco all property/global thermalConductivity peratomtype 1.4
fix ftca all property/global thermalCapacity peratomtype 840.
fix heattransfer all heat/gran initial_temperature 293.
#pair style
pair_style gran model hertz tangential history rolling_friction cdt
pair_coeff * *
pair_style gran model hertz tangential history rolling_friction cdt
pair_coeff * *
#timestep, gravity
timestep ${dt}
timestep ${dt}
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
fix zwall all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwall all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwall_top all wall/gran model hertz tangential history primitive type 1 zplane 0.54
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder ${cylrad} 0. 0.
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder ${cylrad} 0. 0.
# change the particles density
# set group all density ${partDens}
# set group all density ${partDens}
fix lb all balance 1000 xyz 10 1.05 out tmp.balance
#cfd coupling
fix cfd all couple/cfd couple_every 10 mpi
fix cfd2 all couple/cfd/force/implicit
fix cfd3 all couple/cfd/convection T0 ${Tpart}
fix cfd all couple/cfd couple_every 10 mpi
fix cfd2 all couple/cfd/force/implicit
fix cfd3 all couple/cfd/convection T0 ${Tpart}
# freeze particles
#fix integr all nve/sphere
#fix integr all nve/sphere
#screen output
variable totmass equal mass(all)
compute 1 all erotate/sphere
thermo_style custom step atoms ke c_1 vol v_totmass
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol v_totmass
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
dump dmp all custom/vtk 40000 ../DEM/post/dump*.liggghts_coupled.vtk id type x y z vx vy vz fx fy fz radius f_Temp[0]
dump dmp all custom/vtk 40000 ../DEM/post/dump*.liggghts_coupled.vtk id type x y z vx vy vz fx fy fz radius f_Temp[0]
run 1