Skip to content
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 19 commits into from
Mar 3, 2021

Conversation

cgeudeker
Copy link
Contributor

@cgeudeker cgeudeker commented Feb 10, 2021

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.

KV_boundary_eqs

Equations for calculating P-wave (c_p) and S-wave (c_s) velocities:

wave_velocities

is the constrained modulus, calculated as

Equations for calculating corresponding spring coefficients:

spring_coeffs

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

    properties_["pwave_velocity"] = vp_;
    properties_["swave_velocity"] = vs_;

@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #705 (30ef52e) into develop (4c93b20) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #705   +/-   ##
========================================
  Coverage    96.78%   96.78%           
========================================
  Files          130      130           
  Lines        25882    25899   +17     
========================================
+ Hits         25048    25065   +17     
  Misses         834      834           
Impacted Files Coverage Δ
include/materials/linear_elastic.h 100.00% <ø> (ø)
include/materials/linear_elastic.tcc 100.00% <100.00%> (ø)
tests/materials/linear_elastic_test.cc 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27086f7...30ef52e. Read the comment docs.

Comment on lines 84 to 89
//! 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()};
Copy link
Contributor

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.

Copy link
Contributor

@kks32 kks32 left a 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
    }

@cgeudeker
Copy link
Contributor Author

@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.

@kks32
Copy link
Contributor

kks32 commented Feb 22, 2021

@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 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.? Please add the input file example in the PR description

@kks32
Copy link
Contributor

kks32 commented Feb 22, 2021

REQUIRE(material->template property<double>("density") ==
Reference for how to get a specific material property

Comment on lines 16 to 21
// Special material properties
if (material_properties.contains("earthquake")) {
bool earthquake =
material_properties.at("earthquake").template get<bool>();

if (earthquake) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Special material properties
if (material_properties.contains("earthquake")) {
bool earthquake =
material_properties.at("earthquake").template get<bool>();
if (earthquake) {

Comment on lines 31 to 32
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}


SECTION("LinearElastic check properties earthquake") {
unsigned id = 0;
jmaterial["p_wave_velocity"] = 116.023870223;
Copy link
Contributor

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.

Comment on lines 80 to 83
//! S-Wave Velocity
double s_wave_velocity_{std::numeric_limits<double>::max()};
//! P-Wave Velocity
double p_wave_velocity_{std::numeric_limits<double>::max()};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! 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()};

Comment on lines 23 to 24
p_wave_velocity_ = sqrt(constrained_modulus / density_);
s_wave_velocity_ = sqrt(shear_modulus / density_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
p_wave_velocity_ = sqrt(constrained_modulus / density_);
s_wave_velocity_ = sqrt(shear_modulus / density_);
vp_ = sqrt(constrained_modulus / density_);
vs_ = sqrt(shear_modulus / density_);

include/materials/linear_elastic.tcc Show resolved Hide resolved
Comment on lines 151 to 152
jmaterial["p_wave_velocity"] = 116.023870223;
jmaterial["s_wave_velocity"] = 62.0173672946;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check in 3D too

@kks32 kks32 requested a review from jgiven100 March 2, 2021 21:09
@kks32
Copy link
Contributor

kks32 commented Mar 2, 2021

@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

@kks32 kks32 changed the title Linear Elastic Material Properties for #692 Add shear and compression wave velocities to Linear Elastic Material Properties for #692 Mar 2, 2021
Copy link
Collaborator

@jgiven100 jgiven100 left a 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants