33 template<
class CloudType>
47 const typename CloudType::parcelType&
p = iter();
53 if (useEquivalentSize_)
55 dEff *=
cbrt(
p.nParticle()*volumeFactor_);
58 rMin =
min(dEff, rMin);
60 rhoMax =
max(
p.rho(), rhoMax);
76 template<
class CloudType>
79 typename CloudType::parcelType&
p,
81 const WallSiteData<vector>& data,
86 const polyMesh& mesh = this->owner().mesh();
89 label wPI = patchMap_[data.patchIndex()];
92 scalar Estar = Estar_[wPI];
93 scalar Gstar = Gstar_[wPI];
94 scalar
alpha = alpha_[wPI];
97 scalar cohesionEnergyDensity = cohesionEnergyDensity_[wPI];
98 cohesion = cohesion && cohesion_[wPI];
100 vector r_PW =
p.position(mesh) - site;
102 vector U_PW =
p.U() - data.wallData();
104 scalar r_PW_mag =
mag(r_PW);
106 scalar normalOverlapMag =
max(pREff - r_PW_mag, 0.0);
108 vector rHat_PW = r_PW/(r_PW_mag + vSmall);
110 scalar kN = (4.0/3.0)*
sqrt(pREff)*Estar;
116 *(kN*
pow(normalOverlapMag,
b) - etaN*(U_PW & rHat_PW));
123 -cohesionEnergyDensity
131 U_PW - (U_PW & rHat_PW)*rHat_PW
132 + (
p.omega() ^ (pREff*-rHat_PW));
134 scalar deltaT = this->owner().mesh().time().deltaTValue();
136 vector& tangentialOverlap_PW =
137 p.collisionRecords().matchWallRecord(-r_PW, pREff).collisionData();
139 tangentialOverlap_PW += USlip_PW*deltaT;
141 scalar tangentialOverlapMag =
mag(tangentialOverlap_PW);
143 if (tangentialOverlapMag > vSmall)
145 scalar kT = 8.0*
sqrt(pREff*normalOverlapMag)*Gstar;
152 if (kT*tangentialOverlapMag >
mu*
mag(fN_PW))
157 fT_PW = -
mu*
mag(fN_PW)*USlip_PW/
mag(USlip_PW);
159 tangentialOverlap_PW =
Zero;
164 -kT*tangentialOverlapMag
165 *tangentialOverlap_PW/tangentialOverlapMag
171 p.torque() += (pREff*-rHat_PW) ^ fT_PW;
178 template<
class CloudType>
191 cohesionEnergyDensity_(),
195 collisionResolutionSteps_
197 this->coeffDict().template lookup<scalar>(
"collisionResolutionSteps")
200 useEquivalentSize_(
Switch(this->coeffDict().lookup(
"useEquivalentSize")))
202 if (useEquivalentSize_)
205 this->
coeffDict().template lookup<scalar>(
"volumeFactor");
228 label nWallPatches = wallPatchIndices.
size();
235 cohesionEnergyDensity_.
setSize(nWallPatches);
236 cohesion_.setSize(nWallPatches);
238 scalar maxEstar = -great;
240 forAll(wallPatchIndices, wPI)
247 patchMap_[wallPatchIndices[wPI]] = wPI;
249 scalar nu = patchCoeffDict.template lookup<scalar>(
"poissonsRatio");
251 scalar E = patchCoeffDict.template lookup<scalar>(
"youngsModulus");
253 Estar_[wPI] = 1/((1 -
sqr(pNu))/pE + (1 -
sqr(nu))/E);
255 Gstar_[wPI] = 1/(2*((2 + pNu -
sqr(pNu))/pE + (2 + nu -
sqr(nu))/E));
257 alpha_[wPI] = patchCoeffDict.template lookup<scalar>(
"alpha");
259 b_[wPI] = patchCoeffDict.template lookup<scalar>(
"b");
261 mu_[wPI] = patchCoeffDict.template lookup<scalar>(
"mu");
263 cohesionEnergyDensity_[wPI] =
264 patchCoeffDict.
lookup<scalar>(
"cohesionEnergyDensity");
266 cohesion_[wPI] = (
mag(cohesionEnergyDensity_[wPI]) > vSmall);
268 if (Estar_[wPI] > maxEstar)
270 maxEstarIndex_ = wPI;
272 maxEstar = Estar_[wPI];
280 template<
class CloudType>
287 template<
class CloudType>
293 if (useEquivalentSize_)
295 return p.d()/2*
cbrt(
p.nParticle()*volumeFactor_);
304 template<
class CloudType>
311 template<
class CloudType>
314 if (!this->owner().size())
319 scalar rMin, rhoMax, UMagMax;
320 findMinMaxProperties(rMin, rhoMax, UMagMax);
323 const scalar minCollisionDeltaT =
326 *
pow(rhoMax/(Estar_[maxEstarIndex_]*
sqrt(UMagMax) + small), 0.4)
327 /collisionResolutionSteps_;
329 return ceil(this->owner().time().deltaTValue()/minCollisionDeltaT);
333 template<
class CloudType>
343 scalar pREff = this->pREff(
p);
345 forAll(flatSitePoints, siteI)
350 flatSitePoints[siteI],
357 forAll(sharpSitePoints, siteI)
364 sharpSitePoints[siteI],
365 sharpSiteData[siteI],
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Templated base class for dsmc cloud.
const List< typename ParcelType::constantProperties > & constProps() const
Return all of the constant properties.
ParcelType parcelType
Type of parcel the cloud was instantiated for.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Forces between particles and walls, interacting with a spring, slider, damper model.
virtual label nSubCycles() const
For WallModels that control the timestep, calculate the.
virtual ~WallLocalSpringSliderDashpot()
Destructor.
WallLocalSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
virtual scalar pREff(const typename CloudType::parcelType &p) const
Return the effective radius for a particle for the model.
virtual bool controlsTimestep() const
Whether the WallModel has a timestep limit that will.
Templated wall interaction class.
const dictionary & coeffDict() const
Return the coefficients dictionary.
const CloudType & owner() const
Return the owner cloud object.
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
A cloud is a collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const polyBoundaryMesh & bMesh
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
const dimensionedScalar mu
Atomic mass unit.
DSMCCloud< dsmcParcel > CloudType
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
word name(const bool)
Return a word representation of a bool.
vector point
Point is a vector.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)