Nektar++

Here, we will explain how to use the incompressible NavierStokes solver of Nektar++ using the direct solver. Its source code is located at Nektar++/solvers/IncNavierStokesSolver/EquationSystems
. We will start by showing the formulation and demonstrating how to run a first example with the incompressible NavierStokes solver and briefly explain the options of the solver specified in the input file. After these introductory explanations, we will present some numerical results in order to demonstrate the capabilities and the accuracy of the solver.
We consider the weak form of the Stokes problem for the velocity field and the pressure field :
where , and are appropriate spaces for the velocity and the pressure system to satisfy the infsup condition. Using a matrix notation the discrete system may be written as:
where the components of and are , and and the components and are and . The indices and refer to the degrees of freedom on the elemental boundary and interior, respectively. In constructing the system we have lumped the contributions form each component of the velocity field into matrices and . However we note that for a Newtonian fluid the contribution from each field is decoupled. Since the inetrior degrees of freedom of the velocity field do not overlap, the matrix is block diagonal and to take advantage of this structure we can statically condense out the matrix to obtain the system:
To extend the aboce Stokes solver to an unsteady NavierStokes solver we first introduce the unsteady term, , into the Stokes problem. This has the principal effect of modifying the weak Laplacian operator into a weak Helmholts operator where depends on the time integration scheme. The second modification requires the explicit discretisation of the nonlinear terms in a similar manner to the splitting scheme and this term is then introduced as the forcing term .
The folder Nektar++/regressionTests/Solvers/IncNavierStokesSolver/InputFiles
contains several *.xml
files. These are input files for the NavierStokes solver specifying the geometry (i.e. the mesh and the spectal/hp expansion), the parameters and boundary conditions. Further details on the structure of the input file can be found in pageXML.
Now, lets try to run one of them with the coupled solver.
Test_ChanFlow_LinNS_m8.xml
to the directory where the solver is compiled, e.g. Nektar++/solvers/IncNavierStokesSolver/build/IncNavierStokesSolver
.The solution should now have been written to the file Test_ChanFlow_LinNS_m8.fld
. This file is formatted in the Nektar++ output format. To visualise the solution, we can convert the fldfile into TecPlot, Gmsh or Tecplot file formats using the Postprocessing tools in Nektar++/utilities/builds/PostProcessing/
. Here, we will demonstrate how to convert the fld
file into TecPlotfile format.
We convert the fld
file into Tecplotfile format by typing
It will create Test_ChanFlow_LinNS_m8.dat
which can be loaed in TecPlot.
A detailed descriptions of the input file for Nektar++ can be found in pageXML. For what concern the incompressible NavierStokes solver a typical set is:
Futher options can be specified in the input file, as for the Steady Oseen Flow:
[1] S.J. Sherwin and M. Ainsworth: Unsteady NavierStokes Solvers Using Hybrid Spectral/hp Element Methods, Conference Paper, 2000.
[2] R. Stenberg and M. Suri: Mixed hp finite element methods for problems in elasticity and Stokes flows, Numer. Math, 72, 367389, 1996.
[3] M. Ainsworth and S.J. Sherwin: Domain decomposition preconditioners for p and hp finite element approximation of the Stokes equations, Comput. Methods Appl. Mech. Engrg., 175, 243266, 1999.
[4] P. La Tallec and A. Patra: Nonoverlapping domain decomposition methods for adaptive hp approximations of the Stokes problem with discontiunous pressure field, Comput. Methods Appl. Mech. Engrg., 145, 361379, 1997.
[5] G. E. Karniadakis, M. Israeli, and S. A. Orszag: Highorder splitting methodsfor the incompressible NavierStokes equations, J. Comput. Phys., 97, 414443, 1991.