3d anisotropic tensor

I have made some anisotropic models in 2d linear elasticity like :

alfa=30
a=alfa*np.pi/180
G=5
nu=0.3
R=2.5
Ex=30
Ey=Ex/R
a11 = np.sin(a)**4/Ey + np.cos(a)**4/Ex + np.sin(2*a)**2*0.25*(1/G-2*nu/Ey)
a12 = np.sin(2*a)**2*0.25*(Ey**-1+Ex**-1-G**-1)-nu*Ey**-1*(np.cos(a)**4+np.sin(a)**4)
a16 = np.sin(2*a)*((np.sin(a)**2/Ey-np.cos(a)**2/Ex)+(0.5*G**-1-nu*Ex**-1)*np.cos(2*a))
a22 = np.cos(a)**4/Ey+np.sin(a)**4/Ex+np.sin(2*a)**2/4*(G**-1-2*nu/Ey)
a26 = np.sin(2*a)*((np.cos(a)**2/Ey-np.sin(a)**2/Ex)-(0.5/G-nu/Ey)*np.cos(2*a))
a66 = np.sin(2*a)**2*(1/Ey+1/Ex+2*nu/Ey)+np.cos(2*a)**2/G

S = as_matrix([[a11,a12,a16],[a12,a22,a26],[a16,a26,a66]])
C = inv(S)
x_max = 969.3292
def eps(v):
  return sym(grad(v))
def strain2voigt(e):
#"""e is a 2nd-order tensor, returns its Voigt vectorial representation"""
  return as_vector([e[0,0],e[1,1],2*e[0,1]])
def voigt2stress(s):
#"""
#s is a stress-like vector (no 2 factor on last component)
#returns its tensorial representation
#"""
  return as_tensor([[s[0], s[2]],
  [s[2], s[1]]])
def sigma(v):
  return voigt2stress(dot(C, strain2voigt(eps(v))))

Now, i have to do this in a 3d model, but i dont found the correct way to do the voigt formulation in the 3d case to trasnform my anisotropic tensor. I hope you can help me