Extracting sigmayy and sigmazz

hi all,

im trying to get inspiration from this topic published before

and i wondering if changing the number of 0 to 1 or 2 will give me the stretch and stress on y and z accorinatly “stretch_vec.append(defGrad(point)[1])”

if not, is there a suggestion on how to do it? to get the stress in yy and zz?

i refer to those lines in the code those lines

>     
>     # get stretch at a point for plotting
>     point = (0.5,0.5,0)
>     DF = I + grad(u_plot)
>     defGrad.assign(project(DF, W_DFnStress))
>     stretch_vec.append(defGrad(point)[0])
> 
>     # get stress at a point for plotting
>     PK1_s,thydpress = pk1Stress(u_plot,p_plot,E,nu)
>     PK1_stress.assign(project(PK1_s, W_DFnStress))
>     stress_vec.append(PK1_stress(point)[0])
>     

thanks in advance

hi all, maybe someone had a chance to take a look on it and might help me?

If I understand your question correctly, you have the 1st Piola-Kirchhoff stress tensor (PK1_stress) and you want to get its components at a given point.
PK1_stress(point) will return a vector (9 components in 3D) of the components of the tensor value at that point. If you are looking for values yy and zz they should lie on the diagonal of the tensor (index 4 and 8).