Skip to content
Snippets Groups Projects
Commit 5a1830a3 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Velocity stepping tests

parent 3a1ef7f1
No related branches found
No related tags found
No related merge requests found
...@@ -323,6 +323,33 @@ int main(int argc, char *argv[]) { ...@@ -323,6 +323,33 @@ int main(int argc, char *argv[]) {
<< std::endl; << std::endl;
} }
// Comparison with the analytic solution of a velocity stepping test
// with the Ruina state evolution law.
// Jumps at 120 and 360 timesteps; v1 = .6 * v2;
if (parset.get<bool>("printVelocitySteppingComparison")) {
double const v = u4_diff[first_frictional_node].two_norm() / h / L;
if (run >= 120) {
double const euler = (*s4_new)[first_frictional_node];
double direct;
if (run < 360) {
double const v2 = v;
double const v1 = 0.6 * v2;
direct = std::log(
1.0 / v2 *
std::pow((v2 / v1), std::exp(-v2 * (run - 120) * h)));
} else {
double const v1 = v;
double const v2 = v1 / 0.6;
direct = std::log(
1.0 / v1 *
std::pow((v1 / v2), std::exp(-v1 * (run - 360) * h)));
}
std::cout << "[" << run << "]: " << euler << " " << direct << " "
<< (euler - direct) / direct << std::endl;
}
}
// Record the coefficient of friction at a fixed node // Record the coefficient of friction at a fixed node
if (parset.get<bool>("printCoefficient")) { if (parset.get<bool>("printCoefficient")) {
double const V = u4_diff[first_frictional_node].two_norm(); double const V = u4_diff[first_frictional_node].two_norm();
......
...@@ -9,6 +9,8 @@ printProgress = true ...@@ -9,6 +9,8 @@ printProgress = true
writeEvolution = false writeEvolution = false
writeVTK = false writeVTK = false
printVelocitySteppingComparison = false
[grid] [grid]
refinements = 4 refinements = 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment