Go to the documentation of this file.
21 #ifndef __nonLinearCF_hpp__
22 #define __nonLinearCF_hpp__
29 template<
bool limited=true>
82 auto nElem = Yeff.
size();
84 if(nElem != nu.
size())
87 "sizes of Yeff("<<nElem<<
") and nu("<<nu.
size()<<
") do not match.\n";
91 if(nElem != en.
size())
94 "sizes of Yeff("<<nElem<<
") and en("<<en.
size()<<
") do not match.\n";
99 if(nElem != mu.
size())
102 "sizes of Yeff("<<nElem<<
") and mu("<<mu.
size()<<
") do not match.\n";
112 "sizes of properties do not match a symetric array with size ("<<
119 "size mismatch for porperties. \n";
133 etha_n[i] = -2.2664*
log(en[i])/
143 prop[i] = {Yeff[i], Geff[i], etha_n[i], mu[i]};
154 if constexpr (limited)
156 return "nonLinearLimited";
160 return "nonLinearNonLimited";
178 rho_(
"rho",nMaterial),
182 Kokkos::deep_copy(
rho_,rho);
219 const int32 propId_i,
220 const int32 propId_j,
242 real Reff = 1.0/(1/Ri + 1/Rj);
244 real K_hertz = 4.0/3.0*prop.Yeff_*
sqrt(Reff);
245 real sqrt_meff_K_hertz =
sqrt((mi*mj)/(mi+mj) * K_hertz);
247 FCn = (
static_cast<real>(-4.0/3.0) * prop.Yeff_ *
sqrt(Reff)*
pow(ovrlp_n,
static_cast<real>(1.5)) -
248 sqrt_meff_K_hertz*prop.ethan_*
pow(ovrlp_n,
static_cast<real>(0.25))*vrn)*Nij;
250 FCt = (-
static_cast<real>(8.0) * prop.Geff_ *
sqrt(Reff*ovrlp_n) ) * history.
overlap_t_;
260 if constexpr (limited)
262 real kt =
static_cast<real>(8.0) * prop.Geff_ *
sqrt(Reff*ovrlp_n);
268 FCt = (FCt/ft)*ft_fric;
INLINE_FUNCTION_HD ~nonLinearProperties()=default
INLINE_FUNCTION_HD ~nonLinear()=default
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
INLINE_FUNCTION_HD nonLinear()
INLINE_FUNCTION_HD nonLinearProperties(real Yeff, real Geff, real etha_n, real mu)
INLINE_FUNCTION_HD real log(real x)
static bool getN(uint32 nElem, uint32 &n)
NonLinearArrayType nonlinearProperties_
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)
nonLinear(int32 nMaterial, const ViewType1D< real > &rho, const dictionary &dict)
#define ForAll(i, container)
INLINE_FUNCTION_HD nonLinear & operator=(const nonLinear &)=default
static const char * modelName()
T getVal(const word &keyword) const
Kokkos::View< T *, properties... > ViewType1D
bool readNonLinearDictionary(const dictionary &dict)
INLINE_FUNCTION_HD int32 numMaterial() const
INLINE_FUNCTION_HD real sqrt(real x)
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD nonLinearProperties & operator=(const nonLinearProperties &)=default
INLINE_FUNCTION_HD nonLinearProperties()