From: turcksin Date: Thu, 22 May 2014 15:44:09 +0000 (+0000) Subject: Improve documentation for step-52. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e5a883ce5acd2710e313b87241b5753de0b9b72;p=dealii-svn.git Improve documentation for step-52. git-svn-id: https://svn.dealii.org/trunk@32963 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_2_trilinos.cmake b/deal.II/cmake/configure/configure_2_trilinos.cmake index 7b680a4f5e..a79505384b 100644 --- a/deal.II/cmake/configure/configure_2_trilinos.cmake +++ b/deal.II/cmake/configure/configure_2_trilinos.cmake @@ -118,8 +118,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) ENDIF() # - # Trilinos has to be configured with 32bit indices if deal.II uses unsigned long - # long int. + # Trilinos has to be configured with 32bit indices if deal.II uses unsigned int. # IF(TRILINOS_WITH_NO_32BIT_INDICES AND NOT DEAL_II_WITH_64BIT_INDICES) MESSAGE(STATUS "deal.II was configured to use 32bit global indices but " diff --git a/deal.II/examples/step-52/doc/intro.dox b/deal.II/examples/step-52/doc/intro.dox index 4a7ba77555..58e4a1e7b1 100644 --- a/deal.II/examples/step-52/doc/intro.dox +++ b/deal.II/examples/step-52/doc/intro.dox @@ -10,7 +10,7 @@ problem.

Problem statement

-In this example, we solve the energy-integrated time-dependent diffusion +In this example, we solve the one-group time-dependent diffusion approximation of the neutron transport equation (see step-28 for the time-independent multigroup diffusion). We assume that the medium is not fissible and therefore, the neutron flux satisfies the following equation: @@ -19,16 +19,15 @@ fissible and therefore, the neutron flux satisfies the following equation: - \Sigma_a(x) \phi(x,t) + S(x,t) @f} augmented by appropriate boundary conditions. Here, $v$ is the velocity of -neutrons, $D$ is the diffusion coefficient, $\Sigma_a$ is the absorption -cross section, and $S$ is a source. Because we are only interested in the -time dependence, we assume that $D$ and $\Sigma_a$ are constant. The domain is square -$[0,b]\times[0,b]$ and we are looking for a solution of the form: +neutrons (for simplicity we assume it is equal to 1), $D$ is the diffusion coefficient, +$\Sigma_a$ is the absorption cross section, and $S$ is a source. Because we are only i +nterested in the time dependence, we assume that $D$ and $\Sigma_a$ are constant. We are looking +for a solution on a square domain $[0,b]\times[0,b]$ of the form: @f{eqnarray*} \phi(x,t) = A\sin(\omega t)(bx-x^2). @f} -By using quadratic finite elements, there will not have any spatial error and all -the error will come from the time discretization. We -impose the following boundary conditions: homogeneous Dirichlet fo $x=0$ and +By using quadratic finite elements, all the error will be due to the time discretization. We +impose the following boundary conditions: homogeneous Dirichlet for $x=0$ and $x=b$ and homogeneous Neumann conditions for $y=0$ and $y=b$. The source is given by: @f{eqnarray*} @@ -84,10 +83,20 @@ Only embedded explicit methods have been implemented at the time of the writing.

Implicit Runge-Kutta

These methods include backward Euler, implicit midpoint, Crank-Nicolson, and the two stages SDIRK. These methods require to evaluate $M^{-1}f(t,y)$ and -$\left(I-\Delta t M^{-1} \frac{\partial f}{\partial Y}\right)$ or equivalently -$\left(M - \Deltat \frac{\partial f}{\partial y}\right)^{-1} M$. These methods are +$\left(I-\Delta t M^{-1} \frac{\partial f}{\partial y}\right)$ or equivalently +$\left(M - \Delta t \frac{\partial f}{\partial y}\right)^{-1} M$. These methods are always stable. +

Weak form

+To use the Runge-Kutta methods, we need to be able to evaluate: +@f{eqnarray*} +f = \oint D b_i \frac{\partial b_j}{\partial n} d\boldsymbol{r} - \int D \nabla +b_i \nabla b_j \phi_j d\boldsymbol{r} -\int \Sigma_a b_i b_j \phi_j \phi_j +d\boldsymbol{r} + \int b_j S d\boldsymbol{r} +@f} +and $\frac{\partial f}{\partial y}$. Because $f$ is linear in $y$ (or $\phi$ in +this case) $\frac{\partial f}{\partial y} y = f$. +

Remarks

To simplify the problem, the domain is two dimensional and the mesh is uniform (there is no need to adapt the mesh since we use quadratic finite diff --git a/deal.II/examples/step-52/step-52.cc b/deal.II/examples/step-52/step-52.cc index 372727ee82..84fc1a44f4 100644 --- a/deal.II/examples/step-52/step-52.cc +++ b/deal.II/examples/step-52/step-52.cc @@ -70,7 +70,7 @@ namespace Step52 public: Diffusion(); - // This function is the driver that will call the other ones. + // This function is the driver that will call the other functions. void run(); private: @@ -81,7 +81,7 @@ namespace Step52 // the time. void assemble_system(); - // Compute the intensity of the source at the given point. + // Compute the intensity of the source at a given time for a given point. double get_source(double time,const Point<2> &point) const; // Evaluate the diffusion equation $M^{-1}(f(t,y))$ at a given time and @@ -266,7 +266,7 @@ namespace Step52 { Vector tmp(dof_handler.n_dofs()); tmp = 0.; - // Compute system_matrix*y + // Compute $tmp=system_matrix y$. system_matrix.vmult(tmp,y); const QGauss<2> quadrature_formula(fe_degree+1); @@ -343,6 +343,8 @@ namespace Step52 // @sect5{Diffusion::output_results} + // + // We output the solution in vtu files. void Diffusion::output_results(unsigned int time_step,TimeStepping::runge_kutta_method method) const { std::string method_name; @@ -540,8 +542,8 @@ namespace Step52 // @sect5{Diffusion::run} void Diffusion::run() { - // Create the grid (a square [0,5]x[0,5]) and refine the mesh four times. - // The final gird has 16 by 16 cells, for a total of 256. + // Create the grid (a [0,5]x[0,5] square) and refine the mesh four times. + // The final grid has 16 by 16 cells, for a total of 256. GridGenerator::hyper_cube(triangulation, 0., 5.); triangulation.refine_global(4);