-
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
Apply ground motion input as nodal acceleration constraint #715
base: develop
Are you sure you want to change the base?
Conversation
@@ -358,9 +358,9 @@ std::vector<std::array<mpm::Index, 2>> | |||
// ignore comment lines (# or !) or blank lines | |||
if ((line.find('#') == std::string::npos) && | |||
(line.find('!') == std::string::npos) && (line != "")) { | |||
// ID |
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.
// ID | |
// Particle and cell ids |
unsigned dir() const { return dir_; } | ||
|
||
// Return acceleration | ||
double acceleration(double current_time) const { |
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.
inline this function
//! AccelerationConstraint class to store acceleration constraint on a set | ||
//! \brief AccelerationConstraint class to store a constraint on a set | ||
//! \details AccelerationConstraint stores the constraint as a static value | ||
class AccelerationConstraint { |
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.
Is there a general constraint class from which this could be derived?
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.
Currently, no. But I do agree that we should implement a general constraint from which this one and others (VelocityConstraint
, FrictionConstraint
, Traction
) should be derived. They all have a setid_, dir_ and their main value (acceleration_, velocity_, traction_, or friction_). They only differ on the way these main values are named and if they can or cannot be time-dependent -- i.e. if they can have a pointer to a math function. Currently, only traction and acceleration constraints can be time-dependent.
@thiagordonho is there an elastic wave propagation benchmark that demonstrates this implementation? |
@kks32 I ran two simple simulations of a linear elastic block, no gravity, positioned on top of the bottom boundary. I applied the acceleration-time constraint to the nodes at the bottom boundary. The first simulation considers a sinusoidal math function an the second considers a piecewise linear math function. I will attach the obtained results to the body of the PR description. |
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.
Do you interpolate between timesteps? Is that linear?
void mpm::Mesh<Tdim>::update_nodal_acceleration_constraints( | ||
double current_time) { | ||
// Iterate over all nodal acceleration constraints | ||
for (const auto& nacceleration : nodal_acceleration_constraints_) { |
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.
n
is usually reserved for number not nodal, use nodal_acceleration
Codecov Report
@@ Coverage Diff @@
## develop #715 +/- ##
===========================================
- Coverage 96.78% 96.73% -0.05%
===========================================
Files 130 132 +2
Lines 25899 26456 +557
===========================================
+ Hits 25065 25591 +526
- Misses 834 865 +31
Continue to review full report at Codecov.
|
Describe the PR
This implementation is based on the issue presented in the RFC #692 . It adds a feature to read and apply input ground motion in terms of acceleration-time history.
Related Issues/PRs
Continuation of PR #701.
Additional context
This design involves creating a class for acceleration constraints (
AccelerationConstraint
) based on the already existing class for velocity constraints (VelocityConstraint
). However, a math function can be associated with the acceleration constraint defined from an acceleration-time history input. The acceleration constraints are applied at the nodes with the implementedNode::apply_acceleration_constraint
function within theNode::compute_acceleration_velocity
function as follows:The acceleration-time input, as mentioned, is done with math functions. An additional way to initialize a
”Linear”
math function is to read a.csv
file with the time and respective acceleration entries. This procedure is herein extended from the one presented in PR #701, where the CSVReader header file is used for reading the.csv
file. In this implementation, reading the math function.csv
file was moved to theio/io_mesh_ascii.tcc
within the newly created function calledIOMeshAscii::read_math_functions
:Benchmark tests
To test the implemented feature, a time-dependent acceleration was imposed to a Linear elastic, 2D block. The acceleration was imposed on the nodes at the bottom boundary of a 3 x 2 (width x height) mesh. The mesh has a spacing of 0.25 m. The block is 1 meter high and 1 meter wide. A detail of the model is shown in Figure 1. No gravity was considered in this model. Four particles per cell and direction were considered in this model. The following are the elastic characteristics of the block:
Figure 1; Schematic of the model in its starting position.
Two acceleration-time series were considered for two separate simulations. The charts below show the imposed nodal acceleration at the boundary (Figure 2) and the results of the center of mass of the block (Figure 3 and 4).
Figure 2: Imposed acceleration-time history at the nodes of the bottom boundary.
Figure 3: Horizontal velocity of the center of mass of the block.
Figure 4: Horizontal position of the center of mass of the block.
The velocity of the center of mass shows a slight deviation of the expected results, but the horizontal position of the center of mass is very close to the expected values.