Tria3R - Triangular element with reduced integration (pyfe3d.tria3r)#
The module has three classes: Tria3RData, with the sizes of the
sparse arrays that one element fills; Tria3RProbe, with the
buffers in element coordinates that one or more elements share; and
Tria3R, the element. The update_* methods of Tria3R
write the element contributions in sparse row, column and value arrays, from
the positions given by its init_k_* attributes, or add them to a global
internal force vector.
Three-node triangular shell element with 6 degrees-of-freedom per node, \(u\), \(v\), \(w\), \(r_x\), \(r_y\), \(r_z\), first-order shear deformation theory.
The transverse shear strains are, by default, those of the discrete shear
gap (DSG) field of pyfe3d.tria3dsg.Tria3DSG,
selected by the shear_model attribute of Tria3R, 1 by
default, with the alpha_shear_locking attribute 0. by default. The
membrane field is enriched with the drilling rotations of Allman, which is
what distinguishes this element from pyfe3d.tria3dsg.Tria3DSG. With
shear_model = 0 the transverse shear is sampled at the centroid and its
stiffness divided by \(1 + \alpha \ell^2/h^2\), e.g. with
alpha_shear_locking = 0.7; that field does not converge on thin plates
and shells, see the Notes.
The drilling rotation \(r_z\) is given stiffness by one of two models, selected
with the drilling_model attribute of Tria3R: the physics-based
default, for which the nodal moments about the shell normal recovered in the
internal force vector are physical and no user parameter is involved, and a
fictitious penalty scaled by K6ROT, whose only purpose is to remove the singularity of the drilling
degree-of-freedom. Geometrically nonlinear analyses with the von Kármán
membrane strains are supported by Tria3R.update_fint() with
nonlinear=1, Tria3R.update_KCNL() and Tria3R.update_KG().
Notes#
The membrane, bending and extension-bending coupling terms, constant over
the linear triangle, are integrated with a single point at the centroid
(\(S1=S2=S3=1/3\)), with the weight \(1/2\) times the Jacobian determinant
\(2 A_e\), i.e. the area \(A_e\). The drilling stiffness is evaluated with full
integration. Under the default drilling_model = 0 this applies to the
terms of the Allman enrichment, the Hughes-Brezzi term being integrated with
a single point at the centroid, see the drilling stiffness below.
Transverse shear, the default shear_model = 1
The transverse shear strains are the gradient of the interpolated shear gap
of Bletzinger, Bischoff and Ramm [8], averaged over the three choices of the
starting node, the operator of pyfe3d.tria3dsg.Tria3DSG, whose Notes
give its derivation and properties: the rigid-body modes, a state of constant
transverse shear and every state of constant curvature are reproduced
exactly, the last being the locking-free property. The operator is added to
the element matrix through the same 18 by 18 block as the Allman term, see
dsg_shear_Ke(). The bending, transverse shear, geometric stiffness and
mass matrices of the two triangles are then identical, and on a flat plate
in bending, buckling or vibration, where the membrane is decoupled from the
bending, the two give the same results to round-off, measured at \(2 \times
10^{-10}\). alpha_shear_locking defaults to 0.; a non-zero value
applies the factor below on top of the DSG field, exactly as
Tria3DSG does, whose Notes give the measurements.
The Allman membrane is the only difference from Tria3DSG. It
improves the in-plane bending, e.g. of the skew membrane of Cook with the
reference of Felippa [11] (Sec. 9.3), and the response of shells that mixes
membrane and bending, e.g. of the Scordelis-Lo roof and the pinched cylinder
of Belytschko et al. [12] and of the twisted beam of MacNeal and Harder
[13]. On a coarse mesh of a doubly curved surface in inextensional bending,
e.g. the pinched hemisphere of [12], the drilling rotation of one facet is
made of the rotations that bend its neighbours, and the edge modes of the
Allman field turn them into membrane strain, which stiffens the
deformation. This stiffening is in the enrichment, not in the Hughes-Brezzi
coefficient: the penalty drilling model, drilling_model = 1, which has
no Allman field, does not show it, reducing gamma_rz hundredfold does
not remove it, and it vanishes with mesh refinement.
Transverse shear with shear_model = 0
The transverse shear strains are sampled at the centroid, and the transverse shear stiffnesses \(A_{44}\), \(A_{45}\) and \(A_{55}\) are divided by \(1 + factor\), with
where \(\alpha\) is the alpha_shear_locking attribute, \(\ell\) the longest
edge of the triangle and \(h\) the total thickness. It is the scalar factor
that Lyly, Stenberg and Vihinen [1] proposed for the MITC4 quadrilateral,
their Eq. (3.12), called Stenberg’s method by Bischoff and Bletzinger [2]
(Sec. 3.1), in the form of Castro et al. [3] (Eq. (26)), with the longest
edge of the triangle as the element size. The values of those references
are near \(0.1\), roughly seven times smaller than \(\alpha = 0.7\) of the
measurements below: in all of them the factor sits on top of an
assumed-strain or DSG field, which already removes the locking, whereas the
centroid sample locks, and here the factor has to do the unlocking.
Warning
With shear_model = 0 the element does not converge on thin
plates and shells. The factor tends to zero only when \(\ell\) falls well
below \(h\), \(\ell < 0.12 h\) for 1 per cent; before that, the
centroid-sampled field it scales still locks, and the error stalls at a
value set by \(\alpha\) and by the mesh pattern. Lyly, Stenberg and
Vihinen [1] (p. 348) state that the stabilisation was first introduced
for a piecewise quadratic deflection, and that a linear or bilinear
deflection needs an MITC reduction operator with it; the centroid
sample is neither. Measured on a simply supported square plate under a
uniform pressure, with \(n \times n\) squares cut along one diagonal,
against the closed form of Timoshenko and Woinowsky-Krieger [14]
(Table 8, p. 120), the error of the centre deflection, in per cent, is:
n x n squares 8x8 16x16 32x32 64x64 128x128
a/h = 1000, alpha 0.7 -8.6 -13.0 -14.1 -14.4 -14.3
a/h = 100, alpha 0.7 -8.5 -12.8 -13.3 -11.6 -7.3
a/h = 1000, alpha 0.1 -52.1 -51.5 -51.3 -50.9 -49.6
a/h = 1000, alpha 0.3 -26.8 -27.4 -27.5 -27.5 -27.1
a/h = 1000, alpha 2 +20.0 +0.8 -4.1 -5.3 -5.6
a/h = 1000, default -66.4 -12.3 -0.81 -0.09 -0.02
The buckling load of that plate under a uniform compression, \(a/h =
1000\), stalls at +16.4 per cent and its first frequency at +8.0 per cent
with \(\alpha = 0.7\), where the default converges to +0.02 per cent. On
shells, with \(\alpha = 0.7\) and \(N \times N\) cells split in two, the
pinched hemisphere of [12] stalls at 0.826 of the reference from \(N =
32\) to 64 and the Scordelis-Lo roof is at 0.894 with \(N = 64\). A
larger \(\alpha\) moves the stall at the price of a much too flexible
coarse mesh, and on a thin cylinder in buckling the large factor admits
a mode at two elements per wavelength, the mesh Nyquist limit, that
undercuts the physical one, see
tests/test_quad4_linear_buckling_cylinder_displ.py; no single value
serves every problem or every mesh. On the coarse meshes of very thin
plates, where the DSG field of the default is itself stiff, e.g. the
clamped plates of MacNeal and Harder [13], this
field gives a closer answer, but it does not converge to it.
The transverse shear stiffnesses \(A_{44}\), \(A_{45}\) and \(A_{55}\) are read
from the pyfe3d.shellprop.ShellProp object with the shear correction
already applied, see pyfe3d.shellprop.ShellProp.calc_transverse_shear_stiffness(),
and brought to the element coordinate system with
pyfe3d.shellprop.ShellProp.calc_Ats_element(), before any factor of
alpha_shear_locking is applied. With shear_correction='rohwer' and
the plies available, that method re-evaluates the equilibrium-based stiffness
of Rohwer (1988) [9] with the plies rotated to the element coordinate
system.
Drilling stiffness
The FSDT kinematics contains no strain measure associated with \(r_z\), so the
rows and columns of the drilling degree-of-freedom would be empty and a mesh
of coplanar elements would give a singular global stiffness matrix. Two
models are available, selected with the drilling_model attribute, and the
formulation of each is the one documented for pyfe3d.quad4, to which
the reader is referred for the derivation.
Physics-based, the default (drilling_model = 0). The in-plane
displacement field is enriched with the hierarchical quadratic edge modes of
Allman [4], so that the drilling rotations produce membrane strain energy,
and the independently interpolated \(r_z\) is tied to the rotation of the
membrane field by the regularised functional of Hughes and Brezzi [5].
The amplitude of the mode of the edge \(k\) joining nodes \(i\) and \(j\) is \(a_k = \frac{\ell_k}{8}\left({r_z}_i - {r_z}_j\right)\), so the enrichment is the difference of the two drilling rotations already present at the ends of the edge and introduces no new degree-of-freedom. For the triangle the hierarchical bubble of that edge is
with \(S_i\) the area coordinates, equal to unity at the mid-point of the edge and zero at every vertex. The enrichment populates the drilling columns of the membrane operator, giving \(\tilde{\boldsymbol{B}}_m\), and the drilling residual becomes \(\tilde{\boldsymbol{B}}_{r_z} = \boldsymbol{S}^{r_z} + \frac{1}{2}\boldsymbol{\tilde S}^u_{,y} - \frac{1}{2}\tilde{\boldsymbol{S}}^v_{,x}\), whose contribution to the element stiffness matrix is \(\gamma_{r_z} \int_A \tilde{\boldsymbol{B}}_{r_z}^\top \tilde{\boldsymbol{B}}_{r_z} dA\) with \(\gamma_{r_z} = A_{66}\), a stiffness per unit length taken from the laminate, and not a user parameter. The curvature and transverse shear operators are untouched, the edge modes acting only on the in-plane translations, so the bending and the transverse shear response of the element are identical for the two drilling models.
Two quadrature choices matter. Because the derivatives of the bubbles are linear in the area coordinates, the drilling columns of \(\tilde{\boldsymbol{B}}_m\) vary linearly, and the terms quadratic in them are integrated with the three-point rule of degree of precision 2, first row of Table I in Cowper [10], the same one the element already used for its drilling terms. A single point at the centroid would leave those terms unsampled and would give the element five zero eigenvalues over its nine in-plane degrees-of-freedom instead of three. The Hughes-Brezzi term itself is integrated with a single point at the centroid, following Ibrahimbegovic et al. (1990) [7], which is what makes the element insensitive to \(\gamma_{r_z}\).
Unlike the penalty below, the added term is consistent rather than artificial: stationarity with respect to \(r_z\) gives \(r_z = \theta_z\) pointwise, so it contributes no energy at the exact solution for any positive \(\gamma_{r_z}\), and the nodal moments about the shell normal recovered in the internal force vector are physical. Note that the transverse shear stabilisation documented above scales the transverse shear stiffness only and does not interact with the drilling term, which draws its scale from \(A_{66}\) of the extensional stiffness matrix.
Fictitious penalty (drilling_model = 1), following the approach adopted in MSC Nastran and Autodesk Nastran
through their K6ROT parameter. It provides a small artificial stiffness
whose only purpose is to remove the singularity, so the forces associated
with it are spurious and any moment recovered about the shell normal is
meaningless. The penalty energy is defined per element as:
where \(10^{-6}\) is a scaling factor suggested by MSC Nastran’s approach
(CQUAD4) to make the artificial drilling stiffness sufficiently small. The
values of K6ROT are discussed in the Notes of Tria3R. The
rotation \(r_z\) represents the drilling
degree-of-freedom in element’s coordinates, whereas \(\theta_z\) the in-plane
rotation strain, defined as \(\theta_z = \frac{1}{2}\left(v_{,x} -
u_{,y}\right)\), such that the penalty is built from the operator
which is the same operator as \(\tilde{\boldsymbol{B}}_{r_z}\) above, evaluated on the unenriched field. Being built from that operator and not from an addition on the diagonal terms is what keeps the penalty from stiffening a rigid rotation of the element about its normal, so both models represent all rigid-body motions and all constant-strain states exactly. \(A_{66}\) is assumed constant over the element. This term is integrated with the three-point rule. The approach herein presented is very similar to the one presented in Eq. 2.20 of [6].
Zero-energy modes of a single element
The stiffness matrix KC0 of a single free element has seven zero
eigenvalues: the six rigid-body motions and one mode of the rotations,
in the element coordinates, \((x_c, y_c)\) being the centroid and \(c\) an
arbitrary constant. Its curvatures vanish, \(\kappa_{xx} = {r_y}_{,x} = 0\),
\(\kappa_{yy} = -{r_x}_{,y} = 0\) and \(\kappa_{xy} = -{r_x}_{,x} +
{r_y}_{,y} = c - c = 0\), and so does its transverse shear strain, constant with either shear_model.
The bending and the transverse shear have nine degrees-of-freedom, \(w\),
\(r_x\) and \(r_y\) of the three nodes, and at most five independent strains,
the three constant curvatures and the two constant transverse shear
strains, hence at least four zero modes, three of which are the rigid-body
motions \(w = \text{const.}\) and the rotations about the in-plane axes; the
membrane with its drilling term has only the three in-plane rigid-body
motions. The mode is the triangular counterpart of the spurious twisting
mode of the one-point quadrilateral, Eq. (13) of Brockman [15], p. 2347,
which exists for a single element but not in a mesh of two or more
elements. Measured with both shear_model and both drilling_model,
thicknesses of 0.001 to 0.1 times the size of the triangle, in the \(xy\)
plane and rotated out of it: seven zero eigenvalues, below \(10^{-15}\) times
the largest, with the eighth above \(10^{-8}\) times it; assembled, two
triangles of a square and four triangles about an interior node have only
the six rigid-body modes.
References#
Lyly, M., Stenberg, R., and Vihinen, T., A stable bilinear element for the Reissner-Mindlin plate model, Computer Methods in Applied Mechanics and Engineering, 110(3-4), 343-357, 1993. https://doi.org/10.1016/0045-7825(93)90214-I
Bischoff, M., and Bletzinger, K.-U., Improving stability and accuracy of Reissner-Mindlin plate finite elements via algebraic subgrid scale stabilization, Computer Methods in Applied Mechanics and Engineering, 193(15-16), 1517-1528, 2004. https://doi.org/10.1016/j.cma.2003.12.036
Castro, S. G. P., Donadon, M. V., and Guimaraes, T. A. M., ES-PIM applied to buckling of variable angle tow laminates, Composite Structures, 209, 67-78, 2019. https://doi.org/10.1016/j.compstruct.2018.10.058
Allman, D. J., A compatible triangular element including vertex rotations for plane elasticity analysis, Computers & Structures, 19(1-2), 1-8, 1984. https://doi.org/10.1016/0045-7949(84)90197-4
Hughes, T. J. R., and Brezzi, F., On drilling degrees of freedom, Computer Methods in Applied Mechanics and Engineering, 72(1), 105-121, 1989. https://doi.org/10.1016/0045-7825(89)90124-2
Adam, F. M., Mohamed, A. E., and Hassaballa, A. E., Degenerated Four Nodes Shell Element with Drilling Degree of Freedom, IOSR Journal of Engineering, 3(8), 10-20, 2013.
Ibrahimbegovic, A., Taylor, R. L., and Wilson, E. L., A robust quadrilateral membrane finite element with drilling degrees of freedom, International Journal for Numerical Methods in Engineering, 30(3), 445-457, 1990. https://doi.org/10.1002/nme.1620300305
Bletzinger, K.-U., Bischoff, M., and Ramm, E., A unified approach for shear-locking-free triangular and rectangular shell finite elements, Computers & Structures, 75(3), 321-334, 2000. https://doi.org/10.1016/S0045-7949(99)00140-6
Rohwer, K., Improved transverse shear stiffness for layered finite elements, DFVLR-FB 88-32, 1988.
Cowper, G. R., Gaussian quadrature formulas for triangles, International Journal for Numerical Methods in Engineering, 7(3), 405-408, 1973. https://doi.org/10.1002/nme.1620070316
Felippa, C. A., A study of optimal membrane triangles with drilling freedoms, Computer Methods in Applied Mechanics and Engineering, 192(16-18), 2125-2168, 2003. https://doi.org/10.1016/S0045-7825(03)00253-6
Belytschko, T., Stolarski, H., Liu, W. K., Carpenter, N., and Ong, J. S.-J., Stress projection for membrane and shear locking in shell finite elements, Computer Methods in Applied Mechanics and Engineering, 51(1-3), 221-258, 1985. https://doi.org/10.1016/0045-7825(85)90035-0
MacNeal, R. H., and Harder, R. L., A proposed standard set of problems to test finite element accuracy, Finite Elements in Analysis and Design, 1(1), 3-20, 1985. https://doi.org/10.1016/0168-874X(85)90003-4
Timoshenko, S., and Woinowsky-Krieger, S., Theory of Plates and Shells, 2nd ed., McGraw-Hill, 1959.
Brockman, R. A., Dynamics of the bilinear Mindlin plate element, International Journal for Numerical Methods in Engineering, 24(12), 2343-2356, 1987. https://doi.org/10.1002/nme.1620241208
- class pyfe3d.tria3r.Tria3R#
Three-node triangular shell element with reduced integration
Nodal connectivity for the triangular element similar to Nastran’s CTRIA3:
3 |\ | \ positive normal in CCW | \ |___\ 1 2
The element coordinate system is determined identically what is explained in Nastran’s quick reference guide for the CTRIA3 element, as illustrated below.
The constructor stores the probe and sets the identification numbers and the positions
c1, c2, c3to-1, theinit_k_*positions to0, the rotation matrixr11, ..., r33to zero andm11, m12, m21, m22to the identity. Before computing any element matrix, the caller setsc1, c2, c3and theinit_k_*positions, and callsupdate_rotation_matrix()andupdate_probe_xe().- Parameters:
- p
Tria3RProbe Probe used by the element, stored in
probe. One probe can be shared by many elements.
- p
- Attributes:
- eid,int
Element identification number.
- pid,int
Property identification number.
- area,double
Element area. Dimension of length squared. Updated by
update_area().- shear_model,int
Selects the transverse shear field. The default
1is the discrete shear gap field ofTria3DSG, free of shear locking without any parameter, seedsg_shear_Ke().0samples the shear strains at the centroid, to be used with a non-zeroalpha_shear_locking; it does not converge on thin plates and shells and is not recommended, see the module documentation.- alpha_shear_locking,double
Factor \(\alpha\) dividing the transverse shear stiffnesses
A44,A45,A55, already in the element coordinate system and with the shear correction applied (seeShellProp.calc_Ats_element()), by \(1 + \alpha \ell^2/h^2\), with \(\ell\) the longest edge and \(h\) the thickness. The default0.applies no factor. Withshear_model = 1a non-zero value is the stabilisation of Lyly, Stenberg and Vihinen on top of a locking-free field, as forTria3DSG, whose Notes give its effect. Withshear_model = 0the factor does the unlocking, e.g. with0.7;0.there leaves the field locked. Dimensionless.- drilling_model,int
Selects how the drilling degree-of-freedom \(r_z\) is given stiffness. The default
0is the physics-based stiffness, for which the recovered nodal moments about the shell normal are physical, and no user parameter is involved. Any other value selects the fictitious penalty of MSC Nastran and Autodesk Nastran, controlled byK6ROT.- K6ROT,double
Dimensionless multiplier for the fictitious drilling stiffness, only read when
drilling_modelis not0. It has no effect under the default physics-based model, which takes its coefficient from the laminate stiffness instead, seegamma_rz. Default100..- gamma_rz,double
Coefficient \(\gamma_{r_z}\) of the physics-based drilling stiffness, only read when
drilling_modelis0. The default is a negative value, which means thatA66of the laminate extensional stiffness matrix is used. The attribute is exposed for sensitivity studies rather than for normal use. Dimension of force per unit length, asA66.- r11, r12, r13, r21, r22, r23, r31, r32, r33double
Entries \(T_{ij}\) of the transformation matrix \(\boldsymbol{T}_{3\times 3}\) from element to global coordinates, whose columns are the element axes.
- m11, m12, m21, m22double
Rotation matrix only for the constitutive relations. Used when a material direction is used instead of the element local coordinates.
- c1, c2, c3int
Position of each node in the global stiffness matrix. The coordinates of a node are read at the positions
c1//2,c2//2andc3//2of the coordinate array.- n1, n2, n3int
Node identification number.
- init_k_KC0, init_k_KCNL, init_k_KG, init_k_Mint
Position in the arrays storing the sparse data for the structural matrices.
- probe,
Tria3RProbeobject Pointer to the probe.
Methods
update_KC0(self, long[, long[, double[, ...)Update sparse vectors for linear constitutive stiffness matrix KC0
update_KCNL(self, long[, long[, double[, ...)Update sparse vectors for the nonlinear stiffness matrix KCNL
update_KG(self, long[, long[, double[, ...)Update sparse vectors for geometric stiffness matrix KG
update_KG_given_stress(self, double Nxx, ...)Update sparse vectors for geometric stiffness matrix KG
update_M(self, long[, long[, double[, ...)Update sparse vectors for mass matrix M
update_area(self)Update element area
update_fint(self, double[, ShellProp prop, ...)Update the internal force vector
update_probe_finte(self, ShellProp prop, ...)Update the internal force vector of the probe
update_probe_ue(self, double[)Update the local displacement vector of the probe of the element
update_probe_xe(self, double[)Update the 3D coordinates of the probe of the element
update_rotation_matrix(self, double[, ...)Update the rotation matrix of the element
Notes
With
alpha_shear_locking\(= \alpha \neq 0\), the factor is the one of Lyly, Stenberg and Vihinen, called Stenberg’s method by Bischoff and Bletzinger [1] (Sec. 3.1), in the form of Castro et al. [2] (Eq. (26)), see the module documentation, and scales the transverse shear stiffnesses as:maxl = max(edge_12, edge_23, edge_31) factor = alpha_shear_locking*maxl**2/thickness**2 A44 = 1 / (1 + factor) * A44 A45 = 1 / (1 + factor) * A45 A55 = 1 / (1 + factor) * A55
Warning
shear_model = 0, withalpha_shear_locking = 0.7, does not converge on thin plates and shells: on a simply supported square plate with \(a/h = 1000\) the error of the centre deflection stalls at -14 per cent, of the buckling load at +16 per cent and of the first frequency at +8 per cent under refinement, and on a thin cylinder in buckling the factor can make a mesh artefact the critical mode. The measurements and the reason, given by Lyly et al. (1993), p. 348, are in the Notes of the module documentation.Under the default
drilling_model = 0, the physics-based stiffness is the one of Allman (1984) [3] and Hughes and Brezzi (1989) [4], for which the drilling rotation is a kinematic variable that carries strain energy, see the module documentation.For
K6ROT, AUTODESK NASTRAN’s quick reference guide recommendsK6ROT = 100.for static analysis. For modal solutions,K6ROT=1.e4is suggested. MSC NASTRAN’s quick reference guide states thatK6ROT > 100.should not be used, but this is contradicting AUTODESK NASTRAN.The default of
gamma_rz, \(\gamma_{r_z} = A_{66}\), is the value identified by Hughes and Brezzi (1989) [4]. This is a stiffness per unit length taken from the laminate, and not a parameter that needs tuning: the element response has a broad plateau of insensitivity around it, and the attribute is exposed for the sensitivity study that the literature recommends rather than for normal use. Very large values over-constrain \(r_z = \theta_z\), and a zero value leaves the Allman enrichment rank-deficient by one.References
[1]Bischoff, M., and Bletzinger, K.-U., Improving stability and accuracy of Reissner-Mindlin plate finite elements via algebraic subgrid scale stabilization, Computer Methods in Applied Mechanics and Engineering, 193(15-16), 1517-1528, 2004. https://doi.org/10.1016/j.cma.2003.12.036
[2]Castro, S. G. P., Donadon, M. V., and Guimaraes, T. A. M., ES-PIM applied to buckling of variable angle tow laminates, Composite Structures, 209, 67-78, 2019. https://doi.org/10.1016/j.compstruct.2018.10.058
[3]Allman, D. J., A compatible triangular element including vertex rotations for plane elasticity analysis, Computers & Structures, 19(1-2), 1-8, 1984. https://doi.org/10.1016/0045-7949(84)90197-4
[4] (1,2)Hughes, T. J. R., and Brezzi, F., On drilling degrees of freedom, Computer Methods in Applied Mechanics and Engineering, 72(1), 105-121, 1989. https://doi.org/10.1016/0045-7825(89)90124-2
Examples
The constitutive stiffness matrix of one triangular element of an isotropic plate:
>>> import numpy as np >>> from scipy.sparse import coo_matrix >>> from pyfe3d import Tria3R, Tria3RData, Tria3RProbe, DOF, INT, DOUBLE >>> from pyfe3d.shellprop_utils import isotropic_plate >>> x = np.array([0., 0., 0., 1., 0., 0., 1., 1., 0.]) >>> prop = isotropic_plate(thickness=0.01, E=70e9, nu=0.3) >>> data = Tria3RData() >>> elem = Tria3R(Tria3RProbe()) >>> elem.n1, elem.n2, elem.n3 = 1, 2, 3 >>> elem.c1, elem.c2, elem.c3 = 0, 6, 12 >>> elem.update_rotation_matrix(x) >>> elem.update_probe_xe(x) >>> KC0r = np.zeros(data.KC0_SPARSE_SIZE, dtype=INT) >>> KC0c = np.zeros(data.KC0_SPARSE_SIZE, dtype=INT) >>> KC0v = np.zeros(data.KC0_SPARSE_SIZE, dtype=DOUBLE) >>> elem.update_KC0(KC0r, KC0c, KC0v, prop) >>> N = 3*DOF >>> KC0 = coo_matrix((KC0v, (KC0r, KC0c)), shape=(N, N)).toarray() >>> print(KC0.shape, elem.area, np.allclose(KC0, KC0.T)) (18, 18) 0.5 True
- K6ROT#
K6ROT: ‘double’
- alpha_shear_locking#
alpha_shear_locking: ‘double’
- area#
area: ‘double’
- c1#
c1: ‘int’
- c2#
c2: ‘int’
- c3#
c3: ‘int’
- drilling_model#
drilling_model: ‘int’
- eid#
eid: ‘int’
- gamma_rz#
gamma_rz: ‘double’
- init_k_KC0#
init_k_KC0: ‘int’
- init_k_KCNL#
init_k_KCNL: ‘int’
- init_k_KG#
init_k_KG: ‘int’
- init_k_M#
init_k_M: ‘int’
- m11#
m11: ‘double’
- m12#
m12: ‘double’
- m21#
m21: ‘double’
- m22#
m22: ‘double’
- n1#
n1: ‘int’
- n2#
n2: ‘int’
- n3#
n3: ‘int’
- pid#
pid: ‘int’
- probe#
probe: pyfe3d.tria3r.Tria3RProbe
- r11#
r11: ‘double’
- r12#
r12: ‘double’
- r13#
r13: ‘double’
- r21#
r21: ‘double’
- r22#
r22: ‘double’
- r23#
r23: ‘double’
- r31#
r31: ‘double’
- r32#
r32: ‘double’
- r33#
r33: ‘double’
- shear_model#
shear_model: ‘int’
- update_KC0(self, long[: :1] KC0r, long[: :1] KC0c, double[: :1] KC0v, ShellProp prop, int update_KC0v_only=0) void#
Update sparse vectors for linear constitutive stiffness matrix KC0
The element matrix is computed from the coordinates
probe.xe, theareaand the constitutive matrices ofproprotated withm11, m12, m21, m22, the transverse shear field being selected byshear_modeland its stiffnesses scaled according toalpha_shear_locking. Its values, in global coordinates, are added toKC0vat the positionsinit_k_KC0toinit_k_KC0 + KC0_SPARSE_SIZE - 1. Withupdate_KC0v_only=0the global row and column indices are written toKC0randKC0cat the same positions. Before this method is called,update_rotation_matrix()andupdate_probe_xe()must have been used.- Parameters:
- KC0rnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KC0 + KC0_SPARSE_SIZE.- KC0cnp.array
Array to store column positions of sparse values Same type and size as
KC0r.- KC0vnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKC0r. The values are added to the existing ones. Dimension of force per unit length between translations, of force between a translation and a rotation, and of force times length between rotations.- prop
ShellPropobject Shell property object from where the stiffness and mass attributes are read from.
- update_KC0v_onlyint, optional
The default
0means that the row and column indicesKC0randKC0cshould also be updated. Any other value will only update the stiffness matrix valuesKC0v.
Notes
The membrane, bending and extension-bending coupling terms are integrated with a single point at the centroid, with the weight
0.5timesdetJ = 2*area. The transverse shear stiffnesses \(A_{44}\), \(A_{45}\), \(A_{55}\) are divided by \(1 + \alpha \ell^2/h^2\), the factor of Lyly et al. [2], with \(\alpha\) given byalpha_shear_locking,0.by default, \(\ell\) the longest edge and \(h\) the total thicknessprop.h. With the defaultshear_model = 1they enter the discrete shear gap field ofdsg_shear_Ke(), added with the Allman block below; withshear_model = 0the transverse shear strains are sampled at the centroid by the generated terms, see the module documentation. The fictitious drilling penalty,\[K6ROT \cdot 10^{-6} A_{66} \int_A B_{r_z}^\top B_{r_z} dA, \qquad B_{r_z} = S^{r_z} + 1/2 S^u_{,y} - 1/2 S^v_{,x}\]is integrated with the three-point rule of degree of precision 2, first row of Table I in Cowper [1], with the area coordinates \((2/3, 1/6, 1/6)\) and their permutations, each with the weight
area/3. Withdrilling_model = 0this penalty is switched off,K6ROTbeing replaced by zero, and the physics-based drilling stiffness ofallman_delta_Ke()is added instead, rotated to global coordinates with \(K_{g,mn} = T_{mi} K_{e,ij} T_{nj}\), together with the transverse shear ofdsg_shear_Ke()whenshear_model = 1. It is added separately because the enrichment couples the drilling rotation to the curvatures whenever the extension-bending matrix \(B\) is not zero.References
[1]Cowper, G. R., Gaussian quadrature formulas for triangles, International Journal for Numerical Methods in Engineering, 7(3), 405-408, 1973. https://doi.org/10.1002/nme.1620070316
[2]Lyly, M., Stenberg, R., and Vihinen, T., A stable bilinear element for the Reissner-Mindlin plate model, Computer Methods in Applied Mechanics and Engineering, 110(3-4), 343-357, 1993. https://doi.org/10.1016/0045-7825(93)90214-I
- update_KCNL(self, long[: :1] KCNLr, long[: :1] KCNLc, double[: :1] KCNLv, ShellProp prop, int update_KCNLv_only=0) void#
Update sparse vectors for the nonlinear stiffness matrix KCNL
The nonlinear stiffness matrix KCNL is the part of the tangent stiffness matrix, besides
update_KC0()andupdate_KG(), that depends on the displacements through the von Kármán membrane strains, evaluated at the displacementsueof the probe. The sum of the three is the tangent stiffness matrix of the internal forces ofupdate_fint()withnonlinear=1. Withdrilling_model = 0the membrane rows include the Allman enrichment, see_update_probe_BL_G().Before this function is called, the probe
Tria3RProbeattribute of theTria3Robject must be updated usingupdate_probe_ue()with the current displacements; andupdate_probe_xe()with the node coordinates.The element matrix is computed in element coordinates into the probe attribute
KCNLve, rotated to global coordinates, and its values are added toKCNLvat the positionsinit_k_KCNLtoinit_k_KCNL + KCNL_SPARSE_SIZE - 1. Withupdate_KCNLv_only=0the global row and column indices are written toKCNLrandKCNLcat the same positions.- Parameters:
- KCNLrnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KCNL + KCNL_SPARSE_SIZE.- KCNLcnp.array
Array to store column positions of sparse values Same type and size as
KCNLr.- KCNLvnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKCNLr. The values are added to the existing ones, with the dimensions given forKC0vinupdate_KC0().- prop
ShellPropobject Shell property object from where the stiffness and mass attributes are read from.
- update_KCNLv_onlyint, optional
The default
0means that the row and column indicesKCNLrandKCNLcshould also be updated. Any other value will only update the stiffness matrix valuesKCNLv.
Notes
KCNL = KC0L + KCL0 + KCLL + KGNL, that is \(\boldsymbol{K}_{CNL} + \boldsymbol{K}_{GNL}\): the nonlinear constitutive stiffness matrix \(\boldsymbol{K}_{CNL}\), the terms of \(\int (\boldsymbol{B}_L + \boldsymbol{B}_{NL})^\top \boldsymbol{C} (\boldsymbol{B}_L + \boldsymbol{B}_{NL}) d\Omega\) that contain \(\boldsymbol{B}_{NL}\), plus the geometric stiffness matrix \(\boldsymbol{K}_{GNL}\) of the stress resultants of the nonlinear strains. Crisfield [1], Section 8.1.5, Eqs. (8.26)-(8.31), groups the same terms differently: his \(\boldsymbol{K}_{t1}\) is \(\boldsymbol{K}_{C0} + \boldsymbol{K}_{CNL}\), and his initial-stress matrix \(\boldsymbol{K}_{t\sigma}\), built with the total membrane forces, is \(\boldsymbol{K}_G + \boldsymbol{K}_{GNL}\); the tangent stiffness matrix is the same. The matrices are built from the von Kármán membrane strains
\[\epsilon_{xx} = u_{,x} + \frac{1}{2} w_{,x}^2, \quad \epsilon_{yy} = v_{,y} + \frac{1}{2} w_{,y}^2, \quad \gamma_{xy} = u_{,y} + v_{,x} + w_{,x} w_{,y}\]whose nonlinear part is \(\boldsymbol{\epsilon}_{NL} = \frac{1}{2} \boldsymbol{B}_{NL} \boldsymbol{u}_e\), with \(\boldsymbol{B}_{NL}\) its variation. With \(\boldsymbol{B}_m\) and \(\boldsymbol{B}_b\) the linear membrane and bending strain-displacement matrices, \(\boldsymbol{G}_x = \partial \boldsymbol{S}^w / \partial x\) and \(\boldsymbol{G}_y = \partial \boldsymbol{S}^w / \partial y\) the gradients of \(w\), and \(\boldsymbol{A}\), \(\boldsymbol{B}\) the laminate matrices:
KC0L = \(\boldsymbol{B}_m^\top \boldsymbol{A} \boldsymbol{B}_{NL} + \boldsymbol{B}_b^\top \boldsymbol{B} \boldsymbol{B}_{NL}\)
KCL0 = KC0L`^top`
KCLL = \(\boldsymbol{B}_{NL}^\top \boldsymbol{A} \boldsymbol{B}_{NL}\)
KGNL = \(N_{NL,xx} \boldsymbol{G}_x^\top \boldsymbol{G}_x + N_{NL,yy} \boldsymbol{G}_y^\top \boldsymbol{G}_y + N_{NL,xy} (\boldsymbol{G}_x^\top \boldsymbol{G}_y + \boldsymbol{G}_y^\top \boldsymbol{G}_x)\), with \(\boldsymbol{N}_{NL} = \{N_{NL,xx}, N_{NL,yy}, N_{NL,xy}\}^\top = \boldsymbol{A} \boldsymbol{\epsilon}_{NL}\)
The first three groups are the constitutive terms coupling the linear and the nonlinear parts of the membrane strain. KGNL is geometric, carrying the stress of the nonlinear membrane strain. It is collected here so that
update_KG()stays homogeneous of degree one in the displacements, which is what a linear buckling analysis needs. With it here,\[\boldsymbol{K}_T = \boldsymbol{K}_{C0} + \boldsymbol{K}_{CNL}(\boldsymbol{u}) + \boldsymbol{K}_{GNL}(\boldsymbol{u}) + \boldsymbol{K}_G(\boldsymbol{u})\]is the exact Jacobian of the internal forces of
update_fint()withnonlinear=1, and a Newton-Raphson iteration built on them converges quadratically. The quadrature ofupdate_KG()is used.References
[1]Crisfield, M. A., Non-linear Finite Element Analysis of Solids and Structures, Volume 1: Essentials, John Wiley & Sons, Chichester, 1991.
- update_KG(self, long[: :1] KGr, long[: :1] KGc, double[: :1] KGv, ShellProp prop, int update_KGv_only=0) void#
Update sparse vectors for geometric stiffness matrix KG
The matrix is evaluated once, with no quadrature loop.
Before this function is called, the probe
Tria3RProbeattribute of theTria3Robject must be updated usingupdate_probe_ue()with the correct pre-buckling displacements; andupdate_probe_xe()with the node coordinates.The membrane stress resultants are obtained from the linear membrane strains and curvatures of the probe displacements
ue, including fordrilling_model=0the contribution of the drilling rotations, and from the extensional and extension-bending coupling matrices ofproprotated withm11, m12, m21, m22. Only the translational degrees-of-freedom appear. The values are added toKGvat the positionsinit_k_KGtoinit_k_KG + KG_SPARSE_SIZE - 1. Withupdate_KGv_only=0the global row and column indices are written toKGrandKGcat the same positions.- Parameters:
- KGrnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KG + KG_SPARSE_SIZE.- KGcnp.array
Array to store column positions of sparse values Same type and size as
KGr.- KGvnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKGr. The values are added to the existing ones, with dimension of force per unit length.- prop
ShellPropobject Shell property object from where the stiffness and mass attributes are read from.
- update_KGv_onlyint, optional
The default
0means that the row and column indicesKGrandKGcare also updated. Any other value will only update the valuesKGv.
Notes
The stress resultants are
\[\{N_{xx}, N_{yy}, N_{xy}\}^\top = \boldsymbol{A}\{\epsilon_{xx}, \epsilon_{yy}, \gamma_{xy}\}^\top + \boldsymbol{B}\{\kappa_{xx}, \kappa_{yy}, \kappa_{xy}\}^\top\]with the linear strains of the probe displacements, which for
drilling_model = 0include the contribution of the Allman enrichment at the centroid, seeallman_enrichment(), since the edge modes populate the drilling columns of the membrane operator; without it KG would not be part of the exact Jacobian of the internal forces, seeupdate_KCNL(). The matrix is then the one ofupdate_KG_given_stress(). Only the linear strains contribute, which leaves this matrix homogeneous of degree one in the displacements, as a linear buckling analysis needs; the stress of the nonlinear membrane strain is carried byupdate_KCNL().
- update_KG_given_stress(self, double Nxx, double Nyy, double Nxy, long[: :1] KGr, long[: :1] KGc, double[: :1] KGv, int update_KGv_only=0) void#
Update sparse vectors for geometric stiffness matrix KG
Note
A constant stress state is assumed within the element, according to the given values of \(N_{xx}, N_{yy}, N_{xy}\).
The matrix is evaluated once, with no quadrature loop.
Before this function is called, the probe
Tria3RProbeattribute of theTria3Robject must be updated usingupdate_probe_xe()with the node coordinates.Only the translational degrees-of-freedom appear. The values are added to
KGvat the positionsinit_k_KGtoinit_k_KG + KG_SPARSE_SIZE - 1. Withupdate_KGv_only=0the global row and column indices are written toKGrandKGcat the same positions.update_rotation_matrix()must also have been called before.- Parameters:
- Nxx, Nyy, Nxydouble
Membrane stress resultants in the element coordinate system, force per unit length.
- KGrnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KG + KG_SPARSE_SIZE.- KGcnp.array
Array to store column positions of sparse values Same type and size as
KGr.- KGvnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKGr. The values are added to the existing ones, with dimension of force per unit length.- update_KGv_onlyint, optional
The default
0means that the row and column indicesKGrandKGcare also updated. Any other value will only update the valuesKGv.
Notes
The geometric stiffness is the Donnell one, involving only the gradient of the element-frame \(w\),
\[\boldsymbol{K}_G = A_e \left( N_{xx} \boldsymbol{G}_x^\top \boldsymbol{G}_x + N_{yy} \boldsymbol{G}_y^\top \boldsymbol{G}_y + N_{xy} (\boldsymbol{G}_x^\top \boldsymbol{G}_y + \boldsymbol{G}_y^\top \boldsymbol{G}_x) \right)\]with \(A_e\) the element area and \(\boldsymbol{G}_x\), \(\boldsymbol{G}_y\) the rows
Sw_x,Sw_yof_update_probe_BL_G(), the element-frame \(w\) being obtained from the global translations with the element normal \(\{T_{13}, T_{23}, T_{33}\}\). The integrand is constant over the triangle, so the single evaluation is exact.
- update_M(self, long[: :1] Mr, long[: :1] Mc, double[: :1] Mv, ShellProp prop, int mtype=0) void#
Update sparse vectors for mass matrix M
Different integration schemes are available by means of the
mtypeparameter.The element matrix is computed from
intrho,intrhozandintrhoz2ofprop, the coordinatesprobe.xeand thearea, rotated to global coordinates, and its values are added toMvat the positions starting atinit_k_M; the global row and column indices are always written toMrandMcat the same positions.mtype=0andmtype=2writeM_SPARSE_SIZEentries andmtype=1writes the first 90 of them. Before this method is called,update_rotation_matrix()andupdate_probe_xe()must have been used.- Parameters:
- Mrnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_M + M_SPARSE_SIZE.- Mcnp.array
Array to store column positions of sparse values Same type and size as
Mr.- Mvnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asMr. The values are added to the existing ones. Dimension of mass between translations, of mass times length between a translation and a rotation, and of mass times length squared between rotations.- prop
ShellPropobject Shell property object, from which
intrho,intrhozandintrhoz2are read.- mtypeint, optional
0 for consistent mass matrix 1 for lumped mass matrix 2 for reduced integration mass matrix Default
0.
- Raises:
- ValueError
If
mtypeis not 0, 1 or 2.
Notes
The element matrices follow from the kinetic energy of Brockman [1], Eq. (20), with the displacements \(u + z r_y\), \(v - z r_x\) and \(w\) through the thickness,
\[T = \frac{1}{2} \int_A \left[ I_\rho (\dot{u}^2 + \dot{v}^2 + \dot{w}^2) + 2 I_{\rho z} (\dot{u} \dot{r}_y - \dot{v} \dot{r}_x) + I_{\rho z^2} (\dot{r}_x^2 + \dot{r}_y^2) \right] dA\]with \(I_\rho\), \(I_{\rho z}\) and \(I_{\rho z^2}\) given by
intrho,intrhozandintrhoz2, which include the offset. With \(h_{ij}\) the integral of the product of the shape functions \(S_i S_j\) over the element, the element matrix has, as in Eq. (21) of [1], \(I_\rho h_{ij}\) between the translations of nodes \(i\) and \(j\), \(I_{\rho z^2} h_{ij}\) between the rotations \(r_x\) and between the rotations \(r_y\), and \(I_{\rho z} h_{ij}\) coupling the translations to the rotations. The drilling rotation \(r_z\) has no inertia. The schemes differ in how \(h_{ij}\) is integrated:mtype=0: the three-point rule of degree of precision 2, first row of Table I in Cowper [2], with the area coordinates \((2/3, 1/6, 1/6)\) and their permutations, each with the weight \(A_e/3\), which is exact for the quadratic \(S_i S_j\), \(h_{ii} = A_e/6\) and \(h_{ij} = A_e/12\)mtype=1: the vertex rule, the three nodes, each with the weight \(A_e/3\), \(h_{ii} = A_e/3\) and \(h_{ij} = 0\)mtype=2: a single point at the centroid, \(h_{ij} = A_e/9\)
with \(A_e\) the element area. In element coordinates the coupling terms are \(+I_{\rho z} h_{ij}\) between \(u\) and \(r_y\) and \(-I_{\rho z} h_{ij}\) between \(v\) and \(r_x\), consistently with the curvatures of
_update_probe_BL_G().Lumped mass matrix
The vertex rule is a nodal quadrature. Applied to the whole integrand of \(T\), in which \(S_i\) is 1 at node \(i\) and 0 at the other nodes, it gives no coupling between different nodes and, for node \(i\), the block
\[\begin{split}\frac{A_e}{3} \begin{bmatrix} I_\rho & 0 & 0 & 0 & I_{\rho z} & 0 \\ 0 & I_\rho & 0 & -I_{\rho z} & 0 & 0 \\ 0 & 0 & I_\rho & 0 & 0 & 0 \\ 0 & -I_{\rho z} & 0 & I_{\rho z^2} & 0 & 0 \\ I_{\rho z} & 0 & 0 & 0 & I_{\rho z^2} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}\end{split}\]for the DOF \(u, v, w, r_x, r_y, r_z\). The coupling through \(I_{\rho z}\) stays in the nodal block: the matrix is block-diagonal per node, and diagonal only when \(I_{\rho z} = 0\), as Brockman [1] notes for the Lobatto integration at the nodes of the quadrilateral. Since the weights sum to \(A_e\) and \(\sum_i (A_e/3) \boldsymbol{x}_i = \int_A \boldsymbol{x} dA\), with \(\boldsymbol{x}_i\) the position of node \(i\), the lumped matrix has the exact mass and the exact first moment of the mass, including the term \(I_{\rho z} A_e\) that places the centre of mass at the offset from the reference surface. Of the rotary inertia, the term \(I_{\rho z^2} A_e\) about the axes in the plane of the element is exact, while the part from the distribution of \(I_\rho\) over the area, about any axis, is concentrated at the nodes: 4 times the exact value about the centroid of the element, an error that decreases with the size of the elements.
References
[1] (1,2,3)Brockman, R. A., Dynamics of the Bilinear Mindlin Plate Element, International Journal for Numerical Methods in Engineering, 24(12), 2343-2356, 1987. https://onlinelibrary.wiley.com/doi/pdf/10.1002/nme.1620241208
[2]Cowper, G. R., Gaussian quadrature formulas for triangles, International Journal for Numerical Methods in Engineering, 7(3), 405-408, 1973. https://doi.org/10.1002/nme.1620070316
- update_area(self) void#
Update element area
The
areaattribute is updated with the area of the triangle given by the element coordinatesprobe.xe, ignoring thezcoordinates. Called byupdate_probe_xe().Notes
With the vertices \((x_i, y_i)\) of nodes 1 to 3 in element coordinates,
\[A = \frac{1}{2} \left| (x_2 - x_1)(y_3 - y_1) - (x_3 - x_1)(y_2 - y_1) \right|\]
- update_fint(self, double[: :1] fint, ShellProp prop, int nonlinear=0) void#
Update the internal force vector
The element internal forces, computed in element coordinates with
update_probe_finte(), are rotated to global coordinates and added tofintat the positions of the nodes,c1,c2andc3. Before this method is called,update_probe_xe()andupdate_probe_ue()must have been used.- Parameters:
- fintnp.array
Array that is updated in place with the internal forces. The internal forces stored in
fintare calculated in global coordinates. Methodupdate_probe_finte()is called to update the parameterfinteof theTria3RProbewith the internal forces in local coordinates. 1-D array of sizeDOF*M, with forces for the translations and moments (force times length) for the rotations.- prop
ShellPropobject Shell property object from where the stiffness and mass attributes are read from.
- nonlinearint, optional
The default
0gives the linear internal forces,KC0*u. Any other value adds the geometrically nonlinear terms of the von Kármán strains, seeupdate_KCNL().
Notes
With
nonlinear=1the exact Jacobian of the internal forces isKC0 + KCNL + KG, seeupdate_KCNL().
- update_probe_finte(self, ShellProp prop, int nonlinear=0) void#
Update the internal force vector of the probe
The attribute
finteis updated with theTria3RProbethe internal forces in local coordinates. While using this function, mind that the probe can be shared amongst more than one finite element, depending how you defined them, meaning that the probe will always safe the values from the last udpate.The internal forces are computed from the probe coordinates
xeand displacementsue, theareaand the constitutive matrices ofproprotated withm11, m12, m21, m22. Before this method is called,update_probe_xe()andupdate_probe_ue()must have been used.Note
The
finteattribute of objectTria3RProbeis updated, accessible using.probe.finte.- Parameters:
- prop
ShellPropobject Shell property object from where the stiffness and mass attributes are read from.
- nonlinearint, optional
The default
0gives the linear internal forces,KC0*u. Any other value adds the geometrically nonlinear terms of the von Kármán strains, see_update_probe_finte_nonlinear()andupdate_KCNL().
- prop
Notes
The linear internal forces are the product of the element stiffness matrix of
update_KC0(), in element coordinates, withue, computed with the same quadrature: the generated terms with the transverse shear stiffnesses scaled according toalpha_shear_locking, the centroid-sampled shear terms being switched off with the defaultshear_model = 1, plus the 18 by 18 block ofallman_delta_Ke()fordrilling_model = 0and ofdsg_shear_Ke()forshear_model = 1, which keepsfinteexactly equal to the product of the element matrix with the element displacements. Withnonlinear=1the exact Jacobian of the internal forces isKC0 + KCNL + KG, seeupdate_KCNL().
- update_probe_ue(self, double[: :1] u) void#
Update the local displacement vector of the probe of the element
The displacements and rotations of the three nodes, read from
uat the positionsc1,c2andc3, are rotated to the element coordinate system with the transpose \(\boldsymbol{T}_{3\times 3}^\top\) of the transformation matrix and written toprobe.ue.update_rotation_matrix()must have been called before.Note
The
ueattribute of objectTria3RProbeis updated, accessible using.probe.ue.- Parameters:
- uarray-like
Array with global displacements, for a total of \(M\) nodes in the model, this array will be arranged as: \(u_1, v_1, w_1, {r_x}_1, {r_y}_1, {r_z}_1, u_2, v_2, w_2, {r_x}_2, {r_y}_2, {r_z}_2, ..., u_M, v_M, w_M, {r_x}_M, {r_y}_M, {r_z}_M\). 1-D array of size
DOF*M, translations with dimension of length and rotations dimensionless.
Notes
For each node, \(\{u, v, w\}_e^\top = \boldsymbol{T}_{3\times 3}^\top \{u, v, w\}^\top\) and \(\{r_x, r_y, r_z\}_e^\top = \boldsymbol{T}_{3\times 3}^\top \{r_x, r_y, r_z\}^\top\), with \(\boldsymbol{T}_{3\times 3}\) of
update_rotation_matrix(), whose columns are the element axes in global coordinates.
- update_probe_xe(self, double[: :1] x) void#
Update the 3D coordinates of the probe of the element
The coordinates of the three nodes, read from
xat the positionsc1//2,c2//2andc3//2, are rotated to the element coordinate system with the transpose \(\boldsymbol{T}_{3\times 3}^\top\) of the transformation matrix and written toprobe.xe.update_area()is then called, updatingarea.update_rotation_matrix()must have been called before.Note
The
xeattribute of objectTria3RProbeis updated, accessible using.probe.xe.- Parameters:
- xarray-like
Array with global nodal coordinates, for a total of \(M\) nodes in the model, this array will be arranged as: \(x_1, y_1, z_1, x_2, y_2, z_2, ..., x_M, y_M, z_M\). 1-D array of size
3*M, dimension of length.
Notes
For each node, \(\{x, y, z\}_e^\top = \boldsymbol{T}_{3\times 3}^\top \{x, y, z\}^\top\), with \(\boldsymbol{T}_{3\times 3}\) of
update_rotation_matrix(), whose columns are the element axes in global coordinates.
- update_rotation_matrix(self, double[: :1] x, double xmati=0., double xmatj=0., double xmatk=0.) void#
Update the rotation matrix of the element
Attributes
r11,r12,r13,r21,r22,r23,r31,r32,r33are updated, with the entries \(T_{ij}\) of the transformation matrix \(\boldsymbol{T}_{3\times 3}\) from element to global coordinates, whose columns are the element axes.The element coordinate system is determined, identifying the \(ijk\) components of each axis: \({x_e}_i, {x_e}_j, {x_e}_k\); \({y_e}_i, {y_e}_j, {y_e}_k\); \({z_e}_i, {z_e}_j, {z_e}_k\).
The element
xaxis runs from node 1 to node 2 and the elementzaxis is along the cross product of the vectors from node 1 to node 2 and from node 1 to node 3. When a material direction is given,m11, m12, m21, m22are updated with the rotation from the material direction projected onto the element to the elementxaxis. When it is the zero vector, the default, or parallel to the element normal,m11, m12, m21, m22are not changed.- Parameters:
- xarray-like
Array with global nodal coordinates, for a total of \(M\) nodes in the model, this array will be arranged as: \(x_1, y_1, z_1, x_2, y_2, z_2, ..., x_M, y_M, z_M\). 1-D array of size
3*M, dimension of length. The coordinates of each node are read from the positionsc1//2,c2//2andc3//2.- xmati, xmatj, xmatkdouble, optional
Vector in global coordinates representing the material direction. This vector is projected onto the plate element, thus becoming the material direction. The \(ABD\) matrix defining the constitutive behavior of the element is rotated from the material direction to the element \(x\) axis while calculating the stiffness matrices. Only the direction of the vector is used. Default
0., the zero vector, which leavesm11, m12, m21, m22unchanged.
Notes
With \(\boldsymbol{v}_{12} = \boldsymbol{x}_2 - \boldsymbol{x}_1\) and \(\boldsymbol{v}_{13} = \boldsymbol{x}_3 - \boldsymbol{x}_1\), the element axes are
\[\boldsymbol{e}_x = \frac{\boldsymbol{v}_{12}}{\|\boldsymbol{v}_{12}\|}, \qquad \boldsymbol{e}_z = \frac{\boldsymbol{v}_{12} \times \boldsymbol{v}_{13}}{\|\boldsymbol{v}_{12} \times \boldsymbol{v}_{13}\|}, \qquad \boldsymbol{e}_y = \boldsymbol{e}_z \times \boldsymbol{e}_x\]and \(\boldsymbol{T}_{3\times 3} = [\boldsymbol{e}_x, \boldsymbol{e}_y, \boldsymbol{e}_z]\). The material direction \(\boldsymbol{x}_m\) is projected onto the element plane as \(\boldsymbol{x}_m' = (\boldsymbol{e}_z \times \boldsymbol{x}_m) \times \boldsymbol{e}_z\), normalized, and with \(\theta\) the angle from \(\boldsymbol{e}_x\) to \(\boldsymbol{x}_m'\), positive towards \(\boldsymbol{e}_y\), \(m_{11} = m_{22} = \cos\theta = \boldsymbol{x}_m' \cdot \boldsymbol{e}_x\), \(m_{21} = -m_{12} = \sin\theta\), the sign of \(\sin\theta\) being that of \(\boldsymbol{x}_m \cdot \boldsymbol{e}_y\). The material direction is ignored when its norm, or the norm of \(\boldsymbol{e}_z \times \boldsymbol{x}_m\) after its normalization, is not larger than \(10^{-10} \|\boldsymbol{v}_{12} \times \boldsymbol{v}_{13}\|\).
- class pyfe3d.tria3r.Tria3RData#
Used to allocate memory for the sparse matrices.
Each attribute is the number of entries that one
Tria3Rwrites in the row, column and value arrays of the corresponding sparse matrix, starting at the position given by the matchinginit_k_*attribute of the element. Fornelements the arrays needntimes these sizes. The constructor takes no parameters.- Attributes:
- KC0_SPARSE_SIZE,int
KC0_SPARSE_SIZE = 324- KCNL_SPARSE_SIZE,int
KCNL_SPARSE_SIZE = 324- KG_SPARSE_SIZE,int
KG_SPARSE_SIZE = 81- M_SPARSE_SIZE,int
M_SPARSE_SIZE = 270
- KC0_SPARSE_SIZE#
KC0_SPARSE_SIZE: ‘int’
- KCNL_SPARSE_SIZE#
KCNL_SPARSE_SIZE: ‘int’
- KG_SPARSE_SIZE#
KG_SPARSE_SIZE: ‘int’
- M_SPARSE_SIZE#
M_SPARSE_SIZE: ‘int’
- class pyfe3d.tria3r.Tria3RProbe#
Probe used for local coordinates, local displacements, local stresses etc
The idea behind using a probe is to avoid allocating larger memory buffers per finite element. The memory buffers are allocated per probe, and one probe can be shared amongst many finite elements, with the information being updated and retrieved on demand.
Note
The probe can be shared amongst more than one finite element, depending on how you defined them. Mind that the probe will always save the values from the last update.
The constructor takes no parameters and allocates every array filled with zeros.
- Attributes:
- xe,array-like
Array of size
NUM_NODES*DOF//2=9containing the nodal coordinates in the element coordinate system, in the following order \({x_e}_1, {y_e}_1, {z_e}_1\), \({x_e}_2, {y_e}_2, {z_e}_2\), \({x_e}_3, {y_e}_3, {z_e}_3\). Dimension of length. Updated byTria3R.update_probe_xe().- ue,array-like
Array of size
NUM_NODES*DOF=18containing the element displacements in the following order \(u_{e_1}, v_{e_1}, w_{e_1}, {r_x}_{e_1}, {r_y}_{e_1}, {r_z}_{e_1}\), \(u_{e_2}, v_{e_2}, w_{e_2}, {r_x}_{e_2}, {r_y}_{e_2}, {r_z}_{e_2}\), \(u_{e_3}, v_{e_3}, w_{e_3}, {r_x}_{e_3}, {r_y}_{e_3}, {r_z}_{e_3}\). Translations with dimension of length, rotations dimensionless. Updated byTria3R.update_probe_ue().- finte,array-like
Array of size
NUM_NODES*DOF=18containing the element internal forces corresponding to the degrees-of-freedom described byue. Forces, and moments (force times length) for the rotations. Updated byTria3R.update_probe_finte().- BLexx, BLeyy, BLgxy, BLkxx, BLkyy, BLkxyarray-like
Arrays of size
NUM_NODES*DOF=18with the rows of the linear strain-displacement matrix for the membrane strains and curvatures, at the last evaluated integration point. Their products withuegive the membrane strains, dimensionless, and the curvatures, with dimension of one over length.- Sw_x, Sw_yarray-like
Arrays of size
NUM_NODES*DOF=18with the rows giving \(w_{,x}\) and \(w_{,y}\), at the last evaluated integration point, the rows \(\boldsymbol{G}_x\) and \(\boldsymbol{G}_y\) of the Notes. Their products withueare dimensionless.KCNLvearray-likeKCNLve: ‘double[::1]’
Notes
With the row \(\boldsymbol{S}^w\) that interpolates \(w\) from
ue, \(\boldsymbol{G}_x = \partial \boldsymbol{S}^w/\partial x\) and \(\boldsymbol{G}_y = \partial \boldsymbol{S}^w/\partial y\), such that \(w_{,x} = \boldsymbol{G}_x \boldsymbol{u}_e\) and \(w_{,y} = \boldsymbol{G}_y \boldsymbol{u}_e\).- BLexx#
BLexx: ‘double[::1]’
- BLeyy#
BLeyy: ‘double[::1]’
- BLgxy#
BLgxy: ‘double[::1]’
- BLkxx#
BLkxx: ‘double[::1]’
- BLkxy#
BLkxy: ‘double[::1]’
- BLkyy#
BLkyy: ‘double[::1]’
- KCNLve#
KCNLve: ‘double[::1]’
- Sw_x#
Sw_x: ‘double[::1]’
- Sw_y#
Sw_y: ‘double[::1]’
- finte#
finte: ‘double[::1]’
- ue#
ue: ‘double[::1]’
- xe#
xe: ‘double[::1]’
See also
The theory of the element, Tria3R: discrete shear gap with the Allman membrane, and of the shell elements, Shell elements: kinematics and formulation.