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

1/eta -> V0

parent 5f17c947
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ class GlobalRuinaNonlinearity ...@@ -24,7 +24,7 @@ class GlobalRuinaNonlinearity
using GlobalNonlinearity<MatrixType, VectorType>::dim; using GlobalNonlinearity<MatrixType, VectorType>::dim;
GlobalRuinaNonlinearity(dataref nodalIntegrals, dataref a, dataref mu, GlobalRuinaNonlinearity(dataref nodalIntegrals, dataref a, dataref mu,
dataref eta, dataref normalStress, dataref b, dataref V0, dataref normalStress, dataref b,
dataref state, dataref L) dataref state, dataref L)
: restrictions(nodalIntegrals.size()) { : restrictions(nodalIntegrals.size()) {
auto trivialNonlinearity = make_shared<LocalNonlinearity<dim> const>( auto trivialNonlinearity = make_shared<LocalNonlinearity<dim> const>(
...@@ -34,7 +34,7 @@ class GlobalRuinaNonlinearity ...@@ -34,7 +34,7 @@ class GlobalRuinaNonlinearity
? trivialNonlinearity ? trivialNonlinearity
: make_shared<LocalNonlinearity<dim> const>( : make_shared<LocalNonlinearity<dim> const>(
make_shared<RuinaFunction const>( make_shared<RuinaFunction const>(
nodalIntegrals[i], a[i], mu[i], eta[i], nodalIntegrals[i], a[i], mu[i], V0[i],
normalStress[i], b[i], state[i], L[i])); normalStress[i], b[i], state[i], L[i]));
} }
} }
......
...@@ -40,18 +40,18 @@ class NiceFunction { ...@@ -40,18 +40,18 @@ class NiceFunction {
class RuinaFunction : public NiceFunction { class RuinaFunction : public NiceFunction {
public: public:
RuinaFunction(double coefficient, double a, double mu, double eta, RuinaFunction(double coefficient, double a, double mu, double V0,
double normalStress, double b, double state, double L) double normalStress, double b, double state, double L)
: NiceFunction(), : NiceFunction(),
a(a), a(a),
eta(eta), V0(V0),
coefficientProduct(coefficient * normalStress), coefficientProduct(coefficient * normalStress),
K(mu + b * (state - std::log(eta * L))), // state is assumed to be K(mu +
// logarithmic b * (state + std::log(V0 / L))), // state is assumed to be logarithmic
rho(std::exp(-K / a)) {} rho(std::exp(-K / a)) {}
double virtual evaluate(double x) const { double virtual evaluate(double x) const {
double const arg = x * eta; double const arg = x / V0;
if (arg <= rho) if (arg <= rho)
return 0; return 0;
...@@ -60,7 +60,7 @@ class RuinaFunction : public NiceFunction { ...@@ -60,7 +60,7 @@ class RuinaFunction : public NiceFunction {
} }
double virtual leftDifferential(double x) const { double virtual leftDifferential(double x) const {
double const arg = x * eta; double const arg = x / V0;
if (arg <= rho) if (arg <= rho)
return 0; return 0;
...@@ -73,7 +73,7 @@ class RuinaFunction : public NiceFunction { ...@@ -73,7 +73,7 @@ class RuinaFunction : public NiceFunction {
} }
double virtual second_deriv(double x) const { double virtual second_deriv(double x) const {
double const arg = x * eta; double const arg = x / V0;
if (arg <= rho) if (arg <= rho)
return 0; return 0;
...@@ -81,7 +81,7 @@ class RuinaFunction : public NiceFunction { ...@@ -81,7 +81,7 @@ class RuinaFunction : public NiceFunction {
} }
double virtual regularity(double x) const { double virtual regularity(double x) const {
double const arg = x * eta; double const arg = x / V0;
// TODO: Make this controllable // TODO: Make this controllable
if (std::abs(arg - rho) < 1e-14) if (std::abs(arg - rho) < 1e-14)
return std::numeric_limits<double>::infinity(); return std::numeric_limits<double>::infinity();
...@@ -93,7 +93,7 @@ class RuinaFunction : public NiceFunction { ...@@ -93,7 +93,7 @@ class RuinaFunction : public NiceFunction {
private: private:
double const a; double const a;
double const eta; double const V0;
double const coefficientProduct; double const coefficientProduct;
double const K; double const K;
double const rho; double const rho;
......
...@@ -74,8 +74,8 @@ assemble_nonlinearity( ...@@ -74,8 +74,8 @@ assemble_nonlinearity(
SingletonVectorType a(size); SingletonVectorType a(size);
a = parset.get<double>("ruina.a"); a = parset.get<double>("ruina.a");
SingletonVectorType eta(size); SingletonVectorType V0(size);
eta = parset.get<double>("eta"); V0 = parset.get<double>("V0");
SingletonVectorType b(size); SingletonVectorType b(size);
b = parset.get<double>("ruina.b"); b = parset.get<double>("ruina.b");
...@@ -85,7 +85,7 @@ assemble_nonlinearity( ...@@ -85,7 +85,7 @@ assemble_nonlinearity(
return Dune::make_shared< return Dune::make_shared<
Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>( Dune::GlobalRuinaNonlinearity<MatrixType, VectorType> const>(
nodalIntegrals, a, mu, eta, normalStress, b, state, L); nodalIntegrals, a, mu, V0, normalStress, b, state, L);
} }
case Config::Laursen: case Config::Laursen:
assert(false); assert(false);
......
...@@ -277,7 +277,7 @@ int main(int argc, char *argv[]) { ...@@ -277,7 +277,7 @@ int main(int argc, char *argv[]) {
auto const L = parset.get<double>("boundary.friction.ruina.L"); auto const L = parset.get<double>("boundary.friction.ruina.L");
auto const a = parset.get<double>("boundary.friction.ruina.a"); auto const a = parset.get<double>("boundary.friction.ruina.a");
auto const b = parset.get<double>("boundary.friction.ruina.b"); auto const b = parset.get<double>("boundary.friction.ruina.b");
auto const eta = parset.get<double>("boundary.friction.eta"); auto const V0 = parset.get<double>("boundary.friction.V0");
auto const mu = parset.get<double>("boundary.friction.mu"); auto const mu = parset.get<double>("boundary.friction.mu");
auto const timesteps = parset.get<size_t>("timeSteps"); auto const timesteps = parset.get<size_t>("timeSteps");
double const tau = 1.0 / timesteps; double const tau = 1.0 / timesteps;
...@@ -450,8 +450,8 @@ int main(int argc, char *argv[]) { ...@@ -450,8 +450,8 @@ int main(int argc, char *argv[]) {
for (size_t i = 0; i < frictionalNodes.size(); ++i) for (size_t i = 0; i < frictionalNodes.size(); ++i)
if (frictionalNodes[i][0]) if (frictionalNodes[i][0])
coefficient_writer << mu + a *std::log(ud[i].two_norm() * eta) + coefficient_writer << mu + a *std::log(ud[i].two_norm() / V0) +
b * (alpha[i] - std::log(eta * L)) << " "; b * (alpha[i] + std::log(V0 / L)) << " ";
coefficient_writer << std::endl; coefficient_writer << std::endl;
} }
......
...@@ -52,7 +52,7 @@ requiredResidual = 1e-12 ...@@ -52,7 +52,7 @@ requiredResidual = 1e-12
# constitutive properties for earthquake prediction # constitutive properties for earthquake prediction
# http://earthquake.usgs.gov/research/physics/lab/prediction.pdf # http://earthquake.usgs.gov/research/physics/lab/prediction.pdf
mu = 0.6 mu = 0.6
eta = 1 V0 = 1
model = Exponential model = Exponential
[boundary.friction.state] [boundary.friction.state]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment