Quad4 - Quadrilateral element with mixed integration (pyfe3d.quad4)#
The module has three classes: Quad4Data, with the sizes of the
sparse arrays that one element fills; Quad4Probe, with the buffers
in element coordinates that one or more elements share; and Quad4,
the element. The update_* methods of Quad4 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.
The Quad4 element is a four-node quadrilateral shell element with
full integration; Quad4R is the four-node element with reduced
integration and hourglass control.
The Quad4 element has 6 degrees-of-freedom (DOF): \(u\), \(v\), \(w\),
\(r_x\), \(r_y\), \(r_z\). All DOF are interpolated bi-linearly between the nodes.
The element matrices combine membrane, bending, membrane-bending coupling and
transverse shear terms with a stiffness for the drilling rotation \(r_z\),
whose model is selected with the drilling_model attribute of
Quad4: the default 0 is physics-based, any other value gives
the fictitious penalty of MSC Nastran and Autodesk Nastran controlled by the
K6ROT attribute. The quadrature of the membrane terms depends on the
drilling model. The transverse shear terms use the assumed strains of the
MITC4 element with the default shear_model = 1; with shear_model =
0 they are integrated with one point when the thickness h of the
pyfe3d.shellprop.ShellProp is smaller than the square root of the
element area.
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 no shear correction factor is applied by the element. When a material
direction is defined, they are brought to the element coordinate system with
pyfe3d.shellprop.ShellProp.calc_Ats_element().
Notes#
The element follows the first-order shear deformation theory (FSDT). The displacements at a distance \(z\) from the reference surface are \(u + z r_y\), \(v - z r_x\) and \(w\), which gives, in the element coordinate system, the membrane strains, the curvatures and the transverse shear strains
and the strain energy
with \(\boldsymbol{\epsilon} = \{\epsilon_{xx}, \epsilon_{yy}, \gamma_{xy}\}^\top\),
\(\boldsymbol{\kappa} = \{\kappa_{xx}, \kappa_{yy}, \kappa_{xy}\}^\top\),
\(\boldsymbol{\gamma} = \{\gamma_{yz}, \gamma_{xz}\}^\top\), \(\boldsymbol{A}\), \(\boldsymbol{B}\) and \(\boldsymbol{D}\) the
laminate stiffness matrices and \(\boldsymbol{A}_s\) the matrix of \(A_{44}\), \(A_{45}\) and
\(A_{55}\), all in the element coordinate system, and \(U_{r_z}\) the drilling
term described below. These are the rows of Quad4Probe.update_BL().
All DOF are interpolated bi-linearly between the nodes, such that any of the
DOF gradients can be constant over the element when the element is
rectangular.
Integration scheme
The stiffness for the degrees of freedom \(w\), \(r_x\) and \(r_y\) is based on the paper of Hughes et al. [1], whose rotations \(\theta_1\) and \(\theta_2\) enter the transverse shear strains as \(w_{,x} - \theta_1\) and \(w_{,y} - \theta_2\), their Eq. (7), such that \(\theta_1 = -r_y\) and \(\theta_2 = r_x\).
The bending energy terms are integrated with two-by-two quadrature. The
transverse shear energy terms depend on the shear_model attribute of
Quad4, with \(\ell\) the element characteristic length, here
calculated as the square root of the element area \(\ell =
\sqrt{\text{area}}\):
With the default
shear_model = 1, for every thickness, the assumed transverse shear strains of the MITC4 element of Dvorkin and Bathe [8], in the plate form of Bathe and Dvorkin [9], with two-by-two quadrature: the covariant strain \(\gamma_{\xi z}\) is interpolated linearly in \(\eta\) between its values at the mid-points of the edges \(\eta = \pm 1\), and \(\gamma_{\eta z}\) linearly in \(\xi\) between its values at the mid-points of the edges \(\xi = \pm 1\)With
shear_model = 0, for thin and moderately thick plates, when \(h/\ell < 1\), the one-point quadrature of the scheme of Hughes et al. (1977), and for very thick plates, when \(h/\ell \ge 1\), the MITC4 strains above
For \(h/\ell \ge 1\), Hughes et al. [1] propose instead the “modified
one-point shear” element (pp. 1541-1542), which integrates the
\((\partial w/\partial x)^2\) and \((\partial w/\partial y)^2\) contributions to
the shear energy with two-by-two quadrature and the remaining terms with one
point. Because the products of
the gradients of \(w\) and the terms that contain the rotations are integrated
with different rules, a state of pure twist, \(w = \kappa x y\), \(r_x =
\kappa x\), \(r_y = -\kappa y\), whose transverse shear strains vanish
everywhere, stores the spurious shear energy \(A_{55} \ell^4 \kappa^2/12\) in a
square element, \((5/12)(\ell/h)^2\) times its twist energy for an isotropic
plate, 42 % at \(h/\ell = 1\), and a mesh refined across \(h/\ell = 1\) would
become abruptly stiffer in torsion, e.g. by 21 % for the tip twist of a thin-walled
I-beam, see tests/test_quad4_thick_twist.py. The assumed strains are
exact for pure twist and pure bending of a rectangle. With shear_model =
0 the elements with \(h/\ell < 1\) use the one-point rule; with the default
they take the assumed strains as well, and there is no gate on the
thickness.
The membrane stiffness terms, which are not specified in the paper of Hughes et al. (1977), are integrated with a three-by-three quadrature when the default drilling model is active and with a two-by-two quadrature otherwise, for the reason explained under the drilling stiffness below. The bending term always uses two-by-two, so that the drilling model does not change the bending response of the element.
Zero-energy modes of the one-point transverse shear
With the one-point quadrature of the transverse shear terms, the element stiffness matrix has two zero-energy modes besides the rigid-body modes, as reported by Hughes et al. [1], p. 1542 and Fig. 10, and by Hughes, Cohen and Haroun [11], Sec. 3.6, Fig. 6 and Table 1, element S1: the hourglass mode \(w = (x - x_c)(y - y_c)\) with zero rotations, and the in-plane twist \(w = 0\), \(r_x = x - x_c\), \(r_y = y - y_c\), where \((x_c, y_c)\) is the centroid, both bending modes of \(w\), \(r_x\) and \(r_y\), without membrane or drilling components. Their curvatures vanish, and their transverse shear strains vanish at the centroid. A single element then has eight zero eigenvalues instead of six. The hourglass mode is the one that survives assembly ([11], p. 214). It is suppressed by any support that constrains \(w\) along a boundary line, but a strip one element wide loaded in torsion, whose twist is the hourglass pattern, is much too flexible: 377 times the reference value in the twist case of the straight cantilever of MacNeal and Harder [7], 27 times in the out-of-plane case of their curved beam. Hughes et al. call the element “rank deficient” ([1], p. 1542), Hughes, Cohen and Haroun call rank deficiency its “single negative aspect” ([11], p. 221), and the remedy that removes both modes without locking is an assumed transverse shear field, that of Hughes and Tezduyar, which Bathe and Dvorkin [9], p. 367, list as closely related to theirs, or that of the MITC4 element, which has no spurious zero-energy mode and passes the patch test ([9], pp. 372-373). The MITC4 strains are therefore the default, and the element has only the six rigid-body modes.
The two rules differ only in the transverse shear term. On a parallelogram,
whose Jacobian is constant, the MITC4 strain at the centroid is the
displacement-based one, and the two-by-two integral of the MITC4 shear
energy is the one-point term of Hughes et al. plus the energy of the parts
of the assumed strains linear in \(\eta\), for \(\gamma_{\xi z}\), and in
\(\xi\), for \(\gamma_{\eta z}\) (derived here): a matrix of rank two, the
physical stabilisation of Belytschko and Leviathan [12], Eq. (4.13),
p. 331, also used by Quad4R, which vanishes for every state of
constant transverse shear and of constant curvature. On a parallelogram the
element is thus that of Hughes et al., with the energy of the transverse
shear that varies linearly over the element added, the energy that the
one-point rule discards; the two zero-energy modes receive the eigenvalues
0.019 and 0.168 times the largest one on a square with \(h/\ell = 0.01\),
and the 16 other non-zero eigenvalues change by up to 11 %. On other
quadrilaterals the constant part differs as well: the displacement-based
strain at the centroid does not vanish under a constant curvature, and the
one-point rule fails the thin-plate bending patch test, as Belytschko and
Leviathan [12], p. 337, Table 3, report for this element (“4-node SRI”,
0.92 to 1.15 times the exact deflection of the interior nodes), here 0.87
to 1.22 times on their patch and an energy error of 580 % on the patch of
MacNeal and Harder [7], Fig. 2, which the MITC4 strains pass to
round-off. On the other problems of MacNeal and Harder [7], the
normalised results of the default element differ from those of the
one-point rule by at most 2.1 %, except on the coarsest mesh of
the simply supported plates, 2 by 2 elements on a quarter, 0.977 instead of
1.065 for \(b/a = 1\) and 0.971 instead of 0.826 for \(b/a = 5\); the twist of
the straight cantilever becomes 0.941, 0.884 and 0.849 on the regular,
trapezoidal and parallelogram meshes instead of 377, 110 and 138, against
0.941, 0.951 and 0.945 for their QUAD4 element. Setting shear_model =
0 reproduces the element of Hughes et al. for \(h/\ell < 1\).
Geometric stiffness
The geometric stiffness matrix of Quad4.update_KG() and
Quad4.update_KG_given_stress(), and the geometrically nonlinear terms
of Quad4.update_KCNL() and of the internal forces, integrate the
membrane stress resultants with two-by-two quadrature. The slopes \(w_{,x}\)
and \(w_{,y}\) depend on shear_model:
with the default
shear_model = 1, the MITC4 transverse shear, they are taken at the two-by-two points, the full quadrature of the geometric stiffness;with
shear_model = 0they are taken at the centroid, for \(h/\ell < 1\) and for \(h/\ell \ge 1\).
The attribute centroid_slopes = 1 of Quad4 takes them at the
centroid with both values; pyfe3d.corotational.CorotationalShell
sets it with local='von_karman', see below. Quad4R, whose
transverse shear and bending are integrated at the centroid, takes them at
the centroid as well, see Quad4R.update_KG(). The same slopes enter
update_KG, update_KCNL and the nonlinear internal forces, such that
KC0 + KCNL + KG remains the exact Jacobian of the internal forces with
every rule.
The rule depends on shear_model because of the hourglass pattern of
\(w\), \(w = \xi \eta\) with zero rotations. The one-point transverse shear of
shear_model = 0 gives it no stiffness in KC0, see the zero-energy
modes above. With the slopes at the two-by-two points, the pattern would
have the geometric stiffness of the full quadrature. In a
supported plate, the pattern modulated by a smooth envelope then costs only
the transverse shear energy of the envelope, independent of the element size
\(\ell\), whereas its geometric work grows as \(1/\ell^2\), and a linear
buckling analysis could return a spurious mode of \(w\) alternating in sign
from node to node, with nearly zero rotations, below the physical buckling
load, once the transverse shear stiffness is low compared with the bending
stiffness, as in a sandwich plate. On a hard simply supported square plate
with \(b/h = 100\) under uniaxial compression and \(A_{44}\), \(A_{55}\) reduced
to 1/100 of the isotropic value, the lowest buckling load would be 49 % below the
solution of Seide and Stowell [10] with 16 by 16 elements and 87 % below
with 32 by 32; with 1/1000, 71 % below with 8 by 8 elements. At the
centroid the pattern has no slope and no geometric stiffness, consistently
with KC0, and these cases converge to that solution from above, with the
error decreasing as \(\ell^2\): +0.81 %, +0.20 % and +2.19 % with shear_model
= 0. The MITC4 strains of the default give the pattern its transverse
shear stiffness at every element size, and with the slopes at the
two-by-two points no spurious mode remains: +0.51 %, +0.13 % and +1.36 %,
against +0.83 %, +0.21 % and +2.70 % with centroid_slopes = 1, see
tests/test_quad4_geometric_hourglass.py. With
shear_model = 0 the elements with \(h/\ell \ge 1\), which have the MITC4
strains, take the slopes at the centroid as well, such that the geometric
stiffness does not depend on that gate and update_KG_given_stress does
not need the thickness.
The slopes at the two-by-two points integrate the geometric stiffness of a
smooth mode more accurately, and the slopes at the centroid give higher
buckling loads on coarse meshes. Above the exact
solutions, with the default, centroid_slopes = 1 and shear_model =
0: a simply supported plate with 20 by 6 elements, 5 elements per
half-wave along the load, +4.31 %, +6.81 % and +4.67 % above the Kirchhoff
solution, and +1.03 %, +1.61 % and +1.09 % with 40 by 12 elements, see
tests/test_solver.py; the square plate with \(b/h = 10\) and 12 by 12
elements, \(h/\ell = 1.2\), +0.91 %, +1.49 % and +1.49 % above the Mindlin
solution, see tests/test_quad4_geometric_hourglass.py. The laminated
cylinder of tests/test_quad4_linear_buckling_cylinder_displ.py, with
440 elements, gives -494.8 kN with the default and -590.0 kN with
centroid_slopes = 1, both converging to about -279 kN.
In the co-rotational frame of
pyfe3d.corotational.CorotationalShell the transverse translations
of a warped element are the hourglass pattern \(\pm \bar{z}\) of its warp,
not a deflection, and the wrapper with local='von_karman' sets
centroid_slopes = 1 while it calls the element, and restores it: the
von Kármán terms then vanish there, and
kinematics='corotational_von_karman' gives the internal force and the
tangent of 'corotational' to round-off, for both values of
shear_model, see tests/test_corotational_core.py. A Quad4 used
outside the wrapper keeps its own rule.
Hughes et al. [1] note that the transverse shear stiffness is of the order
of \((\ell/h)^2\) times the bending stiffness, such that, with a finite word
length, the bending stiffness is lost for very thin elements, and propose to
multiply the transverse shear stiffness by \((h/\ell)^2\) times the square of a
maximum allowed aspect ratio \(\ell/h\), \(10^5/8\) for their plate element in
the single precision of their computer, when this ratio is exceeded. This
correction is not applied. In double precision, the central deflection of a
simply supported square plate under a central point load, with eight by
eight elements, changes by \(-1 \times 10^{-4}\) from \(\ell/h = 1.25 \times
10^3\) to \(\ell/h = 1.25 \times 10^5\), see tests/test_quad4_thin_limit.py,
by \(1.4 \times 10^{-3}\) at \(\ell/h = 1.25 \times 10^6\), and by \(-33\) % at
\(\ell/h = 1.25 \times 10^7\), where the round-off dominates; with the
one-point transverse shear of shear_model = 0, by \(4 \times 10^{-6}\),
\(3 \times 10^{-4}\) and \(-32\) %.
Transverse shear stiffness
When a material direction is defined,
pyfe3d.shellprop.ShellProp.calc_Ats_element() re-evaluates the
equilibrium-based stiffness of Rohwer (1988) [6] with the plies rotated to
the element coordinate system, such that the assumed cylindrical bending
states are posed along the element axes.
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.
Physics-based, the default (drilling_model = 0). The in-plane
displacement field is enriched so that the drilling rotations produce
membrane strain energy, following Allman [2], and the independently
interpolated \(r_z\) is tied to the rotation of the membrane field by the
regularised functional of Hughes and Brezzi [3]. The combination for the
quadrilateral is the one of Ibrahimbegovic, Taylor and Wilson [4].
Each edge \(k\), joining nodes \(i\) and \(j\) and of length \(\ell_k\), carries a quadratic normal displacement whose end slopes are identified with the vertex drilling rotations, giving the amplitude
so that the enrichment is not a new degree-of-freedom but the difference of the two drilling rotations already present at the ends of the edge. The in-plane field becomes
with \(\boldsymbol{n}_k\) the unit normal of edge \(k\) and \(\hat{S}_k\) the
hierarchical bubble of that edge, equal to unity at its mid-point and zero
at every corner, which for the quadrilateral are the mid-side functions of
the eight-node serendipity element, see allman_enrichment(). In row form
the enrichment populates the drilling columns of the membrane operator,
giving \(\tilde{\boldsymbol{B}}_m\), whereas the curvature and transverse shear
operators are untouched, because the edge modes act only on the in-plane
translations. The drilling residual becomes
and the contribution to the element stiffness matrix is
The value \(\gamma_{r_z} = A_{66}\) is a stiffness per unit length taken from
the laminate, and not a user parameter.
Hughes and Brezzi identify the shear modulus \(G\) as the natural
regularisation parameter of the isotropic problem, and the thickness
integration turns \(G\) into \(hG = A_{66}\), which generalises to the \(A_{66}\)
of the laminate extensional stiffness matrix. The gamma_rz attribute
allows a different value to be used, which is only of interest for the
sensitivity study that the literature recommends.
Allman’s enrichment on its own is rank-deficient by one, because the state \(u_i = v_i = 0\) with \({r_z}_i = \omega_0\) makes every amplitude \(a_k\) vanish and therefore produces no membrane strain, although it is not a rigid-body motion. The term above gives that state the energy \(\frac{1}{2}\gamma_{r_z} A_e \omega_0^2\), with \(A_e\) the element area, and restores the rank at the element level. Prescribing the translations does not remove this mode, but in an assembled mesh it is a single global mode, which Allman notes, for his triangle, is very easily suppressed by prescribing any one of the drilling rotations of the model, and often by the displacement boundary conditions themselves ([2], Sec. 5); the term above removes it without such a constraint.
Two quadrature choices matter and both follow Ibrahimbegovic et al. (1990). The membrane term is integrated with three points per direction: the edge modes make \(\tilde{\boldsymbol{B}}_m\) vary linearly, and with two points the alternating pattern of the drilling rotations produces no membrane strain at any of the four points, leaving a zero-energy mode that no value of \(\gamma_{r_z}\) can remove. The constraint term \(\boldsymbol{K}_{C_e}^{r_z}\) is integrated with a single point at the centroid, which is what makes the element insensitive to \(\gamma_{r_z}\): a fully integrated constraint over-constrains \(r_z = \theta_z\) and locks the membrane response as \(\gamma_{r_z}\) grows, whereas with one point the response reaches an asymptote. One point also gives the constraint rank one per element, exactly what is needed to remove the uniform drilling mode.
Unlike the penalty below, the added term is consistent rather than artificial. Stationarity with respect to \(r_z\) gives \(\gamma_{r_z}(r_z - \theta_z) = 0\) pointwise, so the exact solution satisfies \(r_z = \theta_z\) and the term contributes no energy, for any positive \(\gamma_{r_z}\). The nodal moments about the shell normal recovered in the internal force vector are therefore physical, and in-plane moments can be transmitted between shells and beams through the shared drilling degree-of-freedom. Note also that when \(\boldsymbol{B} \neq \boldsymbol{0}\), for an offset reference surface or an unsymmetric laminate, the enriched membrane operator couples \(r_z\) to the curvatures, which is physically correct.
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
Quad4. The rotation \(r_z\) represents
the drilling degree-of-freedom in element’s coordinates, whereas \(\theta_z\) the in-plane rotation strain, defined as:
The first variation of \(U_{r_z}\) then becomes:
which can be expressed in terms of the shape functions and element degrees-of-freedom (\(u_e\)) as: \(r_z = S^{r_z} u_e\), \(u = S^u u_e\) and \(v = S^v u_e\) as:
or simply as:
with:
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 two-by-two quadrature. The approach herein presented is very similar to the one presented in Eq. 2.20 of Adam et al. [5]. The penalty leaves the membrane term on the two-by-two quadrature.
References#
Hughes, T. J. R., Taylor, R. L., and Kanoknukulchai, W., A simple and efficient finite element for plate bending, International Journal for Numerical Methods in Engineering, 11(10), 1529-1543, 1977. https://doi.org/10.1002/nme.1620111005
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
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
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.
Rohwer, K., Improved transverse shear stiffness for layered finite elements, DFVLR-FB 88-32, 1988.
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
Dvorkin, E. N., and Bathe, K. J., A continuum mechanics based four-node shell element for general non-linear analysis, Engineering Computations, 1(1), 77-88, 1984. https://doi.org/10.1108/eb023562
Bathe, K. J., and Dvorkin, E. N., A four-node plate bending element based on Mindlin/Reissner plate theory and a mixed interpolation, International Journal for Numerical Methods in Engineering, 21(2), 367-383, 1985. https://doi.org/10.1002/nme.1620210213
Seide, P., and Stowell, E. Z., Elastic and plastic buckling of simply supported solid-core sandwich plates in compression, NACA Report 967, 1950, Eq. (1), p. 2.
Hughes, T. J. R., Cohen, M., and Haroun, M., Reduced and selective integration techniques in the finite element analysis of plates, Nuclear Engineering and Design, 46(1), 203-222, 1978. https://doi.org/10.1016/0029-5493(78)90184-X
Belytschko, T., and Leviathan, I., Physical stabilization of the 4-node shell element with one point quadrature, Computer Methods in Applied Mechanics and Engineering, 113(3-4), 321-350, 1994. https://doi.org/10.1016/0045-7825(94)90052-3
- class pyfe3d.quad4.Quad4#
Four-node quadrilateral shell element with mixed integration
Nodal connectivity for the plate element similar to Nastran’s CQUAD4:
^ y | 4 ________ 3 | | | | --> x | | |_______| 1 2
The element coordinate system is determined identically what is explained in Nastran’s quick reference guide for the CQUAD4 element, as illustrated below.
The constructor stores the probe and sets the identification numbers and the positions
c1, c2, c3, c4to-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, c3, c4and theinit_k_*positions, and callsupdate_rotation_matrix()andupdate_probe_xe().- Parameters:
- p
Quad4Probe 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().- drilling_model,int
Selects how the drilling degree-of-freedom \(r_z\) is given stiffness, see the module documentation. The default
0is the physics-based stiffness, with the drilling enrichment of the in-plane displacement field and a regularisation term whose coefficient is set bygamma_rz. Any other value selects the fictitious penalty of MSC Nastran and Autodesk Nastran, controlled byK6ROT.Note
The attribute must be set before the element matrices are updated, and the same value must be passed to
Quad4Probe.update_BL()when strains are recovered from the probe.- 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, seegamma_rz. Default100..- gamma_rz,double
Regularisation parameter \(\gamma_{r_z}\) of the physics-based drilling stiffness, only read when
drilling_modelis0. The default is a negative value, which means that \(A_{66}\) of the laminate extensional stiffness matrix is used. Dimension of force per unit length, asA66.- warp_offsets,int
Rigid offsets of a warped element, see the Notes. The default
1links the flat element of the matrices, in the mean plane of the nodes, to the warped nodes by rigid offsets along its normal, inupdate_KC0,update_M,update_KG,update_KG_given_stress,update_KCNL, the internal forces ofupdate_probe_finteandupdate_fint, also withnonlinear, and the rows of the strains ofQuad4Probe.update_BL;0uses the flat element without them. A flat element gives the same results, bit for bit, with both values.- shear_model,int
Transverse shear of the element, see the module documentation. The default
1gives the assumed transverse shear strains of the MITC4 element of Dvorkin and Bathe, integrated with two-by-two points, for every thickness, and the element has only the six rigid-body modes as zero-energy modes.0gives the one-point transverse shear of Hughes et al. (1977) when \(h/\ell < 1\), with its two zero-energy modes, and the MITC4 strains otherwise. It also selects where the slopes of \(w\) of the geometric terms are taken, seecentroid_slopes.- centroid_slopes,int
Slopes \(w_{,x}\) and \(w_{,y}\) of the geometric stiffness of
update_KG()andupdate_KG_given_stress(), ofupdate_KCNL()and of the von Kármán terms of the internal forces, see the Notes ofupdate_KG(). The default0takes them at the two-by-two integration points withshear_model != 0and at the centroid withshear_model = 0; any other value takes them at the centroid with everyshear_model, asQuad4Rdoes.pyfe3d.corotational.CorotationalShellwithlocal='von_karman'sets it to1while it calls the element, and restores it; withkinematics='von_karman'ofpyfe3d.corotational.CorotationalModel, and in any other use, the element keeps its own rule, since the slopes of \(w\) are then those of real deflections.- 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, c3, c4int
Position of each node in the global stiffness matrix. The coordinates of a node are read at the positions
c1//2,c2//2,c3//2andc4//2of the coordinate array.- n1, n2, n3, n4int
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.
- init_k_KA_beta, init_k_KA_gamma, init_k_CAint
Position in the arrays storing the sparse data for the aerodynamic matrices based on the Piston theory.
- probe,
Quad4Probeobject Pointer to the probe.
Methods
update_CA(self, long[, long[, double[)Update sparse vectors for piston-theory aerodynamic damping matrix \(\boldsymbol{C}_A\)
update_KA_beta(self, long[, long[, double[)Update sparse vectors for piston-theory aerodynamic matrix \(\boldsymbol{K}_{A_\beta}\)
update_KA_gamma(self, long[, long[, double[)Update sparse vectors for piston-theory aerodynamic matrix \(\boldsymbol{K}_{A_\gamma}\)
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
The default physics-based drilling stiffness,
drilling_model = 0, combines the in-plane enrichment of Allman (1984) [1] with the regularisation of Hughes and Brezzi (1989) [2], in the form given for the quadrilateral by Ibrahimbegovic et al. (1990) [3]. With it the drilling rotation is a kinematic variable that carries strain energy, the recovered nodal moments about the shell normal are physical, and no user parameter is involved, since its regularisation parameter is taken from the laminate stiffness. The fictitious penalty of the other values ofdrilling_modelcorresponds to \(\gamma_{r_z} = K6ROT \cdot 10^{-6} A_{66}\). Both models are described in the Notes ofpyfe3d.quad4.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
gamma_rz, \(A_{66}\), is the value identified by Hughes and Brezzi (1989) [2]. 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.Warped elements. The matrices are those of the flat projection of the element, whose nodes are in the mean plane of the four nodes, the plane of the element coordinates parallel to both diagonals: node \(a\) is at the height \(\tilde{z}_a\) above it, with \(\tilde{z}_1 = \tilde{z}_3 = -\tilde{z}_2 = -\tilde{z}_4\), and the coordinate \(z\) of
probe.xeis otherwise ignored. The flat element alone does not represent the rigid rotations of the warped nodes and is too stiff in warped meshes. Withwarp_offsets = 1the flat element is linked to each node by the rigid offset \(\boldsymbol{r}_a = \tilde{z}_a \boldsymbol{e}_3\), the first order of the offsets ofpyfe3d.corotational.CorotationalShellwithwarping='offsets'(derived here), which gives, in element coordinates,\[u^f_a = u_a - \tilde{z}_a r_{y,a}, \qquad v^f_a = v_a + \tilde{z}_a r_{x,a}\]with \(w\) and the rotations unchanged, \(\boldsymbol{u}^f = \boldsymbol{J} \boldsymbol{u}_e\). The element matrices and forces are \(\boldsymbol{J}^\top \boldsymbol{K}_{C0} \boldsymbol{J}\), \(\boldsymbol{J}^\top \boldsymbol{M} \boldsymbol{J}\) and \(\boldsymbol{J}^\top \boldsymbol{f}\), with the flat element evaluated at \(\boldsymbol{J} \boldsymbol{u}_e\), applied in element coordinates before the rotation to global coordinates, and the geometric stiffness adds the eccentricity term of the offsets, see
update_KG().KC0then annihilates the six rigid motions of the warped nodes, is the tangent ofCorotationalShellat the base configuration and keeps the number of zero eigenvalues of the flat element (six, eight withshear_model = 0); for a warp ratiomax|z|/sqrt(A)of 0.022 its non-zero eigenvalues change by at most 0.07 %. Other corrections of warped flat quadrilaterals balance the moment of the offset membrane forces with forces normal to the element instead of nodal moments, MacNeal (1978) [4], p. 180, and Cook (1994) [5], p. 552, or add warping terms to the curvatures, Belytschko et al. (1992) [6], Section 3.3, Eqs. (30b) and (37d-f). In the twisted beam of MacNeal and Harder (1985) [7], Fig. 6, 12 by 2 elements with a warp ratio of 0.024, the tip displacements of their Table 3 are matched within 0.4 % with the offsets, and are 67 to 77 % too small without them, seetests/test_quad_warp_offsets.py.References
[1]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
[2] (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
[3]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
[4]MacNeal, R. H., A simple quadrilateral shell element, Computers & Structures, 8(2), 175-183, 1978. https://doi.org/10.1016/0045-7949(78)90020-2
[5]Cook, R. D., Four-node ‘flat’ shell element: drilling degrees of freedom, membrane-bending coupling, warped geometry, and behavior, Computers & Structures, 50(4), 549-555, 1994. https://doi.org/10.1016/0045-7949(94)90025-6
[6]Belytschko, T., Wong, B. L., and Chiang, H.-Y., Advances in one-point quadrature shell elements, Computer Methods in Applied Mechanics and Engineering, 96(1), 93-107, 1992. https://doi.org/10.1016/0045-7825(92)90100-X
[7]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
Examples
The constitutive stiffness matrix of one square element of an isotropic plate:
>>> import numpy as np >>> from scipy.sparse import coo_matrix >>> from pyfe3d import Quad4, Quad4Data, Quad4Probe, DOF, INT, DOUBLE >>> from pyfe3d.shellprop_utils import isotropic_plate >>> x = np.array([0., 0., 0., 1., 0., 0., 1., 1., 0., 0., 1., 0.]) >>> prop = isotropic_plate(thickness=0.01, E=70e9, nu=0.3) >>> data = Quad4Data() >>> elem = Quad4(Quad4Probe()) >>> elem.n1, elem.n2, elem.n3, elem.n4 = 1, 2, 3, 4 >>> elem.c1, elem.c2, elem.c3, elem.c4 = 0, 6, 12, 18 >>> 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 = 4*DOF >>> KC0 = coo_matrix((KC0v, (KC0r, KC0c)), shape=(N, N)).toarray() >>> print(KC0.shape, elem.area, np.allclose(KC0, KC0.T)) (24, 24) 1.0 True
- K6ROT#
K6ROT: ‘double’
- area#
area: ‘double’
- c1#
c1: ‘int’
- c2#
c2: ‘int’
- c3#
c3: ‘int’
- c4#
c4: ‘int’
- centroid_slopes#
centroid_slopes: ‘int’
- drilling_model#
drilling_model: ‘int’
- eid#
eid: ‘int’
- gamma_rz#
gamma_rz: ‘double’
- init_k_CA#
init_k_CA: ‘int’
- init_k_KA_beta#
init_k_KA_beta: ‘int’
- init_k_KA_gamma#
init_k_KA_gamma: ‘int’
- 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’
- n4#
n4: ‘int’
- pid#
pid: ‘int’
- probe#
probe: pyfe3d.quad4.Quad4Probe
- 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_CA(self, long[: :1] CAr, long[: :1] CAc, double[: :1] CAv) void#
Update sparse vectors for piston-theory aerodynamic damping matrix \(\boldsymbol{C}_A\)
The matrix is integrated over the element with 2 by 2 Gauss-Legendre quadrature, from the coordinates
probe.xeand the rotation matrix, and its values are added toCAvat the positionsinit_k_CAtoinit_k_CA + CA_SPARSE_SIZE - 1; the global row and column indices are always written toCArandCAcat the same positions. Only the translational degrees-of-freedom appear, through their components along the element normal. No aerodynamic coefficient enters the values, which depend only on the geometry, so the caller multiplies the assembled matrix by it. Before this method is called,update_rotation_matrix()andupdate_probe_xe()must have been used.- Parameters:
- CArnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_CA + CA_SPARSE_SIZE.- CAcnp.array
Array to store column positions of sparse values Same type and size as
CAr.- CAvnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asCAr. The values are added to the existing ones, with dimension of length squared.
Notes
With \(w_n\) the displacement along the element normal, as in
update_KA_beta(), the computed matrix is\[\boldsymbol{C}_A = -\int_A \boldsymbol{S}^\top \boldsymbol{S} dA\]acting on the nodal values of the velocity \(\dot w_n\). With the piston-theory damping coefficient \(\mu\) given by the caller, \(\mu \boldsymbol{C}_A \dot{\boldsymbol{u}}\) is the load of the term \(-\mu \dot{w}_n\) of the pressure law, which enters the damping of the equations of motion as \(-\mu \boldsymbol{C}_A\), positive definite, see the piston theory in the notes of
update_KA_beta().
- update_KA_beta(self, long[: :1] KA_betar, long[: :1] KA_betac, double[: :1] KA_betav) void#
Update sparse vectors for piston-theory aerodynamic matrix \(\boldsymbol{K}_{A_\beta}\)
The matrix is integrated over the element with 2 by 2 Gauss-Legendre quadrature, from the coordinates
probe.xeand the rotation matrix, and its values are added toKA_betavat the positionsinit_k_KA_betatoinit_k_KA_beta + KA_BETA_SPARSE_SIZE - 1; the global row and column indices are always written toKA_betarandKA_betacat the same positions. Only the translational degrees-of-freedom appear, through their components along the element normal. No aerodynamic coefficient enters the values, which depend only on the geometry, so the caller multiplies the assembled matrix by it. Before this method is called,update_rotation_matrix()andupdate_probe_xe()must have been used.- Parameters:
- KA_betarnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KA_beta + KA_BETA_SPARSE_SIZE.- KA_betacnp.array
Array to store column positions of sparse values Same type and size as
KA_betar.- KA_betavnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKA_betar. The values are added to the existing ones, with dimension of length.
Notes
With \(w_n = T_{13} u + T_{23} v + T_{33} w\) the displacement along the element normal, written with the global translations, the computed matrix is
\[\boldsymbol{K}_{A_\beta} = -\int_A \boldsymbol{S}^\top \left( T_{11} \boldsymbol{S}_{,x} + T_{12} \boldsymbol{S}_{,y} \right) dA\]acting on the nodal values of \(w_n\), where \(\boldsymbol{S}\) holds the bilinear shape functions and \(\boldsymbol{S}_{,x}\), \(\boldsymbol{S}_{,y}\) their derivatives along the element axes. The element coordinates are \(x = T_{11} X + T_{21} Y + T_{31} Z\) and \(y = T_{12} X + T_{22} Y + T_{32} Z\), such that \(T_{11} \boldsymbol{S}_{,x} + T_{12} \boldsymbol{S}_{,y}\) is the derivative along the global \(X\) axis, the direction of the flow, projected on the plane of the element.
Piston theory
The matrices of
update_KA_beta(),update_KA_gamma()andupdate_CA()are the matrices of the aerodynamic load along the element normal of a supersonic flow along the global \(X\) axis, flowing towards the positive \(X\). The linear piston theory, with Krumhaar’s correction for a cylinder [1], gives the pressure on the side of the flow \(p = \beta w_{,X} + \mu \dot{w} - \gamma w\), with \(w\) the displacement towards the flow, and hence the load per unit area along the normal\[q = -\beta \, w_{n,X} + \gamma \, w_n - \mu \, \dot{w}_n\]whichever side of the element the flow is on, because \(q\) and \(w_n\) change sign together. The load vector is then \(\boldsymbol{f}_A = \beta \boldsymbol{K}_{A_\beta} \boldsymbol{u} + \gamma \boldsymbol{K}_{A_\gamma} \boldsymbol{u} + \mu \boldsymbol{C}_A \dot{\boldsymbol{u}}\) and the equations of motion are
\[\boldsymbol{M} \ddot{\boldsymbol{u}} - \mu \boldsymbol{C}_A \dot{\boldsymbol{u}} + \left(\boldsymbol{K} - \beta \boldsymbol{K}_{A_\beta} - \gamma \boldsymbol{K}_{A_\gamma}\right) \boldsymbol{u} = \boldsymbol{0}\]The coefficients are given by the caller; with the density \(\rho_{\infty}\), speed \(U\) and Mach number \(M\) of the flow, \(\beta = \rho_{\infty} U^2/\sqrt{M^2 - 1}\), \(\mu = \beta (M^2 - 2)/(U (M^2 - 1))\), and \(\gamma = \beta/(2 R \sqrt{M^2 - 1})\) for the flow over the outer, convex, side of a cylinder of radius \(R\), an outward displacement lowering the pressure, or \(\gamma = 0\) for a flat panel. The positive \(\mu\) damps the motion, and the positive \(\gamma\) reduces the stiffness.
References
[1]Krumhaar, H., “The accuracy of linear piston theory when applied to cylindrical shells”, AIAA Journal, 1(6), 1448-1449, 1963.
- update_KA_gamma(self, long[: :1] KA_gammar, long[: :1] KA_gammac, double[: :1] KA_gammav) void#
Update sparse vectors for piston-theory aerodynamic matrix \(\boldsymbol{K}_{A_\gamma}\)
The matrix is integrated over the element with 2 by 2 Gauss-Legendre quadrature, from the coordinates
probe.xeand the rotation matrix, and its values are added toKA_gammavat the positionsinit_k_KA_gammatoinit_k_KA_gamma + KA_GAMMA_SPARSE_SIZE - 1; the global row and column indices are always written toKA_gammarandKA_gammacat the same positions. Only the translational degrees-of-freedom appear, through their components along the element normal. No aerodynamic coefficient enters the values, which depend only on the geometry, so the caller multiplies the assembled matrix by it. Before this method is called,update_rotation_matrix()andupdate_probe_xe()must have been used.- Parameters:
- KA_gammarnp.array
Array to store row positions of sparse values 1-D array of integers (
INT) of size at leastinit_k_KA_gamma + KA_GAMMA_SPARSE_SIZE.- KA_gammacnp.array
Array to store column positions of sparse values Same type and size as
KA_gammar.- KA_gammavnp.array
Array to store sparse values 1-D array of
DOUBLE, same size asKA_gammar. The values are added to the existing ones, with dimension of length squared.
Notes
With \(w_n\) the displacement along the element normal, as in
update_KA_beta(), the computed matrix is\[\boldsymbol{K}_{A_\gamma} = \int_A \boldsymbol{S}^\top \boldsymbol{S} dA\]acting on the nodal values of \(w_n\). With the piston-theory coefficient \(\gamma\) given by the caller, \(\gamma \boldsymbol{K}_{A_\gamma} \boldsymbol{u}\) is the load of the term \(\gamma w_n\) of the pressure law, which enters the stiffness of the equations of motion as \(-\gamma \boldsymbol{K}_{A_\gamma}\), see the piston theory in the notes of
update_KA_beta().
- 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 in element coordinates into the probe attribute
KC0ve, from the coordinatesprobe.xe, theareaand the constitutive matrices ofproprotated withm11, m12, m21, m22. It is rotated to global coordinates and its values 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 element matrix in element coordinates,
KC0ve, is computed by_update_probe_KC0ve(), whose Notes give its terms and quadratures. It is rotated to global coordinates with \(\boldsymbol{K}_g = \boldsymbol{T} \boldsymbol{K}_e \boldsymbol{T}^\top\), where \(\boldsymbol{T}\) is block diagonal, with the matrix \(\boldsymbol{T}_{3\times 3}\) of the entries \(T_{ij}\) stored inr11, ..., r33, whose columns are the element axes, applied to the translations and to the rotations of each node.With
warp_offsets = 1and a warped element the element matrix is \(\boldsymbol{J}^\top \boldsymbol{K}_e \boldsymbol{J}\), see the Notes ofQuad4, computed in place inKC0veat the end of_update_probe_KC0ve().
- 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
KCNL collects the terms of the tangent stiffness matrix of the geometrically nonlinear analysis with the von Kármán membrane strains that are not in KC0 and in KG, evaluated at the displacements of the probe with the quadrature of
update_KG(). The tangent stiffness matrix of the internal forces ofupdate_fint()withnonlinear=1isKC0 + KCNL + KG.Before this function is called, the probe
Quad4Probeattribute of theQuad4object 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 [2], 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.The linear part of the internal forces,
KC0*u, keeps the quadratures of KC0, whereas the nonlinear terms of_update_probe_finte_nonlinear(), KCNL and KG use the two-by-two quadrature, with the same slopes of \(w\), at the two-by-two points withshear_model != 0and at the centroid withshear_model = 0orcentroid_slopes != 0, seeupdate_KG(); each part of the strain energy is differentiated with its own quadrature, so the Jacobian remains exact for every rule of the slopes. The element matrix is computed by_update_probe_KCNLve()and rotated to global coordinates as inupdate_KC0().Warped elements,
warp_offsets = 1, see the Notes ofQuad4. The von Kármán strains are those of the flat element, linked to the nodes by the first-order rigid offsets \(\boldsymbol{u}^f = \boldsymbol{J} \boldsymbol{u}_e\) (derived here): the strain energy is that of the flat element at \(\boldsymbol{J} \boldsymbol{u}_e\), the internal forces are \(\boldsymbol{J}^\top\) times those of the flat element, and its exact Jacobian is \(\boldsymbol{J}^\top (\boldsymbol{K}_{C0} + \boldsymbol{K}_{CNL} + \boldsymbol{K}_{GNL} + \boldsymbol{K}_G) \boldsymbol{J}\) of the flat element at \(\boldsymbol{J} \boldsymbol{u}_e\), where \(\boldsymbol{J}^\top \boldsymbol{K}_G \boldsymbol{J} = \boldsymbol{K}_G\). The link is kept to first order in the rotations because the von Kármán strains themselves are: with the ordering of Sanders (1963), p. 30, Eqs. (67)-(69), and p. 32, Eq. (89), strains of order \(\epsilon^2\), rotations about the in-plane axes of order \(\epsilon\) and a smaller rotation about the normal, the second-order terms of the offsets, \(-\frac{1}{2} \boldsymbol{\theta}_a \times (\boldsymbol{\theta}_a \times \boldsymbol{r}_a)\), change the strains by terms of order \((\tilde{z}/\ell) \epsilon^3\), beyond those kept (derived here). On the twisted beam oftests/test_quad_warp_offsets.pywith 12 by 2 Quad4 elements, the defaultshear_model = 1andcentroid_slopes = 0, and tip loads of 500 along \(z\) and 1100 along \(y\), rotations up to 0.32, the second-order link, evaluated with a numpy prototype that reproduces the first-order link of the element to round-off, gives tip displacements 6.7 and 7.2 % smaller than the first-order one, whose results are 2.8 and 3.1 % below the von Kármán solution of a 96 by 16 mesh of the same element, the discretisation error of the coarse mesh (7.3 and 7.1 % smaller, and 2.3 % below, withcentroid_slopes = 1). The eccentricity term \(\boldsymbol{K}_E\) thatupdate_KG()adds for the linear buckling analysis, the second derivative of the second-order terms, is therefore subtracted here, with the same nodal forces, those ofupdate_probe_finte(), whoseprobe.finteis restored andprobe.KC0veoverwritten, such that KCNL is \(\boldsymbol{J}^\top (\boldsymbol{K}_{CNL} + \boldsymbol{K}_{GNL}) \boldsymbol{J} - \boldsymbol{K}_E\), rotated to global coordinates, andKC0 + KCNL + KGremains the exact Jacobian of the internal forces ofupdate_fint()withnonlinear=1. A flat element andwarp_offsets = 0give the results of the flat element, bit for bit.References
[1]Sanders, J. L., Nonlinear theories for thin shells, Quarterly of Applied Mathematics, 21(1), 21-36, 1963. https://doi.org/10.1090/qam/147023
[2]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) void#
Update sparse vectors for geometric stiffness matrix KG
The stress resultants are integrated with a two-point Gauss-Legendre quadrature in each direction, and the slopes of \(w\) are taken at the same points with
shear_model != 0, the default, and at the centroid withshear_model = 0orcentroid_slopes != 0, see the Notes.Before this function is called, the probe
Quad4Probeattribute of theQuad4object must be updated usingupdate_probe_ue()with the correct pre-buckling (fundamental state) displacements; andupdate_probe_xe()with the node coordinates.At each integration point 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, and the global row and column indices are always 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.
Notes
The matrix is
\[\boldsymbol{K}_G = \sum w_{ij} \det J \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 \(\boldsymbol{G}_x\) and \(\boldsymbol{G}_y\) the rows of \(w_{,x}\) and \(w_{,y}\), at the integration point or at the centroid, see
_update_probe_BL_G(), \(w\) being the displacement along the element normal, i.e. the combination of the global translations withr13, r23, r33, and \(\{N_{xx}, N_{yy}, N_{xy}\}^\top = \boldsymbol{A} \boldsymbol{\epsilon} + \boldsymbol{B} \boldsymbol{\kappa}\) the stress resultants of the linear strains of the Notes ofpyfe3d.quad4. Fordrilling_model=0the membrane strains include those of the drilling enrichment ofallman_enrichment(), without which KG would not be part of the exact Jacobian of the internal forces, seeupdate_KCNL(). KG is linear in the displacementsue, such thatKC0 + lambda*KGgives the linear buckling problem for the load multiplierlambdaof the pre-buckling state.The slopes are taken at the two-by-two points with
shear_model != 0, the default, and at the centroid withshear_model = 0, for every \(h/\ell\), or withcentroid_slopes != 0, see the Notes ofpyfe3d.quad4. The rule depends onshear_modelbecause of the hourglass pattern of \(w\), \(w = \xi \eta\), which has no gradient at the centroid: the one-point transverse shear of the elements with \(h/\ell < 1\) andshear_model = 0gives it no stiffness in KC0, and with the slopes at the two-by-two points it would have the geometric stiffness of the full quadrature, and a linear buckling analysis could return a spurious mode of \(w\) alternating in sign from node to node, with nearly zero rotations, below the physical buckling load. On a hard simply supported square plate with \(b/h = 100\) under uniaxial compression and the transverse shear stiffness reduced to 1/100 of the isotropic one, as in a sandwich, the lowest buckling load would be 49 % below the solution of Seide and Stowell (1950) with 16 by 16 elements and 87 % below with 32 by 32; with 1/1000, 71 % below with 8 by 8 elements. With the slopes at the centroid these cases converge to that solution, +0.81, +0.20 and +2.19 % withshear_model = 0. The assumed transverse shear strains of the MITC4 element of the default give the pattern its transverse shear stiffness, and with the slopes at the two-by-two points no spurious mode remains: +0.51, +0.13 and +1.36 %, against +0.83, +0.21 and +2.70 % withcentroid_slopes = 1. The slopes at the two-by-two points integrate the geometric stiffness of a smooth mode more accurately: a plate with 5 elements per half-wave along the load buckles 4.31 % above the Kirchhoff solution with them, 6.81 % withcentroid_slopes = 1and 4.67 % withshear_model = 0, seetests/test_quad4_geometric_hourglass.py.Quad4Rtakes the slopes at the centroid. In the co-rotational frame ofpyfe3d.corotational.CorotationalShellwithlocal='von_karman'they are taken at the centroid, see the Notes of that class.Warped elements,
warp_offsets = 1, see the Notes ofQuad4: the stress resultants are those of the displacements \(\boldsymbol{J} \boldsymbol{u}_e\) of the flat element, and the matrix above, which has no entries of the in-plane translations, is not changed by \(\boldsymbol{J}^\top \boldsymbol{K}_G \boldsymbol{J}\). The rigid offsets add on the rotations of each node the eccentricity geometric stiffness, which Felippa and Haugen (2005), Section 5.1, p. 2304, name without giving it (see the references ofpyfe3d.corotational.CorotationalShell),\[\boldsymbol{K}_{E,a} = (\boldsymbol{n}_a \cdot \boldsymbol{r}_a) \boldsymbol{I} - \frac{1}{2} \left( \boldsymbol{n}_a \boldsymbol{r}_a^\top + \boldsymbol{r}_a \boldsymbol{n}_a^\top \right)\]the second derivative, at zero rotation, of the work of the nodal forces \(\boldsymbol{n}_a\) of the flat element on the displacement \(-(\boldsymbol{R}_a - \boldsymbol{I}) \boldsymbol{r}_a\) of its node, \(\boldsymbol{R}_a\) the rotation matrix of the node (derived here), equal to
dLambdaT_m(0, n x r) - Spin(n) Spin(r)ofpyfe3d.corotationaland linear in the pre-buckling state. The forces \(\boldsymbol{n}_a\) are the translations of the linear internal forces ofupdate_probe_finte(), which are those of the flat element;probe.finteis restored andprobe.KC0veoverwritten.update_KCNL()subtracts \(\boldsymbol{K}_E\), see its Notes, such that the tangent of the von Kármán internal forces does not contain it. The 36 entries of \(\boldsymbol{K}_E\) follow the 144 of the translations,(r_x, r_y, r_z)of node 1 to node 4 row by row, and are zero for a flat element and withwarp_offsets = 0.
- update_KG_given_stress(self, double Nxx, double Nyy, double Nxy, long[: :1] KGr, long[: :1] KGc, double[: :1] KGv) 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 slopes of \(w\) are taken at the two-by-two points with
shear_model != 0and at the centroid withshear_model = 0orcentroid_slopes != 0, see the Notes ofupdate_KG().Before this function is called, the probe
Quad4Probeattribute of theQuad4object 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, and the global row and column indices are always 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.
Notes
The matrix is the one of
update_KG(), with the given constant stress resultantsNxx, Nyy, Nxyinstead of the ones computed from the displacements of the probe. With constant stress resultants and the slopes at the centroid, it is the element area times the integrand at the centroid; with the slopes at the two-by-two points, the two-by-two quadrature of the integrand.Warped elements,
warp_offsets = 1, see the Notes ofQuad4: the stress resultants are those of the displacements \(\boldsymbol{J} \boldsymbol{u}_e\) of the flat element, and the matrix above, which has no entries of the in-plane translations, is not changed by \(\boldsymbol{J}^\top \boldsymbol{K}_G \boldsymbol{J}\). The rigid offsets add on the rotations of each node the eccentricity geometric stiffness, which Felippa and Haugen (2005), Section 5.1, p. 2304, name without giving it (see the references ofpyfe3d.corotational.CorotationalShell),\[\boldsymbol{K}_{E,a} = (\boldsymbol{n}_a \cdot \boldsymbol{r}_a) \boldsymbol{I} - \frac{1}{2} \left( \boldsymbol{n}_a \boldsymbol{r}_a^\top + \boldsymbol{r}_a \boldsymbol{n}_a^\top \right)\]the second derivative, at zero rotation, of the work of the nodal forces \(\boldsymbol{n}_a\) of the flat element on the displacement \(-(\boldsymbol{R}_a - \boldsymbol{I}) \boldsymbol{r}_a\) of its node, \(\boldsymbol{R}_a\) the rotation matrix of the node (derived here), equal to
dLambdaT_m(0, n x r) - Spin(n) Spin(r)ofpyfe3d.corotationaland linear in the pre-buckling state. The forces \(\boldsymbol{n}_a\) are those of the given stress resultants, the area times \(N_{xx} S_{a,x} + N_{xy} S_{a,y}\) and \(N_{xy} S_{a,x} + N_{yy} S_{a,y}\) with the slopes of the shape functions at the centroid, which is their exact integral. The 36 entries of \(\boldsymbol{K}_E\) follow the 144 of the translations,(r_x, r_y, r_z)of node 1 to node 4 row by row, and are zero for a flat element and withwarp_offsets = 0.
- 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 120 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 three mass matrices follow from the kinetic energy of Brockman 1987 [1], Eq. (20), and have the form of its Eq. (21). With the displacements \(u + z r_y\), \(v - z r_x\) and \(w\) of the Notes of
pyfe3d.quad4, the kinetic energy integrated through the thickness,\[T = \frac{1}{2} \int_A \left[ intrho (\dot{u}^2 + \dot{v}^2 + \dot{w}^2) + 2\, intrhoz (\dot{u} \dot{r}_y - \dot{v} \dot{r}_x) + intrhoz2 (\dot{r}_x^2 + \dot{r}_y^2) \right] dA\]where
intrho,intrhozandintrhoz2include the offset, gives, for the nodes \(i\) and \(j\), in element coordinates,\[\begin{split}M_{ij} = h_{ij} \begin{bmatrix} intrho & 0 & 0 & 0 & intrhoz & 0 \\ 0 & intrho & 0 & -intrhoz & 0 & 0 \\ 0 & 0 & intrho & 0 & 0 & 0 \\ 0 & -intrhoz & 0 & intrhoz2 & 0 & 0 \\ intrhoz & 0 & 0 & 0 & intrhoz2 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}, \qquad h_{ij} = \int_A S_i S_j dA\end{split}\]for the DOF \(u, v, w, r_x, r_y, r_z\), the drilling rotation carrying no inertia. The matrix is rotated to global coordinates as in
update_KC0(). The integrals \(h_{ij}\) are computed with:mtype=0: two-point Gauss-Legendre quadrature in each direction;mtype=1: two-point Gauss-Lobatto quadrature in each direction, whose points are the nodes, the lumped mass matrix of Brockman [1], giving \(h_{ii}\) equal to the Jacobian determinant at node \(i\) and \(h_{ij} = 0\) for \(i \neq j\);mtype=2: a single point at the centroid, where every \(S_i = 1/4\), giving \(h_{ij} = A/16\) for all \(i, j\).
For
mtype=0the quadrature is exact. Withmtype=2the element mass is placed at the average of the node positions, which is the centroid of the area only for a parallelogram.Lumped mass matrix
The Gauss-Lobatto rule of
mtype=1is 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 couples no different nodes and gives for node \(i\) the block \(M_{ii}\) above with \(h_{ii}\), the coupling throughintrhozincluded: the matrix is block-diagonal per node and, as Brockman [1] writes, diagonal only whenintrhozis zero. The weights \(h_{ii}\) sum to the area \(A\), so the lumped matrix has the exact mass and the exact first moment of the mass through the thickness,intrhoz\(A\), which places the centre of mass at the offset from the reference surface. In the plane of the element the first moment is exact when \(h_{ii} = \int_A S_i dA\), which holds for a parallelogram, where \(h_{ii} = A/4\), and not for a general quadrilateral, whose Jacobian determinant varies. Of the rotary inertia, the termintrhoz2\(A\) about the axes in the plane of the element is exact, while the part from the distribution ofintrhoover the area, about any axis, is concentrated at the nodes: 3 times the exact value about the centroid of a parallelogram, an error that decreases with the size of the elements.With
warp_offsets = 1and a warped element the matrix is \(\boldsymbol{J}^\top \boldsymbol{M} \boldsymbol{J}\), see the Notes ofQuad4, which keeps the form above for each pair of nodes \(i\) and \(j\) withintrhozreplaced byintrhoz - intrho*z_jin the entries between the translations of \(i\) and the rotations of \(j\), andintrhoz2byintrhoz2 - intrhoz*(z_i + z_j) + intrho*z_i*z_jin those between the rotations, \(z_i\) being the heights of the nodes above the flat element (derived here): the moments of the mass about the warped nodes. The numbers of entries do not change, and the lumped matrix remains block-diagonal per node.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://doi.org/10.1002/nme.1620241208
- update_area(self) void#
Update element area
The
areaattribute is updated with the area of the quadrilateral given by the element coordinatesprobe.xe, ignoring thezcoordinates. Called byupdate_probe_xe().Notes
The shoelace formula of the quadrilateral with the vertices \((x_i, y_i)\) of nodes 1 to 4 in element coordinates:
\[A = \frac{1}{2} \left| (x_1 y_2 + x_2 y_3 + x_3 y_4 + x_4 y_1) - (x_2 y_1 + x_3 y_2 + x_4 y_3 + x_1 y_4) \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,c2,c3andc4. 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 theQuad4Probewith 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, whose tangent stiffness matrix isKC0 + KCNL + KG, seeupdate_KCNL().
Notes
The internal forces of each node, forces and moments, are rotated from the element to the global coordinates with the rotation matrix
r11, ..., r33. Withnonlinear,KC0 + KCNL + KGis the exact Jacobian of the assembled internal forces, seeupdate_probe_finte()andupdate_KCNL().With
warp_offsets = 1and a warped element the internal forces are those of the flat element at the displacements \(\boldsymbol{J} \boldsymbol{u}_e\), taken to the nodes with \(\boldsymbol{J}^\top\), see the Notes ofQuad4: the linear ones \(\boldsymbol{J}^\top \boldsymbol{K}_e \boldsymbol{J} \boldsymbol{u}_e\) and the terms ofnonlinear, seeupdate_KCNL().
- update_probe_finte(self, ShellProp prop, int nonlinear=0) void#
Update the internal force vector of the probe
The attribute
finteof the objectQuad4Probeis updated, which corresponds to the 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 linear internal forces are
KC0vetimesue, the attributeKC0veof the probe being updated first, as inupdate_KC0(). Before this method is called,update_probe_xe()andupdate_probe_ue()must have been used.Note
The
finteattribute of objectQuad4Probeis 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, whose tangent stiffness matrix isKC0 + KCNL + KG, seeupdate_KCNL().
- prop
Notes
The internal forces are the gradient of the strain energy of the Notes of
pyfe3d.quad4with respect to the element displacements,finte = KC0ve @ uein the linear case, with the quadratures of_update_probe_KC0ve(). Withnonlinearthe terms of_update_probe_finte_nonlinear()are added, andKC0 + KCNL + KGis the exact Jacobian of the internal forces, seeupdate_KCNL().With
warp_offsets = 1and a warped element the internal forces are those of the flat element at the displacements \(\boldsymbol{J} \boldsymbol{u}_e\), taken to the nodes with \(\boldsymbol{J}^\top\), see the Notes ofQuad4: the linear ones \(\boldsymbol{J}^\top \boldsymbol{K}_e \boldsymbol{J} \boldsymbol{u}_e\) and the terms ofnonlinear, 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 four nodes, read from
uat the positionsc1,c2,c3andc4, 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 objectQuad4Probeis 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 four nodes, read from
xat the positionsc1//2,c2//2,c3//2andc4//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 objectQuad4Probeis 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. The element coordinates are thus measured from the origin of the global system along the element axes.
- 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 rotation matrix terms are calculated after solving 9 equations.
The element
zaxis is along the cross product of the vectors from node 4 to node 2 and from node 1 to node 3, and the elementxaxis along the sum of these two vectors. 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//2,c3//2andc4//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}_{13} = \boldsymbol{x}_3 - \boldsymbol{x}_1\) and \(\boldsymbol{v}_{42} = \boldsymbol{x}_2 - \boldsymbol{x}_4\), the vectors along the diagonals, the element axes are
\[\boldsymbol{e}_z = \frac{\boldsymbol{v}_{42} \times \boldsymbol{v}_{13}}{\|\boldsymbol{v}_{42} \times \boldsymbol{v}_{13}\|}, \qquad \boldsymbol{e}_x = \frac{\boldsymbol{v}_{13} + \boldsymbol{v}_{42}}{\|\boldsymbol{v}_{13} + \boldsymbol{v}_{42}\|}, \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}_{42} \times \boldsymbol{v}_{13}\|\).
- warp_offsets#
warp_offsets: ‘int’
- class pyfe3d.quad4.Quad4Data#
Used to allocate memory for the sparse matrices.
Each attribute is the number of entries that one
Quad4writes 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 = 576- KCNL_SPARSE_SIZE,int
KCNL_SPARSE_SIZE = 576- KG_SPARSE_SIZE,int
KG_SPARSE_SIZE = 180: 144 entries of the translations and 36 of the rotations of each node, the eccentricity geometric stiffness of the rigid offsets of a warped element, seeupdate_KG- M_SPARSE_SIZE,int
M_SPARSE_SIZE = 480- KA_BETA_SPARSE_SIZE,int
KA_BETA_SPARSE_SIZE = 144- KA_GAMMA_SPARSE_SIZE,int
KA_GAMMA_SPARSE_SIZE = 144- CA_SPARSE_SIZE,int
CA_SPARSE_SIZE = 144
- CA_SPARSE_SIZE#
CA_SPARSE_SIZE: ‘int’
- KA_BETA_SPARSE_SIZE#
KA_BETA_SPARSE_SIZE: ‘int’
- KA_GAMMA_SPARSE_SIZE#
KA_GAMMA_SPARSE_SIZE: ‘int’
- 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.quad4.Quad4Probe#
Probe used for local coordinates, local displacements, local stiffness, 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=12containing 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\), \({x_e}_4, {y_e}_4, {z_e}_4\). Dimension of length. Updated byQuad4.update_probe_xe().- ue,array-like
Array of size
NUM_NODES*DOF=24containing 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}\), \(u_{e_4}, v_{e_4}, w_{e_4}, {r_x}_{e_4}, {r_y}_{e_4}, {r_z}_{e_4}\). Translations with dimension of length, rotations dimensionless. Updated byQuad4.update_probe_ue().- finte,array-like
Array of size
NUM_NODES*DOF=24containing the element internal forces corresponding to the degrees-of-freedom described byue. Forces, and moments (force times length) for the rotations. Updated byQuad4.update_probe_finte().- KC0ve,array-like
Local stiffness matrix stored as a 1D array of size
(NUM_NODES*DOF)**2. Stored row by row, with the rigid offsets of a warped element whenwarp_offsetsis1, seeQuad4. Updated byQuad4.update_KC0(),Quad4.update_probe_finte()and, for a warped element,Quad4.update_KG().- BLexx, BLeyy, BLgxyarray-like
Arrays of size
NUM_NODES*DOF=24containing the in-plane strain interpolation functions evaluated at a given natural coordinate point \(\xi\), \(\eta\). Their product withuegives the membrane strains, dimensionless.- BLkxx, BLkyy, BLkxyarray-like
Arrays of size
NUM_NODES*DOF=24containing the bending strain interpolation functions evaluated at a given natural coordinate point \(\xi\), \(\eta\). Their product withuegives the curvatures, with dimension of one over length.- BLgyz_grad, BLgyz_rot, BLgxz_grad, BLgxz_rotarray-like
Arrays of size
NUM_NODES*DOF=24containing the transverse shear strain interpolation functions evaluated at a given natural coordinate point \(\xi\), \(\eta\). The sum of the products of a_gradrow and of the_rotrow of the same strain withuegives that transverse shear strain, dimensionless.BLdrillingarray-likeBLdrilling: ‘double[::1]’
- Sw_x, Sw_yarray-like
Arrays of size
NUM_NODES*DOF=24with 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]’
Methods
update_BL(self, double xi, double eta, ...)Update all components of the interpolation matrix \(\boldsymbol{B}_L\) at a given natural coordinate point \(\xi\), \(\eta\).
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\).- BLdrilling#
BLdrilling: ‘double[::1]’
- BLexx#
BLexx: ‘double[::1]’
- BLeyy#
BLeyy: ‘double[::1]’
- BLgxy#
BLgxy: ‘double[::1]’
- BLgxz_grad#
BLgxz_grad: ‘double[::1]’
- BLgxz_rot#
BLgxz_rot: ‘double[::1]’
- BLgyz_grad#
BLgyz_grad: ‘double[::1]’
- BLgyz_rot#
BLgyz_rot: ‘double[::1]’
- BLkxx#
BLkxx: ‘double[::1]’
- BLkxy#
BLkxy: ‘double[::1]’
- BLkyy#
BLkyy: ‘double[::1]’
- KC0ve#
KC0ve: ‘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]’
- update_BL(self, double xi, double eta, int drilling_model=0, int warp_offsets=1) void#
Update all components of the interpolation matrix \(\boldsymbol{B}_L\) at a given natural coordinate point \(\xi\), \(\eta\).
The rows
BLexx,BLeyy,BLgxy,BLkxx,BLkyy,BLkxy,BLgyz_grad,BLgyz_rot,BLgxz_grad,BLgxz_rotandBLdrillingof the probe are computed from its element coordinatesxe, which must have been updated withQuad4.update_probe_xe(). Only the entries that depend onxi,etaandxeare written, the other entries keep their values.Sw_x,Sw_yand the other attributes are not changed.- Parameters:
- xi, etadouble
Natural coordinates of the evaluation point. Dimensionless, from
-1to1over the element.- drilling_modelint, optional
Must match the
drilling_modelattribute of the finite element that the probe is being used with, such that the recovered strains correspond to the displacement field that produced the stiffness matrix. The default0includes the Allman drilling enrichment in the membrane rows and inBLdrilling; any other value gives the unenriched rows used by theK6ROTpenalty model.- warp_offsetsint, optional
Must match the
warp_offsetsattribute of the finite element, whose default is1: the rows of a warped element are then multiplied by the \(\boldsymbol{J}\) of the rigid offsets, see the Notes.0gives the rows of the flat element.
Notes
With the bilinear shape functions \(S_i\) and their Cartesian derivatives \(S_{i,x}\), \(S_{i,y}\), the products of the rows with
ueare the strains of the Notes ofpyfe3d.quad4:BLexx,BLeyyandBLgxygive \(\epsilon_{xx} = u_{,x}\), \(\epsilon_{yy} = v_{,y}\) and \(\gamma_{xy} = u_{,y} + v_{,x}\);BLkxx,BLkyyandBLkxygive \(\kappa_{xx} = {r_y}_{,x}\), \(\kappa_{yy} = -{r_x}_{,y}\) and \(\kappa_{xy} = {r_y}_{,y} - {r_x}_{,x}\);BLgxz_gradandBLgxz_rotgive the two parts of \(\gamma_{xz} = w_{,x} + r_y\), andBLgyz_gradandBLgyz_rotthose of \(\gamma_{yz} = w_{,y} - r_x\);BLdrillinggives \(r_z - \theta_z = r_z + \frac{1}{2}u_{,y} - \frac{1}{2}v_{,x}\), the operator \(B_{r_z}\) of the penalty model.With
drilling_model=0the \(r_z\) columns ofBLexx,BLeyyandBLgxyreceive the derivatives of the edge modes ofallman_enrichment(), \(\tilde S^u_{,x}\), \(\tilde S^v_{,y}\) and \(\tilde S^u_{,y} + \tilde S^v_{,x}\), and the \(r_z\) columns ofBLdrillingreceive \(\frac{1}{2}\tilde S^u_{,y} - \frac{1}{2}\tilde S^v_{,x}\), giving the operator \(\tilde{\boldsymbol{B}}_{r_z}\) of the physics-based model.The rows are those of the flat element, see the Notes of
Quad4, the coordinate \(z\) ofxebeing ignored, times \(\boldsymbol{J}\) of the rigid offsets of a warped element whenwarp_offsetsis not0, such that their products withueare the strains of the displacements of the flat element, \(\boldsymbol{J} \boldsymbol{u}_e\), as in the internal forces ofQuad4.update_probe_finte(): the \(r_x\) and \(r_y\) columns of node \(a\) ofBLexx,BLeyy,BLgxyandBLdrillingreceive \(z_a\) times the \(v\) column and \(-z_a\) times the \(u\) column, \(z_a\) the height of the node above the flat element,xe[3*a + 2]minus the mean of the four. These columns are zero for a flat element and withwarp_offsets = 0. The methods ofQuad4that overwrite the rows at their integration points write those of the flat element.
- xe#
xe: ‘double[::1]’
See also
The theory of the element, Quad4: assumed transverse shear strains (MITC4), and of the shell elements, Shell elements: kinematics and formulation.