Chris Cantwell committed Aug 19, 2014 1 \chapter{ADRSolver}  Daniele de Grazia committed Aug 11, 2014 2 3 4 5 6 7  %3.4/UserGuide/Tutorial/ADRSolver %3.4/UserGuide/Examples/ADRSolver/1DAdvection %3.4/UserGuide/Examples/ADRSolver/3DAdvectionMassTransport %3.4/UserGuide/Examples/ADRSolver/Helmholtz2D  Chris Cantwell committed Aug 19, 2014 8 \section{Synopsis}  Daniele de Grazia committed Aug 11, 2014 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  The ADRSolver is designed to solve partial differential equations of the form: \alpha \dfrac{\partial u}{\partial t} + \lambda u + \nu \nabla u + \epsilon \nabla \cdot (D \nabla u) = f in either discontinuous or continuous projections of the solution field. For a full list of the equations which are supported, and the capabilities of each equation, see the table below. \begin{table}[h!] \begin{center} \tiny \renewcommand\arraystretch{2.2} \begin{tabular}{|l|l|l|l|} \hline  Chris Cantwell committed Aug 19, 2014 24 \textbf{Equation to solve} & \textbf{EquationType} & \textbf{Dimensions supported} & \textbf{Projection supported} \\  Daniele de Grazia committed Aug 11, 2014 25 \hline  Chris Cantwell committed Aug 19, 2014 26 27 $\nabla^2 u = 0$ & \inltt{Laplace} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 28 \hline  Chris Cantwell committed Aug 19, 2014 29 30 $\nabla^2 u = f$ & \inltt{Poisson} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 31 \hline  Chris Cantwell committed Aug 19, 2014 32 33 $\nabla^2 u + \lambda u = f$ & \inltt{Helmholtz} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 34 \hline  Chris Cantwell committed Aug 19, 2014 35 36 $\epsilon \nabla^2 u + \mathbf{V}\nabla u = f$ & \inltt{SteadyAdvectionDiffusion} & 2D only & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 37 \hline  Chris Cantwell committed Aug 19, 2014 38 39 $\epsilon \nabla^2 u + \lambda u = f$ & \inltt{SteadyDiffusionReaction} & 2D only & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 40 \hline  Chris Cantwell committed Aug 19, 2014 41 42 43 $\epsilon \nabla^2 u \mathbf{V}\nabla u + \lambda u = f$ & \inltt{SteadyAdvectionDiffusionReaction} & 2D only & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 44 \hline  Chris Cantwell committed Aug 19, 2014 45 46 $\dfrac{\partial u}{\partial t} + \mathbf{V}\nabla u = f$ & \inltt{UnsteadyAdvection} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 47 \hline  Chris Cantwell committed Aug 19, 2014 48 49 $\dfrac{\partial u}{\partial t} = \epsilon \nabla^2 u$ & \inltt{UnsteadyDiffusion} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 50 \hline  Chris Cantwell committed Aug 19, 2014 51 52 $\dfrac{\partial u}{\partial t} + \mathbf{V}\nabla u = \epsilon \nabla^2 u$ & \inltt{UnsteadyAdvectionDiffusion} & All & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 53 \hline  Chris Cantwell committed Aug 19, 2014 54 55 $\dfrac{\partial u}{\partial t} + u\nabla u = 0$ & \inltt{UnsteadyInviscidBurger} & 1D only & Continuous/Discontinuous \\  Daniele de Grazia committed Aug 11, 2014 56 57 58 59 60 61 62 \hline \end{tabular} \end{center} \caption{Equations supported by the ADRSolver with their capabilities.} \label{t:ADR1} \end{table}  Chris Cantwell committed Aug 19, 2014 63 \section{Usage}  Daniele de Grazia committed Aug 11, 2014 64   Chris Cantwell committed Aug 19, 2014 65 \begin{lstlisting}[style=BashInputStyle]  Daniele de Grazia committed Aug 11, 2014 66 ADRSolver session.xml  Chris Cantwell committed Aug 19, 2014 67 \end{lstlisting}  Daniele de Grazia committed Aug 11, 2014 68   Chris Cantwell committed Aug 19, 2014 69 \section{Session file configuration}  Daniele de Grazia committed Aug 11, 2014 70 71 72 73 74  The type of equation which is to be solved is specified through the EquationType SOLVERINFO option in the session file. This can be set as in table \ref{t:ADR1}. At present, the Steady non-symmetric solvers cannot be used in parallel. \\  Chris Cantwell committed Aug 19, 2014 75 \subsection{Solver Info}  Daniele de Grazia committed Aug 11, 2014 76 77 78 79 80 81 82 83 84  The solver info are listed below: \begin{itemize} \item \textbf{Eqtype}: This sets the type of equation to solve, according to the table above. \item \textbf{TimeIntegrationMethod}: The following types of time integration methods have been tested with each solver: \begin{table}[h!] \begin{center} \footnotesize \renewcommand\arraystretch{1.2}  Chris Cantwell committed Aug 19, 2014 85 \begin{tabular}{|l|c|c|c|c|}  Daniele de Grazia committed Aug 11, 2014 86 \hline  Chris Cantwell committed Aug 19, 2014 87 88 \textbf{EqType} & \textbf{Explicit} & \textbf{Diagonally Implicit} & \textbf{ IMEX} & \textbf{Implicit} \\  Daniele de Grazia committed Aug 11, 2014 89 \hline  Chris Cantwell committed Aug 19, 2014 90 \inltt{UnstedayAdvection} & \checkmark & & &\\  Daniele de Grazia committed Aug 11, 2014 91 \hline  Chris Cantwell committed Aug 19, 2014 92 \inltt{UnstedayDifusion} & \checkmark & \checkmark & &\\  Daniele de Grazia committed Aug 11, 2014 93 \hline  Chris Cantwell committed Aug 19, 2014 94 \inltt{UnstedayAdvectionDiffusion} & & & \checkmark &\\  Daniele de Grazia committed Aug 11, 2014 95 \hline  Chris Cantwell committed Aug 19, 2014 96 \inltt{UnstedayInviscidBurger} & \checkmark & & &\\  Daniele de Grazia committed Aug 11, 2014 97 98 99 100 101 102 103 \hline \end{tabular} \end{center} \label{t:ADR2} \end{table} \vspace{-1 cm}  Daniele de Grazia committed Aug 11, 2014 104 \item \textbf{Projection}: The Galerkin projection used may be either:  Daniele de Grazia committed Aug 11, 2014 105 \begin{itemize}  Chris Cantwell committed Aug 19, 2014 106 107  \item \inltt{Continuous} for a C0-continuous Galerkin (CG) projection. \item \inltt{Discontinuous} for a discontinous Galerkin (DG) projection.  Daniele de Grazia committed Aug 11, 2014 108 \end{itemize}  Daniele de Grazia committed Aug 11, 2014 109 \item \textbf{DiffusionAdvancement}: This specifies how to treat the diffusion term. This will be restricted by the choice of time integration scheme:  Daniele de Grazia committed Aug 11, 2014 110 \begin{itemize}  Chris Cantwell committed Aug 19, 2014 111 112 113 114  \item \inltt{Explicit} Requires the use of an explicit time integration scheme. \item \inltt{Implcit} Requires the use of a diagonally implicit, IMEX or Implicit scheme.  Daniele de Grazia committed Aug 11, 2014 115 \end{itemize}  Daniele de Grazia committed Aug 11, 2014 116 \item \textbf{AdvectionAdvancement}: This specifies how to treat the advection term. This will be restricted by the choice of time integration scheme:  Daniele de Grazia committed Aug 11, 2014 117 \begin{itemize}  Chris Cantwell committed Aug 19, 2014 118 119 120  \item \inltt{Explicit} Requires the use of an explicit or IMEX time integration scheme. \item \inltt{Implicit} Not supported at present.  Daniele de Grazia committed Aug 11, 2014 121 \end{itemize}  Daniele de Grazia committed Aug 11, 2014 122 \item \textbf{AdvectionType}: Specifies the type of advection:  Daniele de Grazia committed Aug 11, 2014 123 \begin{itemize}  Chris Cantwell committed Aug 19, 2014 124 125  \item \inltt{NonConservative} (for CG only). \item \inltt{WeakDG} (for DG only).  Daniele de Grazia committed Aug 11, 2014 126 127 128 \end{itemize} \item \textbf{DiffusionType}: \begin{itemize}  Chris Cantwell committed Aug 19, 2014 129  \item \inltt{LDG}.  Daniele de Grazia committed Aug 11, 2014 130 131 132 \end{itemize} \item \textbf{UpwindType}: \begin{itemize}  Chris Cantwell committed Aug 19, 2014 133  \item \inltt{Upwind}.  Daniele de Grazia committed Aug 11, 2014 134 135 136 \end{itemize} \end{itemize}  Chris Cantwell committed Aug 19, 2014 137 \subsection{Parameters}  Daniele de Grazia committed Aug 11, 2014 138   Chris Cantwell committed Aug 19, 2014 139 140 The following parameters can be specified in the \inltt{PARAMETERS} section of the session file:  Daniele de Grazia committed Aug 11, 2014 141 \begin{itemize}  Chris Cantwell committed Aug 19, 2014 142 \item \inltt{epsilon}: sets the diffusion coefficient $\epsilon$.\\  Daniele de Grazia committed Aug 11, 2014 143 144 \textit{Can be used} in: SteadyDiffusionReaction, SteadyAdvectionDiffusionReaction, UnsteadyDiffusion, UnsteadyAdvectionDiffusion. \\ \textit{Default value}: 0.  Chris Cantwell committed Aug 19, 2014 145 146 \item \inltt{d00}, \inltt{d11}, \inltt{d22}: sets the diagonal entries of the diffusion tensor $D$. \\  Daniele de Grazia committed Aug 11, 2014 147 148 \textit{Can be used in}: UnsteadyDiffusion \\ \textit{Default value}: All set to 1 (i.e. identity matrix).  Chris Cantwell committed Aug 19, 2014 149 \item \inltt{lambda}: sets the reaction coefficient $\lambda$. \\  Daniele de Grazia committed Aug 11, 2014 150 151 152 153 \textit{Can be used in}: SteadyDiffusionReaction, Helmholtz, SteadyAdvectionDiffusionReaction\\ \textit{Default value}: 0. \end{itemize}  Chris Cantwell committed Aug 19, 2014 154 \subsection{Functions}  Daniele de Grazia committed Aug 11, 2014 155   Chris Cantwell committed Aug 19, 2014 156 157 The following functions can be specified inside the \inltt{CONDITIONS} section of the session file:  Daniele de Grazia committed Aug 11, 2014 158 159  \begin{itemize}  Chris Cantwell committed Aug 19, 2014 160 161 162 \item \inltt{AdvectionVelocity}: specifies the advection velocity $\mathbf{V}$. \item \inltt{InitialConditions}: specifies the initial condition for unsteady problems. \item \inltt{Forcing}: specifies the forcing function f.  Daniele de Grazia committed Aug 11, 2014 163 164 \end{itemize}  Chris Cantwell committed Aug 19, 2014 165 166 \section{Examples}  Daniele de Grazia committed Aug 11, 2014 167 \subsection{1D Advection equation}  Daniele de Grazia committed Aug 11, 2014 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298  In this example, it will be demonstrated how the Advection equation can be solved on a one-dimensional domain. This problem is a particular case of the Advection-Diffusion-Reaction Solver. \\ \textbf{Advection equation} We consider the hyperbolic partial differential equation: \dfrac{\partial u}{\partial t} + \dfrac{\partial f}{\partial x} = 0, where $f = a u$ i s the advection flux. \textbf{Input file} Advection1D.xml \textbf{\footnotesize{Geometry definition}} \begin{lstlisting}[style=XMLStyle] -1.0 0.0 0.0 -0.8 0.0 0.0 -0.6 0.0 0.0 -0.4 0.0 0.0 -0.2 0.0 0.0 0.0 0.0 0.0 0.2 0.0 0.0 0.4 0.0 0.0 0.6 0.0 0.0 0.8 0.0 0.0 1.0 0.0 0.0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 S[0-9] V[0] V[10] C[0] \end{lstlisting} \textbf{\footnotesize{Expansion definition}} \begin{lstlisting}[style=XMLStyle] \end{lstlisting} \textbf{\footnotesize{Conditions definition}} \begin{lstlisting}[style=XMLStyle]

