Principal stress directions

In FLAC3D 5, there was a function z_pstress that returned principal stress magnitudes and directions. In FLAC3D 6 and above, this function no longer exists. Instead you can get the full stress tensor and do tensor operations to get what you need. Simple example below:

model new
zone create brick
zone cmodel assign el
zone prop dens 2500 bulk 1e9 shear 0.6e9
zone face apply vel 0 0 0 range pos-z 0
model grav 10
model large-strain off
model solve

fish def get_stress_dir
  zp = zone.near(5,5,5)

  ; get stress as a tensor
  stress_tensor = zone.stress(zp)

  ; return a list of 4 vectors (magnitudes and 3 directions)
  principal_stresses = tensor.prin.dir(stress_tensor)

  mag = principal_stresses(1) ; vector

  io.out('min stress (most compressive): '+string(mag(1)))
  io.out('intermediate stress: '+string(mag(2)))
  io.out('max stress (least compressive): '+string(mag(3)))

  io.out('min stress direction: '+string(principal_stresses(2)))
  io.out('intermediate stress direction: '+string(principal_stresses(3)))
  io.out('max stress direction: '+string(principal_stresses(4)))
end
[get_stress_dir]
3 Likes