33 template<
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);
74 template<
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
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;
174 template<
class CloudType>
187 cohesionEnergyDensity_(),
191 collisionResolutionSteps_
193 this->coeffDict().getScalar(
"collisionResolutionSteps")
196 useEquivalentSize_(
Switch(this->coeffDict().
lookup(
"useEquivalentSize")))
198 if (useEquivalentSize_)
207 const polyMesh&
mesh = cloud.
mesh();
209 const polyBoundaryMesh&
bMesh =
mesh.boundaryMesh();
213 DynamicList<label> wallPatchIndices;
215 for (
const polyPatch&
pp :
bMesh)
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)
237 const dictionary& patchCoeffDict
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];
275 template<
class CloudType>
281 if (useEquivalentSize_)
283 return p.d()/2*
cbrt(
p.nParticle()*volumeFactor_);
290 template<
class CloudType>
297 template<
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);
322 template<
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],
WallLocalSpringSliderDashpot(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
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.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const dictionary & coeffDict() const
Return the coefficients dictionary.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const CloudType & owner() const
Return the owner cloud object.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Forces between particles and walls, interacting with a spring, slider, damper model.
dimensionedScalar pow025(const dimensionedScalar &ds)
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type get(const label i) const
Return bool value at specified position, always false for out-of-range access.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Lookup type of boundary radiation properties.
virtual bool controlsTimestep() const
Whether the WallModel has a timestep limit that will.
#define forAll(list, i)
Loop across all elements in list.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
void setSize(const label n)
Alias for resize()
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A cloud is a registry collection of lagrangian particles.
dimensionedScalar cbrt(const dimensionedScalar &ds)
constexpr scalar pi(M_PI)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Templated wall interaction class.
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
ParcelType parcelType
Type of parcel the cloud was instantiated for.
const dimensionedScalar mu
Atomic mass unit.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const fvMesh & mesh() const
Return reference to the mesh.
vector point
Point is a vector.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
PrimitivePatch< List< face >, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points) ...
Templated base class for dsmc cloud.
const List< typename ParcelType::constantProperties > & constProps() const
Return all of the constant properties.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const dimensionedScalar rhoMax
static constexpr const zero Zero
Global zero (0)