CNFSUB
Force_Contact要素の法線力を計算するために使用します。
使用
接触のカスタムな法線力を実装します。
<Force_Contact
id = "301001"
num_i_graphics = "1"
i_graphics_id = "90000"
num_j_graphics = "1"
j_graphics_id = "90001"
cnf_type = "UserCNF"
cnf_param_string = "USER(500.,1.5,0.5,0.01)"
cnf_fnc_name = "CNFSUB"
cnf_dll_name = "NULL"
cff_type = "Coulomb_On"
mu_static = "0.05"
mu_dynamic = "0.01"
stiction_trans_vel = "0.1"
friction_trans_vel = "0.5"
/>
フォーマット
- Fortranの呼出し構文
-
SUBROUTINE CNFSUB (ID, TIME, PAR, NPAR, LOCI, NI, LOCJ, NJ, GAP, GAPDOT, GAPDOTDOT, AREA, DFLAG, IFLAG, RESULTS)
- C/C++の呼出し構文
-
void STDCALL CNFSUB (int *id, double *time, double *par, int *npar, double *loci, double *ni, double *locj, double *nj, double *gap, double *gapdot, double *gapdotdot, int *dflag, int *iflag, double *result)
- Pythonの呼出し構文
-
def CNFSUB(id, time, par, npar, loci, ni, locj, nj, gap, gapdot, gapdotdot, dflag, iflag): return result
- MATLABの呼出し構文
-
function vector = CNFSUB(id, time, par, npar, loci, ni, locj, nj, gap, gapdot, gapdotdot, dflag, iflag)
属性
- AREA
- [倍精度]
- DFLAG
- [論理]
- GAP
- [倍精度]
- GAPDOT
- [倍精度]
- GAPDOTDOT
- [倍精度]
- ID
- [整数]
- IFLAG
- [論理]
- LOCI
- [倍精度]
- LOCJ
- [倍精度]
- NI
- [倍精度]
- NJ
- [倍精度]
- NPAR
- [整数]
- PAR
- [倍精度]
- TIME
- [倍精度]
出力
- RESULT
- [倍精度]
例
def CNFSUB(id, time, par, npar, loci, ni, locj, nj, gap, gapdot, gapdotdot, dflag, iflag):
stiffness = par[0]
exponent = par[1]
damping = par[2]
dmax = par[3]
spring_force = stiffness*pow(fabs(gap),exponent)
[tmp,errflg] = py_step(gap,-dmax,damping,0.0,0.0,0)
damping_force = -tmp*gapdot
result =3*[0]
result[0] = spring_force+damping_force
if result[0]<0.0:
result[0] = 0.0
return result