-
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 Absorbing Boundary #692 #703
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #703 +/- ##
============================================
+ Coverage 83.91% 96.78% +12.87%
============================================
Files 169 130 -39
Lines 34176 25934 -8242
============================================
- Hits 28676 25098 -3578
+ Misses 5500 836 -4664
Continue to review full report at Codecov.
|
@kks32 Maybe this would be a good PR to start pushing to a new earthquake branch? |
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 your first PR. Nice work!
If the boundary nodes are only supported by the Lysmer-Kuhlmeyer dashpots, it would result in creep because of the stresses from the soil body and will continue to deform. I would suggest adding a spring + dashpot to avoid this effect similar to a Kelvin-Voigt type boundary. Thanks for the unit test. However, I suggest a benchmark problem, create a linear elastic solid block supported on just the dashpots on one end and free on the other. At the free surface, apply an instantaneous vertical load and see what happens to the displacements at the dashpot end, you'll notice creep. This issue needs to be fixed to be able to use a good absorbing boundary.
@@ -299,6 +308,10 @@ class Node : public NodeBase<Tdim> { | |||
Eigen::Matrix<double, Tdim, Tnphases> acceleration_; | |||
//! Velocity constraints | |||
std::map<unsigned, double> velocity_constraints_; | |||
//! Absorbing Constraints | |||
std::tuple<unsigned, double, double> absorbing_constraints_; | |||
//! Absorbing Traction |
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 variable is not needed
@@ -201,6 +201,15 @@ class Node : public NodeBase<Tdim> { | |||
//! Apply velocity constraints | |||
void apply_velocity_constraints() override; | |||
|
|||
//! Assign absorbing constraint | |||
//! \param[in] pwave_v P-wave velocity |
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 and s-wave should be material properties too, not nodal properties.
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.
Hi, so I've been able to understand and make most of your other suggestions barring this one. How would I be able to access these values from the material properties? I had thought it would be through property_handle_
but I'm currently getting an error about segmentation violation when I run ./mpmtest and it calls the function where I do this. Perhaps this is the right method but I need to initialize the properties somewhere. Thanks for your help
static_cast<unsigned>(dir), static_cast<double>(pwave_v), | ||
static_cast<double>(swave_v)); | ||
} else | ||
throw std::runtime_error("Constraint direction is out of bounds"); |
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.
Please be specific on the constraint
@@ -346,6 +350,62 @@ void mpm::Node<Tdim, Tdof, Tnphases>::apply_velocity_constraints() { | |||
} | |||
} | |||
|
|||
//! Assign absorbing constraints | |||
template <unsigned Tdim, unsigned Tdof, unsigned Tnphases> | |||
bool mpm::Node<Tdim, Tdof, Tnphases>::assign_absorbing_constraint( |
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.
Let's change the function to void
unsigned dir, double pwave_v, double swave_v) { | ||
bool status = true; | ||
try { | ||
if (dir < Tdim) { |
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 this condition as assert
|
||
// Calculate Traction Forces | ||
if (dir == dir_n) { | ||
traction = -velocity * mass_density * pwave_v; |
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'd suggest adding a dimensionless damping co-efficient.
// Create Traction Value | ||
double traction; | ||
|
||
for (unsigned dir = 0; dir < Tdim; ++dir) { |
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.
Instead of a for loop create an Eigen::Matrix<double, Tdim, 1> wave_velocity = swave_velocity
and set the normal direction to pwave_velocity then use a cwiseProduct to do the multiplication so you don't need a for loop.
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.
You probably need absorbing boundaries on all phases
node->apply_absorbing_constraint(); | ||
|
||
// Define traction variables | ||
double traction_normal; |
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.
No need to predefine variables
@@ -683,6 +683,93 @@ TEST_CASE("Node is checked for 2D case", "[node][2D]") { | |||
// TODO Assert: REQUIRE_NOTHROW(node->update_external_force(false, 1, | |||
// force_bad)); | |||
|
|||
SECTION("Check absorbing constraint") { | |||
// Set external force to 0 |
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.
Could you use an already existing function, so you don't have to redefine and check all the momenta and forces?
Hi @kks32, thanks so much for your thoughtful comments! Really appreciate it. We are making the benchmark as well, but do you have a reference to a problem? I am struggling to make a problem because the answer is not quite analytical. In addition, does it mean you do not want the unit test (I hope you still want it :P). Thanks once again! |
Hi @ezrayst What benchmark problem are you creating? Could you please elaborate. I was thinking a linear elastic rectangular block which is 1 m thick and 1 m long supported on dashpots. Apply an instantaneous load and see how the displacement gets damped. You can compare the results against (a) fixed displacement boundary (in this case the stress will get doubled, once the wave reflects), (b) dashpot-alone, I expect this to creep, and (c) spring-dashpot system. |
Closing this PR as #703 supersedes this PR. |
Describe the PR
Adding an absorbing boundary for earthquake simulations.
Related Issues/PRs
Part 2 of #692 (Most of the below information can be found here)
Additional context
Dashpots provide normal and shear traction along boundaries to dissipate the ground motion. Traction values are computed according to the following equations from Lysmer and Kuhlemeyer (1969).
Traction values are included in the governing equation for calculating acceleration. The direction input refers to the normal direction.