mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Limiter for isotropic fluctuations.
This commit is contained in:
@ -82,6 +82,7 @@ isotropicFluctuations::isotropicFluctuations
|
|||||||
sm.mesh(),
|
sm.mesh(),
|
||||||
dimensionedScalar("D0", dimensionSet(0,0,0,0,0,0,0), D0_)
|
dimensionedScalar("D0", dimensionSet(0,0,0,0,0,0,0), D0_)
|
||||||
),
|
),
|
||||||
|
maxDisplacement_(propsDict_.lookupOrDefault<scalar>("maxDisplacement", -1.0)),
|
||||||
dtDEM_(particleCloud_.dataExchangeM().DEMts()),
|
dtDEM_(particleCloud_.dataExchangeM().DEMts()),
|
||||||
ranGen_(clock::getTime()+pid())
|
ranGen_(clock::getTime()+pid())
|
||||||
{
|
{
|
||||||
@ -126,6 +127,9 @@ void isotropicFluctuations::setForce() const
|
|||||||
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
|
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
|
||||||
interpolationCellPoint<scalar> voidfractionRecInterpolator_(voidfractionRec_);
|
interpolationCellPoint<scalar> voidfractionRecInterpolator_(voidfractionRec_);
|
||||||
|
|
||||||
|
scalar maxVel = maxDisplacement_ / dtDEM_;
|
||||||
|
scalar magFlucU = 0.0;
|
||||||
|
|
||||||
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
|
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
|
||||||
{
|
{
|
||||||
cellI = particleCloud_.cellIDs()[index][0];
|
cellI = particleCloud_.cellIDs()[index][0];
|
||||||
@ -157,7 +161,15 @@ void isotropicFluctuations::setForce() const
|
|||||||
if(deltaVoidfrac>0)
|
if(deltaVoidfrac>0)
|
||||||
{
|
{
|
||||||
D = D0Field_[cellI];
|
D = D0Field_[cellI];
|
||||||
flucU=unitFlucDir()*fluctuationMag(relVolfractionExcess,D);
|
magFlucU = fluctuationMag(relVolfractionExcess,D);
|
||||||
|
if (maxVel > 0.0 && magFlucU > maxVel)
|
||||||
|
{
|
||||||
|
flucU=unitFlucDir()*maxVel;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flucU=unitFlucDir()*fluctuationMag(relVolfractionExcess,D);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// write particle based data to global array
|
// write particle based data to global array
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
CFDEMcoupling academic - Open Source CFD-DEM coupling
|
CFDEMcoupling academic - Open Source CFD-DEM coupling
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
Thomas Lichtenegger
|
Thomas Lichtenegger
|
||||||
Copyright (C) 2015- Johannes Kepler University, Linz
|
Copyright (C) 2015- Johannes Kepler University, Linz
|
||||||
@ -46,24 +46,24 @@ class isotropicFluctuations
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
dictionary propsDict_;
|
dictionary propsDict_;
|
||||||
|
|
||||||
bool interpolate_;
|
bool interpolate_;
|
||||||
|
|
||||||
bool measureDiff_;
|
bool measureDiff_;
|
||||||
|
|
||||||
mutable OFstream recErrorFile_;
|
mutable OFstream recErrorFile_;
|
||||||
|
|
||||||
// ignore fluctuations in region
|
// ignore fluctuations in region
|
||||||
word ignoreCellsName_;
|
word ignoreCellsName_;
|
||||||
|
|
||||||
autoPtr<cellSet> ignoreCells_;
|
autoPtr<cellSet> ignoreCells_;
|
||||||
|
|
||||||
bool existIgnoreCells_;
|
bool existIgnoreCells_;
|
||||||
|
|
||||||
word voidfractionFieldName_;
|
word voidfractionFieldName_;
|
||||||
|
|
||||||
const volScalarField& voidfraction_;
|
const volScalarField& voidfraction_;
|
||||||
|
|
||||||
word voidfractionRecFieldName_;
|
word voidfractionRecFieldName_;
|
||||||
|
|
||||||
const volScalarField& voidfractionRec_;
|
const volScalarField& voidfractionRec_;
|
||||||
@ -76,6 +76,8 @@ protected:
|
|||||||
|
|
||||||
volScalarField D0Field_;
|
volScalarField D0Field_;
|
||||||
|
|
||||||
|
scalar maxDisplacement_;
|
||||||
|
|
||||||
const scalar dtDEM_;
|
const scalar dtDEM_;
|
||||||
|
|
||||||
virtual vector unitFlucDir() const;
|
virtual vector unitFlucDir() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user