塑性区体积显示程序
def get_plast
shearnow = 1 tensionnow = 2 shearpast = 4 tensionpast = 8 v_shear_now = 0 v_tension_now = 0 v_shear_past = 0 v_tension_past = 0
p_z = zone_head loop while p_z # null
if and(z_state(p_z,0),shearnow) = shearnow then v_shear_now = v_shear_now + z_volume(p_z) endif
if and(z_state(p_z,0),tensionnow) = tensionnow then v_tension_now = v_tension_now + z_volume(p_z) endif
if and(z_state(p_z,0),shearpast) = shearpast then v_shear_past = v_shear_past + z_volume(p_z) endif
if and(z_state(p_z,0),tensionpast) = tensionpast then v_tension_past = v_tension_past + z_volume(p_z) endif
p_z = z_next(p_z) endloop
ii = out('shear_now : ' + string(v_shear_now)) ii = out('tension_now : ' + string(v_tension_now)) ii = out('shear_past : ' + string(v_shear_past)) ii = out('tension_past : ' + string(v_tension_past)) end
get_plast