From: Wolfgang Bangerth Date: Sat, 15 Aug 2009 04:43:27 +0000 (+0000) Subject: Change things so that the gravity vector actually points down, rather than up. X-Git-Tag: v8.0.0~7296 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0519d0a56e55c4693e15b4e824198d776b1f1c89;p=dealii.git Change things so that the gravity vector actually points down, rather than up. git-svn-id: https://svn.dealii.org/trunk@19272 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-31/doc/intro.dox b/deal.II/examples/step-31/doc/intro.dox index e55e88d1fb..f06b2d745f 100644 --- a/deal.II/examples/step-31/doc/intro.dox +++ b/deal.II/examples/step-31/doc/intro.dox @@ -29,7 +29,7 @@ can be neglected, the equations that describe such behavior are the Boussinesq equations that read as follows: @f{eqnarray*} -\nabla \cdot (2 \eta \varepsilon ({\mathbf u})) + \nabla p &=& - \mathrm{Ra} \; T \mathbf{g}, + -\mathrm{Ra} \; T \mathbf{g}, \\ \nabla \cdot {\mathbf u} &=& 0, \\ @@ -52,14 +52,14 @@ particular with regard to efficient linear Stokes solvers. The forcing term of the fluid motion is the buoyancy of the fluid, expressed as the product of the Rayleigh number $\mathrm{Ra}$, -the temperature T and the gravity vector g. (A possibly -more intuitive formulation would use $\mathrm{Ra} \; (T-\bar T) +the temperature T and the gravity vector g pointing downward. (A +possibly more intuitive formulation would use $-\mathrm{Ra} \; (T-\bar T) \mathbf{g}$ as right hand side where $\bar T$ is the average temperature, and the right hand side then describes the forces due to local deviations from the average density; this formulation is entirely equivalent if the gravity vector results from a gravity potential $\phi$, i.e. $\mathbf{g}=-\nabla\phi$, and yields the exact -same solution except for the pressure which will now be $p+\mathrm{Ra} +same solution except for the pressure which will now be $p-\mathrm{Ra} \;\bar T \phi$.) While the first two equations describe how the fluid reacts to @@ -190,7 +190,7 @@ the previous time step. In other words, we first solve the Stokes system for time step n-1 as @f{eqnarray*} -\nabla \cdot (2\eta \varepsilon ({\mathbf u}^{n-1})) + \nabla p^{n-1} &=& - \mathrm{Ra} \; T^{n-1} \mathbf{g}, + -\mathrm{Ra} \; T^{n-1} \mathbf{g}, \\ \nabla \cdot {\mathbf u}^{n-1} &=& 0, @f} @@ -310,7 +310,7 @@ by their discrete counterparts: - (\nabla \cdot {\mathbf v}_h, p^{n-1}_h) &=& - ({\mathbf v}_h, \mathrm{Ra} \; T^{n-1}_h \mathbf{g}), + -({\mathbf v}_h, \mathrm{Ra} \; T^{n-1}_h \mathbf{g}), \\ (q_h, \nabla \cdot {\mathbf u}^{n-1}_h) &=& 0, @f} @@ -329,7 +329,7 @@ that we implement is - (\nabla \cdot {\mathbf v}_h, p^{n-1}_h) &=& - ({\mathbf v}_h, \mathrm{Ra} \; T^{n-1}_h \mathbf{g}), + -({\mathbf v}_h, \mathrm{Ra} \; T^{n-1}_h \mathbf{g}), \\ (q_h, \nabla \cdot {\mathbf u}^{n-1}_h) &=& 0. @f} diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index 9bcb73480d..f8f5ace887 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -1770,10 +1770,10 @@ void BoussinesqFlowProblem::assemble_stokes_system () - phi_p[i] * div_phi_u[j]) * stokes_fe_values.JxW(q); - const Point gravity = ( (dim == 2) ? (Point (0,1)) : - (Point (0,0,1)) ); + const Point gravity = -( (dim == 2) ? (Point (0,1)) : + (Point (0,0,1)) ); for (unsigned int i=0; i