-
Notifications
You must be signed in to change notification settings - Fork 286
[GeoMechanicsApplication] Add 1D functionality to existing 2D/3D Pw element #12292
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
29a66c6
Added pressure line element
mnabideltares d20b2a0
Added fluid_body_vector and projected the gravity along the element
mnabideltares ff9aac0
Cleaned unused variable(s)
mnabideltares 11cef1c
Merge branch 'master' into geo/12267-add-1d-pressure-element
mnabideltares 7897c9e
Added 8 test cases
mnabideltares c098b94
cleanup
mnabideltares 8df634f
modifications based on sonar code smells
mnabideltares 295c41f
clean up
mnabideltares c6008ed
Added 3D pressure line element + test cases
mnabideltares c1eb8bc
modifications based on review
mnabideltares c106ce8
modifications based on review 2
mnabideltares 3ac1dbe
modifications based on review 3
mnabideltares ec4b4d9
README.md is added for the test cases
mnabideltares 58c8e95
fix README
mnabideltares 22d8610
another fix README
mnabideltares dcc107b
fix
mnabideltares c46fb69
a small fix in README.md
mnabideltares 491de4f
Fixed variable names to camel case for input parameters
mnabideltares 1711f5d
Modifications based on review comments
mnabideltares 3766518
Modifications based on review comments - continue
mnabideltares File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
applications/GeoMechanicsApplication/custom_elements/transient_Pw_line_element.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // KRATOS___ | ||
| // // ) ) | ||
| // // ___ ___ | ||
| // // ____ //___) ) // ) ) | ||
| // // / / // // / / | ||
| // ((____/ / ((____ ((___/ / MECHANICS | ||
| // | ||
| // License: geo_mechanics_application/license.txt | ||
| // | ||
| // Main authors: Mohamed Nabi | ||
| // John van Esch | ||
| // Gennady Markelov | ||
| // | ||
|
|
||
| #include "custom_elements/transient_Pw_line_element.h" | ||
|
|
||
| namespace Kratos | ||
| { | ||
|
|
||
| template class TransientPwLineElement<2, 2>; | ||
| template class TransientPwLineElement<2, 3>; | ||
| template class TransientPwLineElement<2, 4>; | ||
| template class TransientPwLineElement<2, 5>; | ||
| template class TransientPwLineElement<3, 2>; | ||
| template class TransientPwLineElement<3, 3>; | ||
|
|
||
markelov208 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } // Namespace Kratos | ||
393 changes: 393 additions & 0 deletions
393
applications/GeoMechanicsApplication/custom_elements/transient_Pw_line_element.h
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
applications/GeoMechanicsApplication/tests/test_pressure_line_element.py
rfaasse marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import os | ||
|
|
||
| import KratosMultiphysics.KratosUnittest as KratosUnittest | ||
| import test_helper | ||
|
|
||
| class KratosGeoMechanicsTransientPressureLineElementTests(KratosUnittest.TestCase): | ||
| """ | ||
| This class contains benchmark tests which are checked with the regression on a previously obtained value. | ||
| """ | ||
| etalon_value1 = -20000.0 | ||
|
|
||
| def setUp(self): | ||
| # Code here will be placed BEFORE every test in this TestCase. | ||
| pass | ||
|
|
||
| def tearDown(self): | ||
| # Code here will be placed AFTER every test in this TestCase. | ||
| pass | ||
|
|
||
| def check_water_pressure(self, test_name, etalon_value): | ||
| file_path = test_helper.get_file_path(os.path.join('test_pressure_line_element', test_name)) | ||
| simulation = test_helper.run_kratos(file_path) | ||
| pressure = test_helper.get_water_pressure(simulation) | ||
| self.assertAlmostEqual(etalon_value, pressure[2]) | ||
|
|
||
| def test_oblique_line_element2D2N(self): | ||
| self.check_water_pressure("test_oblique_line_element2D2N", self.etalon_value1) | ||
|
|
||
| def test_oblique_line_element2D3N(self): | ||
| self.check_water_pressure("test_oblique_line_element2D3N", self.etalon_value1) | ||
|
|
||
| def test_oblique_line_element2D4N(self): | ||
| self.check_water_pressure("test_oblique_line_element2D4N", self.etalon_value1) | ||
|
|
||
| def test_oblique_line_element2D5N(self): | ||
| self.check_water_pressure("test_oblique_line_element2D5N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element2D2N(self): | ||
| self.check_water_pressure("test_vertical_line_element2D2N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element2D3N(self): | ||
| self.check_water_pressure("test_vertical_line_element2D3N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element2D4N(self): | ||
| self.check_water_pressure("test_vertical_line_element2D4N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element2D5N(self): | ||
| self.check_water_pressure("test_vertical_line_element2D5N", self.etalon_value1) | ||
|
|
||
| def test_oblique_line_element3D2N(self): | ||
| self.check_water_pressure("test_oblique_line_element3D2N", self.etalon_value1) | ||
|
|
||
| def test_oblique_line_element3D3N(self): | ||
| self.check_water_pressure("test_oblique_line_element3D3N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element3D2N(self): | ||
| self.check_water_pressure("test_vertical_line_element3D2N", self.etalon_value1) | ||
|
|
||
| def test_vertical_line_element3D3N(self): | ||
| self.check_water_pressure("test_vertical_line_element3D3N", self.etalon_value1) | ||
|
|
||
| if __name__ == '__main__': | ||
| KratosUnittest.main() |
29 changes: 29 additions & 0 deletions
29
...GeoMechanicsApplication/tests/test_pressure_line_element/Common/MaterialParameters2D.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "properties": [{ | ||
| "model_part_name" : "PorousDomain.filter", | ||
| "properties_id" : 1, | ||
| "Material" : { | ||
| "constitutive_law" : { | ||
| "name" : "GeoLinearElasticPlaneStrain2DLaw" | ||
| }, | ||
| "Variables" : { | ||
| "IGNORE_UNDRAINED" : false, | ||
| "YOUNG_MODULUS" : 1.000000e+07, | ||
| "POISSON_RATIO" : 0.000000e+00, | ||
| "DENSITY_SOLID" : 2.650000e+03, | ||
| "DENSITY_WATER" : 1.000000e+03, | ||
| "POROSITY" : 1.000000e-01, | ||
| "BULK_MODULUS_SOLID" : 9.000000e+19, | ||
| "BULK_MODULUS_FLUID" : 1.000000e+20, | ||
| "PERMEABILITY_XX" : 9.084000e-06, | ||
| "DYNAMIC_VISCOSITY" : 1.000000e-03, | ||
| "BIOT_COEFFICIENT" : 1.000000e+00, | ||
| "RETENTION_LAW" : "SaturatedLaw", | ||
| "SATURATED_SATURATION" : 1.000000e+00, | ||
| "RESIDUAL_SATURATION" : 0.000000e+00 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is RESIDUAL_SATURATION needed for the SaturatedLaw? The 3D materials parameters files shows that it is possible without. |
||
| }, | ||
| "Tables": { | ||
| } | ||
| } | ||
| }] | ||
| } | ||
28 changes: 28 additions & 0 deletions
28
...GeoMechanicsApplication/tests/test_pressure_line_element/Common/MaterialParameters3D.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "properties": [{ | ||
| "model_part_name" : "PorousDomain.filter", | ||
| "properties_id" : 1, | ||
| "Material" : { | ||
| "constitutive_law" : { | ||
| "name" : "LinearElasticK03DLaw" | ||
| }, | ||
| "Variables" : { | ||
| "IGNORE_UNDRAINED" : false, | ||
| "YOUNG_MODULUS" : 1.000000e+07, | ||
| "POISSON_RATIO" : 0.000000e+00, | ||
| "DENSITY_SOLID" : 2.650000e+03, | ||
| "DENSITY_WATER" : 1.000000e+03, | ||
| "POROSITY" : 1.000000e-01, | ||
| "BULK_MODULUS_SOLID" : 9.000000e+19, | ||
| "BULK_MODULUS_FLUID" : 1.000000e+20, | ||
| "PERMEABILITY_XX" : 9.084000e-06, | ||
| "DYNAMIC_VISCOSITY" : 1.000000e-03, | ||
| "BIOT_COEFFICIENT" : 1.000000e+00, | ||
| "RETENTION_LAW" : "SaturatedLaw", | ||
| "SATURATED_SATURATION" : 1.000000e+00 | ||
| }, | ||
| "Tables": { | ||
| } | ||
| } | ||
| }] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.