From: Wolfgang Bangerth Date: Sat, 15 Aug 2009 23:28:45 +0000 (+0000) Subject: Implement the constant density sphere gravity model. X-Git-Tag: v8.0.0~7292 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c04c160efc9d0f153e5a8d7ccb2df8feab07fd3;p=dealii.git Implement the constant density sphere gravity model. git-svn-id: https://svn.dealii.org/trunk@19276 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/doc/intro.dox b/deal.II/examples/step-32/doc/intro.dox index c7d1c09ffb..289c84f2b4 100644 --- a/deal.II/examples/step-32/doc/intro.dox +++ b/deal.II/examples/step-32/doc/intro.dox @@ -428,21 +428,52 @@ SI system) even if we list them here in other units: \varphi(\mathbf x) = \int_{\text{earth}} - -G \frac{\rho(\mathbf x)}{\|\mathbf x-\mathbf y\|} + -G \frac{\rho(\mathbf y)}{\|\mathbf x-\mathbf y\|} \ \text{d}y, @f] then $\mathbf g(\mathbf x) = -\nabla \varphi(\mathbf x)$. If we assume that the density $\rho$ is constant throughout the earth, we can produce an - analytical expression for the gravity vector: - -XXX - Of course, within this problem, we are only interested in the branch that - pertains to within the earth. - + analytical expression for the gravity vector (don't try to integrate above + equation somehow -- it leads to elliptic integrals; the simpler way is to + notice that $-\Delta\varphi(\mathbf x) = 4\pi G \rho + \chi_{\text{earth}}(\mathbf x)$ and solving this + partial differential equation in all of ${\mathbb R}^3$ exploiting the + radial symmetry): + @f[ + \mathbf g(\mathbf x) = + \left\{ + \begin{array}{ll} + -\frac{4}{3}\pi G \rho \|\mathbf x\| \frac{\mathbf x}{\|\mathbf x\|} + & \text{for} \ \|\mathbf x\|this + article). (ii) The density, and by consequence the gravity vector, is not even constant in time: after all, the problem we want to solve is the time dependent upwelling of hot, less dense material and the downwelling of cold dense material. This leads to a gravity diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 6a7b2e25a4..5891742008 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -99,7 +99,7 @@ namespace EquationData template Tensor<1,dim> gravity_vector (const Point &p) { - return -9.81 * p / p.norm_square(); + return -9.81 * p / R1; }