Chapter 3
Running the solver

Now that we have the mesh file compatible with Nektar++ and periodic boundary conditions, ADR_mesh_aligned.xml, and we have completed the condition file, ADR_conditions.xml, we can run the solver by using the following command:
Task: 3.1 Run the ADRSolver using the command:

$NEK/ADRSolver ADR_mesh_aligned.xml ADR_conditions.xml

Note that we have written the mesh in a separate file from the conditions. This is generally more efficient because it allows reopening just the condition file which is much smaller in size than the mesh file (especially for large problems). However, we could also have written both the mesh and the conditions in unique file and used the same command as above for running the solver (in this case with just one file instead of two as line argument).

As soon as the file finishes running, we should see the following screen output:

========================================= 
                EquationType: UnsteadyAdvection 
                Session Name: ADR_mesh_aligned 
                Spatial Dim.: 2 
          Max SEM Exp. Order: 5 
              Expansion Dim.: 2 
              Riemann Solver: Upwind 
              Advection Type: 
             Projection Type: Discontinuous Galerkin 
                   Advection: explicit 
                   Diffusion: explicit 
                   Time Step: 0.001 
                No. of Steps: 1000 
         Checkpoints (steps): 100 
            Integration Type: ClassicalRungeKutta4 
========================================== 
Initial Conditions: 
  - Field u: sin(k*x)*cos(k*y) 
Writing: "ADR_mesh_aligned_0.chk" 
Steps: 100      Time: 0.1          CPU Time: 0.435392s 
Writing: "ADR_mesh_aligned_1.chk" 
Steps: 200      Time: 0.2          CPU Time: 0.430588s 
Writing: "ADR_mesh_aligned_2.chk" 
Steps: 300      Time: 0.3          CPU Time: 0.428503s 
Writing: "ADR_mesh_aligned_3.chk" 
Steps: 400      Time: 0.4          CPU Time: 0.428529s 
Writing: "ADR_mesh_aligned_4.chk" 
Steps: 500      Time: 0.5          CPU Time: 0.430142s 
Writing: "ADR_mesh_aligned_5.chk" 
Steps: 600      Time: 0.6          CPU Time: 0.429481s 
Writing: "ADR_mesh_aligned_6.chk" 
Steps: 700      Time: 0.7          CPU Time: 0.433232s 
Writing: "ADR_mesh_aligned_7.chk" 
Steps: 800      Time: 0.8          CPU Time: 0.431088s 
Writing: "ADR_mesh_aligned_8.chk" 
Steps: 900      Time: 0.9          CPU Time: 0.427919s 
Writing: "ADR_mesh_aligned_9.chk" 
Steps: 1000     Time: 1            CPU Time: 0.436098s 
Writing: "ADR_mesh_aligned_10.chk" 
Time-integration  : 4.31097s 
Writing: "ADR_mesh_aligned.fld" 
------------------------------------------- 
Total Computation Time = 4s 
------------------------------------------- 
L 2 error (variable u) : 0.00863475 
L inf error (variable u) : 0.0390366

where the L2 and L inf errors are evaluated against the <FUNCTION NAME="ExactSolution"> provided in the ADR_conditions.xml file. To have a more detailed view on the solver settings and parameters used, it is possible to use the -v option (which stands for verbose) as follows:

Task: 3.2 Rerun the ADRSolver with the verbose option:

$NEK/ADRSolver -v ADR_mesh_aligned.xml ADR_conditions.xml

The simulation has now produced 11 .chk binary files and a final .fld binary file (which in this case is identical to the tenth .chk file). These binary files contain the result of the simulation every 100 time-steps. This output interval has been chosen through the parameter IO_CheckSteps in ADR_conditions.xml, which was set equal to 100. Also, it is possible to note that every 100 time-steps the solver outputs the physical time of the simulation and the CPU time required for doing 100 time-steps. The interval of 100 time-steps is decided through the parameter IO_InfoSteps, which was also equal to 100.