.. _tutorial_1: Tutorial 1: Simple Aerofoil --------------------------- .. contents:: Table of Contents :depth: 3 :local: :backlinks: none What is in this tutorial? ========================= The NACA0012 is a symmetrical aerofoil which is commonly used for code validation. In this configuration it is a quick and simple simulation to run. By downloading this `zip file `_ and following the instructions below, you should learn to run, post-process and visualise a simple zCFD simulation. This is a small simulation which most users should be able to run on a laptop in ~5 minutes. What you need? ============== To run the tutorial you will need an installation of zCFD and a valid licence (the free licence is sufficient for this tutorial). For instructions on installing zCFD please see :ref:`here ` *or* if you are using an **EPIC Desktop** please see :ref:`here ` The tutorial assumes that you are running all commands using a bash shell on Linux. Step 1. Download the files ========================== The tutorial zip file can be downloaded `here `_. The zip file contains a mesh file (*naca0012.h5*) and a zCFD control file (*naca0012.py*). This tutorial will assume you unzip the file in a directory called "zcfd_tutorial_1" in your users home directory. .. code-block:: bash cd ~ mkdir zcfd_tutorial_1 wget https://zcfd.zenotech.com/tutorials/1/naca0012.zip unzip naca0012.zip Step 2. Review Control file =========================== *naca0012.py* is the zCFD control file. When we run zCFD, zCFD reads the control file and uses the Python dictionary :code:`parameters` to set the solver settings. A brief overview of the parameters dictionary for the simulation is given below; for a more detailed description of the control file structure, see the :ref:`reference guide `. .. parsed-literal:: parameters = { :ref:`"time marching" `: { "unsteady": {"total time": 1.0, "time step": 1.0}, "scheme": {"name": "implicit euler", "stage": 1}, "cfl": 50, "cfl ramp factor": {"growth": 1.1, "initial": 1.0}, "cycles": 1500, }, :ref:`"equations" `: "RANS", "RANS": { "order": "euler_second", "turbulence": {"model": "sst"}, "inviscid flux scheme": "Roe", }, :ref:`"IC_1" `: { "temperature": 300, "pressure": 101325.0, "V": {"vector": [1.0,0.0,0.0], "Mach": 0.15}, "viscosity": 1.02145e-05, "turbulence intensity": 5.2e-2, "eddy viscosity ratio": 1.0, }, :ref:`"BC_1" `: { "zone": [1], "type": "farfield", "condition": "IC_1", "kind": "riemann", }, :ref:`"BC_2" `: { "zone": [4], "type": "wall", "kind": "noslip", }, :ref:`"BC_3" `: { "zone": [2, 3], "type": "symmetry", }, :ref:`"report" `: { "frequency": 10, "forces" : { "FR_1" : {"name" : "wall", "zone" : [4]}, } }, "reference": "IC_1", :ref:`"write output" `: { "surface variables": ["V","p","mach","cp","cf","pressureforce","frictionforce"], "volume variables": ["V", "p", "T", "rho", "mach", "cp", "eddy"], }, } .. _tutorial_1_time: Time marching ^^^^^^^^^^^^^ The start of the parameters dictionary contains the :ref:`time marching