Question on tracking the number of subcontacts experiencing sliding or dilation at different iteration steps

How can I monitor the subcontact states (sliding, dilation, etc.) of joint sets in 3DEC 7.0? I want to track the number of subcontacts experiencing sliding or dilation at different iteration steps in the model. Thank you very much!

Hi @JLUJYP !

You could use the fish history command.

In PS of this message, I give a script modified after the slip.dat file from 3DEC documentation.

When plotting the history at the end of the run, I get this result for the number of sliding points (cyan line in the picture):

The key points are:

  • setting a Fish function to keep track of number of subcontacts (3DEC command fish define nsliding_nodesin script below)
  • setting the interval history with the 3DEC history interval command
  • setting the actual tracking with the 3DEC fish history name command

You can then customize the subcontacts states you want to keep track of with other state values (see the States section in link above).

Notice that history command lets you track values on regular intervals.
You can also base your tracking on events rather than on regular intervals (e.g., each time a subcontact enters sliding), see the fish callback 3DEC command.

Hope it helps!

Regards

Théophile

PS : the script

; Example from 3DEC documentation, modified to keep track of number of sliding/ruptured joints
; doc/3dec/docproject/source/theory/mohrcoulomb/mohrcoulomb.html

model new
model large-strain on

;   Coulomb slip joint model
;   direct shear test
;
block create brick  -0.15,0.15 -0.10,0.10 -0.10,0
block create brick  -0.10,0.10  -0.10,0.10 0,0.10

block zone generate edgelength  0.02

block zone cmodel assign elastic
block zone prop  dens=0.0026  bulk=4000   shear=3000
;
 ;  Coulomb slip model
block contact jmodel assign mohr
block contact prop stiffness-normal=100000 stiffness-shear=100000  ...
                   friction=30.0 dilation 15 dilation-zero 6e-4

;; Use cohesion for weakening behavior
;block contact prop cohesion 10

block contact material-table default prop stiffness-normal=100000  ...
                                          stiffness-shear=100000  ...
                                          friction=30.0 dilation 15 ...
                                          dilation-zero 6e-4

block hide range pos-z 0 1
block gridpoint apply vel 0 0 0 range pos-z -1 0.1
block hide off
;
; normal load
block face apply stress 0 0 -50  0 0 0 range pos-z 0.1
;
model cycle 100

fish define nsliding_nodes
    ; Compute number of sliding nodes
    local nnodes = 0
    loop foreach local cpnt block.contact.list()
        loop foreach local cxpnt block.contact.subcontactlist(cpnt)
            local sliding_now = math.and(block.subcontact.state(cxpnt), 1)
            if sliding_now
                nnodes += 1
            end_if
        end_loop
    end_loop
    nsliding_nodes = nnodes
end
;
block contact reset disp
block contact reset state

; shear load
block hide range pos-z -.1 0.0
block gridpoint apply  vel-x=0.005 range pos-z -.1 1.1
block gridpoint apply  vel-y 0 range pos-z -1 1
block hide off
;
his interval 5
fish hist name 'N sliding' nsliding_nodes

model cyc 30000

;model save 'slip1'
program return

Thank you for your kind response. The information you provided has been very helpful to me. Wishing you a joyful life!

I’m glad it helped!

Regards

Théophile