Data Files for “Hertz Contact Model” Problem

cmhertz-setup.p3dat

; fname: cmhertz-setup.p3dat
;     Setup shared parameters, loading path and history monitoring 
; =============================================================================

model domain extent -2 2 -2 2 condition periodic
contact cmat default model hertz property hz_shear 1e9 hz_poiss 0.3 fric 0.5
model mechanical timestep fix 1e-3

fish define monitor
  modeltime = mech.time.total
  cnforce = 0
  cnvforce = 0
  csforce = 0
  csvforce = 0
  loop foreach local cp contact.list
    hz_f_loc = contact.prop(cp,'hz_force')  
    cnforce  = comp.x(hz_f_loc)
    hz_fs_loc = hz_f_loc
    comp.x(hz_fs_loc) = 0.0
    csforce  = math.mag(hz_fs_loc)
    hz_fs_glob = contact.to.global(cp,hz_fs_loc)
    cxsforce  = comp.x(hz_fs_glob)
    cysforce  = comp.y(hz_fs_glob)
    czsforce  = comp.z(hz_fs_glob)    
    cnvforce = comp.x(contact.prop(cp,'dp_force'))
    csvforce = comp.y(contact.prop(cp,'dp_force'))
  endloop
end

fish callback add @monitor 50.0

history interval 1
model history name 1 mechanical time-total
model history name 2 timestep
fish history name 100 @cnforce
fish history name 101 @cnvforce
fish history name 102 @cxsforce
fish history name 103 @cysforce
fish history name 104 @czsforce

fish history name 105 @csforce
fish history name 106 @csvforce

model energy mechanical on
model history name 1000 mechanical energy energy-strain
model history name 1001 mechanical energy energy-slip
model history name 1002 mechanical energy energy-dashpot

fish define loading_path(root,n)
  local fnamea = string.build('%1%2d_load%3a',root,global.dim,n)
  local fnameb = string.build('%1%2d_load%3b',root,global.dim,n)
  local fnamec = string.build('%1%2d_load%3c',root,global.dim,n)
  local fnamed = string.build('%1%2d_load%3d',root,global.dim,n)
  local fnamee = string.build('%1%2d_load%3e',root,global.dim,n)
  command
    ball attribute velocity-y -0.01 range id 1
model solve time 1e-1
    model save @fnamea
    ball attribute velocity-y 0 spin-z 0.00628 range id 1
model solve time 5e-2
    model save @fnameb
    ball attribute spin multiply 0.0 spin-x 0.00628 range id 1
model solve time 5e-2
    model save @fnamec
    ball attribute spin multiply 0.0 spin-y 6.28 range id 1
model solve time 5e-2
    model save @fnamed
    ball attribute spin multiply 0.0 velocity-y 0.01 range id 1
model solve time 1e-1
    model save @fnamee
  endcommand
end

return
; =============================================================================
; eof: cmhertz-setup.p3dat

cmhertzbb.p3dat

; fname: cmhertzbb.p3dat
;     Exercise the Hertz contact model under multiple loading paths
; =============================================================================
model new
model title 'Exercising the Hertz contact model (ball-ball contact)'

call 'cmhertz-setup.p3dat' suppress

ball create id=2 position-x=0.0 position-y=0.0 radius=0.5 
ball create id=1 position-x=0.0 position-y=1.0 radius=0.5

ball attribute density 2500.0
ball fix velocity-x velocity-y velocity-z spin-x spin-y spin-z
model clean
model save 'hzbb3d_ini'

; load 1 : 
@loading_path('hzbb',1)

; load 2 :  hz_mode = 1
model restore 'hzbb3d_ini'
contact property hz_mode 1
@loading_path('hzbb',2)

; load 3 :  hz_mode = 1 - normal and shear viscous damping
model restore 'hzbb3d_ini'
contact property hz_mode 1     ...
                 dp_nratio 0.5 ...
                 dp_sratio 0.5 ...
                 dp_mode  3  

@loading_path('hzbb',3)

return
; =============================================================================
;eof: cmhertzbb.p3dat

cmhertzbw.p3dat

; fname: cmhertzbw.p3dat
;     Exercise the Hertz contact model under multiple loading paths
; =============================================================================
model new
model title 'Excercising the Hertz contact model (ball-wall interaction)'

call 'cmhertz-setup.p3dat' suppress

wall generate id=1 disk radius=0.5 position 0.0 0.5 0.0 dip 90 resolution 0.1
ball create id=1 position-x=0.0 position-y=1.0 radius=0.5

ball attribute density 2500.0
ball fix velocity-x velocity-y velocity-z spin-x spin-y spin-z
model clean
model save 'hzbw3d_ini'

; load 1 : 
@loading_path('hzbw',1)

; load 2 :  hz_mode = 1
model restore 'hzbw3d_ini'
contact property hz_mode 1
@loading_path('hzbw',2)

; load 3 :  hz_mode = 1 - normal and shear viscous damping
model restore 'hzbw3d_ini'
contact property hz_mode 1     ...
                 dp_nratio 0.5 ...
                 dp_sratio 0.5 ...
                 dp_mode  3

@loading_path('hzbw',3)

return
; =============================================================================
;eof: cmhertzbw.p3dat