================================================================================= CBSFlow Formatted Structured Mesh Generator (2d/3d) ------------------------------ Written by Rhodri Bevan Zeta Computational Resources Ltd www.zetacomp.com ================================================================================= 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. User Guide: CBS Structured Mesh Generator code ===================================================== This meshing program is only designed to produce simple box-like geometries. This can be either in 2d or 3d. There are four different element types available: 1. Triangle (3 noded element, 2 noded side) 2. Quadrilateral (4 noded element, 2 noded side) 3. Tetrahedron (4 noded element, 3 noded face) 4. Hexahedron (8 noded element, 4 noded face) Non-uniform structured meshes are produced via a displacement algorithm, if this is disabled then a uniform structured mesh is produced. The parameters for the code are provided in a file called meshparam.inp. The format of this file is as follows: The first line is the element type (1-4), see above for details. The second line is the start coordinates (X, Y, Z components). The third line is the domain extent, again in X Y and Z components. Even if the simulation is 2d, the Z component must be supplied, but will be ignored. The fourth line is the number of divisions in the IJK directions. The fifth line is the output name for the mesh file generated. The sixth line will specify the location of this file. The displacement algorithm is controlled within the code itself if the user wants to change the settings. The settings are located at the start of the source code, together with a simple explanation. The displacement algorithm is exponential, although this can be modified by the user if required. The mesh generator outputs two files, a TECPLOT readable file to visualise the mesh, and the CBSFlow formatted mesh file. This file is described in the next section 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 Side Number --------------------- In 2d the boundary side number can be visualised as: side 1 - bottom side 2 - right side 3 - top side 4 - left While in 3d, this becomes: side 1 - bottom side 2 - top side 3 - front side 4 - right side 5 - back side 6 - left