# 3. Shell and Membrane Elements - Shell2D,Shell3D,Mem3D

Shell elements are a specialization of a volume element in which a given direction, the shell thickness, may be assumed to be small with respect to the other directions - the shell surface. Shell elements generally assume that the stress normal to the shell surface is zero. There are two modules for the simulation of shells: Shell2D for plane stress, plane strain, and axisymmetric 2D analysis and Shell3D for full 3D analysis.

Membrane elements are used to represent thin surfaces which have no bending stiffness, only stiffness in the plane of the surface is retained. Use the Mem3D module to model membranes for 3D analysis.

## 3.1 2D Shell Elements - Shell2D

The Shell2D module is used to simulate 2D shells. It can be used for any planar or axisymmetric simulation. In the latter case, the coordinate system utilized is r-z-theta, where r is the radial direction, z is the axial direction and theta is the circumferential direction. All coordinates are input to Shell2D functions as a three component position vector, in all cases the third component is ignored.

All symmetric shell resultants are given in the order Nxx, Nzz, Nxz, Mxx, Mzz. Mxz. Qxy. Qzy. Note that in plane strain, the ezz, gxz and kzz, kxz and gzy components of strain are identically zero, while the Nxz and Mxx, Mxz and Qzy components of stress are zero. In plane stress, the gxz and kzz, kxz and gzy components of strain are identically zero, while the Nzz, Nxz and Mxx, Mxz and Qzy components of stress are zero.

2D Shell elements are one-dimensional elements in 2D space which support in-plane deformation, bending and tranverse shear through the thickness of the shell. The stress normal to the shell surface is assumed to be zero. The methods associated with a Shell2D object are the following.

• Begin and end an instance of an object, generic object functions
```*vfe_Shell2DBegin       - create an instance of a Shell2D object
vfe_Shell2DEnd          - destroy an instance of a Shell2D object
vfe_Shell2DError        - return Shell2D object error flag
```
• Attributes and Parameters
```vfe_Shell2DSetHistPtr   - set pointers to material history
vfe_Shell2DSetObject    - set attribute object
vfe_Shell2DSetParamd    - set element formulation parameters
vfe_Shell2DSetParami    - set element formulation parameters
vfe_Shell2DSetPropPtr   - set pointer to element nodal properties
vfe_Shell2DSetTopology  - set input element topology
```
• Degree of Freedom and Integration Information
```vfe_Shell2DDofMap       - query element degree of freedom map
vfe_Shell2DNumDof       - query number of element degrees of freedom
vfe_Shell2DNumIntPnt    - query number of element integration points
```
• Structural analysis computations
```vfe_Shell2DConcLoad     - concentrated load vector
vfe_Shell2DDirCos       - compute shell local direction cosines
vfe_Shell2DGeomStiff    - geometric stiffness matrix
vfe_Shell2DInitHist     - initialize material history
vfe_Shell2DMass         - consistent mass matrix
vfe_Shell2DMassDiag     - diagonal mass matrix
vfe_Shell2DReact        - reaction vector
vfe_Shell2DReactStiff   - reaction vector, stiffness matrix
vfe_Shell2DStiff        - linear stiffness matrix
vfe_Shell2DStrsAdapt    - stress based error analysis
vfe_Shell2DStrsStrn     - resultant stress and strain/curvature
vfe_Shell2DStressStrain - three-dimensional stress and strain
```

## 3.2 Element Geometry

The basic shell element geometry is defined by the node coordinates of the shell reference surface. The shell wall is defined by the node offsets of the shell midsurface from the reference surface, shell thicknesses and shell normals. These properties which are set using vfe_Shell2DSetPropPtr are illustrated below in Figure 3-1. Other element quantities which may be set using this function are shell temperature and effective shear factor.

If the node offsets are zero, the shell midsurface is coincident with the shell reference surface. In general, large midsurface offset values, which are much greater than the shell thickness, should be avoided. By default the shell node normals are computed to be normal to the shell reference surface. The user may optionally enter node normals to achieve a "miter" joint between adjacent shell elements. Shell thickness and offset are always measured in the direction of the normal to the shell reference surface regardless of the direction of the shell node normals. The element natural coordinate, r, lies on the shell midsurface with the positive direction in the direction of the element connectivity. The element local coordinate system for stress and material orientation is the local x' axis along the element local r direction and the local z'. direction along the global z axis. The local y' axis is normal to the shell reference surface. The local axes form a right handed orthogonal system.

The element technology to be used is set using the function vfe_Shell2DSetParami with type VFE_TECH. Standard fully integrated, VFE_TECH_ISOP, formulations exist for all orders. The default technology is VFE_TECH_ISOP.

• Linear VFE_TECH_ISOP (1). Use a Kirckhoff formulation, VFE_TECH_KIRCHHOFF, for cubic bending.
• Parabolic VFE_TECH_ISOP (2). ##### Figure 3-1, Geometry for 3 Node 2D Shell Element
The exact nature of the shell wall construction which couples element and primitive material properties, is managed using the ShellProp module. The ShellProp module provides for simple monocoque, vfe_ShellPropSetMonocoque, and general integrated shell walls, vfe_ShellPropSetIntegrate, as well as preintegrated shell wall constructions input as a general matrix, vfe_ShellPropSetMatrix, relating midsurface strains and curvatures to stress and moment resultants. For monocoque and general integrated shell walls the ShellProp module allows primitive materials, such as defined by the LinMat module, to be specified at the integration points.

Note that when using the general integrated shell wall defined by vfe_ShellPropSetIntegrate, the actual distance of the shell wall integration point from the midsurface is computed internally by multiplying the integration point coordinates input in vfe_ShellPropSetIntegrate by one-half of the thickness specified using vfe_Shell2DSetPropPtr. Therefore, if the actual shell thickness is specified using vfe_Shell2DSetPropPtr, the shell wall integration point coordinates input in vfe_ShellPropSetIntegrate should be in the range [-1.,1.] from the bottom to the top shell surface, with the coordinate 0. lying on the midsurface.

Use the function vfe_Shell2DStrsAdapt to aid in computing element strain energy, strain energy error and other useful quantities to aid in solution error estimation and mesh adaptation.

## 3.3 Function Descriptions

The currently available Shell2D functions are described in detail in this section.

#### NAME

*vfe_Shell2DBegin - create an instance of a Shell2D object

#### C SPECIFICATION

```vfe_Shell2D *vfe_Shell2DBegin ()
```

```None
```

#### FUNCTION RETURN VALUE

The function returns a pointer to the newly created Shell2D object. If the object creation fails, NULL is returned.

#### DESCRIPTION

Create an instance of a Shell2D object. Memory is allocated for the object private data and the pointer to the object is returned.

Destroy an instance of a Shell2D object using

```     void vfe_Shell2DEnd (vfe_Shell2D *shell2d)
```

Return the current value of a Shell2D object error flag using

```     Vint vfe_Shell2DError (vfe_Shell2D *shell2d)
```

#### NAME

vfe_Shell2DSetHistPtr - set pointers to material history

#### C SPECIFICATION

```void vfe_Shell2DSetHistPtr (vfe_Shell2D *shell2d,
Vdouble *oldhist, Vdouble *newhist)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
oldhist      Pointer to start of material history at previous step
newhist      Pointer to start of material history at current step
```

```None
```

#### DESCRIPTION

Set pointers to the start of the material history data at the previous step, oldhist and the current step newhist. This function is required when an underlying material model such as plasticity is used. Note that the material history data is not copied by this function, only the pointers themselves are copied. The number of double precision values required for the material history at a step is the number of history variables at an integration point times the total number of integration points in the element. The number of history variables depends on the underlying material model and may be queried using vfe_MatlFunNumHist. The total number of integration points is the product of the number of element integration points returned using vfe_Shell2DNumIntPnt and the number of section integration points returned using vfe_MatlFunNumStressStrain. By default the pointers to the material history are NULL. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Shell2DSetObject - set attribute object

#### C SPECIFICATION

```void vfe_Shell2DSetObject (vfe_Shell2D *shell2d,
Vint objecttype,
Vobject *object)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
objecttype   The object type identifier
=VFE_MATLFUN            MatlFun object
object       Pointer to the object to be set.
```

```None
```

#### ERRORS

SYS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

#### DESCRIPTION

Set a pointer to an attribute object. Users must supply a MatlFun object prior to computing any quantity that requires a material model definition.

#### NAME

vfe_Shell2DSetParamd - set element formulation parameters

#### C SPECIFICATION

```void vfe_Shell2DSetParamd (vfe_Shell2D *shell2d,
Vint type,
Vdouble dparam)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
type         Type of formulation parameter to set
=VFE_MAXPROJANG         Maximum nodal projection angle
dparam       Double precision parameter value.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper dparam is specified.

#### DESCRIPTION

Set element formulation parameters.

Use VFE_MAXPROJANG to set the maximum angle in degrees between the shell normal at an element integration point and the shell normal at a node. By default VFE_MAXPROJANG is set to 90. degrees.

Use VFE_ADDEDMASS to add non-structural mass/area to the shell element. By default VFE_ADDEDMASS is set to 0..

#### NAME

vfe_Shell2DSetParami - set element formulation parameters

#### C SPECIFICATION

```void vfe_Shell2DSetParami (vfe_Shell2D *shell2d,
Vint type,
Vint iparam)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
type         Type of formulation parameter to set
=VFE_TECH               Element technology
=VFE_LARGEROTATION      Toggle for large rotations
=VFE_ROTINERTIA         Enable rotary inertias
=VFE_TEMPMATLAVE        Average material temperature flag
=VFE_2D                 2D Approximation
=VFE_CHECKCORNNORM      Corner normal checking
iparam       Integer parameter value.
=VFE_TECH_ISOP          Standard isoparametric technology
=VFE_TECH_KIRCHHOFF     Kirchhoff technology
=VFE_AXISYMMETRIC       2D axisymmetric
=VFE_PLANESTRAIN        2D plane strain
=VFE_PLANESTRESS        2D plane stress
=SYS_OFF                Disable
=SYS_ON                 Enable
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper iparam is specified.

#### DESCRIPTION

Set element technology and formulation parameters.

The basic element technology is set with the VFE_TECH parameter. By default VFE_TECH is set to VFE_TECH_ISOP.

Toggle large rotations using VFE_LARGEROTATION. By default VFE_LARGEROTATION is set to SYS_OFF.

The addition of rotary inertias to the element mass matrix is set with the VFE_ROTINERTIA parameter. By default VFE_ROTINERTIA is set to SYS_OFF.

The parameter VFE_2D sets the particular 2D approximation for the element. The choices include plane stress, VFE_PLANESTRESS, plane strain, VFE_PLANESTRAIN and axisymmetric, VFE_AXISYMMETRIC. By default VFE_2D is set to VFE_PLANESTRESS.

The parameter VFE_TEMPMATLAVG toggles the method for computing the temperature used for evaluating temperature dependent material properties. If enabled, the temperature used for temperature dependent material properties is the average of the element node point temperatures. If disabled, the temperature is isoparametrically interpolated from the node point temperatures at each element integration point. By default VFE_TEMPMATLAVG is set to SYS_ON.

The parameter VFE_CHECKCORNNORM toggles a comparison between computed normals at integration points in shells and a computed normal interpolated from corner node values. If this parameter is enabled then the dot product of these two normals is computed and, if negative, an error is flagged. By default VFE_CHECKCORNNORM is set to SYS_ON.

#### NAME

vfe_Shell2DSetPropPtr - set pointer to element nodal properties

#### C SPECIFICATION

