Skip to content
Snippets Groups Projects
Commit 1901ec29 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/gravity-stokes-darcy' into 'master'

[md][stokesDarcy] Correctly account for orientation of gravity vector

See merge request !1184
parents 8934cbe2 96d31e37
No related branches found
No related tags found
1 merge request!1184[md][stokesDarcy] Correctly account for orientation of gravity vector
......@@ -299,7 +299,7 @@ public:
const Scalar mu = stokesContext.volVars.viscosity(darcyPhaseIdx);
const Scalar rho = stokesContext.volVars.density(darcyPhaseIdx);
const Scalar distance = (stokesContext.element.geometry().center() - scvf.center()).two_norm();
const Scalar g = couplingManager_.problem(darcyIdx).gravity()[scvf.directionIndex()];
const Scalar g = -scvf.directionSign() * couplingManager_.problem(darcyIdx).gravity()[scvf.directionIndex()];
const Scalar interfacePressure = ((scvf.directionSign() * velocity * (mu/darcyPermeability(scvf))) + rho * g) * distance + darcyPressure;
momentumFlux = interfacePressure;
}
......
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