Skip to content

Commit 498e7b7

Browse files
committed
Not sure
1 parent f481333 commit 498e7b7

4 files changed

Lines changed: 35 additions & 7 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if __name__ == '__main__':
22
from FEM import NewtonTotalLagrangian, MGDCM, ContinumTotalLagrangian, QuadMembraneLinear, Geometry3D
3-
# from FEM.Elements.ContinumElements import QuadShellLinearReddy as QuadShellLinear
3+
from FEM.Elements.ContinumElements import QuadShellLinearReddy as QuadShellLinear
44
from FEM.Elements.ContinumElements import QuadShellLinear
55
import matplotlib.pyplot as plt
66
import numpy as np

Examples/safarrancho7-3.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,14 @@ def cm(_E):
9898
uij_num = JINV @ uij_num.T
9999
uij_num = uij_num.T
100100
a = 0
101+
for w in W:
102+
JS, _JS = e.get_jacobians(w)
103+
FS = e.calculate_deformation_gradients(w)
104+
thetas = e.derivatives_transformation()
105+
for i, z in enumerate(e.Z):
106+
JINV = _JS[i]
107+
dpx = e.calculate_dpxs(w, i, JINV)
108+
BNL = e.calculate_BNL(dpx)
109+
UIJ = FS[i] - np.eye(3)
110+
theta = thetas[i]
111+
a = 0

src/FEM/Elements/ContinumElements/Shells_reddy.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ def calculate_A(self, F):
105105
dudx = F+np.eye(3)
106106
A = np.zeros((6, 9))
107107
A[0, 0] = dudx[0, 0]
108-
A[0, 3] = dudx[0, 1]
109-
A[0, 6] = dudx[0, 2]
108+
A[0, 3] = dudx[1, 0]
109+
A[0, 6] = dudx[2, 0]
110110

111-
A[1, 1] = dudx[1, 0]
111+
A[1, 1] = dudx[0, 1]
112112
A[1, 4] = dudx[1, 1]
113-
A[1, 7] = dudx[1, 2]
113+
A[1, 7] = dudx[2, 1]
114114

115-
A[2, 2] = dudx[2, 0]
116-
A[2, 5] = dudx[2, 1]
115+
A[2, 2] = dudx[0, 2]
116+
A[2, 5] = dudx[1, 2]
117117
A[2, 8] = dudx[2, 2]
118118

119119
fila = np.array([dudx[0, 1], dudx[0, 0], 0, dudx[1, 1],

src/FEM/Elements/ContinumElements/Shells_rem.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,22 @@ def calculate_deformation_gradients(self, w):
311311
FS.append(F)
312312
return FS
313313

314+
def derivatives_transformation(self):
315+
thetas = []
316+
e1s, e2s, e3s = self.calculate_e1_e2(deformed=True)
317+
for k in range(len(self._p)):
318+
phik = self._p[k]
319+
theta = np.zeros((3, 3))
320+
for i in range(len(self.coords)):
321+
e1 = e1s[i]
322+
e2 = e2s[i]
323+
e3 = e3s[i]
324+
theta[:, 0] += e1*phik[i]
325+
theta[:, 1] += e2*phik[i]
326+
theta[:, 2] += e3*phik[i]
327+
thetas.append(theta)
328+
return thetas
329+
314330
def elementMatrices(self) -> None:
315331
"""Calculate element matrices and vectors.
316332
@@ -325,6 +341,7 @@ def elementMatrices(self) -> None:
325341
t_z, t_w = np.polynomial.legendre.leggauss(self.n_gauss_thickness)
326342
Ke = 0.0
327343
Fe = 0.0
344+
THETAS = self.derivatives_transformation()
328345
for z_t, w_t in zip(t_z, t_w):
329346
JS, _JS = self.get_jacobians(z_t)
330347
FS = self.calculate_deformation_gradients(z_t)

0 commit comments

Comments
 (0)