-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add shear and compression wave velocities to Linear Elastic Material Properties for #692 #705
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
32fdba3
initiate absorbing constraint
cgeudeker 2360285
initiate absorbing constraint
cgeudeker 10c6415
initiate bounding constraint update
cgeudeker cee7b4e
Test Case Attempt
cgeudeker 04e38ef
Working Test Case
cgeudeker 7e7ebfc
3D test case
cgeudeker 7210c21
3D test case, clang-format
cgeudeker e1a3c2e
Earthquake Material Property
cgeudeker 917cdbc
Earthquake Material Property
cgeudeker 59bcff1
Earthquake Material Property
cgeudeker d1e42ef
Earthquake Material Properties
cgeudeker dbf0023
Earthquake Material Properties, test case
cgeudeker 3b431c3
Earthquake Material Properties, clang format
cgeudeker b392949
Remove Layer Thickness from material property
cgeudeker 1187ad0
Merge branch 'develop' into material
kks32 de75919
Earthquake Boolean Removal and Fixed Test Case
cgeudeker 8f98064
Earthquake Boolean Removal and Fixed Test Case
cgeudeker 2c44bee
Merge branch 'material' of https://github.com/cgeudeker/mpm into mate…
cgeudeker 30ef52e
Variable renames and 3d Test Case
cgeudeker 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
This file contains 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 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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,9 +9,28 @@ mpm::LinearElastic<Tdim>::LinearElastic(unsigned id, | |||||||||||||
material_properties.at("youngs_modulus").template get<double>(); | ||||||||||||||
poisson_ratio_ = | ||||||||||||||
material_properties.at("poisson_ratio").template get<double>(); | ||||||||||||||
|
||||||||||||||
// Calculate bulk modulus | ||||||||||||||
bulk_modulus_ = youngs_modulus_ / (3.0 * (1. - 2. * poisson_ratio_)); | ||||||||||||||
|
||||||||||||||
// Special material properties | ||||||||||||||
if (material_properties.contains("earthquake")) { | ||||||||||||||
bool earthquake = | ||||||||||||||
material_properties.at("earthquake").template get<bool>(); | ||||||||||||||
|
||||||||||||||
if (earthquake) { | ||||||||||||||
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.
Suggested change
|
||||||||||||||
// Calculate constrained and shear modulus | ||||||||||||||
double constrained_modulus = | ||||||||||||||
youngs_modulus_ * (1. - poisson_ratio_) / | ||||||||||||||
((1. + poisson_ratio_) * (1. - 2. * poisson_ratio_)); | ||||||||||||||
double shear_modulus = youngs_modulus_ / (2.0 * (1. + poisson_ratio_)); | ||||||||||||||
|
||||||||||||||
// Calculate wave velocities | ||||||||||||||
p_wave_velocity_ = sqrt(constrained_modulus / density_); | ||||||||||||||
s_wave_velocity_ = sqrt(shear_modulus / density_); | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
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.
Suggested change
|
||||||||||||||
|
||||||||||||||
kks32 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
properties_ = material_properties; | ||||||||||||||
// Set elastic tensor | ||||||||||||||
this->compute_elastic_tensor(); | ||||||||||||||
|
This file contains 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 |
---|---|---|
|
@@ -147,6 +147,15 @@ TEST_CASE("LinearElastic is checked in 2D", "[material][linear_elastic][2D]") { | |
REQUIRE(stress(4) == Approx(0.00000000000000e+00).epsilon(Tolerance)); | ||
REQUIRE(stress(5) == Approx(0.00000000000000e+00).epsilon(Tolerance)); | ||
} | ||
|
||
SECTION("LinearElastic check properties earthquake") { | ||
unsigned id = 0; | ||
jmaterial["earthquake"] = true; | ||
|
||
auto material = | ||
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. Check in 3D too |
||
Factory<mpm::Material<Dim>, unsigned, const Json&>::instance()->create( | ||
"LinearElastic2D", std::move(id), jmaterial); | ||
} | ||
} | ||
|
||
//! Check linearelastic class in 3D | ||
|
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.
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.