Skip to content

[GeoMechanicsApplication] setup a test for the triaxial experiment#14354

Open
Sabine-van-Dijk wants to merge 18 commits intomasterfrom
geo/add-triaxial-test
Open

[GeoMechanicsApplication] setup a test for the triaxial experiment#14354
Sabine-van-Dijk wants to merge 18 commits intomasterfrom
geo/add-triaxial-test

Conversation

@Sabine-van-Dijk
Copy link
Copy Markdown

📝 Description

Set up a test for the triaxial experiment.

Key changes

The Project Properties file needed some changes to be able to run the element_integration_point_values_at_time function.

🆕 Changelog

  • Run a simulation in the element test gui.
  • Export the output files to the test folder
  • Compare the output of the displacement, the Cauchy stress and the engineering strain.

@Sabine-van-Dijk Sabine-van-Dijk self-assigned this Apr 10, 2026
@Sabine-van-Dijk Sabine-van-Dijk added the GeoMechanics Issues related to the GeoMechanicsApplication label Apr 10, 2026
@Sabine-van-Dijk Sabine-van-Dijk requested a review from a team as a code owner April 10, 2026 13:24
Copy link
Copy Markdown
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sabine,

Thank you for a good start of this test. You will find a lot of comments which are largely a direct result of how it was done for the element test software setup, hopefully they just help to make it even better. Please have a look at the remarks and also the following:

  • Maybe a natural place for this new test is withing tests/test_element_lab

Regards, Wijtze Pieter

Comment thread applications/GeoMechanicsApplication/tests/test_triaxial/MaterialParameters.json Outdated
Comment thread applications/GeoMechanicsApplication/tests/test_triaxial/ProjectParameters.json Outdated
Comment thread applications/GeoMechanicsApplication/tests/test_triaxial/ProjectParameters.json Outdated
Comment thread applications/GeoMechanicsApplication/tests/test_triaxial/ProjectParameters.json Outdated
from applications.GeoMechanicsApplication.tests import test_helper
from kratos.python_scripts import KratosUnittest

class KratosGeoMechanicsTriaxialTests(KratosUnittest.TestCase):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have this test running automatically in one of the test suites, its class name needs to be added in one of the lists of test cases in test_GeoMechanicsApplication.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be added to small_test_cases list, I think.

Comment on lines +12 to +19
"""
The output for the test was generated for the Mohr Coulomb model using the following material properties:
"YOUNG_MODULUS": 20000.0,
"POISSON_RATIO": 0.25,
"COHESION": 2.0,
"FRICTION_ANGLE": 25.0,
"DILATANCY_ANGLE": 2.0
"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of description I would expect in a REAMDE.md file in this directory with a schematic picture of the test and maybe graphs of the results in time. Please have a look at e.g. the README.md file in tests/building_pit for a very elaborate example.

Copy link
Copy Markdown
Contributor

@indigocoral indigocoral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Sabine, for adding this Triaxial test. It's a very good start indeed. The main change is for the set up of the test which was done by the ElementTest GUI. As Wijtze Pieter has also mentioned, we would need to add a README.md document for this test.

"problem_name": "triaxial",
"parallel_type": "OpenMP",
"echo_level": 1,
"start_time": 0.0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to -0.1 so the cell confining pressure can happen beforehand between time -0.1 till 0.0. And then the prescribed displacement can happen within 100 steps between time 0.0 and time 1.0.

Suggested change
"start_time": 0.0,
"start_time": -0.1,

from applications.GeoMechanicsApplication.tests import test_helper
from kratos.python_scripts import KratosUnittest

class KratosGeoMechanicsTriaxialTests(KratosUnittest.TestCase):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be added to small_test_cases list, I think.

Copy link
Copy Markdown
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sabine,

Its coming closer. Please the test to the testsuite to let it run automagically, change the bottom condition in the picture to rollers and put some well chosen text + the nice picture in a README.md file and then its good to go for me.

Thank you, Wijtze Pieter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fully fixed condition at the bottom of the picture does not match the roller conditions ( only Y fixed ) in the ProjectParameters. As the json file decides what the computation is, please adapt the picture.

},
"time_stepping": {
"time_step": 8.640000000000002e+03,
"time_step": 8.64e+03,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change ( and the other dsettlement project parameters file too ) unrelated to the purpose of the pull request. Still, it is an improvement.

@Sabine-van-Dijk
Copy link
Copy Markdown
Author

Because I added the test to the already existing test_element_lab it was already in the testsuite.

Copy link
Copy Markdown
Contributor

@indigocoral indigocoral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sabine,
Firstly, apologies from my side about the schematic's base condition. Thanks @WPK4FEM for your comment on it.
Thanks for moving the test to the test_element_lab.py and the corresponding folder. And also for applying the requested changes.
I just have a question about adding the material file to the exception list. I thought we would always format the new files and this exception list is for the old files? Perhaps I have missed the decision here....
Although I saw in your commits that the DYNAMIC_VISCOSITY had an unexpected change...

@Sabine-van-Dijk
Copy link
Copy Markdown
Author

I changed the code a bit to do some testing yesterday and thought it was nice to leave it this way with the assertAlmostEqual instead of the assertEqual for future tests

Copy link
Copy Markdown
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sabine,
Lets get this on master. In a later revision, you may want to alter the README sligthly: the top nodes that are moved go from y=1.0 to y=0.8, its the displacement u_y that goes from 0.0 to -0.2
That you form creating a complete set with picture and documentation.
Wijtze Pieter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GeoMechanics Issues related to the GeoMechanicsApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GeoMechanicsApplication] add triaxial integration test to kratos tests

3 participants