Sensitivity

A sensitivity analysis calculates how a variable G (called the objective function) changes with some other variables s (called the design variables), i.e. DG/Ds.

If s are the coordinates of some nodes, then the objective function usually takes the form G(s,U(s)), i.e. it is a direct function of the coordinates and it is a direct function of the displacements, which are again a function of the coordinates. One can write (vector- and matrix-denoting parentheses have been omitted; it is assumed that the reader knows that U and F are vectors, K and M are matrices and that s and G are potentially vectors):

\frac{DG}{Ds}=\frac{\partial G}{\partial s} + \frac{\partial G}{\partial U} \frac{\partial U}{\partial s}. (518)

The governing equation for static (linear and nonlinear) calculations is F_{\text{int}}(s,U(s))=F_{\text{ext}}(s,U(s)), which leads to

\frac{\partial F_{\text{int}}}{\partial s} + \frac{\partial F_{\text{int}}}{\partial U} \frac{\partial U}{\partial s}=\frac{\partial F_{\text{ext}}}{\partial s} + \frac{\partial F_{\text{ext}}}{\partial U} \frac{\partial U}{\partial s}. (519)

or

\frac{\partial U}{\partial s} = K^{-1} \left( \frac{\partial F_{\text{ext}}}{\partial s}-\frac{\partial F_{\text{int}}}{\partial s} \right), (520)

where

K=\frac{\partial F_{\text{int}}}{\partial U}-\frac{\partial F_{\text{ext}}}{\partial U}. (521)

Since for linear applications F_{\text{int}}(s,U(s))=K(s) \cdot U and F_{\text{ext}}(s,U(s))=F(s), the above equations reduce in that case to

\frac{\partial K}{\partial s} \cdot U + K \cdot \frac{\partial U}{\partial s}=\frac{\partial F}{\partial s}, (522)

or

\frac{\partial U}{\partial s} = K^{-1} \left( \frac{\partial F}{\partial s}-\frac{\partial K}{\partial s} \cdot U \right). (523)

Consequently one arives at the equation:

\frac{DG}{Ds}=\frac{\partial G}{\partial s} + \frac{\partial G}{\partial U} K^{-1} \left( \frac{\partial F}{\partial s}-\frac{\partial K}{\partial s} \cdot U \right). (524)

For the speed-up of the calculations it is important to perform the calculation of the term \frac{\partial K}{\partial s} \cdot U on element level and to calculate the term \frac{\partial G}{\partial U} K^{-1} before multiplying with the last term in brackets. Furhermore, \frac{\partial G}{\partial U} K^{-1} should be calculated by solving an equation system and not by inverting K.

For special objective functions this relationship is further simplified:

For eigenfrequencies as objective function one starts from the eigenvalue equation:

K \cdot U_i = \lambda_i M \cdot U_i, (525)

from which one gets:

\frac{\partial \lambda_i}{\partial s} M \cdot U_i = (K - \lambda_i M) \cdot\frac{\partial U_i}{\partial s} + \left( \frac{\partial K}{\partial s} - \lambda_i \frac{\partial M}{\partial s} \right) \cdot U_i. (526)

Premultiplying with U_i^T and taking the eigenvalue equation and the normalization of the eigenvectors w.r.t. M into account leads to

\frac{\partial \lambda_i}{\partial s} = U_i^T \cdot \left( \frac{\partial K}{\partial s} - \lambda_i \frac{\partial M}{\partial s} \right) \cdot U_i. (527)

Notice that this is the sensitivity of the eigenvalues, not of the eigenfrequencies (which are the square roots of the eigenvalues). This is exactly how it is implemented in CalculiX: you get in the output the sensitivity of the eigenvalues.

Subsequently, one can derive the eigenvalue equation to obtain the derivatives of the eigenvectors:

(K - \lambda_i M) \frac{\partial U_i}{\partial s} = - \left( \frac{\partial K}{\partial s} - \lambda_i \frac{\partial M}{\partial s} - \frac{\partial \lambda_i}{\partial s} M \right) \cdot U_i. (528)

If s is the orientation in some or all of the elements, the term \frac{\partial G}{\partial s} is in addition zero in the above equations.

In CalculiX, G is defined with the keyword *OBJECTIVE, s is defined with the keyword DESIGNVARIABLES and a sensitivity analysis is introduced with the procedure card *SENSITIVITY.

If the parameter NLGEOM is not used on the *SENSITIVITY card, the calculation of \frac{\partial K}{\partial s} does not contain the large deformation and stress stiffness, else it does. Similarly, without NLGEOM \frac{\partial G}{\partial s} is calculated based on the linear strains, else the quadratic terms are taken into account.

If the objective function is the mass, the shapeenergy or the displacements a *STATIC step must have been performed. The displacements U and the stiffness matrix K from this step are taken for K and U in Equation ([*]) (in the presence of a subsequent sensitivity step K is stored automatically in a file with the name jobname.stm). If the static step was calculated with NLGEOM, so should the sensitivity step in order to be consistent. So the procedure cards should run like:

*STEP
*STATIC
...
*STEP
*SENSITIVITY
...

or

*STEP,NLGEOM
*STATIC
...
*STEP,NLGEOM
*SENSITIVITY
...

If the objective functions are the eigenfrequencies (which include the eigenmodes), a *FREQUENCY step must have been performed with STORAGE=YES. This frequency step may be a perturbation step, in which case it is preceded by a static step. The displacements U, the stiffness matrix K and the mass matrix M for equations ([*]) and ([*]) are taken from the frequency step. If the frequency step is performed as a perturbation step, the sensitivity step should be performed with NLGEOM, else it is not necessary. So the procedure cards should run like:

*STEP
*FREQUENCY,STORAGE=YES
...
*STEP
*SENSITIVITY
...

or

*STEP
*STATIC
...
*STEP,PERTURBATION
*FREQUENCY,STORAGE=YES
...
*STEP,NLGEOM
*SENSITIVITY
...

or

*STEP,NLGEOM
*STATIC
...
*STEP,PERTURBATION
*FREQUENCY,STORAGE=YES
...
*STEP,NLGEOM
*SENSITIVITY
...

(a perturbation frequency step only makes sense with a preceding static step).

The output of a sensitivity calculation is stored as follows (frd-output only if the SEN output request was specified underneath a *NODE FILE card):

For TYPE=COORDINATE design variables the results of the target functions MASS, STRAIN ENERGY, EIGENFREQUENCY and DISPLACEMENT (i.e. the square root of the sum of the squares of the displacements in all objective nodes) are stored in the .frd-file and can be visualized using CalculiX GraphiX.

For TYPE=ORIENTATION design variables the eigenfrequency sensitivity is stored in the .dat file whereas the displacement sensitivity (i.e. the derivative of the displacements in all nodes w.r.t. the orientation) is stored in the .frd-file. The order of the design variables is listed in the .dat-file. All orientations defined by *ORIENTATION cards are varied, each orientation is defined by 3 independent variables. So for n *ORIENTATION cards there are 3n design variables. The sensitivity of the mass w.r.t. the orientation is zero.

Finally, it is important to know that a sensitivity analysis in CalculiX only works for true 3D-elements (no shells, beams, plane stress, etc...).