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

Kill velocity stepping

parent de57cc3d
No related branches found
No related tags found
No related merge requests found
......@@ -280,8 +280,6 @@ int main(int argc, char *argv[]) {
std::fstream displacement_writer("displacement", std::fstream::out);
std::fstream velocity_writer("velocity", std::fstream::out);
std::fstream coefficient_writer("coefficient", std::fstream::out);
std::fstream velocity_stepping_writer("velocity_stepping",
std::fstream::out);
timer.reset();
auto const L = parset.get<double>("boundary.friction.ruina.L");
......@@ -292,10 +290,6 @@ int main(int argc, char *argv[]) {
auto const timesteps = parset.get<size_t>("timeSteps");
double const tau = 1.0 / timesteps;
velocity_stepping_writer << "# name: B" << std::endl << "# type: matrix"
<< std::endl << "# rows: " << timesteps
<< std::endl << "# columns: 2" << std::endl;
auto const &dirichletFunction = functions.get("dirichletCondition");
auto const &neumannFunction = functions.get("neumannCondition");
......@@ -412,32 +406,6 @@ int main(int argc, char *argv[]) {
}
if (parset.get<bool>("printProgress"))
std::cerr << 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 = ud[first_frictional_node].two_norm() / L;
double const euler = alpha[first_frictional_node];
double direct;
if (run < 120) {
direct = euler;
} else 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) * tau)));
} 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) * tau)));
}
velocity_stepping_writer << euler << " " << direct << std::endl;
}
}
alpha_old = alpha;
......@@ -487,7 +455,6 @@ int main(int argc, char *argv[]) {
displacement_writer.close();
velocity_writer.close();
coefficient_writer.close();
velocity_stepping_writer.close();
Python::stop();
}
......
......@@ -6,8 +6,6 @@ printProgress = false
writeVTK = false
printVelocitySteppingComparison = false
enableTimer = false
timeSteppingScheme = implicitEuler
......
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