• Ingen resultater fundet

<I PROPERTY="EQTYPE" VALUE=" UnsteadyNavierStokes " />

<!- - How to handle c o n v e c t i o n - ->

<I PROPERTY=" E v o l u t i o n O p e r a t o r " VALUE=" N o n l i n e a r " />

<!- - The type o f s o l v e r : CG or DG - ->

<I PROPERTY=" P r o j e c t i o n " VALUE=" Continuous " />

<!- - The time s t e p p i n g scheme - ->

<I PROPERTY=" TimeIntegrationMethod " VALUE=" IMEXOrder2 " />

</SOLVERINFO>

<V ID=" 0 "> u </V>

<V ID=" 1 "> v </V>

<V ID=" 2 "> p </V>

</VARIABLES>

<N VAR=" p " USERDEFINEDTYPE="H" VALUE=" 0 " />

</REGION>

<N VAR=" p " USERDEFINEDTYPE="H" VALUE=" 0 " />

</REGION>

This appendix is dedicated to giving the reader an introduction to the SEM framework Nektar++[5] that may be used as a tool for solving CFD problems with the implemented incompressible Navier-Stokes solver.

The approach adapted in this section is one which is designed to provide the reader with an overview of Nektar++from a users perspective. It covers the installation and an overview of the different utilities provided with Nektar++. This should provide the reader with enough help to install and use Nektar++.

A.3.1 Installing Nektar++

The reader is referred to

http://www.nektar.info/wiki/3.3/Compile/ for a set of installation instructions for either Mac, Windows or Linux. The author used the Linux instructions and found that these worked without needing to modify anything. The installation and following simulations were based on the following Nektar++and third party software versions33,

Nektar version: nektar++-3.3.0.

ThirdParty version: ThirdParty-3.3.0.

A.3.2 Navigating Nektar++

In the following, the notation(Nektar Dir)/is a reference to the folder which contains the downloadedNektar++ source code. The default name for this folder is: nektar++-3.3.0.

Once Nektar++ has been built on the users system the only two folders which the end user should be concerned with is(Nektar Dir)/builds/and

(Nektar Dir)/regressionTests/.

(Nektar Dir)/builds/: This folder contains seven folders, only three of which are of initial interest to the user. The folders of interest are:

– (Nektar Dir)/builds/regressionTests/: This folder contains a fileruntests.sh which is a shell script that runs a series of tests confirming the all the solvers func-tion as intended. This test should be run every time an update for Nektar++

is installed.

– (Nektar Dir)/builds/solvers/: This folder contains the solvers currently im-plemented in Nektar++. In order to use any of the solvers all that is needed is a correctly formatted .xml file containing your problem (see section A.3.3 on setting up a problem and .xml file) in a directory of choice and then from this directory run the solver.

– (Nektar Dir)/builds/utilities/: In this folder there are two new folders of interest, these are:

- PostProcessing/

- PreProcessing/

(Nektar Dir)/builds/utilities/PreProcessing/: In Preprocessing there are three folders each containing a preprocessing tool. Only the mesh converting tool Mesh-Convert in the ./MeshConvert/ folder is of immediate interest. This tool may be used to convert a mesh created in one of the supported formats to the Nektar++

.xmlformat. A full description of how to use the mesh converter tool is available at http://www.nektar.info/wiki/3.3/Tutorial/MeshConvert.

33All downloadable fromhttp://www.nektar.info/downloader.

A.3 The Nektar++ framework A APPENDIX

(Nektar Dir)/builds/utilities/PostProcessing/: This folder contains a subfolder ./Extras/ and a series of post processing tools. The folder also contain a series of post processing tools. All tools are in the form of an executable. The tools of immediate interest to the end user are listed in the following and may roughly be divided into three categories:

– Category 1: Calculations of Quantities from present fields.

∗ Gradient:

- Name: CalcGrad

- Location: (Nektar Dir)/builds/utilities/PostProcessing/Extras/

- Description: Calculate the gradient of the field numbered ifield in the FILENAME.xml file for the solution stored in FILENAME.fld and prints a new .fld file FILENAME_with_grad.fld

- Call: CalcGradifield FILENAME.xml FILENAME.fld - Output file: FILENAME_with_grad.fld

∗ Vorticity:

- Name: CalcVorticity

- Location: (Nektar Dir)/builds/utilities/PostProcessing/Extras/

- Description: Calculates the Vorticity of the 2D (u,v) or 3D (u,v,w) velo-city fields stored in FILENAME.fld and prints it along with allready existing fields to a new .fld file FILENAME_with_vorticity.fld

- Call: CalcVorticity FILENAME.xml FILENAME.fld - Output file: FILENAME_with_vorticity.fld

∗ L2-norm:

- Name: L2

- Location: (Nektar Dir)/builds/utilities/PostProcessing/Extras/

- Description: Calculate the L2-norm for the field numbered ifield in the FILENAME.xml and stored in FILENAME.fld

- Call: L2ifield FILENAME.xml FILENAME.fld - Output text: printf(L2 of field "ifield" is: XX.XXXX)

∗ Linf-norm:

- Name: Linf

- Location: (Nektar Dir)/builds/utilities/PostProcessing/Extras/

- Description: Calculate the Linf-norm for the field numbered ifield in the FILENAME.xml and stored in FILENAME.fld

- Call: Linf ifield FILENAME.xml FILENAME.fld - Output: printf(Linf of field "ifield" is: XX.XXXX) – Category 2: Conversions for further simulations.

∗ Convert a field from one mesh to another on the same domain:

- Name: FieldToField

-Description: Perform the conversion of the fields stored in FIELDSOLDMESH.fld from one mesh OLDMESH.xml to the file FIELDSNEWMESH.fld on another mesh NEWMESH.xml. In order to work after the conversions the domains

in the two .xml files must be the same, i.e. same boundaries and size, but the mesh is allowed to change. Currently only supports a modal basis.

-Call: FieldToField OLDMESH.xml FIELDSOLDMESH.fld NEWMESH.xml FIELDSNEWMESH.fld

- Output file: FIELDSNEWMESH.fld

- Location: (Nektar Dir)/builds/utilities/PostProcessing/Extras/

– Category 3: Conversions for visualisation / Post processing with other software.

∗ Split the N fields in an.fld file to N seperate.fld files.

- Name: SplitFld

- Call: SplitFld FILENAME.fld

-Output files: FILENAME_1.fld FILENAME_2.fld ... FILENAME_N.fld

∗ Convert .fldfile to a file which may be opened by Gmsh.

- Name: "FldToGmsh"

- Call: FldToGmsh FILENAME.fld - Output file: FILENAME.pos

∗ Convert .fldfile to a file which may be opened by Tecplot.

- Name: FldToTecplot

- Call: FldToTecplot FILENAME.fld - Output file: FILENAME.tec

∗ Convert .fldfile to a file which may be opened by Paraview:

- Name: FldToVtk

- Call: FldToVtk FILENAME.fld - Output: FILENAME.vtu

∗ Convert Nektar++ session .xml file to a file which may be opened by Tecplot:

- Name: XmlToTecplot

- Call: XmlToTecplot FILENAME.xml - Output file: FILENAME.tec

∗ Convert Nektar++ session.xmlfile to a file which may be opened by Para-view:

- Name: XmlToVtk

- Call: XmlToVtk FILENAME.xml - Output file: FILENAME.vtu

(Nektar Dir)/regressionTests/: The regressionTests/ folder contains another folderSolvers/which in turn contain six folders named after six of the solvers imple-mented inNektar++. Each of these folders contain a new folder namedInputFiles/, in which there are a series of .xml files each containing a fully functional Nektar++

simulation which the user can use as inspiration / a template for setting up their own problem.