================================================================================= CBSFlow (2d) Compressible (Inviscid) ------------------------------------- Written by Rhodri Bevan Zeta Computational Resources Ltd www.zetacomp.com Uses Characteristic Based Split Scheme for Convection Stabilisation ================================================================================= Source codes - General information ------------------------------------ Please read this information before using the codes. No guarantee is given on any of the source codes provided. All the source codes are copyrighted and no part of the code should be reproduced without the written permission of the author. The code is for personal use only. Improved and updated versions of the codes will be available via our website in due course. If you wish to be kept up to date, then please use the contact form to provide an email address. Full 3d (serial and parallel) codes are also available via the website. User Guide: Fully-Explicit (2d) Compressible code ===================================================== The CBSFlow (2d) executable requires a CASENAME to be provided during runtime. This CASENAME defines the input files. CBSFlow requires 3 input files. A mesh file (.plt extension), a boundary definition file (.bco extension) and a parameters file (.par extension). Using the naca0012 example files, the CASENAME would be airfoil1 and the input files would be: 1. airfoil1.plt 2. airfoil1.bco 3. airfoil1.par Mesh File Layout ----------------- The 1st line defines the size of the mesh: Number of elements (NELEM), Number of Points (NPOIN), Number of Boundary Sides (NBOUN). Then follows the element connectivity table (INTMA) for each element. The element number is first, followed by 3 nodes within the triangle. Afterwards comes the coordinates for each node (COORD), again with the node number first, followed by the x and y coordinates. Finally, information on the boundary sides (ISIDE). The first two numbers in each line denote the 2 nodes within the side. The third number is the element number to which the side belongs. The final number is the boundary side number. This boundary side number is replaced during run-time with information from the boundary condition file. Boundary Condition File ------------------------- The 1st line defines how many boundary side types are present in the mesh (NFLAG). Following this will then be NFLAG entries in the FLAG_LIST array. This array replaces boundary side numbers in the PLT file with boundary flag codes. This procedure is to avoid regenerating the mesh each time you change the boundary conditions. Currently, The available flag codes are: ! 500 - wall, prescribed velocity ! 503 - Freestream Conditions ! 504 - pressure boundary ! 506 - velocity symmetry, no-flux energy Parameters File ----------------- The parameters file is comprised of text outlining what parameters come next in the file, and the parameters themselves. The layout of the file cannot be changed, or CBSFlow will not function correctly, if at all. The 1st parameter (line 2) controls whether freestream conditions are used as an initial solution, or whether a previous solution is used. If RESTART_OPT is 0, then freestream is used. If 1 is chosen, then a previous solution is used, unless no previous solution exists. If this is the case, then the program defaults to freestream conditions. A warning will be printed to screen to inform the user which condition is used. The 4th line of the file contains the freestream conditions. 6 values are required (Ux, Uy, rho, P, Mach and T). The 6th line begins with NTIME, the max number of iterations. The local time-step can be fixed to a constant value (using DTFIXED second entry in line, ON = 1, 0 = local, -1 = Global minimum of local values). The next variable in the line is DTFIX, the variable defines the fixed value if appropriate. Even if not used, this entry (like others) must be present. The final entry in the line (IWRITE) denotes how often the convergence check/screen output is undertaken. The 8th line concerns the residual smoothing parameters. The first entry defines the magnitude of the smoothing, and the second entry defines the number of smoothing loops. The 10th line is farfield related and controls whether vortex correction is applied to the farfield boundary conditions. The 1st entry is the ON (1) or OFF (0), and the second and third entries denote the X and Y coordinate of the vortex centre. The final entry on the line is the chord length of the aerofoil. The 12th line denotes a safety factor (CSAFM), and THETA1. The safety factor is used during the local time-stepping calculation to reduce the used local time-step below the critical value. THETA1 is the value used in the continuity equation. Theta(2) is hard-coded as 0, as Step 2 is solved explicitly in this version of CBSFlow. Line 14 contains the artificial diffusion and gamma information. The first entry is gamma (1.4 for ideal gas) the second is the artificial diffusion parameters. Line 16 defines the Reynolds Number and Prandtl number, together with the ratio between stag temperature and freestream. Line 18 controls the steady state tolerances (L2 norm - velocity, density and energy). First entry (0 - OFF, 1 - ON) for Velocity, followed by tolerance value itself. Third entry is ON (1)/ OFF (0) for Density, followed by tolerance. Fifth entry is ON (1)/ OFF (0) for Energy, followed by tolerance. If energy is not solved, then energy tolerance is ignored. Output type is controlled by line 20. First entry enables (1) or disables (0) Paraview Output, second entry enables (1) or disables (0) tecplot output. Line 22 contains a single option for Run Time Control. 1 is ON, 0 is OFF. If on, then CBSFlow will update the simulation with new values whenever the Parameters file is modified (and saved). Only certain values can be changed during run-time however, to avoid calculation issues. If the wrong value is changed, this will not have an effect on the simulation and the simulation will need to be stopped and restarted for it to be updated. Running CBSFlow ------------------ After compiling the program, for example using gfortran, then the program can be run from the command line with one argument in the command. e.g. prompt:> cbsflow2d 5000NUcav This would require the CASE 5000NUcav to be located in the current directory. Otherwise , if located in a subdirectory the command would be: prompt:> cbsflow2d ./a_subdirectory/5000NUcav During run-time, some output to screen occurs. This information is intended to inform the user as to the progress of the iterative scheme. Both L2 Norm information and residual information is presented. It is advised that the user consult the example benchmark files provided on www.zetacomp.com If any bugs are detected, then the authors would like to be informed (via email/the contact form located on the website). Feedback is also welcomed. However, only limited complementary support may be provided, and on a case-by-case basis. Additional software will be added to the website in due course.