Add shear and compression wave velocities to Linear Elastic Material Properties for #692#705
Add shear and compression wave velocities to Linear Elastic Material Properties for #692#705cbgeo merged 19 commits intocb-geo:developfrom
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.
Remove all these lines as it is not good to store layer thickness in the material. Should be computed at the nodes.
|
@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.
| // 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
| } | ||
| } |
|
|
||
| SECTION("LinearElastic check properties earthquake") { | ||
| unsigned id = 0; | ||
| jmaterial["p_wave_velocity"] = 116.023870223; |
There was a problem hiding this comment.
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.
| //! 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.
| 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.
| 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 = |
|
@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 |
jgiven100
left a comment
There was a problem hiding this comment.
@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:
Equations for calculating corresponding spring coefficients:
Additionally, constrained modulus and shear modulus were calculated.
layer_thicknesswas 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