33template<
class CloudType>
45 for (
const typename CloudType::parcelType&
p : this->owner())
51 if (useEquivalentSize_)
53 dEff *=
cbrt(
p.nParticle()*volumeFactor_);
56 rMin =
min(dEff, rMin);
74template<
class CloudType>
77 typename CloudType::parcelType&
p,
79 const WallSiteData<vector>& data,
85 label wPI = patchMap_[data.patchIndex()];
88 scalar Estar = Estar_[wPI];
89 scalar Gstar = Gstar_[wPI];
90 scalar
alpha = alpha_[wPI];
93 scalar cohesionEnergyDensity = cohesionEnergyDensity_[wPI];
94 cohesion = cohesion && cohesion_[wPI];
96 vector r_PW =
p.position() - site;
98 vector U_PW =
p.U() - data.wallData();
100 scalar r_PW_mag =
mag(r_PW);
102 scalar normalOverlapMag =
max(pREff - r_PW_mag, 0.0);
104 vector rHat_PW = r_PW/(r_PW_mag + VSMALL);
106 scalar kN = (4.0/3.0)*
sqrt(pREff)*Estar;
112 *(kN*
pow(normalOverlapMag,
b) - etaN*(U_PW & rHat_PW));
119 -cohesionEnergyDensity
120 *mathematical::pi*(
sqr(pREff) -
sqr(r_PW_mag))
127 U_PW - (U_PW & rHat_PW)*rHat_PW
128 + (
p.omega() ^ (pREff*-rHat_PW));
130 scalar deltaT = this->owner().mesh().time().deltaTValue();
132 vector& tangentialOverlap_PW =
133 p.collisionRecords().matchWallRecord(-r_PW, pREff).collisionData();
135 tangentialOverlap_PW += USlip_PW*deltaT;
137 scalar tangentialOverlapMag =
mag(tangentialOverlap_PW);
139 if (tangentialOverlapMag > VSMALL)
141 scalar kT = 8.0*
sqrt(pREff*normalOverlapMag)*Gstar;
148 if (kT*tangentialOverlapMag >
mu*
mag(fN_PW))
153 fT_PW = -
mu*
mag(fN_PW)*USlip_PW/
mag(USlip_PW);
155 tangentialOverlap_PW = Zero;
160 -kT*tangentialOverlapMag
161 *tangentialOverlap_PW/tangentialOverlapMag
167 p.torque() += (pREff*-rHat_PW) ^ fT_PW;
174template<
class CloudType>
187 cohesionEnergyDensity_(),
191 collisionResolutionSteps_
193 this->coeffDict().getScalar(
"collisionResolutionSteps")
196 useEquivalentSize_(
Switch(this->coeffDict().
lookup(
"useEquivalentSize")))
198 if (useEquivalentSize_)
217 if (isA<wallPolyPatch>(pp))
219 wallPatchIndices.
append(pp.index());
223 label nWallPatches = wallPatchIndices.
size();
230 cohesionEnergyDensity_.
setSize(nWallPatches);
231 cohesion_.setSize(nWallPatches);
233 scalar maxEstar = -GREAT;
235 forAll(wallPatchIndices, wPI)
242 patchMap_[wallPatchIndices[wPI]] = wPI;
244 scalar
nu = patchCoeffDict.
get<scalar>(
"poissonsRatio");
246 scalar E = patchCoeffDict.
get<scalar>(
"youngsModulus");
248 Estar_[wPI] = 1/((1 -
sqr(pNu))/pE + (1 -
sqr(
nu))/E);
250 Gstar_[wPI] = 1/(2*((2 + pNu -
sqr(pNu))/pE + (2 +
nu -
sqr(
nu))/E));
252 alpha_[wPI] = patchCoeffDict.
get<scalar>(
"alpha");
254 b_[wPI] = patchCoeffDict.
get<scalar>(
"b");
256 mu_[wPI] = patchCoeffDict.
get<scalar>(
"mu");
258 cohesionEnergyDensity_[wPI] =
259 patchCoeffDict.
get<scalar>(
"cohesionEnergyDensity");
261 cohesion_[wPI] = (
mag(cohesionEnergyDensity_[wPI]) > VSMALL);
263 if (Estar_[wPI] > maxEstar)
265 maxEstarIndex_ = wPI;
267 maxEstar = Estar_[wPI];
275template<
class CloudType>
281 if (useEquivalentSize_)
283 return p.d()/2*
cbrt(
p.nParticle()*volumeFactor_);
290template<
class CloudType>
297template<
class CloudType>
300 if (!(this->owner().size()))
309 findMinMaxProperties(rMin,
rhoMax, UMagMax);
312 scalar minCollisionDeltaT =
315 *
pow(
rhoMax/(Estar_[maxEstarIndex_]*
sqrt(UMagMax) + VSMALL), 0.4)
316 /collisionResolutionSteps_;
318 return ceil(this->owner().time().deltaTValue()/minCollisionDeltaT);
322template<
class CloudType>
332 scalar pREff = this->pREff(
p);
334 forAll(flatSitePoints, siteI)
339 flatSitePoints[siteI],
346 forAll(sharpSitePoints, siteI)
353 sharpSitePoints[siteI],
354 sharpSiteData[siteI],
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.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(const label n)
Alias for resize()
A list of faces which address into the list of points.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
void size(const label n)
Older name for setAddressableSize.
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 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 registry collection of lagrangian particles.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
Lookup type of boundary radiation properties.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const volScalarField & mu
const dimensionedScalar rhoMax
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar cbrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.