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

[Cleanup] Fix sign of normal stress

parent 8770c7a3
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ class FrictionPotentialWrapper {
class FrictionPotential : public FrictionPotentialWrapper {
public:
FrictionPotential(double coefficient, FrictionData const &fd)
: fd(fd), weightTimesNormalStress(coefficient * fd.normalStress) {}
: fd(fd), weightTimesNormalStress(coefficient * (-fd.normalStress)) {}
// log(V/V_m) if V >= V_0
// 0 otherwise
......
......@@ -261,7 +261,7 @@ int main(int argc, char *argv[]) {
// volume * gravity * density / area = normal stress
// V * g * rho / A = sigma_n
// m^d * N/kg * kg/m^d / m^(d-1) = N/m^(d-1)
normalStress = volume * gravity * density / area;
normalStress = -volume * gravity * density / area;
}
FrictionData const frictionData(parset.sub("boundary.friction"),
normalStress);
......
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