Go to the documentation of this file.
21 #ifndef __linearCF_hpp__
22 #define __linearCF_hpp__
30 template<
bool limited=true>
86 auto nElem = kn.
size();
89 if(nElem != kt.
size())
92 "sizes of kn("<<nElem<<
") and kt("<<kt.
size()<<
") do not match.\n";
96 if(nElem != en.
size())
99 "sizes of kn("<<nElem<<
") and en("<<en.
size()<<
") do not match.\n";
103 if(nElem != et.
size())
106 "sizes of kn("<<nElem<<
") and et("<<et.
size()<<
") do not match.\n";
110 if(nElem != mu.
size())
113 "sizes of kn("<<nElem<<
") and mu("<<mu.
size()<<
") do not match.\n";
123 "sizes of properties do not match a symetric array with size ("<<
130 "size mismatch for porperties. \n"<<
131 "you supplied "<<
numMaterial_<<
" items in materials list and "<<
132 nMat <<
" for other properties.\n";
140 etha_n[i] = -2.0*
log(en[i])*
sqrt(kn[i])/
143 etha_t[i] = -2.0*
log( et[i]*
sqrt(kt[i]) )/
150 prop[i] = {kn[i], kt[i], etha_n[i], etha_t[i], mu[i]};
161 if constexpr (limited)
163 return "linearLimited";
167 return "linearNonLimited";
183 rho_(
"rho",nMaterial),
187 Kokkos::deep_copy(
rho_,rho);
224 const int32 propId_i,
225 const int32 propId_j,
248 real sqrt_meff =
sqrt((mi*mj)/(mi+mj));
250 FCn = (-prop.kn_ * ovrlp_n - sqrt_meff * prop.ethan_ * vrn)*Nij;
251 FCt = -prop.kt_ * history.
overlap_t_ - sqrt_meff * prop.ethat_*Vt;
260 if constexpr (limited)
267 FCt = (FCt/ft)*ft_fric;
INLINE_FUNCTION_HD int32 numMaterial() const
LinearArrayType linearProperties_
INLINE_FUNCTION_HD void contactForce(const real dt, const int32 i, const int32 j, const int32 propId_i, const int32 propId_j, const real Ri, const real Rj, const real ovrlp_n, const realx3 &Vr, const realx3 &Nij, contactForceStorage &history, realx3 &FCn, realx3 &FCt) const
bool readLinearDictionary(const dictionary &dict)
INLINE_FUNCTION_HD ~linear()=default
INLINE_FUNCTION_HD real log(real x)
static bool getN(uint32 nElem, uint32 &n)
INLINE_FUNCTION_HD T dot(const quadruple< T > &oprnd1, const quadruple< T > &oprnd2)
bool assign(const Vector< T > src)
#define fatalErrorInFunction
INLINE_FUNCTION_HD T length(const triple< T > &v1)
Vector< T, Allocator > pow(const Vector< T, Allocator > &v, T e)
linear(int32 nMaterial, const ViewType1D< real > &rho, const dictionary &dict)
INLINE_FUNCTION_HD linearProperties()
INLINE_FUNCTION_HD linear()
#define ForAll(i, container)
T getVal(const word &keyword) const
INLINE_FUNCTION_HD ~linearProperties()=default
INLINE_FUNCTION_HD linearProperties & operator=(const linearProperties &)=default
static const char * modelName()
Kokkos::View< T *, properties... > ViewType1D
INLINE_FUNCTION_HD linearProperties(real kn, real kt, real etha_n, real etha_t, real mu)
INLINE_FUNCTION_HD real sqrt(real x)
INLINE_FUNCTION_HD linear & operator=(const linear &)=default
#define INLINE_FUNCTION_HD