-
Notifications
You must be signed in to change notification settings - Fork 83
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #705 +/- ##
========================================
Coverage 96.78% 96.78%
========================================
Files 130 130
Lines 25882 25899 +17
========================================
+ Hits 25048 25065 +17
Misses 834 834
Continue to review full report at Codecov.
|
include/materials/linear_elastic.h
Outdated
//! Layer Thickness | ||
double layer_thickness_{std::numeric_limits<double>::max()}; | ||
//! P Spring Coefficient | ||
double p_spring_coeff_{std::numeric_limits<double>::max()}; | ||
//! S Spring Coefficient | ||
double s_spring_coeff_{std::numeric_limits<double>::max()}; |
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.
Remove all these lines as it is not good to store layer thickness in the material. Should be computed at the nodes.
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.
In the PR description could you add how the input file would look like for the linear elastic part?
Instead of a separate boolean, maybe the best option would be to:
"earthquake": {
"shear_wave_velocity": 300,
"compression_wave_velocity": 600
}
@kks32 I updated the PR description. In short though, I felt that a boolean parameter worked better since it is just determining whether or not the P-wave and S-wave properties would be calculated. Alternatively though if we want to be able to input them as well, perhaps overwriting the calculation that would have been made otherwise than I think your approach would make more sense. |
@cgeudeker The boolean doesn't do anything, you can set it to true and not actually define vs or vp. I don't understand what you mean by |
mpm/tests/materials/norsand_test.cc Line 70 in c9630b3
|
include/materials/linear_elastic.tcc
Outdated
// 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 comment
The reason will be displayed to describe this comment to others. Learn more.
// Special material properties | |
if (material_properties.contains("earthquake")) { | |
bool earthquake = | |
material_properties.at("earthquake").template get<bool>(); | |
if (earthquake) { |
include/materials/linear_elastic.tcc
Outdated
} | ||
} |
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.
} | |
} |
|
||
SECTION("LinearElastic check properties earthquake") { | ||
unsigned id = 0; | ||
jmaterial["p_wave_velocity"] = 116.023870223; |
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 is an incorrect text, you can't pass the values of p_wave and s_wave velocity and check if that's correct.
include/materials/linear_elastic.h
Outdated
//! S-Wave Velocity | ||
double s_wave_velocity_{std::numeric_limits<double>::max()}; | ||
//! P-Wave Velocity | ||
double p_wave_velocity_{std::numeric_limits<double>::max()}; |
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.
//! S-Wave Velocity | |
double s_wave_velocity_{std::numeric_limits<double>::max()}; | |
//! P-Wave Velocity | |
double p_wave_velocity_{std::numeric_limits<double>::max()}; | |
//! Compressional Wave Velocity | |
double vp_{std::numeric_limits<double>::max()}; | |
//! Shear wave Velocity | |
double vs_{std::numeric_limits<double>::max()}; |
include/materials/linear_elastic.tcc
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
p_wave_velocity_ = sqrt(constrained_modulus / density_); | |
s_wave_velocity_ = sqrt(shear_modulus / density_); | |
vp_ = sqrt(constrained_modulus / density_); | |
vs_ = sqrt(shear_modulus / density_); |
jmaterial["p_wave_velocity"] = 116.023870223; | ||
jmaterial["s_wave_velocity"] = 62.0173672946; |
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.
jmaterial["p_wave_velocity"] = 116.023870223; | |
jmaterial["s_wave_velocity"] = 62.0173672946; |
jmaterial["p_wave_velocity"] = 116.023870223; | ||
jmaterial["s_wave_velocity"] = 62.0173672946; | ||
|
||
auto material = |
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.
Check in 3D too
@jgiven100 Hi Joel if you have some time could you please review this? I'm happy with the changes to calculate shear wave and compression wave velocities in Linear Elastic model |
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.
@cgeudeker Thanks for adding vs_
and vp_
to the linear elastic model. This looks great!
@kks right now we don't have linear elastic
documentation online (probably since the model only consists of an elastic tensor). Do we want to start a documentation page for linear elastic
if we will be adding more features to the model for earthquake MPM?
Describe the PR
Add shear and compression wave velocities to linear elastic material properties related to #692 .
Related Issues/PRs
Related to #692, specifically Kelvin-Voigt boundary.
Additional context
The following gives information that can also be found in the following paper. Kelvin-Voigt boundary elements operate as a dashpot, spring system according to the following equations.
Equations for calculating P-wave (c_p) and S-wave (c_s) velocities:
is the constrained modulus, calculated as
Equations for calculating corresponding spring coefficients:
Additionally, constrained modulus and shear modulus were calculated.
layer_thickness
was the only value that could not be calculated by the already existent material properties.Input File Format:
P-wave and S-wave velocities are automatically calculated using values already defined in linear elastic properties. The values are then recorded into the JSON material properties object