FinTime = 20

TimeStep = 0.01

NumSteps = FinTime/TimeStep

IO_CheckSteps = 100000

IO_InfoSteps = 100000

u C[1] C[2]

\end{lstlisting} \textbf{Running the code} ADRSolver Advection1D.xml \textbf{Post-processing} FldToTecplot Advection1D.xml Advection1D.fld \\ FldToVtk Advection1D.xml Advection1D.fld  Daniele de Grazia committed Aug 11, 2014 299 \subsection{2D Helmholtz Problem}  Daniele de Grazia committed Aug 11, 2014 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390  In this example, it will be demonstrated how the Helmholtz equation can be solved on a two-dimensional domain. This problem is a particular case of the Advection-Diffusion-Reaction Solver. \textbf{Helmholtz equation} We consider the elliptic partial differential equation: \nabla^2 u + \lambda u = f where $\nabla^2$ is the Laplacian and $\lambda$ is a real positive constant. \textbf{Input file} For this tutorial, the input file (in the \nekpp input format) used can be found in \nekpp/regressionTests/Solvers/ADRSolver/InputFiles/Test\_Helmholtz2D\_modal.xml. \textbf{\footnotesize{Geometry definition}} In the GEOMETRY section, the dimensions of the problem are defined. Then, the coordinates (XSCALE, YSCALE, ZSCALE) of each vertices are specified. As this input file defines a two-dimensional problem: ZSCALE = 0. \begin{lstlisting}[style=XMLStyle] -1.000000000000000 3.500000000000000 0.0 . . 3.179196984040000 2.779077508740000 0.0 \end{lstlisting} Edges can now be defined by two vertices. \begin{lstlisting}[style=XMLStyle] 1 21 . . 10 19 \end{lstlisting} In the ELEMENT section, the tag T and Q define respectively triangular and quadrilateral element. Triangular elements are defined by a sequence of three edges and quadrilateral elements by a sequence of four edges. \begin{lstlisting}[style=XMLStyle] 6 7 16 . . 29 37 34 35 41 46 40 . . 91 92 95 93 \end{lstlisting} Finally, collections of elements are listed in the COMPOSITE section and the DOMAIN section specifies that the mesh is composed by all the triangular and quadrilateral elements. The other composites will be used to enforce boundary conditions. \begin{lstlisting}[style=XMLStyle] Q[22-47] T[0-21] E[0-1] . . E[84,75,69,62,51,40,30,20,6] C[0-1] \end{lstlisting} \textbf{\footnotesize{Expansion definition}} This section defines the polynomial expansions used on each composites. \begin{lstlisting}[style=XMLStyle] \end{lstlisting} \textbf{\footnotesize{Conditions definition}}  Daniele de Grazia committed Aug 11, 2014 391 This sections defines the problem solved. In this example $\lambda = 1$ and the Continuous Galerkin Method  Daniele de Grazia committed Aug 11, 2014 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 is used as projection scheme to solve the Helmholtz equation. \begin{lstlisting}[style=XMLStyle]

