-
Notifications
You must be signed in to change notification settings - Fork 269
[GeoMechanicsApplication] Add thermal constitutive law #11747
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
Conversation
- cleaned a bit thermal_dispersion_2D_law files.
- replace 2 with constexpr
Based on Mohamed's feedback, the newly created variables have been replaced by the values of a new (plain) `enum`. Later on, we need to replace the plain `enum` by a scoped `enum` (which is more modern and safer to use).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear and understandable code and great to see the unit tests are added.
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_2D_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_2D_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_2D_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_2D_law.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_2D_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
{ | ||
KRATOS_TRY | ||
|
||
const double cWater = rProp[POROSITY] * rProp[SATURATION]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the SATURATION, @WPK4FEM proposed to investate if we could re-use the retention laws that are already there instead of having this new entry in the MaterialParameters.json. I think it would be a good idea to discuss this in office.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks nice and clean. I only have several minor comments and suggestions.
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_retention/retention_law.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/geo_mechanics_application_constants.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
KRATOS_TEST_CASE_IN_SUITE(GetWorkingSpaceDimension_ReturnsCorrectValue, KratosGeoMechanicsFastSuite) | ||
{ | ||
const SizeType dimension = 3; | ||
GeoThermalDispersionLaw geo_thermal_dispersion_2D_law(dimension); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also rename this local variable for consistency:
GeoThermalDispersionLaw geo_thermal_dispersion_2D_law(dimension); | |
GeoThermalDispersionLaw geo_thermal_dispersion_3D_law(dimension); |
And perhaps also add a check (in this test case) for the 2D case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected
Anne, thank you for the comments. A new commit has just been done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice. Thanks for the hard work Gennady!
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/thermal_dispersion_law.cpp
Outdated
Show resolved
Hide resolved
Hi Anne, thank you for the info on code smells and high esteem of my work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're ready to merge. Please Gennady, feel free to press the button :-)
Good morning Anne, unfortunately there is a failed test, MeshMovingApplication. I think this is not GeoMechanics but it blocks the merge button. Is there a 'secret' button to accept failed tests? GitLab has it. |
Yes, we've noticed ;-) I have pressed the button to rerun the failed jobs. Not sure whether that will help, but let's try. I'm not aware of any "secret" button to accept failed tests. |
📝 Description
A brief description of the PR.
🆕 Changelog
Please summarize the changes in one list to generate the changelog:
E.g.