-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type traits for mechanical problems #45
Comments
Constitutive modelThe design for the constitutive model needs to handle the stress update and tangent matrix operator at the same time. The explicit simulations do not require a material tangent but only the stress update. A constitutive model dictates:
The dependency starts with the choice of the constitutive model. This should then have an |
An outline of all the possible cases this design would need to account for are listed here. Linear theoryDisplacement formulationThe assembly and solution of the linear system
and each theory uses a special form of the
Linear eigenvalue bucklingFor buckling problems the above displacement formulation is required to be solved along with the assembly pre-stress matrix or geometric stiffness matrix for the current configuration. An eigenvalue problem results for the buckling. The requirement is that the linear material tangent is build alongside the geometric stiffness. Natural frequency analysisNatural frequency problems require the solution of Non-linear theoryUpdated and total Lagrange formulations. LATIN for non-incremental method. |
The enum characterisations could be: namespace mechanical
{
enum class type {
/// C1 beam theory with Hermite interpolation
euler_beam,
/// C0 beam theory
beam,
shell,
axisymmetric,
plane_stress,
plane_strain,
solid};
enum class material {linear, nonlinear};
enum class deformation {small, finite};
enum class method {perturbation, incremental, latin};
enum class lagrangian {total, updated};
} where the impossible combinations could be disallowed at compile time. |
Fixed size numerical structures (vectors and matrices) are critical to extracting the maximum performance out of the code by providing as much information as possible to the optimiser. Depending on each simulation type, the matrices representing the material tangent, stress and deformation tensors are known. Some generic classes, for example the internal variables class, already take template parameters for the size of the rank two and rank four tensor. The dimension information (one, two or three) and the degrees of freedom can be encoded into these traits.
To deal with the quirks of each simulation type (axisymmetric, plate, shell, solid, beam, plane strain and plane stress) we should introduce a traits class that specifies this information for each simulation type. This generates a little additional work but should encapsulate the size information.
Firstly, we need to introduce a strongly-typed enum to provide a compile-time logic.
This should be able to handle the unsymmetrical 9x9 constitutive models for three-dimensional theory if required through the template parameter. In addition, if analysis specific post-processing steps are required, further template specialisations can be used for the parts which are not common.
A downside of this approach is the additional boiler plate and the fact that most of the implemented code will still be dependent on the type with what code can be reused, will be.
The text was updated successfully, but these errors were encountered: