Go to the documentation of this file.
21 #ifndef __cGAbsoluteLinearCF_hpp__
22 #define __cGAbsoluteLinearCF_hpp__
37 template<
bool limited=true>
99 auto nElem = kn.
size();
101 if(nElem != kt.
size())
104 "sizes of kn("<<nElem<<
") and kt("<<kt.
size()<<
") do not match.\n";
108 if(nElem != kt.
size())
111 "sizes of kn("<<nElem<<
") and kt("<<kt.
size()<<
") do not match.\n";
115 if(nElem != en.
size())
118 "sizes of kn("<<nElem<<
") and en("<<en.
size()<<
") do not match.\n";
122 if(nElem != et.
size())
125 "sizes of kn("<<nElem<<
") and et("<<et.
size()<<
") do not match.\n";
129 if(nElem != mu.
size())
132 "sizes of kn("<<nElem<<
") and mu("<<mu.
size()<<
") do not match.\n";
142 "sizes of properties do not match a symetric array with size ("<<
149 "size mismatch for porperties. \n"<<
150 "you supplied "<<
numMaterial_<<
" items in materials list and "<<
151 nMat <<
" for other properties.\n";
161 etha_t[i] = -2.0*
log( et[i])*
sqrt(kt[i]*2/7) /
168 prop[i] = {kn[i], kt[i], en[i], etha_t[i], mu[i] };
173 auto adm = dict.
getVal<
word>(
"additionalDissipationModel");
184 else if (adm ==
"GB")
199 if constexpr (limited)
201 return "cGAbsoluteLinearLimited";
205 return "cGAbsoluteLinearNonLimited";
221 rho_(
"rho",nMaterial),
225 Kokkos::deep_copy(
rho_,rho);
280 real f_ = ( cGFi + cGFj )/2 ;
291 real sqrt_meff =
sqrt((mi*mj)/(mi+mj));
297 prop.en_ =
sqrt(1+((
pow(prop.en_,2)-1)*f_));
314 FCn = ( -
pow(f_,3.0)*prop.kn_ * ovrlp_n - sqrt_meff *
pow(f_,1.5) * ethan_ * vrn)*Nij;
315 FCt = ( -
pow(f_,3.0)*prop.kt_ * history.
overlap_t_ - sqrt_meff *
pow(f_,1.5) * prop.ethat_*Vt);
326 if constexpr (limited)
333 FCt = (FCt/ft)*ft_fric;
Vector< T, Allocator > exp(const Vector< T, Allocator > &v)
cGAbsoluteLinear(int32 nMaterial, const ViewType1D< real > &rho, const dictionary &dict)
#define fatalExit
Fatal exit.
INLINE_FUNCTION_HD ~cGAbsoluteLinear()=default
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 linearProperties & operator=(const linearProperties &)=default
bool readLinearDictionary(const dictionary &dict)
INLINE_FUNCTION_HD linearProperties()
auto size() const
Size of the vector.
INLINE_FUNCTION_HD cGAbsoluteLinear & operator=(const cGAbsoluteLinear &)=default
static bool getN(uint32 nElem, uint32 &n)
INLINE_FUNCTION_HD ~linearProperties()=default
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 cGFi, const real cGFj, const real ovrlp_n, const realx3 &Vr, const realx3 &Nij, contactForceStorage &history, realx3 &FCn, realx3 &FCt) 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()
INLINE_FUNCTION_HD cGAbsoluteLinear()
Vector< T, Allocator > log(const Vector< T, Allocator > &v)
#define ForAll(i, container)
LinearArrayType linearProperties_
INLINE_FUNCTION_HD linearProperties(real kn, real kt, real en, real etha_t, real mu)
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
T getVal(const word &keyword) const
get the value of data entry
int32 addDissipationModel_
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD int32 numMaterial() const
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...