Lambda = 1

\end{lstlisting} Then, Dirichlet, Neumann and Robin boundary conditions are defined thanks to the boundary references given by the BOUNDARYREGIONS section. \begin{lstlisting}[style=XMLStyle] C[2] . . C[10] . . \end{lstlisting} We know that for $f = -(\lambda + 2 \pi^2)sin(\pi x)cos(\pi y)$, the exact solution of the two-dimensional Helmholtz equation is $u = sin(\pi x)cos(\pi y)$. These functions are defined at the end of the CONDITIONS section. \begin{lstlisting}[style=XMLStyle]
\end{lstlisting} The exact solution will be used to evaluate the $L_2$ and $L_{inf}$ errors. \textbf{Running the code} The ADRSolver is used to solve the two-dimensional Helmholtz problem. To run the code, the user must first go to the directory: \\ \nekpp/builds/solvers/ADRSolver \\ and then copy the input file detailed above in this directory via: \\ cp ../../../regressionTests/Solvers/ADRSolver/InputFiles/Test\_Helmholtz2D\_modal.xml \\ Finally, the following command executes the solver: \\ ./ADRSolver Test\_Helmholtz2D\_modal.xml \\ This execution should print out a summary of input file, the $L_2$ and $L_{inf}$ errors and the time spent on the calculation.\\ \textbf{Post-processing} Simulation results are written in the file Test\_Helmholtz2D\_modal.fld. \nekpp provides post-processing tools to be able to display the results. For example, the command:\\ \footnotesize../../../utilities/PostProcessing/FldToGmsh Test\_Helmholtz2D\_modal.xml Test\_Helmholtz2D\_modal.fld \\ \normalsize provides the file Test\_Helmholtz2D\_modal\_u.pos in the Gmsh format which gives the following image.  Daniele de Grazia committed Aug 11, 2014 476 \begin{figure}[h!]  Daniele de Grazia committed Aug 11, 2014 477 478 479 480 481 482 483 484 \begin{center} \includegraphics[width=6cm]{Figures/Helmholtz2D} \caption{Solution of the 2D Helmholtz Problem.} \end{center} \end{figure} By writing FldToTecplot or FldToVtk instead of FldToGmsh in the previous command, Tecplot or Paraview can be used to visualize the results.  Daniele de Grazia committed Aug 11, 2014 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 \subsection{Advection dominated mass transport in a pipe} The following example demonstrates the application of the ADRsolver for modelling advection dominated mass transport in a straight pipe. Such a transport regime is encountered frequently when modelling mass transport in arteries. This is because the diffusion coefficient of small blood borne molecules, for example oxygen or adenosine triphosphate, is very small $O(10^{-10})$. \textbf{Background} The governing equation for modelling mass transport is the unsteady advection diffusion equation: \dfrac{\partial u}{\partial t} + v\nabla u + \epsilon \nabla^2 u = 0 For small diffusion coefficient, $\epsilon$, the transport is dominated by advection and this leads to a very fine boundary layer adjacent to the surface which must be captured in order to get a realistic representation of the wall mass transfer processes. This creates problems not only from a meshing perspective, but also numerically where classical oscillations are observed in the solution due to under-resolution of the boundary layer.\\ The Graetz-Nusselt solution is an analytical solution of a developing mass (or heat) transfer boundary layer in a pipe. Previously this solution has been used as a benchmark for the accuracy of numerical methods to capture the fine boundary layer which develops for high Peclet number transport (the ratio of advection to diffusion). The solution is derived based on the assumption that the velocity field within the mass transfer boundary layer is linear i.e. the Schmidt number (the relative thickness of the momentum to mass transfer boundary layer) is sufficiently large. The analytical solution for the non-dimensional mass transfer at the wall is given by: S h(z) = \dfrac{2^{4/3}(Pe R/z)^{1/3}}{g^{1/3}\Gamma(4/3)} , where $z$ is the streamwise coordinate, $R$ the pipe radius, $\Gamma(4/3)$ an incomplete Gamma function and $Pe$ the Peclet number given by: Pe = \dfrac{2 U R}{\epsilon} In the following we will numerically solver mass transport in a pipe and compare the calculated mass transfer at the wall with the Graetz-Nusselt solution. The Peclet number of the transport regime under consideration is 750000, which is physiologically relevant. \textbf{Geometry} The geometry under consideration is a pipe of radius, $R = 0.5$ and length $l = 0.5$ \begin{figure}[h!] \begin{center} \includegraphics[width=6cm]{Figures/pipe} \caption{Pipe.} \end{center} \end{figure} Since the mass transport boundary layer will be confined to a very small layer adjacent to the wall we do not need to mesh the interior region, hence the mesh consists of a layer of ten prismatic elements over a thickness of 0.036R. The elements progressively grow over the thickness of domain. \textbf{Input parameters} \textbf{\footnotesize{Expansion}} In this example we utilise heterogeneous polynomial order, in which the polynomial order normal to the wall is higher so that we avoid unphysical oscillations, and hence the incorrect solution, in the mass transport boundary layer. To do this we specify explicitly the expansion type, points type and distribution in each direction as follows: \begin{lstlisting}[style=XMLStyle] \end{lstlisting} The above represents a quadratic polynomial order in the azimuthal and streamwise direction and 4th order polynomial normal to the wall for a prismatic element. \textbf{\footnotesize{Solver information}} \begin{lstlisting}[style=XMLStyle] \end{lstlisting} \textbf{\footnotesize{Parameters}} \begin{lstlisting}[style=XMLStyle]

TimeStep = 0.0005

FinalTime = 30

NumSteps = FinalTime/TimeStep

IO_CheckSteps = 1000

IO_InfoSteps = 200

epsilon = 1.33333e-6

\end{lstlisting} The value of $\epsilon$ is $\epsilon = 1/Pe$. \textbf{\footnotesize{Boundary conditions}} The analytical solution represents a developing mass transfer boundary layer in a pipe. In order to reproduce this numerically we assume that the inlet concentration is a uniform value and the outer wall concentration is zero; this will lead to the development of the mass transport boundary layer along the length of the pipe. Since we do not model explicitly the mass transfer in the interior region of the pipe we assume that the inner wall surface concentration is the same as the inlet concentration; this assumption is valid based on the large Peclet number meaning the concentration boundary layer is confined to the region in the immediate vicinity of the wall. The boundary conditions are specified as follows in the input file: \begin{lstlisting}[style=XMLStyle] C[3] C[4] C[2] C[5] \end{lstlisting} \textbf{\footnotesize{Functions}} The velocity field within the domain is fully developed pipe flow (Poiseuille flow), hence we can define this through an analytical function as follows: \begin{lstlisting}[style=XMLStyle] \end{lstlisting} We assume that the initial domain concentration is uniform everywhere and the same as the inlet. This is defined by, \begin{lstlisting}[style=XMLStyle] \end{lstlisting} \textbf{Results} To compare with the analytical expression we numerically calculate the concentration gradient at the surface of the pipe. This is then plotted against the analytical solution by extracting the solution along a line in the streamwise direction. \begin{figure}[h!] \begin{center} \includegraphics[width=7cm]{Figures/graetz-nusselt} \caption{Concentration gradient at the surface of the pipe.} \end{center} \end{figure}  Daniele de Grazia committed Aug 11, 2014 656