Go to the documentation of this file.
21 #ifndef __nonLinearModCF_hpp__
22 #define __nonLinearModCF_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 != etha_n.
size())
94 "sizes of Yeff("<<nElem<<
") and etha_n("<<etha_n.
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";
127 prop[i] = {Yeff[i], Geff[i], etha_n[i], mu[i]};
138 if constexpr (limited)
140 return "nonLinearModLimited";
144 return "nonLinearModNonLimited";
162 rho_(
"rho",nMaterial),
166 Kokkos::deep_copy(
rho_,rho);
226 real Reff = 1.0/(1/Ri + 1/Rj);
228 real K_hertz = 4.0/3.0*prop.Yeff_*
sqrt(Reff);
229 real sqrt_meff_K_hertz =
sqrt((mi*mj)/(mi+mj) * K_hertz);
231 FCn = (
static_cast<real>(-4.0/3.0) * prop.Yeff_ *
sqrt(Reff)*
pow(ovrlp_n,
static_cast<real>(1.5)) -
232 prop.ethan_*
pow(ovrlp_n,
static_cast<real>(0.5))*vrn)*Nij;
234 FCt = (-
static_cast<real>(16.0/3.0) * prop.Geff_ *
sqrt(Reff*ovrlp_n) ) * history.
overlap_t_;
244 if constexpr (limited)
246 real kt =
static_cast<real>(16.0/3.0) * prop.Geff_ *
sqrt(Reff*ovrlp_n);
252 FCt = (FCt/ft)*ft_fric;
269 #endif //__nonLinearModCF_hpp__
#define fatalExit
Fatal exit.
INLINE_FUNCTION_HD nonLinearProperties(real Yeff, real Geff, real etha_n, real mu)
Vector< T, Allocator > pow(const Vector< T, Allocator > &v1, const Vector< T, Allocator > &v2)
Vector< T, Allocator > sqrt(const Vector< T, Allocator > &v)
INLINE_FUNCTION_HD nonLinearMod()
INLINE_FUNCTION_HD void contactForce(const real dt, const uint32 i, const uint32 j, const uint32 propId_i, const uint32 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
auto size() const
Size of the vector.
INLINE_FUNCTION_HD ~nonLinearMod()=default
INLINE_FUNCTION_HD nonLinearProperties & operator=(const nonLinearProperties &)=default
static bool getN(uint32 nElem, uint32 &n)
INLINE_FUNCTION_HD int32 numMaterial() const
INLINE_FUNCTION_HD T dot(const quadruple< T > &oprnd1, const quadruple< T > &oprnd2)
bool assign(const Vector< T > src)
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
INLINE_FUNCTION_HD T length(const triple< T > &v1)
static const char * modelName()
#define ForAll(i, container)
INLINE_FUNCTION_HD nonLinearMod & operator=(const nonLinearMod &)=default
bool readNonLinearDictionary(const dictionary &dict)
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
T getVal(const word &keyword) const
get the value of data entry
INLINE_FUNCTION_HD nonLinearProperties()
NonLinearArrayType nonlinearProperties_
nonLinearMod(int32 nMaterial, const ViewType1D< real > &rho, const dictionary &dict)
INLINE_FUNCTION_HD ~nonLinearProperties()=default
#define INLINE_FUNCTION_HD
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...