KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.02k stars 245 forks source link

[GeoMechanicsApplication] Investigate the Structural Elements in GeoMechanics #12198

Closed rfaasse closed 6 months ago

rfaasse commented 6 months ago

Reset Displacements

In this issue, the aim is to investigate if the 'reset_displacements' functionality we have in Geomechanics can be obtained by re-using the elements from structural mechanics. If this is possible, this would allow us to remove a lot of redundant duplication, as we have a significant number of 'geo-structural' classes, which do not add a lot of value, except for the reset displacements functionality (see also the tree structure in the snippet as an overview of all 'geo-structural' classes.

Image

The reset-displacement functionality, adds the internal stress state of a previous stage to the current stage, such that the reference changes. This makes it possible to split a geomechanical calculation (e.g. settlement) into several stages. We could first have a (or multiple) stage(s) to consolidate and settle the soil and create the internal stresses due to gravity loading, pore pressures etc. Afterwards, we could have another stage to simulate e.g. settlement from that point in time onwards. Due to the reset displacements functionality.

To get this functionality without using a geo-specific element to save the internal state and apply it to later steps, there are two steps that need to be taken:

  1. Get the relevant internal stress.
  2. Apply the stress obtained in step 1 to the internal stresses in later stages (to change the reference).

Step 2 has been investigated and can be done using the ConstitutiveLaw::InitialState. As seen in #12197, a process is created (called reset_displacements_process), which sets the INITIAL_STRESS_VECTOR (right now hard-coded, tailored to the relevant truss test), and uses the SetInitialStateProcess to save it in the constitutive law. The constitutive law then needs a minor change to apply this initial stress to a given stress vector. Using this process with hard-coded numbers, we were able to get the 'reset_displacement' test for a truss element pass, while using structural elements (TrussLinearElement3D2N instead of GeoLinearTrussElement2D2N, note that the dimension is different, since there is no 2D2N structural element, this would probably need to be added).

For step 1 (getting the relevant internal stress), some more changes need to be done in the element, since the relevant internal stresses are only a part of the RHS. Therefore, it's not trivial to obtain this internal stress from the element in the current state.

Geo Truss elements

Differences Between GeoTrussElementBase + GeoTrussElement and Truss3D2N elements in structural mechanics application:

  1. Geo version has template parameters for dimension and number of nodes, in structural this is hard-coded 3D2N
  2. Geo version does not calculate LOCAL_ELEMENT_ORIENTATION
  3. Geo version misses HasSelfWeight and GetSpecifications
  4. Geo version has functionality for reset displacement.

Related issue: https://github.com/KratosMultiphysics/Kratos/issues/11465

rfaasse commented 6 months ago

@WPK4FEM, I documented the current state of the investigation in the description of the issue, including the experimental/discussion PR to create a reset displacements process. When you have some time, could you have a look to see if this is enough to close this issue?

WPK4FEM commented 6 months ago

@rfaasse Yes I think this completes the investigation. Next steps: