- #1
doenn1616
- 5
- 0
- TL;DR Summary
- Have tested 2D triangular shape functions successfully but having trouble with 3D.
Hi, 2 part question trying to get tetrahedron Finite Element shape functions working: 1) How do I properly setup the shape coefficient matrix and 2) How do I build the coefficient quantities in the shape functions properly? ANY tips or corrections may unblock me and would be of much value!
Following J.T. Oden's "Finite Elements of Nonlinear Continua" (McGraw Hill), general simplex:
Tetrahedron Simplex:
Permutation symbol steps and shape coefficient matrix (C) description:
I attached the full Matlab test. I don't mind if this works in Matlab or anything else, as long as I can understand. Flow of my Matlab:
Tetrahedron points. I read the ordering of these is critical so that the coefficient matrix is positive (not sure if this is true?):
First struggle:
Within buildShapeCoeff() I did this (Line 100) in order to get a positive determinant... Is this needed? I tried without and the bNi coefficient in 10.105b kept coming up zero?
shapeCoeffRes = shapeCoeffRes' % Transpose rowmajor versus colmajor
Lines 45 and 46 yield 1/6C or -1/6C as required:
Then I try calculating aN and bNi (Figures 10.105a and 10.105b) with the following:
Finally at line 62 I try calculating Figure 10.101b. The result is not 0 but it is out of range of expectations. If ANY more detail is required, I can provide quickly.
Following J.T. Oden's "Finite Elements of Nonlinear Continua" (McGraw Hill), general simplex:
Tetrahedron Simplex:
Permutation symbol steps and shape coefficient matrix (C) description:
I attached the full Matlab test. I don't mind if this works in Matlab or anything else, as long as I can understand. Flow of my Matlab:
Tetrahedron points. I read the ordering of these is critical so that the coefficient matrix is positive (not sure if this is true?):
Code:
p1 = [2,0,8]
p2 = [2,0,0]
p3 = [12,0,0]
p4 = [2,8,0]
Code:
points = buildPoints(p1,p2,p3,p4) % Just organization of points
shapeCoeff = buildShapeCoeff(p1,p2,p3,p4)
First struggle:
Within buildShapeCoeff() I did this (Line 100) in order to get a positive determinant... Is this needed? I tried without and the bNi coefficient in 10.105b kept coming up zero?
shapeCoeffRes = shapeCoeffRes' % Transpose rowmajor versus colmajor
Lines 45 and 46 yield 1/6C or -1/6C as required:
Code:
aCoeffPrefix = buildACoeffPrefix(shapeCoeff) %Line 45
bCoeffPrefix = buildBCoeffPrefix(shapeCoeff) %Line 46
Code:
aVals = calcAVals(aCoeffPrefix, points) % Line 48
bVals = calcBVals(bCoeffPrefix, points) % Line 50
Finally at line 62 I try calculating Figure 10.101b. The result is not 0 but it is out of range of expectations. If ANY more detail is required, I can provide quickly.
Attachments
Last edited by a moderator: