Structural Mechanics Model¶
Static structural mechanics problems can be handled using the class
StructuralMechanicsModel
. So
far, Akantu
provides 2D and 3D Bernoulli beam elements [FJ09].
This model is instantiated for a given Mesh
, as for
the SolidMechanicsModel
. The model
will create its own FEEngine
object to compute
the interpolation, gradient, integration and assembly operations. The
StructuralMechanicsModel
constructor is called in the following way:
StructuralMechanicsModel model(mesh, spatial_dimension);
where mesh
is a Mesh
object defining the structure for
which the equations of statics are to be solved, and
spatial_dimension
is the dimensionality of the problem. If
spatial_dimension
is omitted, the problem is assumed to have
the same dimensionality as the one specified by the mesh.
Warning
Dynamic computations are not supported to date.
Note
Structural meshes are created and loaded
with _miot_gmsh_struct
instead of _miot_gmsh
(cf. Creating and Loading a Mesh)
Mesh mesh;
mesh.read("structural_mesh.msh", _miot_gmsh_struct);
This model contains at least the following Arrays
:
blocked_dofs contains a Boolean value for each degree of freedom specifying whether that degree is blocked or not. A Dirichlet boundary condition can be prescribed by setting the blocked_dofs value of a degree of freedom to
true
. The displacement is computed for all degrees of freedom for which the blocked_dofs value is set tofalse
. For the remaining degrees of freedom, the imposed values (zero by default after initialization) are kept.displacement_rotation contains the generalized displacements (i.e. displacements and rotations) of all degrees of freedom. It can be either a computed displacement for free degrees of freedom or an imposed displacement in case of blocked ones (\(\vec{u}\) in the following).
external_force contains the generalized external forces (forces and moments) applied to the nodes (\(\vec{f_{\st{ext}}}\) in the following).
internal_force contains the generalized internal forces (forces and moments) applied to the nodes (\(\vec{f_{\st{int}}}\) in the following).
An example to help understand how to use this model will be presented in the next section.
Model Setup¶
Initialization¶
The easiest way to initialize the structural mechanics model is:
model.initFull();
The method initFull
computes the shape
functions, initializes the internal vectors mentioned above and allocates the
memory for the stiffness matrix, unlike the solid mechanics model, its default
argument is _static
.
Material properties are defined using the StructuralMaterial
structure described in
Table 6. Such a definition could, for
instance, look like
StructuralMaterial mat1;
mat.E=3e10;
mat.I=0.0025;
mat.A=0.01;
Field |
Description |
---|---|
|
Young’s modulus |
|
Cross section area |
|
Second cross sectional moment of inertia (for 2D elements) |
|
|
|
|
|
Polar moment of inertia of beam cross section (for 3D elements) |
Materials can be added to the model’s element_material
vector using
model.addMaterial(mat1);
They are successively numbered and then assigned to specific elements.
for (Int i = 0; i < nb_element_mat_1; ++i) {
model.getElementMaterial(_bernoulli_beam_2)(i,0) = 1;
}
Setting Boundary Conditions¶
As explained before, the Dirichlet boundary conditions are applied through the
array blocked_dofs. Two options exist to define Neumann conditions.
If a nodal force is applied, it has to be directly set in the array
force_momentum. For loads distributed along the beam length, the
method computeForcesFromFunction
integrates them into nodal forces. The
method takes as input a function describing the distribution of loads along the
beam and a functor BoundaryFunctionType
specifing if the function is expressed in the local coordinates (_bft_traction_local
) or in the
global system of coordinates (_bft_traction
).
static void lin_load(double * position, double * load,
Real * normal, UInt surface_id){
memset(load,0,sizeof(Real)*3);
load[1] = position[0]*position[0]-250;
}
int main(){
...
model.computeForcesFromFunction<_bernoulli_beam_2>(lin_load,
_bft_traction_local);
...
}
Static Analysis¶
The StructuralMechanicsModel
class can perform static analyses of structures. In this case, the equation to solve is the same as for the SolidMechanicsModel
used for static analyses
where \(\mat{K}\) is the global stiffness matrix, \(\vec{u}\) the generalized displacement vector and \(\vec{f_{\st{ext}}}\) the vector of generalized external forces applied to the system.
To solve such a problem, the static solver of the
StructuralMechanicsModel
object
is used. First a model has to be created and initialized.
StructuralMechanicsModel model(mesh);
model.initFull();
model.initFull
initializes all internal vectors to zero.
Once the model is created and initialized, the boundary conditions can be set as explained in Section Setting Boundary Conditions. Boundary conditions will prescribe the external forces or moments for the free degrees of freedom \(\vec{f_{\st{ext}}}\) and displacements or rotations for the others. To completely define the system represented by equation (Eq. 9), the global stiffness matrix \(\mat{K}\) must be assembled.
model.assembleStiffnessMatrix();
The computation of the static equilibrium is performed using the same Newton-Raphson algorithm as described in Section~ref{sect:smm:static}.
note{To date, StructuralMechanicsModel
handles only constitutively and
geometrically linear problems, the algorithm is therefore guaranteed to converge
in two iterations.}
model.solveStep();
model.solveStep
solves the Eq. 9. The increment vector of the model will contain the new increment of displacements, and the displacement_rotation vector is also updated to the new displacements.
At the end of the analysis, the final solution is stored in the
displacement_rotation vector. A full example of how to solve a structural
mechanics problem is presented in the code
example/structural_mechanics/bernoulli_beam_2_example.cc
. This example is
composed of a 2D beam, clamped at the left end and supported by two rollers as
shown in Fig. 28. The problem is defined by the
applied load \(q=6 \text{\kN/m}\), moment \(\bar{M} = 3.6 \text{kN m}\),
moments of inertia \(I_1 = 250\,000 \text{cm}^4\) and \(I_2 = 128\,000
\text{cm}^4\) and lengths \(L_1 = 10\text{m}\) and \(L_2 = 8\text{m}\).
The resulting rotations at node two and three are \(\varphi_2 = 0.001\,167\)
and \(\varphi_3 = -0.000\,771\).
Fig. 28 2D beam example¶