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

[Algorit] Simplify normal stress computation

parent 5310e055
No related branches found
No related tags found
No related merge requests found
......@@ -188,24 +188,9 @@ int main(int argc, char *argv[]) {
};
Vector ell(fineVertexCount);
computeExternalForces(0.0, ell);
double normalStress;
{
double volume = 1.0;
for (size_t i = 0; i < dims; ++i)
volume *= (myGeometry.C[i] - myGeometry.A[i]);
double area = 1.0;
for (size_t i = 0; i < dims; ++i)
if (i != 1)
area *= (myGeometry.C[i] - myGeometry.A[i]);
// 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 * parset.get<double>("gravity") *
parset.get<double>("body.density") / area;
}
double normalStress = (myGeometry.A[1] - myGeometry.C[1]) *
parset.get<double>("gravity") *
parset.get<double>("body.density");
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