jfieldstone
Mechanical
- Jan 18, 2016
- 2
Hello all,
I am developing a 3D boundary element program where I have only surface elements (4-node quads and 3-node tris), but that are oriented in 3D space. Likewise, I want to compute x,y,z gradients on each of these faces.
I have a nodal solution (phi), and I want to compute dphi/dx, dphi/dy, dphi/dz.
I have successfully done this for quads, but cannot seem to figure it out for triangles.
For the quad-4 with linear shape functions:
N = [1/4*(1+xi)*(1+eta) 1/4(1+xi)*(1-eta) 1/4(1-xi)*(1-eta) 1/4(1-xi)*(1-eta)]
I can compute the differential operators in x,y,z (dNdx, dNdy, and dNdz) by simply computing 2 tangential vectors (dxdxi, dxdeta, dydxi, dydeta, dzdxi, dzdeta):
e1 = dNdxi*[ex,ey,ez]
and
e2 = dNdeta*[ex,ey,ez]
Taking the cross product of these gives me my surface gradient:
e3 = cross(e1,e2)
Then using these 3 vectors as my jacobian:
Jac = [e1; e2; e3];
I can invert my jacobian to compute dxidx,dxidy,dxidz, detadx,detady,detadz, and finally post multiply with dNdxi and dNdeta again to compute dNdx, dNdy, dNdz:
dNdx = Jac(1,1)^-1*dNdxi + Jac(1,2)^-1*dNdeta
dNdy = Jac(2,1)^-1*dNdxi + Jac(2,2)^-1*dNdeta
dNdz = Jac(3,1)^-1*dNdxi + Jac(3,2)^-1*dNdeta
These work well, and I get the correct gradients.
But now for the 3-node triangle, it's not so straight forward. I have formulated the TRI-3 with 3 local coordinates (xi, eta, and zeta), where my shape functions are just:
N = [xi eta zeta],
and so:
dN = I (identity).
How can I compute dNdx, dNdy, and dNdz for the linear 3-node triangle?
Any help is appreciated, and thank you in advance.
I am developing a 3D boundary element program where I have only surface elements (4-node quads and 3-node tris), but that are oriented in 3D space. Likewise, I want to compute x,y,z gradients on each of these faces.
I have a nodal solution (phi), and I want to compute dphi/dx, dphi/dy, dphi/dz.
I have successfully done this for quads, but cannot seem to figure it out for triangles.
For the quad-4 with linear shape functions:
N = [1/4*(1+xi)*(1+eta) 1/4(1+xi)*(1-eta) 1/4(1-xi)*(1-eta) 1/4(1-xi)*(1-eta)]
I can compute the differential operators in x,y,z (dNdx, dNdy, and dNdz) by simply computing 2 tangential vectors (dxdxi, dxdeta, dydxi, dydeta, dzdxi, dzdeta):
e1 = dNdxi*[ex,ey,ez]
and
e2 = dNdeta*[ex,ey,ez]
Taking the cross product of these gives me my surface gradient:
e3 = cross(e1,e2)
Then using these 3 vectors as my jacobian:
Jac = [e1; e2; e3];
I can invert my jacobian to compute dxidx,dxidy,dxidz, detadx,detady,detadz, and finally post multiply with dNdxi and dNdeta again to compute dNdx, dNdy, dNdz:
dNdx = Jac(1,1)^-1*dNdxi + Jac(1,2)^-1*dNdeta
dNdy = Jac(2,1)^-1*dNdxi + Jac(2,2)^-1*dNdeta
dNdz = Jac(3,1)^-1*dNdxi + Jac(3,2)^-1*dNdeta
These work well, and I get the correct gradients.
But now for the 3-node triangle, it's not so straight forward. I have formulated the TRI-3 with 3 local coordinates (xi, eta, and zeta), where my shape functions are just:
N = [xi eta zeta],
and so:
dN = I (identity).
How can I compute dNdx, dNdy, and dNdz for the linear 3-node triangle?
Any help is appreciated, and thank you in advance.