b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2element_property_stress_example.C File Reference

Example of a material implementation for stress analysis with 3D elements. More...

#include "b2fortran_element_property.H"
#include "b2material_util.H"
#include "elements/properties/b2solid_mechanics.H"
Include dependency graph for b2element_property_stress_example.C:

Classes

class  b2000::b2dbv3::ElementPropertyStressExample3D
 This is the ElementProperty class that is used by 3D elements. More...
 
class  b2000::b2dbv3::ElementPropertyStressExample25D
 This is the ElementProperty class that is used by shell elements. More...
 
class  b2000::b2dbv3::ElementPropertyStressExample
 

Namespaces

namespace  b2000
 Contains the base classes for implementing Finite Elements.
 

Detailed Description

Example of a material implementation for stress analysis with 3D elements.

Conventions

The conventions for strain, stress and constitutive tensors follow the notation that is used in the book "Finite Element Procedures" by K.J. Bathe.

The components of the Green-Lagrange strain tensor are arranged as

[e11, e22, e33, 2e12, 2e23, 2e13]

The components of the second Piola-Kirchhoff stress tensor are arranged as

[s11, s22, s33, s12, s23, s13]

The constitutive matrix is symmetric and lower-packed, it is a vector with 21 elements that fit into the matrix as follows

0
1 6
2 7 11
3 8 12 15
4 9 13 16 18
5 10 14 17 19 20

Organization of the code

The following code parts are needed:

  1. A function that implements the material model; it receives the Green-Lagrange strain and calculates the second Piola-Kirchhoff stress and the tangent constitutive matrix. Typically, this function is written such that it is independent of B2000++, except that it follows the above-described conventions.
  2. For each of elements (3D, 25D, 2D, etc.), a class that inherits from FortranElementProperty and from one of the SolidMechanics classes. FortranElementProperty contains all data that is stored on the database – the laminate stacking sequence, the material constants, etc. It is called like that for historical reasons. The SolidMechanics class (e.g. SolidMechanics3D<double>) contains the API that is used by the elements. This class extracts the material constants etc., it is also responsible for the transformation of the strain, stress, and constitutive matrix between the basis that is used by the element (branch-global or element covariant/contravariant) and the material reference frame.
  3. The final class inherits from all classes of point 2 and has a type_t member with a name, typically SOLID_MECHANICS.***, so that it is created when B2000++ finds a MATERIAL.* dataset with TYPE=***.

For the classes under point 2 and 3 it is necessary to provide the so-called unique final overriders for the functions in FortranElementProperty and SolidMechanics.

C++ Namespaces

The elements use the C++ namespace b2000. Thus, the SolidMechanics classes are defined in that namespace. The parts of B2000++ that are associated/connected with the database use the C++ namespace b2000::b2dbv3. This means that all the classes in this file are defined in this namespace.