G+Smo
24.08.0
Geometry + Simulation Modules
|
This example solves a linear shell problem using the gsThinShellAssembler. The goals of the tutorial are the following:
Like every example in G+Smo, we start our file with some includes. In this case, we include the gsThinShellAssembler.h
file containing the assembler for the Kirchhoff-Love shell, and the getMaterialMatrix.h
used for getting the material matrix.
The command line options for this file are relatively easy. One can control the number of mesh refinements and degree elevations, and specify a plot flag if needed.
The problem at hand will be the Scordelis-Lo Roof problem from the shell obstactle course, see this paper. The geometry is stored in a file, hence it is read into the original geometry ori via gsReadFile.
For the analysis, we will use the geometry defined in the basis that we want for analysis. This is not essential, but it makes it easier to construct the geometry later using the gsThinShellAssembler class
The basis is simply obtained using gsMultiBasis
The boundary conditions of the problem are assigned via gsBoundaryConditions. On the east and west boundary of the geometry, the \(y\) and \(z\) displacements are fixed, and to make the problem well-defined, the south-west corner is fixed in \(x\). The boundary conditions are defined by first specifying the side (boxSide), then the type of condition (condition_type), then the function (nullptr
here), the unknown (always 0, since displacements are the only unknown field), whether the condition is applied in the parametric domain (always false
) and finally the component of the solution field (-1 for all, 0 for \(x\), 1 for \(y\) and 2 for \(z\)):
The surface load on the shell is provided by a gsFunctionSet, which in this case is a derived gsFunctionExpr.
The material law used in gsThinShellAssembler is specified using a separate class, derived from gsMaterialMatrixBase. The family of this class includes several material models, and can be evaluated in every point (including a thickness coordinate) using gsMaterialMatrixEval or it can be integrated using gsMaterialMatrixIntegrate. Depending on the options specified to the latter classes, different constitutive quantities can be obtaied, including the normal force and bending moment.
To define a meterial matrix, we can use the getMaterialMatrix function. This functions needs the undeformed geometry, the thickness, a set of parameters and some options:
In case of "Material"
0, a gsMaterialMatrixLinear is provided, which only takes the Young's Modulus ( \(E\)) and the Poisson's ratio ( \(\nu\)). For the linear material matrix, thickness integration is simply done by multiplying with the thickness moments. For hyperelastic material models (see gsMaterialMatrixNonlinear), more parameters can be required, and through-thickness integration is done numerically. We refer to the page The gsMaterialMatrixBase for more details on material matrices.
When the geometry, the basis, the boundary conditions and forces and the material are specified, the gsThinShellAssembler is simply constructed as follows:
Here, the first template parameter is the physical dimension, the second is the real type and the third is a boolean specifying whether bending stiffness contributions should be assembled.
Assemlbly of the linear stiffness matrix and external load vector is simply performed by calling
Having the stiffness matrix and force vector assembled, the linear shell problem can be solved accordingly. This is done with a simple gsSparseSolver:
Solving the linear problem gives the displacements of the control points of the geometry. To construct the displacement field, these control points form a solution field using the same basis as used for analysis. To construct the deformed geometry, their values need to be added to the control points of the original geometry. For ease of use, these functions are available in the gsThinShellAssembler:
Using the displacement field and the deformed geometry, one can make some evaluations like with any other gsFunction, gsGeometry or gsMultiPatch, for example to print the displacements in a point:
In addition, the solutions can be exported to Paraview using gsField:
Here is the full file linear_shell.cpp
. Clicking on a function or class name will lead you to its reference documentation.