Go to the documentation of this file.
21 #ifndef __cGRelativeLinearCF_hpp__
22 #define __cGRelativeLinearCF_hpp__
37 template<
bool limited=true>
100 auto nElem = kn.
size();
103 if(nElem != kt.
size())
106 "sizes of kn("<<nElem<<
") and kt("<<kt.
size()<<
") do not match.\n";
110 if(nElem != en.
size())
113 "sizes of kn("<<nElem<<
") and en("<<en.
size()<<
") do not match.\n";
117 if(nElem != et.
size())
120 "sizes of kn("<<nElem<<
") and et("<<et.
size()<<
") do not match.\n";
124 if(nElem != mu.
size())
127 "sizes of kn("<<nElem<<
") and mu("<<mu.
size()<<
") do not match.\n";
137 "sizes of properties do not match a symetric array with size ("<<
144 "size mismatch for porperties. \n"<<
145 "you supplied "<<
numMaterial_<<
" items in materials list and "<<
146 nMat <<
" for other properties.\n";
158 etha_t[i] = -2.0*
log( et[i])*
sqrt(kt[i]*2/7) /
167 prop[i] = {kn[i], kt[i], en[i], etha_t[i], mu[i] };
172 auto adm = dict.
getVal<
word>(
"additionalDissipationModel");
183 else if (adm ==
"GB")
198 if constexpr (limited)
200 return "cGRelativeLinearLimited";
204 return "cGRelativeLinearNonLimited";
220 rho_(
"rho",nMaterial),
224 Kokkos::deep_copy(
rho_,rho);
277 real f_ = ( cGFi + cGFj )/2 ;
288 real sqrt_meff =
sqrt((mi*mj)/(mi+mj));
293 prop.en_ =
sqrt(1+((
pow(prop.en_,2)-1)*f_));
304 FCn = ( -
pow(f_,1.0)*prop.kn_ * ovrlp_n - sqrt_meff *
pow(f_,0.5) * ethan_ * vrn)*Nij;
305 FCt = ( -
pow(f_,1.0)*prop.kt_ * history.
overlap_t_ - sqrt_meff *
pow(f_,0.5) * prop.ethat_*Vt);
316 if constexpr (limited)
323 FCt = (FCt/ft)*ft_fric;
Vector< T, Allocator > exp(const Vector< T, Allocator > &v)
INLINE_FUNCTION_HD int32 numMaterial() const
cGRelativeLinear(int32 nMaterial, const ViewType1D< real > &rho, const dictionary &dict)
#define fatalExit
Fatal exit.
LinearArrayType linearProperties_
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 ~cGRelativeLinear()=default
INLINE_FUNCTION_HD linearProperties()
INLINE_FUNCTION_HD ~linearProperties()=default
auto size() const
Size of the vector.
int32 addDissipationModel_
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
Report a fatal error and function name and exit the application.
INLINE_FUNCTION_HD T length(const triple< T > &v1)
Vector< T, Allocator > log(const Vector< T, Allocator > &v)
#define ForAll(i, container)
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
static const char * modelName()
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
#define INLINE_FUNCTION_HD
INLINE_FUNCTION_HD linearProperties & operator=(const linearProperties &)=default
INLINE_FUNCTION_HD cGRelativeLinear & operator=(const cGRelativeLinear &)=default
INLINE_FUNCTION_HD cGRelativeLinear()
bool readLinearDictionary(const dictionary &dict)
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...