]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change things so that the gravity vector actually points down, rather than up.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 15 Aug 2009 04:43:27 +0000 (04:43 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 15 Aug 2009 04:43:27 +0000 (04:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@19272 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-31/doc/intro.dox
deal.II/examples/step-31/step-31.cc

index e55e88d1fb0ab2da6c279efd8fdc5de84a9c9751..f06b2d745f9fd8298a65bad5b699165178b30d97 100644 (file)
@@ -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 <i>T</i> and the gravity vector <b>g</b>. (A possibly
-more intuitive formulation would use $\mathrm{Ra} \; (T-\bar T)
+the temperature <i>T</i> and the gravity vector <b>g</b> 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 <i>n-1</i> 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}
index 9bcb73480dbd9459d14c56fe2c6bf627bfe7b7eb..f8f5ace887705d69a8115f3605ab67cbc07cfc23 100644 (file)
@@ -1770,10 +1770,10 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
                                      - phi_p[i] * div_phi_u[j])
                                     * stokes_fe_values.JxW(q);
 
-         const Point<dim> gravity = ( (dim == 2) ? (Point<dim> (0,1)) : 
-                                      (Point<dim> (0,0,1)) );
+         const Point<dim> gravity = -( (dim == 2) ? (Point<dim> (0,1)) : 
+                                       (Point<dim> (0,0,1)) );
          for (unsigned int i=0; i<dofs_per_cell; ++i)
-           local_rhs(i) += (EquationData::Rayleigh_number *
+           local_rhs(i) += (-EquationData::Rayleigh_number *
                             gravity * phi_u[i] * old_temperature)*
                            stokes_fe_values.JxW(q);
        }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.