```void vfe_Shell2DSetPropPtr (vfe_Shell2D *shell2d,
Vint type,
Vdouble *propptr)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
type         Type of element property
=VFE_PROP_TEMPERATURE      Temperatures
=VFE_PROP_TEMPREF          Reference temperatures
=VFE_PROP_THICKNESS        Thicknesses
=VFE_PROP_NORMAL           Normals
=VFE_PROP_OFFSET           Offsets
=VFE_PROP_KS               Effective shear factor
propptr      Pointer to start of element nodal properties
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

#### DESCRIPTION

Set a pointer to the start of a specified type of element nodal properties. Note that the properties are not copied by this function, only the pointer itself is copied. If a property pointer is not set the element assumes a default value for the associated property. By default the temperature is 0., the thickness is 2., the offset is 0. and the effective shear factor is 5/6. If the element node normals are not specified, the normals are computed to be normal to the shell reference surface. By default the reference temperature is 0.

#### NAME

vfe_Shell2DSetTopology - set element topology

#### C SPECIFICATION

```void vfe_Shell2DSetTopology (vfe_Shell2D *shell2d,
Vint maxi)
```

#### INPUT ARGUMENTS

```maxi         The number of points along the i direction.
If maxi = 0 then the linear Serendipity
element form is assumed.
```

```None
```

#### ERRORS

SYS_ERROR_VALUE is generated if an improper maxi or maxj is specified. SYS_ERROR_ENUM is generated if an improper shape is input.

#### DESCRIPTION

Specify the topology of a 2D shell element. If maxi is set to 3 then a quadratic element form is assumed.

#### NAME

vfe_Shell2DDofMap - query element degree of freedom map

#### C SPECIFICATION

```void vfe_Shell2DDofMap (vfe_Shell2D *shell2d,
Vint analysistype,
Vint loc[], Vint tag[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
```

#### OUTPUT ARGUMENTS

```loc          Vector of degree of freedom locations
tag          Vector of degree of freedom types
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for element degree of freedom map. The degree of freedom map consists of a location index, loc and type, tag for each degree of freedom used by the element.

The location index is either a positive node index into the element connectivity indicating a nodal freedom or a zero value indicating an elemental degree of freedom. The tag indicates the type of the degree of freedom. Tag values are one of a set of enumerated types which indicate whether the degree of freedom is a translation, rotation, temperature, etc.

The length of the loc and tag vectors is equal to the number of element degrees of freedom. Use vfe_Shell2DNumDof to return the number of element degrees of freedom.

#### NAME

vfe_Shell2DNumDof - query number of element degrees of freedom

#### C SPECIFICATION

```void vfe_Shell2DNumDof (vfe_Shell2D *shell2d,
Vint analysistype,
Vint *nedofs)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
```

#### OUTPUT ARGUMENTS

```nedofs       Number of element degrees of freedom
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element degree of freedom nedofs. The number of degrees of freedom will generally be equal to the number of nodal degrees of freedom per node times the number of nodes plus the number of elemental degrees of freedom. Use vfe_Shell2DDofMap to return the location and type of each degree of freedom.

#### NAME

vfe_Shell2DNumIntPnt - query number of element integration points

#### C SPECIFICATION

```void vfe_Shell2DNumIntPnt (vfe_Shell2D *shell2d,
Vint analysistype,
Vint *nepnts)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
```

#### OUTPUT ARGUMENTS

```nepnts       Number of element integration points
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element integration points nepnts.

#### C SPECIFICATION

```void vfe_Shell2DConcLoad (vfe_Shell2D *shell2d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble xc,
Vdouble v[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_EDGE     Element edge
no           Element edge number (ignored)
direction
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed. SYS_ERROR_COMPUTE is generated if the location xc cannot be projected onto the surface defined by the element node locations.

#### DESCRIPTION

Compute the consistent degree of freedom loads given a concentrated force q on the edge of the shell. The load location, xc, is projected to the surface defined by the element node locations. The projected point location is used as the point of application of the concentrated force even if it falls outside of the boundary of the element.

The vector q contains three values if loadtype is VFE_CONCLOAD_TRAC, or a single value if loadtype is VFE_CONCLOAD_PRES. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The load is in units of force for both VFE_CONCLOAD_TRAC and VFE_CONCLOAD_PRES.

#### NAME

vfe_Shell2DDirCos - compute shell local direction cosines

#### C SPECIFICATION

```void vfe_Shell2DDirCos (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble tm[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of point locations defining shell surface.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```tm           Array of direction cosine matrices at the shell nodes.
```

#### DESCRIPTION

Compute the direction cosine matrices of the shell element local coordinate system. For stress and strain computation the local coordinate system at each stress output location is the coordinate system in which the output stresses and strains at the location using vfe_Shell2DStrsStrn or vfe_Shell2DStressStrain are expressed. Given that X',Y' and Z' are three orthonormal vectors indicating the direction of the local coordinate axes in the global coordinate system (x,y,z), then the direction cosine matrix, tm for this local coordinate system is defined as:
```     tm = X'x  tm = X'y  tm = X'z
tm = Y'x  tm = Y'y  tm = Y'z
tm = Z'x  tm = Z'y  tm = Z'z
```

The element degrees of freedom, u, are only required if large rotations have been enabled. Otherwise this argument is ignored.

#### C SPECIFICATION

```void vfe_Shell2DDistLoad (vfe_Shell2D *shell2d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_EDGE     Element edge
no           Element edge number
to element face
q            Vector of distributed load values
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_OPERATION is generated if an invalid combination of enttype and loadtype is specified. SYS_ERROR_VALUE is generated if an improper no is specified. SYS_ERROR_COMPUTE is generated if a zero edge Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom loads given a distributed load, q along a 2D shell element edge. The vector q contains values for the load type for each node in the element. If the loadtype is VFE_DISTLOAD_PRES then q contains a scalar pressure at each element node. If the loadtype is VFE_DISTLOAD_TRAC then q contains a vector traction at each element node. The pressure and traction units are force/length.

Note that the input array of node locations, x, contains the coordinate locations for all nodes in the element - not just on the edge of interest. Correspondingly the output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element.

#### C SPECIFICATION

```void vfe_Shell2DElemLoad (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
q            Array of node accelerations
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom body loads given acceleration load vector, q, on an element. The vector q contains an acceleration vector for for each node in the element. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The input element loads are in the units of force per unit mass. Note that the computation of consistent loads uses the material density.

#### NAME

vfe_Shell2DGeomStiff - geometric stiffness matrix

#### C SPECIFICATION

```void vfe_Shell2DGeomStiff (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble kg[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```kg           Degree of freedom geometric stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the geometric stiffness matrix, kg, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the geometric stiffness is returned.

#### NAME

vfe_Shell2DInitHist - initialize material history

#### C SPECIFICATION

```void vfe_Shell2DInitHist (vfe_Shell2D *shell2d)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
```

```None
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set.

#### DESCRIPTION

Initialize the values of the history variables used in the underlying element or primitive material model for the element. This operation should be performed once for each element (at the first load or time step for example) to initialize the old history variables to reflect the initial configuration condition. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Shell2DMass - consistent mass matrix

#### C SPECIFICATION

```void vfe_Shell2DMass (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble m[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```m            Degree of freedom consistent mass matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the consistent mass matrix, m, given the node coordinates, x. The lower triangle of the consistent mass is returned. Use vfe_Shell2DMassDiag to compute a diagonal mass matrix.

#### NAME

vfe_Shell2DMassDiag - diagonal mass matrix

#### C SPECIFICATION

```void vfe_Shell2DMassDiag (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble md[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```md           Degree of freedom diagonal mass vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the diagonal mass matrix, md, given the node coordinates, x. The diagonal mass is returned as a degree of freedom length vector. Use vfe_Shell2DMass to compute a consistent mass matrix.

#### NAME

vfe_Shell2DReact - reaction vector

#### C SPECIFICATION

```void vfe_Shell2DReact (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble r[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, given the node coordinates, x, and the degree of freedom displacement vector, u.

#### NAME

vfe_Shell2DReactStiff - reaction vector, stiffness matrix

#### C SPECIFICATION

```void vfe_Shell2DReactStiff (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble kflag,
Vdouble r[],
Vdouble k[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
kflag        Flag to compute stiffness matrix, k
=SYS_OFF      Do not compute stiffness matrix
=SYS_ON       Compute and return stiffness matrix
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
k            Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, and optionally the stiffness matrix, k, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Shell2DStiff - linear stiffness matrix

#### C SPECIFICATION

```void vfe_Shell2DStiff (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble kl[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```kl           Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the linear stiffness matrix, kl, given the node coordinates, x. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Shell2DStrsAdapt - stress based error analysis

#### C SPECIFICATION

```void vfe_Shell2DStrsAdapt (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble *setot,
Vdouble *seerr,
Vdouble *h,
Vdouble *p,
Vdouble *d)
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
strss        Array of recovered nodal stresses
```

#### OUTPUT ARGUMENTS

```setot        Total strain energy
seerr        Strain energy error
h            Characteristic length
p            Effective polynomial order
d            Dimension
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the element total strain energy, setot, and strain energy error, seerr, given the element displacements, u, and an estimate of the exact nodal stress resultants, strss. In addition useful quantities such as the characteristic length, effective polynomial order and dimension of the element are returned. The element dimension, d, is 1. These quantities are useful for computing new characteristic element length for mesh adaptation.

#### NAME

vfe_Shell2DStrsStrn - resultant stress and strain/curvature

#### C SPECIFICATION

```void vfe_Shell2DStrsStrn (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble strs[], Vdouble strn[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```strs         Array of nodal stresses
strn         Array of nodal strains
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal stresses and strains, strs and strn, given the node coordinates, x, and the degree of freedom displacement vector, u.

The stresses and strains are computed in the shell local coordinate system. The actual direction cosine matrices of the shell local systems at the element output locations may be returned using vfe_Shell2DDirCos.

The strs is composed of 8 stress resultants and the strn is composed of 8 associated midsurface strains and curvatures at each output location. The stress and strain values are ordered first by the 8 stress resultant or strain components followed by the the number of element nodes. For example, for a 3 node shell element a total of 8*3 = 24 stress values will be returned in strs and 24 strain values returned in strn.

#### NAME

vfe_Shell2DStressStrain - three-dimensional stress and strain

#### C SPECIFICATION

```void vfe_Shell2DStressStrain (vfe_Shell2D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble strs[], Vdouble strn[],
Vdouble stress[], Vdouble strain[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell2D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```strs         Array of nodal stress resultants
strn         Array of nodal strains/curvatures
stress       Array of nodal three dimensional stresses at recovery points
strain       Array of nodal three dimensional strains at recovery points
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal stresses and strains, strs and strn, and the three-dimensional stresses and strains, stress and strain, given the node coordinates, x, and the degree of freedom displacement vector, u.

The stress resultants and strain/curvatures are the same as those obtained with vfe_Shell2DStrsStrn, and the same remarks regarding local coordinate systems apply.

The three-dimensional stresses and strains are computed at a series of points in the beam's cross section. The number of cross sectional points is obtained using vfe_MatlFunNumStressStrain and depend on the type of cross section used. See ShellProp for more details on each cross section type.

## 3.4 3D Shell Elements - Shell3D

The Shell3D module is used to simulate 3D shells. 3D Shell elements are two-dimensional elements in 3D space which support in-plane deformation, bending and tranverse shear through the thickness of the shell. The stress normal to the shell surface is assumed to be zero.

The methods associated with a Shell3D object are the following.

• Begin and end an instance of an object, generic object functions
```*vfe_Shell3DBegin       - create an instance of a Shell3D object
vfe_Shell3DEnd          - destroy an instance of a Shell3D object
vfe_Shell3DError        - return Shell3D object error flag
```
• Attributes and Parameters
```vfe_Shell3DSetHistPtr   - set pointers to material history
vfe_Shell3DSetLocalSystem - set stress axes direction
vfe_Shell3DSetMatlSystem - set material axes direction
vfe_Shell3DSetObject    - set attribute object
vfe_Shell3DSetParamd    - set element formulation parameters
vfe_Shell3DSetParami    - set element formulation parameters
vfe_Shell3DSetPropPtr   - set pointer to element nodal properties
vfe_Shell3DSetTopology  - set input element topology
```
• Degree of Freedom and Integration Information
```vfe_Shell3DDofMap       - query element degree of freedom map
vfe_Shell3DNumDof       - query number of element degrees of freedom
vfe_Shell3DNumIntPnt    - query number of element integration points
```
• Structural analysis computations
```vfe_Shell3DBMatrix      - B(beta) matrix
vfe_Shell3DDirCos       - compute shell local direction cosines
vfe_Shell3DGeomStiff    - geometric stiffness matrix
vfe_Shell3DInitHist     - initialize material history
vfe_Shell3DMass         - consistent mass matrix
vfe_Shell3DMassDiag     - diagonal mass matrix
vfe_Shell3DReact        - reaction vector
vfe_Shell3DReactStiff   - reaction vector, stiffness matrix
vfe_Shell3DStiff        - linear stiffness matrix
vfe_Shell3DStrsAdapt    - stress based error analysis
vfe_Shell3DStrsStrn     - resultant stress and strain/curvature
vfe_Shell3DStressStrain - three-dimensional stress and strain
```

## 3.5 Element Geometry

The basic shell element geometry is defined by the node coordinates of the shell reference surface. The shell wall is defined by the node offsets of the shell midsurface from the reference surface, shell thicknesses and shell normals. These properties which are set using vfe_Shell3DSetPropPtr are illustrated below in Figure 3-2. Other element quantities which may be set using this function are shell temperature and effective shear factor.

If the node offsets are zero, the shell midsurface is coincident with the shell reference surface. In general, large midsurface offset values, which are much greater than the shell thickness, should be avoided. By default the shell node normals are computed to be normal to the shell reference surface. The user may optionally enter node normals to achieve a "miter" joint between adjacent shell elements. Shell thickness and offset are always measured in the direction of the normal to the shell reference surface regardless of the direction of the shell node normals. The element natural coordinates, r,s, lie in the shell midsurface.

The element technology to be used is set using the function vfe_Shell2DSetParami with type VFE_TECH. Standard fully integrated, VFE_TECH_ISOP, and underintegrated, VFE_TECH_URED exist for all elements. The default technology is VFE_TECH_ISOP which will work in all cases. However for some element types, alternative technologies should be considered for improved performance. The recommended technology varies with element topology, order and 2D approximation and is listed below. The number of integration points used for fully integrated technologies appears in paraenthesis. Underintegrated technologies use a single integration point for the linear element forms and for the higher order element forms use the fully integrated rule for the one-less order.

• Linear triangle VFE_TECH_ISOP (1),
• Parabolic triangle VFE_TECH_ANS. The fully integrated technology VFE_TECH_ISOP (3), is overly stiff.
• Linear quadrilateral, VFE_TECH_MIXED or VFE_TECH_ANS. The fully integrated technology, VFE_TECH_ISOP (4), is overly stiff.
• Parabolic quadrilateral axisymetric, VFE_TECH_URED The fully integrated technology, VFE_TECH_ISOP (9), is overly stiff. ##### Figure 3-2, Geometry for 8 Node 3D Shell Element
The exact nature of the shell wall construction which couples element and primitive material properties, is managed using the ShellProp module. The ShellProp module provides for simple monocoque, vfe_ShellPropSetMonocoque, and general integrated shell walls, vfe_ShellPropSetIntegrate, as well as preintegrated shell wall constructions input as a general matrix, vfe_ShellPropSetMatrix, relating midsurface strains and curvatures to stress and moment resultants. For monocoque and general integrated shell walls the ShellProp module allows primitive materials, such as defined by the LinMat module, to be specified at the integration points.

Note that when using the general integrated shell wall defined by vfe_ShellPropSetIntegrate, the actual distance of the shell wall integration point from the midsurface is computed internally by multiplying the integration point coordinates input in vfe_ShellPropSetIntegrate by one-half of the thickness specified using vfe_Shell3DSetPropPtr. Therefore, if the actual shell thickness is specified using vfe_Shell3DSetPropPtr, the shell wall integration point coordinates input in vfe_ShellPropSetIntegrate should be in the range [-1.,1.] from the bottom to the top shell surface, with the coordinate 0. lying on the midsurface.

Use the function vfe_Shell3DStrsAdapt to aid in computing element strain energy, strain energy error and other useful quantities to aid in solution error estimation and mesh adaptation.

## 3.6 Function Descriptions

The currently available Shell3D functions are described in detail in this section.

#### NAME

*vfe_Shell3DBegin - create an instance of a Shell3D object

#### C SPECIFICATION

```vfe_Shell3D *vfe_Shell3DBegin ()
```

```None
```

#### FUNCTION RETURN VALUE

The function returns a pointer to the newly created Shell3D object. If the object creation fails, NULL is returned.

#### DESCRIPTION

Create an instance of a Shell3D object. Memory is allocated for the object private data and the pointer to the object is returned.

Destroy an instance of a Shell3D object using

```     void vfe_Shell3DEnd (vfe_Shell3D *shell3d)
```

Return the current value of a Shell3D object error flag using

```     Vint vfe_Shell3DError (vfe_Shell3D *shell3d)
```

#### NAME

vfe_Shell3DSetHistPtr - set pointers to material history

#### C SPECIFICATION

```void vfe_Shell3DSetHistPtr (vfe_Shell3D *shell3d,
Vdouble *oldhist, Vdouble *newhist)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
oldhist      Pointer to start of material history at previous step
newhist      Pointer to start of material history at current step
```

```None
```

#### DESCRIPTION

Set pointers to the start of the material history data at the previous step, oldhist and the current step newhist. This function is required when an underlying material model such as plasticity is used. Note that the material history data is not copied by this function, only the pointers themselves are copied. The number of double precision values required for the material history at a step is the number of history variables at an integration point times the total number of integration points in the element. The number of history variables depends on the underlying material model and may be queried using vfe_MatlFunNumHist. The total number of integration points is the product of the number of element integration points returned using vfe_Shell3DNumIntPnt and the number of section integration points returned using vfe_MatlFunNumStressStrain. By default the pointers to the material history are NULL. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Shell3DSetLocalSystem - set local coordinate system convention

#### C SPECIFICATION

```void vfe_Shell3DSetLocalSystem (vfe_Shell3D *shell3d,
Vint type,
Vdouble vec[],
Vdouble angle)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
type         Local system convention
vec          Orientation vector data
angle        Angle to rotate shell x',y' axes about the shell z'
axis in degrees.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is input.

#### DESCRIPTION

Specify the convention to be used to construct the orientation of the shell element local x',y',z' coordinate system with respect to the shell reference surface. For stress and strain computation for output using vfe_Shell3DStrsStrn or vfe_Shell3DStressStrain, the local coordinate system is evaluated at each output location and is the coordinate system in which the output stresses and strains at the output location are expressed.

The z' axis is always constructed to be normal to the shell reference surface. The orientation of the x' and y' axes in the plane of the shell reference surface is determined by type. The vec array is only used if the specified type requires position or direction vectors. An additional rotation of the x',y' axes about the z' axis can be specified with angle. By default the local system convention is SYS_ELEMSYS_STANDARD with angle set to 0.

For a description of element coordinate systems, type, and associated orientation vector data, please see
1.4 Element Coordinate Systems

#### NAME

vfe_Shell3DSetMatlSystem - set material system convention

#### C SPECIFICATION

```void vfe_Shell3DSetMatlSystem (vfe_Shell3D *shell3d,
Vint type,
Vdouble vec[],
Vdouble angle)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
type         Local system convention
vec          Orientation vector data
angle        Angle to rotate shell x',y' axes about the shell z'
axis in degrees.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is input.

#### DESCRIPTION

Specify the convention to be used to construct the orientation of the shell element local material x',y',z' coordinate system with respect to the shell reference surface. This local system is computed at each integration point location on the shell surface and is assumed to be the coordinate system in which the material properties of the element at the integration point are expressed.

The z' axis is always constructed to be normal to the shell reference surface. The orientation of the x' and y' axes in the plane of the shell reference surface is determined by type. The vec array is only used if the specified type requires position or direction vectors. An additional rotation of the x',y' axes about the z' axis can be specified with angle. By default the local system convention is SYS_ELEMSYS_STANDARD with angle set to 0.

For a description of element coordinate systems, type, and associated orientation vector data, please see
1.4 Element Coordinate Systems

#### NAME

vfe_Shell3DSetObject - set attribute object

#### C SPECIFICATION

```void vfe_Shell3DSetObject (vfe_Shell3D *shell3d,
Vint objecttype,
Vobject *object)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
objecttype   The object type identifier
=VFE_MATLFUN            MatlFun object
object       Pointer to the object to be set.
```

```None
```

#### ERRORS

SYS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

#### DESCRIPTION

Set a pointer to an attribute object. Users must supply a MatlFun object prior to computing any quantity that requires a material model definition.

#### NAME

vfe_Shell3DSetParamd - set element formulation parameters

#### C SPECIFICATION

```void vfe_Shell3DSetParamd (vfe_Shell3D *shell3d,
Vint type,
Vdouble dparam)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
type         Type of formulation parameter to set
=VFE_DRILLFACTOR        Drill stiffness factor
=VFE_MAXPROJANG         Maximum nodal projection angle
dparam       Double precision parameter value.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper dparam is specified.

#### DESCRIPTION

Set element formulation parameters.

The factor applied to the drilling stiffness in the shell element stiffness matrix is set with the VFE_DRILLFACTOR parameter. By default VFE_DRILLFACTOR is set to 1. If unique shell normal directions are supplied then the drill factor can be reduced to a value of .01 . The addition of drill stiffness is enabled using vfe_Shell3DSetParami.

Use VFE_MAXPROJANG to set the maximum angle in degrees between the shell normal at an element integration point and the shell normal at a node. By default VFE_MAXPROJANG is set to 90. degrees.

Use VFE_ADDEDMASS to add non-structural mass/area to the shell element. By default VFE_ADDEDMASS is set to 0..

#### NAME

vfe_Shell3DSetParami - set element formulation parameters

#### C SPECIFICATION

```void vfe_Shell3DSetParami (vfe_Shell3D *shell3d,
Vint type,
Vint iparam)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
type         Type of formulation parameter to set
=VFE_TECH               Element technology
=VFE_LARGEROTATION      Toggle for large rotations
=VFE_DRILLSTIFF         Enable drill stiffness
=VFE_ROTINERTIA         Enable rotary inertias
=VFE_TEMPMATLAVE        Average material temperature flag
=VFE_CHECKCORNNORM      Corner normal checking
iparam       Integer parameter value.
=VFE_TECH_ISOP          Standard isoparametric technology
=VFE_TECH_URED          Uniform reduced technology
=VFE_TECH_MIXED         Mixed technology
=VFE_TECH_ANS           Assumed natural strains technology
=VFE_TECH_KIRCHHOFF     Kirchhoff technology
=SYS_OFF                Disable
=SYS_ON                 Enable
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper iparam is specified.

#### DESCRIPTION

Set element technology and formulation parameters.

The basic element technology is set with the VFE_TECH parameter. By default VFE_TECH is set to VFE_TECH_ISOP.

Toggle large rotations using VFE_LARGEROTATION. By default VFE_LARGEROTATION is set to SYS_OFF.

The addition of drilling stiffness to the shell element stiffness matrix is set with the VFE_DRILLSTIFF parameter. By default VFE_DRILLSTIFF is set to SYS_ON.

The addition of rotary inertias to the element mass matrix is set with the VFE_ROTINERTIA parameter. By default VFE_ROTINERTIA is set to SYS_OFF.

The parameter VFE_TEMPMATLAVG toggles the method for computing the temperature used for evaluating temperature dependent material properties. If enabled, the temperature used for temperature dependent material properties is the average of the element node point temperatures. If disabled, the temperature is isoparametrically interpolated from the node point temperatures at each element integration point. By default VFE_TEMPMATLAVG is set to SYS_ON.

The parameter VFE_CHECKCORNNORM toggles a comparison between computed normals at integration points in shells and a computed normal interpolated from corner node values. If this parameter is enabled then the dot product of these two normals is computed and, if negative, an error is flagged. By default VFE_CHECKCORNNORM is set to SYS_ON.

#### NAME

vfe_Shell3DSetPropPtr - set pointer to element nodal properties

#### C SPECIFICATION

```void vfe_Shell3DSetPropPtr (vfe_Shell3D *shell3d,
Vint type,
Vdouble *propptr)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
type         Type of element property
=VFE_PROP_TEMPERATURE      Temperatures
=VFE_PROP_TEMPREF          Reference temperatures
=VFE_PROP_THICKNESS        Thicknesses
=VFE_PROP_NORMAL           Normals
=VFE_PROP_OFFSET           Offsets
=VFE_PROP_KS               Effective shear factor
=VFE_PROP_VOLFACT          Volume scale factor
propptr      Pointer to start of element nodal properties
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

#### DESCRIPTION

Set a pointer to the start of a specified type of element nodal properties. Note that the properties are not copied by this function, only the pointer itself is copied. If a property pointer is not set the element assumes a default value for the associated property. By default the temperature is 0., the thickness is 2., the offset is 0. and the effective shear factor is 5/6. If the element node normals are not specified, the normals are computed to be normal to the shell reference surface. By default the reference temperature is 0.

#### NAME

vfe_Shell3DSetTopology - set element topology

#### C SPECIFICATION

```void vfe_Shell3DSetTopology (vfe_Shell3D *shell3d,
Vint shape,
Vint maxi,
Vint maxj)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
shape        The topological shape for the element
=SYS_SHAPETRI           Triangle
maxi         The number of points along the i direction.
If maxi = 0 then the linear Serendipity
element form of the specified shape is assumed.
maxj         The number of points along the j direction.
If maxj = 0 then a Serendipity finite element is assumed.
If 2 <= maxj <= 3 and 2 <= maxi <= 3, then a Lagrange
finite element is assumed.
If maxi != 0 then maxj = 0 or maxj = maxi.
```

```None
```

#### ERRORS

SYS_ERROR_VALUE is generated if an improper maxi or maxj is specified. SYS_ERROR_ENUM is generated if an improper shape is input.

#### DESCRIPTION

Specify the topology of a 3D shell element. If maxi is set to 3 then a quadratic element form is assumed. The default topology is shape = SYS_SHAPEQUAD, maxi = maxj = 0. Serendipity elements with missing mid-side nodes are also supported. See VisTools, Computational Cells for a description on how to define element topologies with missing mid-side nodes.

#### NAME

vfe_Shell3DDofMap - query element degree of freedom map

#### C SPECIFICATION

```void vfe_Shell3DDofMap (vfe_Shell3D *shell3d,
Vint analysistype,
Vint loc[], Vint tag[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```loc          Vector of degree of freedom locations
tag          Vector of degree of freedom types
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for element degree of freedom map. The degree of freedom map consists of a location index, loc and type, tag for each degree of freedom used by the element.

The location index is either a positive node index into the element connectivity indicating a nodal freedom or a zero value indicating an elemental degree of freedom. The tag indicates the type of the degree of freedom. Tag values are one of a set of enumerated types which indicate whether the degree of freedom is a translation, rotation, temperature, etc.

The length of the loc and tag vectors is equal to the number of element degrees of freedom. Use vfe_Shell3DNumDof to return the number of element degrees of freedom.

#### NAME

vfe_Shell3DNumDof - query number of element degrees of freedom

#### C SPECIFICATION

```void vfe_Shell3DNumDof (vfe_Shell3D *shell3d,
Vint analysistype,
Vint *nedofs)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```nedofs       Number of element degrees of freedom
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element degree of freedom nedofs. The number of degrees of freedom will generally be equal to the number of nodal degrees of freedom per node times the number of nodes plus the number of elemental degrees of freedom. Use vfe_Shell3DDofMap to return the location and type of each degree of freedom.

#### NAME

vfe_Shell3DNumIntPnt - query number of element integration points

#### C SPECIFICATION

```void vfe_Shell3DNumIntPnt (vfe_Shell3D *shell3d,
Vint analysistype,
Vint *nepnts)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```nepnts       Number of element integration points
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element integration points nepnts.

#### NAME

vfe_Shell3DBMatrix - B(beta) matrix

#### C SPECIFICATION

```void vfe_Shell3DBMatrix (vfe_Shell3D *shell3d,
Vdouble x[],
Vint *nipt,
Vdouble rst[],
Vdouble h[],
Vdouble phr[],
Vdouble w[],
Vdouble dj[],
Vdouble tm[],
Vdouble dm[],
Vdouble b[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```nipt         Number of integration points
rst          Natural coordinates (r,s,t) at integration points
h            Nodal shape functions at integration points
phr          Gradient of h w.r.t. natural coordinates at integration points
w            Weights at integration points
dj           Determinant of Jacobian matrix at integration points
tm           Material coordinate system at integration points
dm           Material matrix at integration points
b            B(beta) matrix relating element dofs to strains
```

#### ERRORS

SYS_ERROR_OPERATION is generated if element is improperly configured. SYS_ERROR_COMPUTE is generated if a negative determinant of the Jacobian is detected.

#### DESCRIPTION

Compute the B(beta) matrix relating the strain components (exx,eyy,gxy,kxx,kyy,kxy,g_xz,g_yz) to the element degrees of freedom. Use vfe_Shell3DNumDof to determine the number of element degrees of freedom, and vfe_Shell3DDofMap to determine the meaning of each degree of freedom.

This function also returns the number of integration points needed to form the element stiffness matrix, nipt; the (r,s,t) natural coordinates of the element at the integration points; the nodal shape functions at each integration point in the order h_(i1,n1), h_(i1,n2), ... , h_(i1,nen), h_(i2,n1), h_(i2,n2), ... h_(nipt,nen) where i1, i2, ..., nipt are integration point numbers, and n1, n2, ... , nen are node numbers; the gradient phr of the shape functions h with respect to the natural coordinates (r,s,t); the integration point weights w at each integration point; the determinant of the Jacobian transformation d(x,y,z)/d(r,s); the orthogonal material matrices tm at each integration point; the material matrix dm at each integration point, where the 21 entries refer to the lower triangle of the 8x8 matrix relating the strains to the stresses; and the B(beta) matrix at each integration point relating the strains to the element degrees of freedom. The rows of B are defined for all element degrees of freedom for the first integration point, followed by the values at the second integration point, etc.

#### C SPECIFICATION

```void vfe_Shell3DConcLoad (vfe_Shell3D *shell3d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble xc,
Vdouble v[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_FACE     Element face
no           Element face number (ignored)
direction
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed. SYS_ERROR_COMPUTE is generated if the location xc cannot be projected onto the surface defined by the element node locations.

#### DESCRIPTION

Compute the consistent degree of freedom loads given a concentrated force q on the face of the shell. The load location, xc, is projected to the surface defined by the element node locations. The projected point location is used as the point of application of the concentrated force even if it falls outside of the boundary of the element.

The vector q contains three values if loadtype is VFE_CONCLOAD_TRAC, or a single value if loadtype is VFE_CONCLOAD_PRES. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The load is in units of force for both VFE_CONCLOAD_TRAC and VFE_CONCLOAD_PRES.

#### NAME

vfe_Shell3DDirCos - compute shell local direction cosines

#### C SPECIFICATION

```void vfe_Shell3DDirCos (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble tm[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of point locations defining shell surface.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```tm           Array of direction cosine matrices at the shell nodes.
```

#### DESCRIPTION

Compute the direction cosine matrices of the shell element local coordinate system. For stress and strain computation the local coordinate system at each stress output location is the coordinate system in which the output stresses and strains at the location using vfe_Shell3DStrsStrn or vfe_Shell3DStressStrain are expressed. Given that X',Y' and Z' are three orthonormal vectors indicating the direction of the local coordinate axes in the global coordinate system (x,y,z), then the direction cosine matrix, tm for this local coordinate system is defined as:
```     tm = X'x  tm = X'y  tm = X'z
tm = Y'x  tm = Y'y  tm = Y'z
tm = Z'x  tm = Z'y  tm = Z'z
```

The element degrees of freedom, u, are only required if large rotations have been enabled. Otherwise this argument is ignored.

The local coordinate system is determined by the local system convention set using vfe_Shell3DSetLocalSystem.

#### C SPECIFICATION

```void vfe_Shell3DDistLoad (vfe_Shell3D *shell3d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_EDGE     Element edge
=SYS_FACE     Element face
no           Element edge number
to element face or element edge
to element face or element edge
q            Vector of distributed load values
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_OPERATION is generated if an invalid combination of enttype and loadtype is specified. SYS_ERROR_VALUE is generated if an improper no is specified. SYS_ERROR_COMPUTE is generated if a zero edge or face Jacobian is computed.

#### C SPECIFICATION

```void vfe_Shell3DElemLoad (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
q            Array of node accelerations
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom body loads given acceleration load vector, q, on an element. The vector q contains an acceleration vector for for each node in the element. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The input element loads are in the units of force per unit mass. Note that the computation of consistent loads uses the material density.

#### NAME

vfe_Shell3DGeomStiff - geometric stiffness matrix

#### C SPECIFICATION

```void vfe_Shell3DGeomStiff (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble kg[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```kg           Degree of freedom geometric stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the geometric stiffness matrix, kg, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the geometric stiffness is returned.

#### NAME

vfe_Shell3DInitHist - initialize material history

#### C SPECIFICATION

```void vfe_Shell3DInitHist (vfe_Shell3D *shell3d)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
```

```None
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set.

#### DESCRIPTION

Initialize the values of the history variables used in the underlying element or primitive material model for the element. This operation should be performed once for each element (at the first load or time step for example) to initialize the old history variables to reflect the initial configuration condition. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Shell3DMass - consistent mass matrix

#### C SPECIFICATION

```void vfe_Shell3DMass (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble m[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```m            Degree of freedom consistent mass matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the consistent mass matrix, m, given the node coordinates, x. The lower triangle of the consistent mass is returned. Use vfe_Shell3DMassDiag to compute a diagonal mass matrix.

#### NAME

vfe_Shell3DMassDiag - diagonal mass matrix

#### C SPECIFICATION

```void vfe_Shell3DMassDiag (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble md[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```md           Degree of freedom diagonal mass vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the diagonal mass matrix, md, given the node coordinates, x. The diagonal mass is returned as a degree of freedom length vector. Use vfe_Shell3DMass to compute a consistent mass matrix.

#### NAME

vfe_Shell3DReact - reaction vector

#### C SPECIFICATION

```void vfe_Shell3DReact (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble r[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, given the node coordinates, x, and the degree of freedom displacement vector, u.

#### NAME

vfe_Shell3DReactStiff - reaction vector, stiffness matrix

#### C SPECIFICATION

```void vfe_Shell3DReactStiff (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble kflag,
Vdouble r[],
Vdouble k[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
kflag        Flag to compute stiffness matrix, k
=SYS_OFF      Do not compute stiffness matrix
=SYS_ON       Compute and return stiffness matrix
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
k            Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, and optionally the stiffness matrix, k, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Shell3DStiff - linear stiffness matrix

#### C SPECIFICATION

```void vfe_Shell3DStiff (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble kl[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```kl           Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the linear stiffness matrix, kl, given the node coordinates, x. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Shell3DStrsAdapt - stress based error analysis

#### C SPECIFICATION

```void vfe_Shell3DStrsAdapt (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble *setot,
Vdouble *seerr,
Vdouble *h,
Vdouble *p,
Vdouble *d)
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
strss        Array of recovered nodal stresses
```

#### OUTPUT ARGUMENTS

```setot        Total strain energy
seerr        Strain energy error
h            Characteristic length
p            Effective polynomial order
d            Dimension
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the element total strain energy, setot, and strain energy error, seerr, given the element displacements, u, and an estimate of the exact nodal stress resultants, strss. In addition useful quantities such as the characteristic length, effective polynomial order and dimension of the element are returned. The element dimension, d, is 2. These quantities are useful for computing new characteristic element length for mesh adaptation.

#### NAME

vfe_Shell3DStrsStrn - resultant stress and strain/curvature

#### C SPECIFICATION

```void vfe_Shell3DStrsStrn (vfe_Shell3D *shell3d,
Vdouble x[],
Vdouble u[],
Vdouble strs[], Vdouble strn[])
```

#### INPUT ARGUMENTS

```shell3d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```strs         Array of nodal stresses
strn         Array of nodal strains
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal stresses and strains, strs and strn, given the node coordinates, x, and the degree of freedom displacement vector, u.

The stresses and strains are computed in the shell local coordinate system. The convention used to generate local coordinate systems is specified using vfe_Shell3DSetLocalSystem. The actual direction cosine matrices of the shell local systems at the element output locations may be returned using vfe_Shell3DDirCos.

The strs is composed of 8 stress resultants and the strn is composed of 8 associated midsurface strains and curvatures at each output location. The stress and strain values are ordered first by the 8 stress resultant or strain components followed by the the number of element nodes. For example, for a 4 node shell element a total of 8*4 = 32 stress values will be returned in strs and 32 strain values returned in strn.

#### NAME

vfe_Shell3DStressStrain - three-dimensional stress and strain

#### C SPECIFICATION

```void vfe_Shell3DStressStrain (vfe_Shell3D *shell2d,
Vdouble x[],
Vdouble u[],
Vdouble strs[], Vdouble strn[],
Vdouble stress[], Vdouble strain[])
```

#### INPUT ARGUMENTS

```shell2d      Pointer to Shell3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```strs         Array of nodal stress resultants
strn         Array of nodal strains/curvatures
stress       Array of nodal three dimensional stresses at recovery points
strain       Array of nodal three dimensional strains at recovery points
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal stresses and strains, strs and strn, and the three-dimensional stresses and strains, stress and strain, given the node coordinates, x, and the degree of freedom displacement vector, u.

The stress resultants and strain/curvatures are the same as those obtained with vfe_Shell3DStrsStrn, and the same remarks regarding local coordinate systems apply.

The three-dimensional stresses and strains are computed at a series of points in the beam's cross section. The number of cross sectional points is obtained using vfe_MatlFunNumStressStrain and depend on the type of cross section used. See ShellProp for more details on each cross section type.

## 3.7 3D Membrane Elements - Mem3D

The Mem3D module is used to simulate 3D membranes. 3D membrane elements are two-dimensional elements in 3D space which support in-plane deformation only. The stress normal to the membrane surface is assumed to be zero. The transverse shear stresses are also zero.

The methods associated with a Mem3D object are the following.

• Begin and end an instance of an object, generic object functions
```*vfe_Mem3DBegin       - create an instance of a Mem3D object
vfe_Mem3DEnd          - destroy an instance of a Mem3D object
vfe_Mem3DError        - return Mem3D object error flag
```
• Attributes and Parameters
```vfe_Mem3DSetHistPtr   - set pointers to material history
vfe_Mem3DSetLocalSystem - set stress axes direction
vfe_Mem3DSetMatlSystem - set material axes direction
vfe_Mem3DSetObject    - set attribute object
vfe_Mem3DSetParamd    - set element formulation parameters
vfe_Mem3DSetParami    - set element formulation parameters
vfe_Mem3DSetPropPtr   - set pointer to element nodal properties
vfe_Mem3DSetTopology  - set input element topology
```
• Degree of Freedom and Integration Information
```vfe_Mem3DDofMap       - query element degree of freedom map
vfe_Mem3DNumDof       - query number of element degrees of freedom
vfe_Mem3DNumIntPnt    - query number of element integration points
```
• Structural analysis computations
```vfe_Mem3DConcLoad     - concentrated load vector
vfe_Mem3DDirCos       - compute membrane local direction cosines
vfe_Mem3DGeomStiff    - geometric stiffness matrix
vfe_Mem3DInitHist     - initialize material history
vfe_Mem3DMass         - consistent mass matrix
vfe_Mem3DMassDiag     - diagonal mass matrix
vfe_Mem3DReact        - reaction vector
vfe_Mem3DReactStiff   - reaction vector, stiffness matrix
vfe_Mem3DStiff        - linear stiffness matrix
vfe_Mem3DStrsAdapt    - stress based error analysis
```
• Thermal analysis computations
```vfe_Mem3DDistHeat     - distributed heat loads.
vfe_Mem3DElemHeat     - body heat generation
vfe_Mem3DCap          - consistent capacitance matrix
vfe_Mem3DCapDiag      - diagonal capacitance matrix
vfe_Mem3DPower        - thermal power
vfe_Mem3DPowerCond    - thermal power, conductance matrix
vfe_Mem3DCond         - conductance matrix
vfe_Mem3DHFlxAdapt    - heat flux based error analysis
vfe_Mem3DHFlxTGrd     - heat flux and temperature gradient
```
Instance a Mem3D object using vfe_Mem3DBegin. Once a Mem3D is instanced, set the material function attribute object MatlFun using vfe_Mem3DSetObject. The current topology of the element is specified using vfe_Mem3DSetTopology. The thickness of the membrane element is specified using vfe_Mem3DSetPropPtr. Query the element degree of freedom map using vfe_Mem3DDofMap and vfe_Mem3DNumDof.

If the element is to support a material model, such as a plastic material model, which requires a material history then the user must manage the material history information using vfe_Mem3DSetHistPtr and vfe_Mem3DInitHist. Since all element geometry is available directly to the element in terms of node coordinates and thicknesses, the material function should point to a primitive material.

## 3.8 Element Geometry

The basic membrane element geometry is defined by the node coordinates of the membrane reference surface and the node thicknesses There are no offset properties available for the membrane element, therefore the membrane midsurface is coincident with the reference surface. The node thickness properties are set using vfe_Mem3DSetPropPtr and are illustrated below in Figure 3-3. Other element quantities which may be set using this function are node temperature and reference temperature. The z' component of stress is zero as well as the transverse shear stresses in the y'z' and z'x' planes. The element natural coordinates, r,s, lie in the membrane midsurface. ##### Figure 3-3, Geometry for 8 Node 3D Membrane Element
Use the function vfe_Mem3DStrsAdapt to aid in computing element strain energy, strain energy error and other useful quantities to aid in solution error estimation and mesh adaptation. The function vfe_Mem3DHFlxAdapt performs a similar computation for heat transfer analysis.

## 3.9 Function Descriptions

The currently available Mem3D functions are described in detail in this section.

#### NAME

*vfe_Mem3DBegin - create an instance of a Mem3D object

#### C SPECIFICATION

```vfe_Mem3D *vfe_Mem3DBegin ()
```

```None
```

#### FUNCTION RETURN VALUE

The function returns a pointer to the newly created Mem3D object. If the object creation fails, NULL is returned.

#### DESCRIPTION

Create an instance of a Mem3D object. Memory is allocated for the object private data and the pointer to the object is returned.

Destroy an instance of a Mem3D object using

```     void vfe_Mem3DEnd (vfe_Mem3D *mem3d)
```

Return the current value of a Mem3D object error flag using

```     Vint vfe_Mem3DError (vfe_Mem3D *mem3d)
```

#### NAME

vfe_Mem3DSetHistPtr - set pointers to material history

#### C SPECIFICATION

```void vfe_Mem3DSetHistPtr (vfe_Mem3D *mem3d,
Vdouble *oldhist, Vdouble *newhist)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
oldhist      Pointer to start of material history at previous step
newhist      Pointer to start of material history at current step
```

```None
```

#### DESCRIPTION

Set pointers to the start of the material history data at the previous step, oldhist and the current step newhist. This function is required when an underlying material model such as plasticity is used. Note that the material history data is not copied by this function, only the pointers themselves are copied. The number of double precision values required for the material history at a step is the number of history variables at an integration point times the total number of integration points in the element. The number of history variables depends on the underlying material model and may be queried using vfe_MatlFunNumHist. The total number of integration points is the product of the number of element integration points returned using vfe_Mem3DNumIntPnt and the number of section integration points returned using vfe_MatlFunNumStressStrain. By default the pointers to the material history are NULL. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Mem3DSetLocalSystem - set local coordinate system convention

#### C SPECIFICATION

```void vfe_Mem3DSetLocalSystem (vfe_Mem3D *mem3d,
Vint type,
Vdouble vec[],
Vdouble angle)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
type         Local system convention
vec          Orientation vector data
angle        Angle to rotate membrane x',y' axes about the membrane z'
axis in degrees.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is input.

#### DESCRIPTION

Specify the convention to be used to construct the orientation of the membrane element local x',y',z' coordinate system with respect to the membrane reference surface. For stress and strain computation for output using vfe_Mem3DStrsStrn, the local coordinate system is evaluated at each output location and is the coordinate system in which the output stresses and strains at the output location are expressed.

The z' axis is always constructed to be normal to the membrane reference surface. The orientation of the x' and y' axes in the plane of the membrane reference surface is determined by type. The vec array is only used if the specified type requires position or direction vectors. An additional rotation of the x',y' axes about the z' axis can be specified with angle. By default the local system convention is SYS_ELEMSYS_STANDARD with angle set to 0.

For a description of element coordinate systems, type, and associated orientation vector data, please see
1.4 Element Coordinate Systems

#### NAME

vfe_Mem3DSetMatlSystem - set material system convention

#### C SPECIFICATION

```void vfe_Mem3DSetMatlSystem (vfe_Mem3D *mem3d,
Vint type,
Vdouble vec[],
Vdouble angle)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
type         Local system convention
vec          Orientation vector data
angle        Angle to rotate membrane x',y' axes about the membrane z'
axis in degrees.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is input.

#### DESCRIPTION

Specify the convention to be used to construct the orientation of the membrane element local material x',y',z' coordinate system with respect to the membrane reference surface. This local system is computed at each integration point location on the membrane surface and is assumed to be the coordinate system in which the material properties of the element at the integration point are expressed.

The z' axis is always constructed to be normal to the membrane reference surface. The orientation of the x' and y' axes in the plane of the membrane reference surface is determined by type. The vec array is only used if the specified type requires position or direction vectors. An additional rotation of the x',y' axes about the z' axis can be specified with angle. By default the local system convention is SYS_ELEMSYS_STANDARD with angle set to 0.

For a description of element coordinate systems, type, and associated orientation vector data, please see
1.4 Element Coordinate Systems

#### NAME

vfe_Mem3DSetObject - set attribute object

#### C SPECIFICATION

```void vfe_Mem3DSetObject (vfe_Mem3D *mem3d,
Vint objecttype,
Vobject *object)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
objecttype   The object type identifier
=VFE_MATLFUN            MatlFun object
object       Pointer to the object to be set.
```

```None
```

#### ERRORS

SYS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

#### DESCRIPTION

Set a pointer to an attribute object. Users must supply a MatlFun object prior to computing any quantity that requires a material model definition.

#### NAME

vfe_Mem3DSetParamd - set element formulation parameters

#### C SPECIFICATION

```void vfe_Mem3DSetParamd (vfe_Mem3D *mem3d,
Vint type,
Vdouble dparam)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
type         Type of formulation parameter to set
=VFE_MAXPROJANG         Maximum nodal projection angle
dparam       Double precision parameter value.
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper dparam is specified.

#### DESCRIPTION

Set element formulation parameters.

Use VFE_MAXPROJANG to set the maximum angle in degrees between the membrane surface normal at an element integration point and the membrane normal at a node. By default VFE_MAXPROJANG is set to 90. degrees.

Use VFE_ADDEDMASS to add non-structural mass/area to the membrane element. By default VFE_ADDEDMASS is set to 0..

#### NAME

vfe_Mem3DSetParami - set element formulation parameters

#### C SPECIFICATION

```void vfe_Mem3DSetParami (vfe_Mem3D *mem3d,
Vint type,
Vint iparam)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
type         Type of formulation parameter to set
=VFE_TECH               Element technology
=VFE_STRAINTYPE         Element strain type
=VFE_TEMPMATLAVE        Average material temperature flag
=VFE_CHECKCORNNORM      Corner normal checking
iparam       Integer parameter value.
=VFE_TECH_ISOP          Standard isoparametric technology
=VFE_TECH_URED          Uniform reduced technology
=VFE_SMALLSTRAIN        Small strain
=VFE_LARGESTRAIN        Large strain
=SYS_OFF                Disable
=SYS_ON                 Enable
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified. SYS_ERROR_VALUE is generated if an improper iparam is specified.

#### DESCRIPTION

Set element technology and formulation parameters.

The basic element technology is set with the VFE_TECH parameter. By default VFE_TECH is set to VFE_TECH_ISOP.

Set element strain type using VFE_STRAINTYPE with a value of either VFE_LARGESTRAIN to enable large strain or VFE_SMALLSTRAIN to enable small strains. By default VFE_STRAINTYPE is set to VFE_SMALLSTRAIN. If a small strain material is used under VFE_LARGESTRAIN then it is assumed that the material law relates the Green-Lagrange strain tensor with the second second Piola-Kirchhoff stress tensor. Otherwise, the material law relates the deformation gradient with the Cauchy stress.

The parameter VFE_TEMPMATLAVG toggles the method for computing the temperature used for evaluating temperature dependent material properties. If enabled, the temperature used for temperature dependent material properties is the average of the element node point temperatures. If disabled, the temperature is isoparametrically interpolated from the node point temperatures at each element integration point. By default VFE_TEMPMATLAVG is set to SYS_ON.

The parameter VFE_CHECKCORNNORM toggles a comparison between computed normals at integration points in shells and a computed normal interpolated from corner node values. If this parameter is enabled then the dot product of these two normals is computed and, if negative, an error is flagged. By default VFE_CHECKCORNNORM is set to SYS_ON.

#### NAME

vfe_Mem3DSetPropPtr - set pointer to element nodal properties

#### C SPECIFICATION

```void vfe_Mem3DSetPropPtr (vfe_Mem3D *mem3d,
Vint type,
Vdouble *propptr)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
type         Type of element property
=VFE_PROP_TEMPERATURE      Temperatures
=VFE_PROP_TEMPREF          Reference temperatures
=VFE_PROP_THICKNESS        Thicknesses
=VFE_PROP_PRESTRESS        Pre-stress
propptr      Pointer to start of element nodal properties
```

```None
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper type is specified.

#### DESCRIPTION

Set a pointer to the start of a specified type of element nodal properties. Note that the properties are not copied by this function, only the pointer itself is copied. If a property pointer is not set the element assumes a default value for the associated property. By default the thickness is 1., the temperature is 0. and the reference temperature is 0. If a pre-stress is set it is added to the computed stress resulting from the material model.

#### NAME

vfe_Mem3DSetTopology - set element topology

#### C SPECIFICATION

```void vfe_Mem3DSetTopology (vfe_Mem3D *mem3d,
Vint shape,
Vint maxi,
Vint maxj)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
shape        The topological shape for the element
=SYS_SHAPETRI           Triangle
maxi         The number of points along the i direction.
If maxi = 0 then the linear Serendipity
element form of the specified shape is assumed.
maxj         The number of points along the j direction.
If maxj = 0 then a Serendipity finite element is assumed.
If 2 <= maxj <= 3 and 2 <= maxi <= 3, then a Lagrange
finite element is assumed.
If maxi != 0 then maxj = 0 or maxj = maxi.
```

```None
```

#### ERRORS

SYS_ERROR_VALUE is generated if an improper maxi or maxj is specified. SYS_ERROR_ENUM is generated if an improper shape is input.

#### DESCRIPTION

Specify the topology of a 3D membrane element. If maxi is set to 3 then a quadratic element form is assumed. The default topology is shape = SYS_SHAPEQUAD, maxi = maxj = 0.

#### NAME

vfe_Mem3DDofMap - query element degree of freedom map

#### C SPECIFICATION

```void vfe_Mem3DDofMap (vfe_Mem3D *mem3d,
Vint analysistype,
Vint loc[], Vint tag[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```loc          Vector of degree of freedom locations
tag          Vector of degree of freedom types
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for element degree of freedom map. The degree of freedom map consists of a location index, loc and type, tag for each degree of freedom used by the element.

The location index is either a positive node index into the element connectivity indicating a nodal freedom or a zero value indicating an elemental degree of freedom. The tag indicates the type of the degree of freedom. Tag values are one of a set of enumerated types which indicate whether the degree of freedom is a translation or temperature.

The length of the loc and tag vectors is equal to the number of element degrees of freedom. Use vfe_Mem3DNumDof to return the number of element degrees of freedom.

#### NAME

vfe_Mem3DNumDof - query number of element degrees of freedom

#### C SPECIFICATION

```void vfe_Mem3DNumDof (vfe_Mem3D *mem3d,
Vint analysistype,
Vint *nedofs)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```nedofs       Number of element degrees of freedom
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element degree of freedom nedofs. The number of degrees of freedom will generally be equal to the number of nodal degrees of freedom per node times the number of nodes plus the number of elemental degrees of freedom. Use vfe_Mem3DDofMap to return the location and type of each degree of freedom.

#### NAME

vfe_Mem3DNumIntPnt - query number of element integration points

#### C SPECIFICATION

```void vfe_Mem3DNumIntPnt (vfe_Mem3D *mem3d,
Vint analysistype,
Vint *nepnts)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
analysistype The type of analysis
=VFE_ANALYSIS_STRUCTURAL Structural analysis
=VFE_ANALYSIS_THERMAL    Thermal analysis
```

#### OUTPUT ARGUMENTS

```nepnts       Number of element integration points
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper analysistype is specified.

#### DESCRIPTION

Query for number of element integration points nepnts.

#### C SPECIFICATION

```void vfe_Mem3DConcLoad (vfe_Mem3D *mem3d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble xc,
Vdouble v[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_FACE     Element face
no           Element face number (ignored)
direction
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed. SYS_ERROR_COMPUTE is generated if the location xc cannot be projected onto the surface defined by the element node locations.

#### DESCRIPTION

Compute the consistent degree of freedom loads given a concentrated force q on the face of the shell. The load location, xc, is projected to the surface defined by the element node locations. The projected point location is used as the point of application of the concentrated force even if it falls outside of the boundary of the element.

The vector q contains three values if loadtype is VFE_CONCLOAD_TRAC, or a single value if loadtype is VFE_CONCLOAD_PRES. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The load is in units of force for both VFE_CONCLOAD_TRAC and VFE_CONCLOAD_PRES.

#### NAME

vfe_Mem3DDirCos - compute membrane local direction cosines

#### C SPECIFICATION

```void vfe_Mem3DDirCos (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble tm[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of point locations defining membrane surface.
```

#### OUTPUT ARGUMENTS

```tm           Array of direction cosine matrices at the membrane nodes.
```

#### DESCRIPTION

Compute the direction cosine matrices of the membrane element local coordinate system. For stress and strain computation the local coordinate system at each stress output location is the coordinate system in which the output stresses and strains at the location using vfe_Mem3DStrsStrn are expressed. Given that X',Y' and Z' are three orthonormal vectors indicating the direction of the local coordinate axes in the global coordinate system (x,y,z), then the direction cosine matrix, tm for this local coordinate system is defined as:
```     tm = X'x  tm = X'y  tm = X'z
tm = Y'x  tm = Y'y  tm = Y'z
tm = Z'x  tm = Z'y  tm = Z'z
```

The local coordinate system is determined by the local system convention set using vfe_Mem3DSetLocalSystem.

#### C SPECIFICATION

```void vfe_Mem3DDistLoad (vfe_Mem3D *mem3d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_EDGE     Element edge
=SYS_FACE     Element face
no           Element edge number
to element face or element edge
to element face or element edge
q            Vector of distributed load values
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype or loadtype is specified. SYS_ERROR_OPERATION is generated if an invalid combination of enttype and loadtype is specified. SYS_ERROR_VALUE is generated if an improper no is specified. SYS_ERROR_COMPUTE is generated if a zero edge or face Jacobian is computed.

#### C SPECIFICATION

```void vfe_Mem3DElemLoad (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
q            Array of node accelerations
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_COMPUTE is generated if a zero Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom body loads given acceleration load vector, q, on an element. The vector q contains an acceleration vector for for each node in the element. The output array of consistent degree of freedom loads, f, contains loads for all degrees of freedom in the element. The input element loads are in the units of force per unit mass. Note that the computation of consistent loads uses the material density.

#### NAME

vfe_Mem3DGeomStiff - geometric stiffness matrix

#### C SPECIFICATION

```void vfe_Mem3DGeomStiff (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble kg[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```kg           Degree of freedom geometric stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the geometric stiffness matrix, kg, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the geometric stiffness is returned.

#### NAME

vfe_Mem3DInitHist - initialize material history

#### C SPECIFICATION

```void vfe_Mem3DInitHist (vfe_Mem3D *mem3d)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
```

```None
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set.

#### DESCRIPTION

Initialize the values of the history variables used in the underlying element or primitive material model for the element. This operation should be performed once for each element (at the first load or time step for example) to initialize the old history variables to reflect the initial configuration condition. If the number of history variables is zero, this function need not be called.

#### NAME

vfe_Mem3DMass - consistent mass matrix

#### C SPECIFICATION

```void vfe_Mem3DMass (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble m[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```m            Degree of freedom consistent mass matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the consistent mass matrix, m, given the node coordinates, x. The lower triangle of the consistent mass is returned. Use vfe_Mem3DMassDiag to compute a diagonal mass matrix.

#### NAME

vfe_Mem3DMassDiag - diagonal mass matrix

#### C SPECIFICATION

```void vfe_Mem3DMassDiag (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble md[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```md           Degree of freedom diagonal mass vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the diagonal mass matrix, md, given the node coordinates, x. The diagonal mass is returned as a degree of freedom length vector. Use vfe_Mem3DMass to compute a consistent mass matrix.

#### NAME

vfe_Mem3DReact - reaction vector

#### C SPECIFICATION

```void vfe_Mem3DReact (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble r[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, given the node coordinates, x, and the degree of freedom displacement vector, u.

#### NAME

vfe_Mem3DReactStiff - reaction vector, stiffness matrix

#### C SPECIFICATION

```void vfe_Mem3DReactStiff (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble kflag,
Vdouble r[],
Vdouble k[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
kflag        Flag to compute stiffness matrix, k
=SYS_OFF      Do not compute stiffness matrix
=SYS_ON       Compute and return stiffness matrix
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom reaction vector
k            Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the reaction vector, r, and optionally the stiffness matrix, k, given the node coordinates, x, and the degree of freedom displacement vector, u. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Mem3DStiff - linear stiffness matrix

#### C SPECIFICATION

```void vfe_Mem3DStiff (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble kl[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```kl           Degree of freedom stiffness matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the linear stiffness matrix, kl, given the node coordinates, x. The lower triangle of the stiffness matrix is returned.

#### NAME

vfe_Mem3DStrsAdapt - stress based error analysis

#### C SPECIFICATION

```void vfe_Mem3DStrsAdapt (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble *setot,
Vdouble *seerr,
Vdouble *h,
Vdouble *p,
Vdouble *d)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
strss        Array of recovered nodal stresses
```

#### OUTPUT ARGUMENTS

```setot        Total strain energy
seerr        Strain energy error
h            Characteristic length
p            Effective polynomial order
d            Dimension
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the element total strain energy, setot, and strain energy error, seerr, given the element displacements, u, and an estimate of the exact nodal stress resultants, strss. In addition useful quantities such as the characteristic length, effective polynomial order and dimension of the element are returned. The element dimension, d, is 2. These quantities are useful for computing new characteristic element length for mesh adaptation.

#### C SPECIFICATION

```void vfe_Mem3DStrsStrn (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble strs[], Vdouble strn[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of displacements
```

#### OUTPUT ARGUMENTS

```strs         Array of nodal stresses
strn         Array of nodal strains
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal stresses and strains, strs and strn, given the node coordinates, x, and the degree of freedom displacement vector, u.

The stresses and strains are computed in the membrane local coordinate system. The convention used to generate local coordinate systems is specified using vfe_Mem3DSetLocalSystem. The actual direction cosine matrices of the membrane local systems at the element output locations may be returned using vfe_Mem3DDirCos.

The strs is composed of 6 stresses and the strn is composed of 6 associated strains at each output location. The stress and strain values are ordered first by the 6 tensor components followed by the the number of element nodes. For example, for a 4 node membrane element a total of 6*4 = 24 stress values will be returned in strs and 24 strain values returned in strn.

#### C SPECIFICATION

```void vfe_Mem3DDistHeat (vfe_Mem3D *mem3d,
Vdouble x[],
Vint enttype,
Vint no,
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
enttype      Entity type on which load is applied
=SYS_FACE     Element face
no           Element face number
q            Vector of distributed load values
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_ENUM is generated if an improper enttype is specified. SYS_ERROR_VALUE is generated if an improper no is specified. SYS_ERROR_COMPUTE is generated if a zero edge Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom loads given a distributed heat load, q along a 3D membrane element face. The vector q contains values for the heat flux for each node in the element. The distributed loads are in units of heat flux per unit area.

#### NAME

vfe_Mem3DElemHeat - body heat generation

#### C SPECIFICATION

```void vfe_Mem3DElemHeat (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble q[],
Vdouble f[],
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
q            Array of node heat fluxes
```

#### OUTPUT ARGUMENTS

```f            Degree of freedom vector of consistent loads.
```

#### ERRORS

SYS_ERROR_COMPUTE is generated if a non-positive Jacobian is computed.

#### DESCRIPTION

Compute the consistent degree of freedom body heat generation given nodal heat generation vector, q on an element. The vector q contains heat generation per volume for each node in the element. The output array of consistent degree of freedom loads, f, contains the heat generation in the element. The input element loads are in the units of power per unit volume.

#### NAME

vfe_Mem3DCap - consistent capacitance matrix

#### C SPECIFICATION

```void vfe_Mem3DCap (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble c[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
```

#### OUTPUT ARGUMENTS

```c            Degree of freedom consistent capacitance matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the consistent capacitance matrix, c, given the node coordinates, x,and temperatures, u. The lower triangle of the consistent capacitance is returned. Use vfe_Mem3DCapDiag to compute a diagonal capacitance matrix. This calculation requires material density and specific heat.

#### NAME

vfe_Mem3DCapDiag - diagonal capacitance matrix

#### C SPECIFICATION

```void vfe_Mem3DCapDiag (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble cd[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
```

#### OUTPUT ARGUMENTS

```cd           Degree of freedom diagonal capacitance matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the diagonal capacitance matrix, cd, given the node coordinates, x, and temperatures, u. The diagonal capacitance is returned as a degree of freedom length vector. Use vfe_Mem3DCap to compute a consistent capacitance matrix. This calculation requires material density and specific heat.

#### NAME

vfe_Mem3DCond - thermal conductance matrix

#### C SPECIFICATION

```void vfe_Mem3DCond (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble kl[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
```

#### OUTPUT ARGUMENTS

```kl           Degree of freedom conductance matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the linear conductance matrix, kl, given the node coordinates, x. The lower triangle of the conductance matrix is returned.

#### NAME

vfe_Mem3DPower - thermal power vector

#### C SPECIFICATION

```void vfe_Mem3DPower (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble r[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom power vector
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the power vector, r, given the node coordinates, x, and the degree of freedom temperature vector, u.

#### NAME

vfe_Mem3DPowerCond - thermal power, conductance matrix

#### C SPECIFICATION

```void vfe_Mem3DPowerCond (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble kflag,
Vdouble r[],
Vdouble k[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
kflag        Flag to compute conductance matrix, k
=SYS_OFF      Do not compute conductance matrix
=SYS_ON       Compute and return conductance matrix
```

#### OUTPUT ARGUMENTS

```r            Degree of freedom power vector
k            Degree of freedom conductance matrix
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the power vector, r, and optionally the conductance matrix, k, given the node coordinates, x, and the degree of freedom temperature vector, u. The lower triangle of the conductance matrix is returned.

#### NAME

vfe_Mem3DHFlxAdapt - heat flux based error analysis

#### C SPECIFICATION

```void vfe_Mem3DHFlxAdapt (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble hflxs[],
Vdouble *hetot,
Vdouble *heerr,
Vdouble *h,
Vdouble *p,
Vdouble *d)
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
hflxs        Array of recovered nodal heat flux
```

#### OUTPUT ARGUMENTS

```hetot        Total heat energy
heerr        Heat energy error
h            Characteristic length
p            Effective polynomial order
d            Dimension
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute the element total heat energy, hetot, and heat energy error, heerr, given the element temperatures, u, and an estimate of the exact nodal heat flux, hflxs. In addition useful quantities such as the characteristic length, effective polynomial order and dimension of the element are returned. The element dimension, d, is 2. These quantities are useful for computing new characteristic element length for mesh adaptation.

#### NAME

vfe_Mem3DHFlxTGrd - heat flux and thermal gradient

#### C SPECIFICATION

```void vfe_Mem3DHFlxTGrd (vfe_Mem3D *mem3d,
Vdouble x[],
Vdouble u[],
Vdouble hflx[], Vdouble tgrd[])
```

#### INPUT ARGUMENTS

```mem3d        Pointer to Mem3D object.
x            Array of node locations.
u            Degree of freedom vector of temperatures
```

#### OUTPUT ARGUMENTS

```hflx         Array of nodal heat fluxes
tgrd         Array of nodal temperature gradients
```

#### ERRORS

SYS_ERROR_NULLOBJECT is generated if a MatlFun attribute object has not been set. SYS_ERROR_COMPUTE is generated if a negative Jacobian transformation is computed or the maximum nodal projection angle is exceeded.

#### DESCRIPTION

Compute nodal heat fluxes and temperature gradients, hflx and tgrd, given the node coordinates, x, and the degree of freedom temperature vector, u. The flux and gradients are computed in the membrane local system. The convention used to generate local coordinate systems is specified using vfe_Mem3DSetLocalSystem.

The flux and gradient values are ordered first by the 3 vectoral components followed by the number of element nodes.