ANSA v18.1.1 ANSA for CFD Brief User's Guide ANSA for CFD Brief User's Guide v18.1.1 BETA CAE Systems 1 ANSA v18.1.1 ANSA for CFD Brief User's Guide Table of Contents 1. Introduction.............................................................................................................................................. 4 1.1. CFD layout....................................................................................................................................... 5 1.2. How to get help for ANSA?............................................................................................................... 6 1.3. Customizing ANSA........................................................................................................................... 7 1.4. Basic terminology............................................................................................................................. 8 1.5. View Control..................................................................................................................................... 9 1.6. Detail on Demand effect................................................................................................................. 10 1.7. Most important key actions............................................................................................................. 10 1.8. Making Selections.......................................................................................................................... 11 1.9. TOPO menu................................................................................................................................... 12 1.10. MESH menu................................................................................................................................. 13 1.11. DECK menu.................................................................................................................................. 14 1.12. MORPH menu.............................................................................................................................. 15 1.13. HEXABLOCK menu...................................................................................................................... 16 2. Geometry Preparation........................................................................................................................... 17 2.1. Data Input....................................................................................................................................... 17 2.2. Resolution and Tolerances............................................................................................................. 18 2.3. Effect of tolerances on CAD operations.......................................................................................... 19 2.4. Geometry Clean up........................................................................................................................ 21 2.5. Wetted surface extraction for thin parts.......................................................................................... 23 2.6. Wetted surface extraction for bulk parts or assemblies..................................................................24 2.7. Watertight preparation.................................................................................................................... 25 2.8. Checking for intersections and proximities at Geometry level........................................................25 2.9. Creation of sub-volumes................................................................................................................. 26 2.10. Model organization through the Model Browser (Part Manager)..................................................27 2.11. Detection of Baffles...................................................................................................................... 28 2.12. Link Geometry.............................................................................................................................. 29 2.13. Treating Surfaces......................................................................................................................... 30 3. Surface Meshing on Geometry.............................................................................................................. 31 3.1. Simplifying Macros......................................................................................................................... 31 3.2. Uniform size mesh.......................................................................................................................... 32 3.3. Variable feature dependent size mesh (CFD mesh).......................................................................33 3.4. Notes on CFD meshing.................................................................................................................. 34 3.5. STL like mesh................................................................................................................................. 37 3.6. Summary of Automatic Quality Improvement functions..................................................................38 3.7. Useful Checks................................................................................................................................ 40 4. Watertight model preparation................................................................................................................. 41 4.1. Intersecting meshed parts.............................................................................................................. 41 4.2. Surface wrapping approach............................................................................................................ 42 4.3. Preparation for wrapping................................................................................................................ 43 4.4. Constant length surface wrapping.................................................................................................. 44 4.5. Variable length surface wrapping.................................................................................................... 45 4.6. Post-wrap checks........................................................................................................................... 47 5. Identifying leaks..................................................................................................................................... 48 6. Layers.................................................................................................................................................... 49 7. Volume Meshing.................................................................................................................................... 53 7.1. Manual Volume Definition............................................................................................................... 53 7.2. Auto Detect functionality for Volume Definition...............................................................................53 7.3. Meshing the Volume....................................................................................................................... 53 7.4. Semi-structured volume mesh........................................................................................................ 55 7.5. Checking the Volume quality and fixing.......................................................................................... 55 8. Batch Meshing....................................................................................................................................... 56 8.1. Setting up Batch Mesh sessions..................................................................................................... 57 9. Hexablock Meshing............................................................................................................................... 58 10. CFD solver I/O formats........................................................................................................................ 61 10.1. Definition of periodic boundary conditions....................................................................................63 11. Model generation Checklist.................................................................................................................. 64 12. Recommendations for OpenFOAM model setup.................................................................................66 12.1. Setting up the quality criteria limits............................................................................................... 66 BETA CAE Systems 2 ANSA v18.1.1 ANSA for CFD Brief User's Guide 12.2. Surface meshing........................................................................................................................... 66 12.3. Layers generation......................................................................................................................... 67 12.4. Final Volume mesh improvement................................................................................................. 68 12.5. Setting up Boundary Conditions................................................................................................... 69 12.6. Solver setup.................................................................................................................................. 70 12.7. Running the case.......................................................................................................................... 70 13. Importing CFD results in ANSA............................................................................................................ 71 13.1. Importing results from the same mesh......................................................................................... 71 13.2. Importing results from a different mesh........................................................................................ 72 14. Morphing for CFD................................................................................................................................ 73 14.1. Box Morphing Approach............................................................................................................... 74 14.2. Box preparation............................................................................................................................ 75 14.3. Box shape issues......................................................................................................................... 77 14.4. Box boundaries............................................................................................................................. 77 14.5. Larger Boxes maintain orthogonality............................................................................................ 78 14.6. Larger Boxes result in smaller deformations of the volume mesh................................................78 14.7. Tangency condition....................................................................................................................... 79 14.8. Additional User Tangency condition.............................................................................................. 80 14.9. Tolerances.................................................................................................................................... 81 14.10. Edge fitting on features of the model.......................................................................................... 81 14.11. Using 1-D Box edges.................................................................................................................. 83 14.12. Troubleshooting morphing boxes................................................................................................ 84 14.13. Direct Morphing (without morphing boxes).................................................................................85 14.14. Define MORPH Parameters....................................................................................................... 86 14.15. The Deformation Morph Parameter............................................................................................ 86 14.16. Imposing pre-defined deformations............................................................................................ 87 14.17. Model Browser structure............................................................................................................. 90 15. User Defined Functions for CFD models............................................................................................. 91 16. How To and Troubleshooting section................................................................................................... 94 COPYRIGHT 1990-2018 BETA CAE SYSTEMS ALL RIGHTS RESERVED BETA CAE Systems ansa@beta-cae.com http://www.beta-cae.com BETA CAE Systems 3 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1. Introduction This document is a compressed summary of ANSA's functionality for CFD and describes some important steps/points that are useful for the creation of a CFD model. As CFD models are usually large in size, ensure that you are using the 64bit version of the code to take full advantage of all your hardware’s memory. Start ANSA as follows: /<installation_path>/ansa_v18.x/ansa64.sh for Linux, or ./ansa64.bat for Windows This will open the ANSA launcher window: Start-up mode selection Option to start a new custom user defined mode based on the above selected one Specification of additional start up arguments and commands (press the ? button to list them) Option to skip the launcher and always start with the current options Select the CFD mode and press OK. The CFD mode of ANSA is customized with respect to the interface as well as the actual functionality (mesh parameters, quality criteria etc) so that it performs best for CFD pre-processing tasks. It is therefore highly recommended to use this mode of ANSA for your work. Note: if the launcher does not appear (due to special installation issues in your company) you can impose directly the start-up of ANSA in CFD mode by adding the argument -gui CFD, for example in Linux: /<installation_path>/ansa_v18.x/ansa64.sh -gui CFD BETA CAE Systems 4 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.1. CFD layout 3. Help 1. DB Browser - Browser - Filters 4. Tools: -Batch mesh ..... -Settings 2. Lists: -Model Browser -PID list ...... 14. ANSA Info window 13. Progress bar 5. Utilities: -Mesh Parameters -Quality Criteria ....... -Measure 6. Modules Group Name 7. Group of Functions 10. Visibility status buttons of entities 12. Selection assistant 8. Options window 9. Drawing Styles 11. FOCUS commands 1. DataBase Browser to browse and filter entities from the contents of the ANSA file. 2. Access to Lists: Model Browser for model organization through Groups, sub-assemblies and Parts PIDs (Property ID) for management of Properties of the model MIDs (Material ID) for management of Materials of the model SETs for management of SET (groups of ANSA entities like Elements, Properties, Faces etc.) 3. Access to Help from main menu bar: html Online-Help and all PDF documentation 4. Access to Tools: Batch Mesh for meshing automation Script Editor for user scripting language editor Access to User Defined Functions, UDFs (section 15) Checks for model validity and fix checks Settings for customization of Functionality and GUI, correspondingly saved in CFD.defaults and CFD.xml files in your home directory under <homedir>/.BETA/ANSA/version_v17.x.x/ 5. Access to Utilities: Mesh Parameters for controlling the meshing algorithms and quality improvement Quality Criteria for setting solver specific quality criteria and Presentation Parameters Measure tool to make measurements of the model 6. Switch between the main Modules of TOPO for geometry creation, manipulation, cleanup and watertight preparation MESH for surface and volume mesh and fix DECK for solver related features and the creation of Size Boxes for controlling mesh size MORPH for mesh and geometry morphing HEXABLOCK for hexa meshing based on block structured boxes 7. The functions are arranged in Groups, depending on the Entity they are applicable to. Some additional functions that may exist in the buffer menu (hidden) can be accessed by clicking on the Group Name with the left mouse button. 8. The Options window displays all the settings of the currently Active function. 9-10. These flag buttons control the visibility mode of the model, in the form of flags or toggle buttons like coloring the model in ENT (Entity) or PID (Property ID), or SHADOW or WIRE mode etc. In addition, there are visibility flag buttons for different Entities. 11. The FOCUS group contains all the functions that are used to isolate and control the visibility of selected entities in order to obtain a clear image of the working area of the model 12. The Selection Assistant allows the selection of entities in different modes 13-14. Progress bar, instructions and reporting of the program are printed in the message line and the ANSA info window. BETA CAE Systems 5 ANSA v18.1.1 ANSA for CFD Brief User's Guide The bottom section of the GUI consists of the button groups shown below (labels below icons can be activated with right-click option on any toolbar and selecting “Show Labels”: <-Selection Assistant-> <-------------Focus Commands----------------> <-------Visibility View Modes---------> <-------------------------------------------Visibility Status buttons--------------------------------------------------------------> 1.2. How to get help for ANSA? This document is the best place to start from. However please have also in mind the following: ANSA Tooltips If you leave the cursor for a couple of seconds on any ANSA button you will find useful tool tip information Online Help If you press Ctrl+left mouse button on any function ANSA will open the html Online Help with more details about the function. Online help is also accessible from Help>ANSA Online Help. In this page you can also use the Search field to find other functions. ANSA PDF documentation From Help> Documentation Index you can easily access all the PDF documents of ANSA, like User-Guides and Tutorials. Ensure that your system has a default PDF viewer so that the documents are accessible. Start with the two tutorials in the CFD section: CFD - The Basics - Meshing external aerodynamics BETA CAE Systems YouTube channel Look for the following videos on YouTube Live Introductory webinar on ANSA for CFD ANSA/META features for CFD ANSA Technical Support Please contact us at ansa@beta-cae.gr or at your local distributor for any further queries you may have. BETA CAE Systems 6 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.3. Customizing ANSA The CFD mode is the best starting point of ANSA for CFD applications. This does not mean that you cannot customize it to your specific needs or preferences. You can make any change in the functionality settings (default solver, quality criteria, meshing parameters etc) or the GUI settings (button positions, colors, window sizes etc) and then save them through the Tools>Settings window: At the bottom left there are buttons to save three customization files: (ANSA) Settings: save all functionality related settings in CFD.defaults file Translators (Settings): Save all settings related to opening of CAD data in CFD_translators.defaults file and GUI Settings: Save GUI settings: save all GUI settings in CFD.xml file Save Settings and Save GUI Settings will save in your home directory, in a hidden folder named .BETA your customized settings (in the files CFD.defaults and CFD.xml correspondingly) as shown below for every ANSA version: CFD.defaults contains all your customized functionality settings CFD.xml contains all your customized GUI settings CFD_TRANSL.py is a file that contains user defined script functions (see section 14) launcher.txt contains the last used settings of the ANSA launcher window Next time you start ANSA, these customized settings will be read and applied. Note that these customized settings are very important as they affect not only the appearance of ANSA but also its functionality. If for whatever reason you are in doubt about these local settings, you may remove them from this location and then ANSA will start again with the default settings of the CFD mode. BETA CAE Systems 7 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.4. Basic terminology In the TOPO menu the following entities appear: 3D Curve 3D Point Triple CONS Double CONS Single CONS Hot Point Weld Spot Face Surface Cross hatch Connecting Spot FE-model elements The Surface is the underlying mathematical CAD description of the Face where the actual mesh takes place. The CONS (Curves ON Surfaces) are the boundaries of the Faces. According to their connectivity, they are colored in Red (single edge), Yellow (double connectivity) or Cyan (triple -or more- connectivity). The Hot Points are the end points of CONS. 3D Curves are curves in space that are used for CAD constructions, but they are not connected to the Faces. 3D Points are also used for geometrical constructions. Correspondingly, in the MESH and DECK menus: Perimeter Segment Hot Point Perimeter Node Weld Spot Macro Area Connecting Spot FE-model elements A Macro Area may consist of one or more joined Faces. The Perimeters are the boundaries of the Macro Areas. The Hot Points are the end points of the Perimeters. FE-model is a mesh that is not associated to any geometry (dead-mesh). Finally, a yellow Connecting Spot indicates connectivity of Macro area (geometry) with FE-model mesh. BETA CAE Systems 8 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.5. View Control Basic view control can be achieved with the mouse: Rotate Hold down the [Ctrl] key and rotate the model by pressing the left mouse button. Note that with [Ctrl+Shift] pressed, you get dynamic mode rotation (automatically Shadow mode and other details become de-activated for faster view manipulation!). Ctrl Translate Hold down the [Ctrl] key and translate the model by pressing the middle mouse button. Ctrl Zoom Hold down the [Ctrl] key, and zoom in and out by pressing both left and middle mouse buttons Moving the mouse left and down the view zooms in and moving right and up the view zooms out. You can also zoom in and out by using the mouse wheel. Ctrl View control is also possible using the Function keys of the keyboard: F1 F2 TOP FRONT BETA CAE Systems F3 F4 F5 LEFT BOTTOM BACK 9 F6 F7 RIGHT ZOOM IN F8 F9 F10 ZOOM OUT ZOOM ALL Default View ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.6. Detail on Demand effect By default, the visibility of details and model appearance of a model vary with the current zoom level. This means when you look at a model from distance, less detail is displayed (for example you cannot see the WIRE of the mesh). As you zoom in, you begin to see more and more details like the mesh wireframe. Zoom in high detail Zoom out low detail The magnitude of this effect, called detail on demand, is controlled by the Quality Criteria window (F11 key), Presentation Parameters tab with the slide bar shown on the left. F11 higher detail lower detail 1.7. Most important key actions The mouse buttons are mainly used as follows: The left mouse button (1): - to activate menu buttons - to select or define entities The middle mouse button (2): - to confirm selections or processes The right mouse button (3): - to perform the opposite action of left mouse button (e.g. select/deselect or insert/delete) - to reapply last action to other entities The [ESC] key cancels operations, exits from functions and closes windows at any step of the process. So if you are in doubt, press [ESC]. The [ESC] key can also be used to interrupt a function while it is running (for example aborts the Surface or Volume meshing process during its calculation, if this takes too long). Esc F11 The [F11] key gives access to the Quality and Presentation Parameters window. In this window the user can specify the solver specific quality criteria definitions and their threshold values, as well as other presentation attributes. BETA CAE Systems 10 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.8. Making Selections Selections are performed with left mouse button. Selected entities are highlighted in white and can be deselected with right mouse button, if it is required. Selections can be made in various ways: single entities, box selections, or feature selections. The selection assistant appears at the bottom, next to the FOCUS commands, like for example the selection of shell elements by feature angle here below: The selection assistant appears in two modes, one for Area selection (shell elements, Faces etc) and one for Line selection (3D Curves, CONS, element edges, nodes along an edge etc Area selection mode ENT: selection of individual entities, one by one. PID: selection of all the entities of one selected PID. PID region: selection of the entities of an unconnected region of one PID. Macro Area: selection of an individual Macro area and its elements. VOL: Selection of a specific ANSA Volume entity. PART: Selection of all the entities of an ANSA Part Feature Angle: Automatic selection of shell elements or Faces within a user specified feature angle. Line selection mode ENT: Selection on individual entities, one by one Corner Angle: Automatic selection of edges/curves along a user specified corner angle. Loop: Automatic selection of all edges/CONS along a closed loop (useful for hole closure). Opposite: Automatic selection of parallel Perimeters, edges etc. (useful for aligning nodal number and spacing on Perimeters). direction Note that when selecting edges or CONS in Corner Angle selection mode, the direction of selection is dictated from the side that is picked, as shown here. picked side BETA CAE Systems 11 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.9. TOPO menu In this menu the user can create, modify and clean up the geometry. The menu is divided in groups of functions according to the entities they refer to. Hot Points These functions are used to create or delete Hot Points or Weld Spots. CONS Functions that are applied on CONS (Curves ON Surfaces). Faces Functions to create or modify Faces. Surfaces Functions that create Faces and modify Surfaces. Curves Functions to create 3D Curves. Points Functions to create 3D Points. Auxiliaries Functions to create Working Planes in order to draw in 2D mode. Options List window The available options of the currently active function appear in this window. BETA CAE Systems 12 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.10. MESH menu In the MESH menu the user can create, modify and fix surface and volume mesh. Hot points Functions to insert or remove Hot Points or Weld Spots. Perimeters Functions to assign Perimeter nodes. Macros Operations to modify Macro Areas, manually or automatically, in order to improve their shape for better surface meshing. Grids Manual operations on grids (move and paste). Mesh Generation Surface meshing algorithms. Shell Mesh Quality improvement function Improve and other operations on surface mesh. Elements Manual operations on elements. Octree Surface Wrapping and Hextreme volume meshing based on Octree algorithms Volumes Volume definition, mesh generation and quality improvement functions for volume elements. Options List window The available options of the currently active function appear in this window. BETA CAE Systems 13 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.11. DECK menu In the Deck menu the user can specify the Solver for which to prepare a model (etc. OpenFOAM, Fluent, Star etc). In addition, they can perform some operations on Grids, Coordinate Systems, Elements, or define Size Boxes for mesh size control, and setup solver controls. NODE Functions to create, delete or disconnect nodes. COORD. SYSTEMS Functions to create orthogonal, cylindrical or spherical coordinate systems. ELEMENTS Functions to create manually individual line, shell and solid elements and renumber them. SIZE BOXES Functions to create and manage Size Boxes in order to control the max element length of surface and volume mesh in specific regions of the model. AUXILIARIES Setup solver controls (like the controlDict file for OpenFOAM or definition of non-conformal interfaces). BETA CAE Systems 14 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.12. MORPH menu In this menu the user can morph surface/volume mesh and geometry in order to modify and improve a design. Boxes Functions to create and manage Morphing Boxes. Controls Functions to define and manage Morphing Parameters. Control Points Functions to insert Control Points on Morphing Box edges in order to change their shape. Edges Functions that affect Morphing Box edges (like for example the control of Tangency on them). Hatches Functions that work on Morphing Box faces (Hatches). Box Morping Movement of Control Points (with or without Morphing action, depending on the status of the Morphing field in the Options List window). Direct Morphing Morphing without the need of Morphing Boxes. Checks Troubleshooting checks for Morph Box morphing. Options List window View Mode: Control of visibility of the geometry in TOPO or MESH view mode. Morphing: The status of this field controls whether a control point movement, from the MODIFICATION group of functions, will Morph or not the model that is loaded in the Boxes!! See section 12 for more details. BETA CAE Systems 15 ANSA v18.1.1 ANSA for CFD Brief User's Guide 1.13. HEXABLOCK menu In this menu the user can generate pure hexa meshes based on block topologies (see section 8). Boxes Functions to create and manipulate Hexa Boxes. Control Points Functions to insert Control Points on Morphing Box edges in order to change their shape later on. Association Functions to associate the Control Points, Edges and Faces of the Boxes on the actual model geometry, so that the mesh can be projected on the geometry. Modification Functions to move specific Control Points in order to change the shape of the boxes. Edges Function to assign and modify the nodal distributions on Box edges. Shell Mesh Functions to generate shell mesh on Box Faces. Volume Mesh Functions to generate volume mesh in Boxes. Options List window: View Mode: Control of visibility of the underlying geometry in TOPO or MESH view mode The available options of the currently active function appear in this window. Most important are Element type: mixed or tria and Project on geom: Option to project the generated mesh on the underlying geometry. BETA CAE Systems 16 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2. Geometry Preparation 2.1. Data Input In ANSA you can File>Open directly the following CAD files: Neutral files Native CAD files IGES, STEP, VDA Catia v4 and v5, Unigraphics, ProEngineer, SolidWorks, Inventor, Parasolid, JT Reading native CAD files offers a better quality geometrical data and in addition you can also translate and inherit in ANSA information about Property name and ID, Part name and assembly structure of the model, etc., as originally designed in the CAD process. This additional information helps you to manage your model with greater flexibility and trace back a Part in the CAD system, if necessary. Before opening a CAD file ensure that you check the Settings>Translators which control important translation options like: - How Properties (PIDs) are extracted (from CAD Body, Part, Layer etc) - If Sets are created. This may extract names of areas of the geometry that may be useful in model management. These SETs could then be translated in PIDs (see section 15) - How topology and cleanup is performed If you do not see the same information of PID or Part as assigned in CAD when opening a file, try changing the above settings. ! Keep in mind that an IGES file for example does not have topology information so ANSA topology must be active. A Catia file, on the contrary, already contains the topology information, so ANSA topology does not have to be applied. Another important setting when opening neutral CAD files like IGES that do not contain topology information, are the Settings>Tolerances. Depending on the size and detail of the model you may want to try alternative settings to see which one gives the best resulting topology. The two tolerance values represent the maximum distance between two Hot Points and two CONS below which ANSA will perform topology on. When opening IGES or STEP files, you can also activate in Settings>Translators>Neutral Files Topology the option Clean Geometry in order to get even fewer errors. Finally, for IGES and STEP files you can try to read them either with ANSA or CT libraries, by selecting Settings>Translators File Associations for Neutral files, in order to check which one gives the best result. BETA CAE Systems 17 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.2. Resolution and Tolerances ANSA displays the geometry (the Faces) based on a certain Resolution (element length). By default, this resolution is set to 20 (but the user can modify it from Settings>Resolution). Good resolution The exact geometrical accuracy is not compromised, the resolution only affects the visual display. The resolution length should be set near the element length which will be used to mesh the model. In this way the geometry is displayed with the same level of detail as the final discretized meshed model. Very coarse resolution If the geometry is very small in dimensions, then the default resolution (20) may not be appropriate and the model may look ragged. The user can either change the Resolution or go to Mesh>Perimeters>Length and change the element length. Alternatively, they can use the Mesh>Perimeters> Spacing [AutoCFD] (see section 3.3) and ANSA will assign proper nodal distributions to resolve all curved-shape details. Very small model dimensions compared to tolerances In addition, when ANSA performs topology to “stitch” together Faces and close gaps, it uses some tolerance values. By default these values are set to “middle” level (0.05 for Hot Points and 0.2 for CONS) but can the user can modify it from Settings>Tolerances. These tolerances are also graphically represented by two horizontal white lines at the bottom left of the graphics window. If these lines are as large as the model, this implies that the model has very small dimensions and should be scaled up (Transform>Move [Scale]), otherwise problems may occur in geometry Tolerance lines representing graphically the tolerance values handling and meshing !! In general when you fit the whole model in the view you should not be able to see the white tolerance lines. ! Check also your current units in Settings>Units and ensure that your metric system units are correct. Make a measurement to see if the model is indeed in mm, inch or metres for example. BETA CAE Systems 18 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.3. Effect of tolerances on CAD operations Apart from the topology operations (during CAD import or afterwards by TOPO and PASTE functions), the current Tolerance Settings also influence the accuracy of all CAD operations in ANSA. Being aware of this, the user can adjust the tolerances to obtain the desired result. Tolerances are managed in Settings>Tolerances. Draft tolerances The effect of tolerances will be demonstrated in the following example using the CONS>Project function. The idea applies to all CAD operations. In this example a 3D Curve is projected on a Face to trim it near its edge. ! Note that the 3D Curve lies very close to the boundary CONS of the Face. Draft tolerances If the Projection takes place with Draft Tolerances, the result may not be good. Here the trimming has not taken place along the whole length of this edge of the Face. In some other cases, no cut may take place at all. Draft tolerances Contrary, if Fine Tolerances are used, the trimming takes place with high accuracy and a very thin part of the Face is cut, exactly along the original 3D Curve. Extra-fine tolerances Fine tolerances, do not always mean the best possible result. In this example, the two 3D Curves are projected on the Faces below. ! Note that the 3D Curves do not meet at a common location. A gap exists between them. BETA CAE Systems Draft tolerances 19 ANSA v18.1.1 ANSA for CFD Brief User's Guide The 3D Curves and the corresponding Faces are selected for the CONS>Project function. With Draft Tolerances a closed cut is performed, because the gap of the original Curves falls within the current tolerances. However, with Fine Tolerances, the gap of the original Curves is reflected on the cut of the Faces. The created CONS do not meet. As a result the SHADOW view mode is usually lost for some Faces (These Faces are called Unchecked Faces). The user must then close the cuts manually to close the Faces and recover Shadow. Extra-fine tolerances Another example here demonstrates the effect of tolerances on the creation of a new COONS type Face. With draft tolerances a Surface with few patches is created, resulting in a “lighter” geometry description. Draft tolerances With extra-fine tolerances, a Surface with several patches is created, possibly due to some “noise' in the curvature of the selected CONS. The extra detail of the CONS which may be unnecessary leads to a “heavy” surface description. Extra-fine tolerances BETA CAE Systems 20 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.4. Geometry Clean up When reading geometry in ANSA you should first check the topology. You can refer to CFD Tutorial The Basics to follow the clean up steps of this model. De-activate SHADOW and DOUBLE CONS visibility and see if there are any red or cyan CONS which indicate single or triple connectivity. You can also do this with one click if you press Drawing Styles>TOPO Check Gaps Topological problems Check if these features are intentional, or topological errors. Use the functions from the TOPO module to fix such problems No Topological problems The final view should be like the one shown here. Before switching to MESH, activate SHADOW. If ANSA reports UNCHECKED Faces in the legend on the left then this means that there are Faces that cannot be shaded. These are problems that need to be fixed. Use right-click on the legend for Show Only or Fix BETA CAE Systems 21 ANSA v18.1.1 ANSA for CFD Brief User's Guide You can also use the function Check>Geometry to identify and fix automatically some problems. There are different categories of problems that can be identified. If problems are identified the user can right-click on the list to isolate or fix them automatically if possible. BETA CAE Systems 22 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.5. Wetted surface extraction for thin parts If you start with solid description parts, you need to extract the outer (or middle) surface. Depending on the case, you should use one, or a combination, of the following approaches: Pressed sheet metal Parts (clean geometry) For pressed sheet metal parts that have no topological problems (gaps, red CONS) the Faces>Mid. Surface [Skin] function can be used. This function can quickly identify the two sides of the thin part and the user can select which one to keep. Cast parts with triple connectivity For parts that do not have fully clean and closed geometry or are not plain pressed sheet, but contain ribs and reinforcements, the Faces>Mid. Surface [Skin] function cannot be used. Instead, the user can follow this workaround. Use the FOCUS commands OR and NOT with the feature angle selection active and a suitable angle value limit (you may have to increase the default angle to around 70). With this approach the geometry may contain gaps. The result is a simple outer surface extraction of one of the two sides. Another option is to use the Faces>Mid. Surface [Casting] function. This will generate the middle skin of a complex cast part as shown below. This option is more computationally intensive than the SKIN option, so should only be used for really complex parts. Note that the result of the Faces>Mid. Surface [Casting] function is an FE-model mesh. BETA CAE Systems 23 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.6. Wetted surface extraction for bulk parts or assemblies When you are dealing with large bulk parts (engine, transmission, exhaust box, interior passages of HVAC systems, etc.) there are two functions that can assist you in extracting the geometry of interest, whether this is the outer or the inner side. Each one has pros and cons, so the user can try both to see which brings the most desired results. The Isolate [Skin] function. This is an example of an exhaust system with a catalyst inside. In order to easily extract say the exterior Faces, if the domain of interest is the flow surrounding the exhaust system the user can activate the Isolate [Skin] function. This function does not require perfectly connected geometry, red CONS and intersections may be present. Still, some major openings, like the inlet and outlet, should be closed by the user. Here the user must specify to isolate Outer or Inner Faces. Specify also the minimum gap or leak size. Provided that no gaps larger than this size are present in the model, ANSA will isolate all the outer Faces. On complex models, most of the times one cannot be certain if a model is fully closed. Specifying some source points inside the “dead” regions allows ANSA to detect possible leaks. If there is a leak, with respect to the leak length specified, ANSA will stop and create a 3D curve of the leak path. The user can trace the curve, find the leak, close it and re-apply the function. If there is no leak, ANSA will leave visible only the required Faces. The Isolate [Exterior] function For the same example the function Isolate [Exterior] with the option Scan All Around will “mark” each entity with a value from 0 to 1, where 0 is for absolutely exterior, 1 for absolutely interior and any intermediate value for faces that are partly exterior and partly interior. The model is displayed in contour plot of this value and a window pops up with all the entities listed with the corresponding value. The user can right-click on each entry and use Show Only for example. BETA CAE Systems 24 ANSA v18.1.1 ANSA for CFD Brief User's Guide The option Normal to Screen of the Isolate [Exterior] function, will instruct the algorithm to separate in two classes Exterior and Interior the entities that can be seen from one view angle only, the one normal to the screen plane (so function is view dependent). This option is recommended for thin parts and assemblies (for example the underbody sheet metal parts) 2.7. Watertight preparation Having extracted the outer surfaces, you must create the watertight model by sealing all gaps and eliminating the overlaps. If these gaps are small (close to the Tolerances), they can be closed by Faces>Topo or Paste functions. If they exceed (by far) the tolerances, then new Faces must be created (usually with Faces>New [COONS]) to close them. 2.8. Checking for intersections and proximities at Geometry level You should make some checks for intersection and proximity while constructing your model. First of all, use the Checks>Penetration [Intersections] to locate intersecting areas (wrong topology, misplaced parts etc). Fix these areas using Topo functions (like Faces>Intersect). Use the Isolate>Flanges [Proximity] function to isolate Faces within a certain distance apart. This will indicate you all the proximity problematic areas that may cause problems in volume meshing. Then use the Faces>Fuse function to close these narrow proximity passages, where possible. Isolate>Flanges [Proximity] BETA CAE Systems 25 Faces>Fuse ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.9. Creation of sub-volumes Usually you need to create more than one volumes, either to allow different boundary conditions (porous and moving zones), or to be able to change only a part of the model and re-volume mesh only the area around it, or even for post-processing purposes. When you create new Faces to define the sub-Volumes, remember to put them in PIDs that can be easily recognized by a name convention (say interior ) so that you can filter them easily in the Property List. It is also a good idea to create a Part in the Model Browser (see section 2.10), where you place all such interior faces. BETA CAE Systems 26 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.10. Model organization through the Model Browser (Part Manager) When working with complex models with hundreds of Properties it is very useful to use the Model Browser. The Model Browser is like a file manager. It consists of Groups and Parts just like folders and files. In this sense it contains a tree structure of the assembly of your model. By default this tree structure is automatically extracted from the CAD file that you have read in ANSA (Catia, UG etc). If you do not have a proper Model Browser structure you can create your own, starting from creating new Groups and Parts, placing entities inside Parts, and Parts inside Groups. The most useful functions are: New>Group: Creates a new Group New>Part: Creates a new Part View: Select between Icon and Tree structure view mode Utilities>PIDtoPart: Create one Part for each PID of your ANSA file Set Part: Select entities from the screen (Faces, elements, Curves etc) confirm and place them in an ANSA Part (Remember Entities belong inside Parts and Parts belong inside Groups). Identify: Click on an entity on the display and ANSA will show to which Part it belongs There is also useful functionality in the right-click menu Show/Hide/Show only: function to control the visibility of selected Parts Open in a new Window: Open the contents of a selected Group in a new Window. Note you can also double click on a Group to see its contents. Edit Tree: You can move Groups or Parts using cut/paste or with drag and drop actions. Mark As: Lock (or Unlock) selected Groups/Parts so that when you press ALL only these appear. Save: Option to save selected Groups/Parts in a separate ANSA file. Delete: Option to Delete the selected Groups/Parts. BETA CAE Systems 27 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.11. Detection of Baffles In complicated models sometimes it is hard to identify if and where baffles (zero-thickness walls) are. This can be done automatically using the function Isolate>Baffles The model must be meshed and ALL visible. ANSA leaves on the screen only the baffles surface mesh. You can now easily assign the visible element to different PIDs using the User Defined Function ChangeBaffleProperties (see section 14). This UDF will create new PIDs with the suffix “_baffle” so that the user can easily distinguish the zero thickness walls. This is necessary if later on layers must be generated from baffles from both sides. BETA CAE Systems 28 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.12. Link Geometry Many CFD applications, like external aero cases have geometries with similarities, like symmetry for example, while other cases have rotational periodicity. In such cases it is possible to use the functionality of LINK Faces. This will save time in the meshing process as you will only have to do this on one side and the other will obtain the same mesh automatically. Link type geometry is distinguished by a light brown crosshatch. Link Face Parent Face Link type geometry can be generated by Transform>Link [Translate, Rotate, Symmetry...] For periodic model Link type Faces is the only way to guarantee exact matching nodes at the boundaries. Parent Face !Note: when creating models with periodic BCs, ensure you set Extra-fine tolerances during the generation of any geometry in ANSA in order to ensure that the geometry is accurate to several decimal points and hence exact node matching can be achieved. Link Face Link type geometry obtains the exact same mesh as its parent. Any modification on one has the same effect on the other and vice versa. See section 10.1 for details about the setup of periodic BCs. BETA CAE Systems 29 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2.13. Treating Surfaces If the underlying Surface is a revolute of 360o, you may get unmeshed Macros. Use the Surfaces>Break [Constant Curvature] function, so that ANSA splits it in four quadrants. This is applicable also to pipe geometries. Other surfaces that may cause problems in surface meshing are ones with very high local curvature areas, like leading edges of wings or nacelles. Surfaces>Info can be used to examine them. Use the Surfaces>Break [Curvature Peaks] function, so that ANSA cuts the Face exactly at the location of peak curvature. (Note that you can also use the UDF SplitCurvaturePeaks that will automatically apply the action only on the Faces that is needed). The result is a geometry that can be meshed much better like this leading edge of a wing. Sometimes the underlying Surfaces of Faces are too large. This may significantly delay some TOPO operations like project, intersect, meshing, etc. Use the Surfaces>Reduce function, select All Faces and confirm. Now the Surfaces of all Faces have been shrunk to their Face limits . BETA CAE Systems 30 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3. Surface Meshing on Geometry Generation of surface mesh on clean geometry is the preferred way to get the highest mesh quality (in comparison to working with tessellated data (see section 4). The following sections describe some tips for surface meshing. 3.1. Simplifying Macros The quality of the resulting mesh can be greatly improved by joining Macros together, prior to applying Perimeter lengths and spacing. Joining Macros can be done manually using the function Perimeters>Join It can also be done automatically with the function Macros>Simplify !!! Before using the function ensure that correct element length has been applied either through Perimeters>Length or Spacing [AutoCFD], as the de-featuring that is performed depends on it. Keep all default settings, meaning a medium level defeaturing, keeping sharp edges and perimeters along the symmetry plane. Press Run. ANSA previews the Perimeters that are going to be joined in light orange color. Press OK to confirm the previewed joined Perimeters. ANSA joins the Perimeters that do not form important features and should be removed. Delete any remaining Hot Points and re-apply the correct Length or Spacing. Larger Macros result in better flowing mesh. Any manually (Join) or automatically (Simplify) joined Perimeters can be brought back to their original state by selecting them with the function Perimeters>Release. BETA CAE Systems 31 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3.2. Uniform size mesh If you want to mesh with Uniform size mesh follow these steps: 1) Assign to all selected Perimeters the target element length with the function Perimeters>Length 2) Use the function Macros>Simplify to join some perimeters 3) Mesh the Macros with the function Mesh Generation>Adv.Front algorithm as it gives the best quality mesh. If Adv. Front leaves unmeshed Macros (reported in the legend on the left), then you can try to mesh them with another more robust algorithm like Free. 4) Having completed the surface mesh, perform a quality check by switching to HIDDEN mode. The legend on the left should display bad quality elements as OFF. You can rightclick on the legend entry to Show Only the problematic areas. 5) For quality improvement of this mesh, make ALL visible and use the function Shell Mesh>Improve with the option Select Violating. This will automatically select the areas around the violating elements and will perform automatic JOIN and mesh improvement. Narrow Macros->skewed elements BETA CAE Systems After Improve [Reshape Violating] 32 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3.3. Variable feature dependent size mesh (CFD mesh) For a variable size tria mesh you should: 1) Use the function Perimeters>Spacing [AutoCFD] This function will apply automatically curvature dependent refinement to selected Perimeters or Macros. Set the Growth rate: to control how fast the mesh should grow on flat areas Distortion angle: to control how fine curvature refinement you want Min length and Max length: to avoid over-refinement or over coarsening. Sharp edge refinement: Specify length values to refine the convex and concave sharp edges as shown here. Note that the orientation of the Macros indicates the positive direction (gray side) and based on that, the convex and concave angles are distinguished as shown here. Note also that sharp angles are detected only between Faces that are of BC type wall (not symmetry, inlet etc) so the user should first assign the proper BC type to each PID. Trailing edge refinement: specify the assigned element length on all identified trailing edges as a ratio of its width Free edges length: assigned element length to all free edges (Red CONS) PID/Self proximity: specify automatic mesh refinement by proximity (between different PIDs or within the same PID respectively) as a factor of the gap size. Note that proximity refinement will not drop the local length to below half of the minimum length. 2) Use the function Macros>Simplify to join some perimeters 3) Re apply Perimeters>Spacing [Auto CFD] as after Simplify the Perimeters have been modified 4) Mesh the Macros with Mesh Generation>CFD with the same settings in the Options List, as that for the Spacing[AutoCFD]. Note that the CFD algorithm grows the mesh size on flat Macros. If, for any reason, you want to keep the mesh size on selected Macros constant, use the Adv.Front algorithm or another one instead. 5) Having completed the surface mesh, perform a quality check by switching to Hidden mode. The legend on the left should display bad quality elements as OFF. You can right-click on the legend entry to Show Only the problematic areas. 6) For quality improvement of this mesh, use Focus>All visible and use the function Shell Mesh>Improve [Reshape] with the option Select Violating. This will automatically select the areas around the violating elements and will perform automatic Joining of Perimeters and mesh improvement.This function will perform local Perimeter joining and mesh reconstruction operations without altering the local variable length. Note that apart from the skewness criteria the user can optionally set a Minimum Length in F11 (a value less than the min length of CFD mesh by at least 50%) so that ANSA can distinguish the small features that should be joined automatically. BETA CAE Systems 33 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3.4. Notes on CFD meshing 1) Further control of size Note that you can also create Size Boxes to control the maximum length of the functions: Perimeters>Spacing [Auto CFD] for setting Perimeters spacing Mesh Generation>CFD for meshing Macros and Volumes>Mesh Volume for volume meshing. Size Boxes are created in the CFD Decks from the Group Size Boxes. Main functions are: DECK>SIZE BOXES>NEW DECK>SIZE BOXES>LIST You can perform the above task with different values for each PID or area of your model. Remember that Spacing [Auto CFD] works on Visible and you should pay attention to what happens at their common boundaries. So, if you have to use Spacing [AutoCFD] with different length ranges for different areas, start first from the small length areas. Use Spacing [Auto CFD] and CFD mesh and then Macros>Freeze them, selecting them with left mouse button. Then bring the larger element size areas to visible and reapply Spacing [Auto CFD] with new values. All frozen Perimeters will be treated by default as size sources and this will ensure a smooth size transition from small to large length areas. BETA CAE Systems 34 ANSA v18.1.1 ANSA for CFD Brief User's Guide 2) Quality problems in CFD meshing Note that because the CFD algorithm meshes according to the local CAD curvature, if some surfaces are problematic the following things may occur: This is an extreme example for demonstration purposes. Note the over refinement on Perimeters and inside Macro, which is due to bad geometry definition. Note that you can check the curvature of CONS using CONS>Info and the curvature of Faces using Surfaces>Info. These functions can usually pin point the problems of mesh over refinement, caused by problems in the geometry. In this case try to limit the minimum length in the Spacing [Auto CFD] and Mesh Generation>CFD Options List window. If this does not give a satisfactory result, switch to TOPO and use Surfaces>Info to check the underlying Surface. Ensure you set in the Options List the Contour plot of Average curvature to detect any local peaks in curvature which are mainly “noise”. Use the Surfaces>Reduce function to simplify the description of the Surface, removing unwanted “noise”. Note that if you increase the Tolerance value the Reduce effect will be stronger, so you can try this progressively until you get a good quality mesh for the selected Macro. Re-applying Spacing and remeshing should give better results now. Problematic Surfaces may also result in “squeezed” elements like here. Use the function Shell Mesh>Improve Smooth or Reshape to repair the mesh locally (Note for Reshape it is recommended that you specify a Target Length in the Options Window). If the underlying Surface is very bad (Look for twisted or collapsed iso-parametrics using Surfaces>Info) you should use a different algorithm, like Adv.Front or Free. BETA CAE Systems 35 ANSA v18.1.1 ANSA for CFD Brief User's Guide In some rare cases there are fillets with peak curvature in the middle and zero curvature at the ends, as Surfaces>Info contour plot displays here. Such cases, with variable curvature may lead to undesired effects in the Spacing [Auto CFD] and CFD meshing algorithm. The curvature of this fillet is not followed in the middle, but only along its narrow perimeters To overcome such problems the user should activate the option Enhanced Curvature Sampling in Spacing [AutoCFD] This will make ANSA identify more robustly the curvature and lead to a good quality mesh. 3) Unmeshed macros in CFD meshing There may also be unmeshed Macros if some extreme Joining has been performed. In this example the joining to avoid the skewed angle in the mesh has resulted in an abrupt discontinuity, and CFD algorithm fails due to curvature discontinuity. It is suggested to make a Macros>Cut to isolate the problematic area and mesh only this with Free, and the rest with CFD as desired. CFD FREE CFD BETA CAE Systems 36 ANSA v18.1.1 3.5. STL like mesh ANSA for CFD Brief User's Guide If you want to create an STL like mesh, then: 1) Use Perimeters>Spacing [Auto STL], set the max cordal deviation and max element length 2) Use Mesh Generation>STL with the same settings in the Options List window. Notes: - Note that if there are any unmeshed macros, use Free algorithm. - STL mesh should mainly be used on Non-Joined Macros. The results on joined macros may not be so accurate. - Avoid STL meshing of Macros of revolution of more than 180 degrees. Split them if needed for more robust results. If needed, quality improvement for this kind of mesh can be done using the function Shell Mesh>Collapse [Violating] by collapsing needle like elements. ! Note that for this step the user should not use the default CFD quality criteria which are strict but set suitable quality criteria, like the ones shown below. Use the UDF SetQualityCriteria and select the PowerFlow option to assign propert criteria for STL like mesh. BETA CAE Systems 37 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3.6. Summary of Automatic Quality Improvement functions The table below summarizes the features of the main automatic quality improvement options of the function Shell Mesh>Improve Before Function After Fix Qual Fix quality violations by small nodal movements. Result can be undone using Grids>Origin Reconstruct Fix quality violations by mesh reconstruction. Results however are always bounded by existing Perimeters! Reshape Most advanced function as it performs local Perimeter Join operations and mesh reconstruction. For 99% of the cases you should use Reshape [Violating] to fix all mesh quality issues. All these functions can be used on meshed Macros or FE-mod mesh. For FE-mod mesh the identified feature lines behave like Perimeters. For example, Reshape can “join” the identified feature lines (“perimeters”) if needed, to improve the quality. It is recommended to use the Reshape function because it is the most powerful one. Reconstruct and FixQual can be used for some final touch up actions, if needed. Original model with very narrow Macros and hence skewed trias. BETA CAE Systems Result of Reconstruct. All violations are fixed by further mesh refinement as the Perimeters cannot be joined. Mesh may have overrefinements. 38 Result of Reshape. All quality violations are fixed by Joining of Perimeters and mesh reconstruction. Small unneeded features are removed. ANSA v18.1.1 ANSA for CFD Brief User's Guide What controls automatic quality improvement functions The functions Reshape, Recons and Fix Qual are controlled by the following settings: Quality Criteria ANSA will only fix the mesh if it violates the current settings of the Quality Criteria window. Mesh Parameters The target length in CFD mode is Local This means that ANSA will reconstruct the mesh using the same underlying size of the elements it improves. The Target should only be changed temporarily for specific operations (for example reconstructing the mesh to a uniform target size). Join Perimeters with distance < 0.4*L Flat Perimeters defeaturing level: medium ANSA will join a perimeter if the feature that will be removed is smaller than 0.4 of the local element length. Increasing this value will lead to more joining of perimeters and more de-featuring of small details. If after joining and reconstruct of Reshape function there are still remaining element violations, then ANSA will use Fix Qual, which will move some nodes in order to fix these violations. This controls how large these movements can be, with respect to L, the local length value. BETA CAE Systems 39 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3.7. Useful Checks Before proceeding to Layers or Volume meshing please check the following: - Checks>Penetration [Intersections] This will isolate all intersecting elements, which may exist due to bad cleanup, or badly meshed Macros. - Checks>Penetration [Proximities] This will isolate all elements that have a proximity problem. Activate the option “Check grey-grey” to check only the grey side of the mesh for proximities. Proximity check takes place based on two parameters: the shell element length and a user specified factor, or an absolute distance. This check can be performed between different PIDs as well as within same PIDs. The option “Auto-Fix” is also available, so that ANSA can reconstruct and refine the mesh locally. Ensure that you use “Auto-Fix” on selected areas so that you can determine whether it should take place or not. - Check>Duplicate This will isolate any duplicate elements that may exist, although rarely. Check if there is a topological problem there. - Check>Mesh>[Sharp Edges] This will isolate elements that form very narrow or steep angles that may cause problems in layer generation or volume meshing. - Isolate>Bounds [Single and Triple] This will identify unwanted single or triple connectivity areas of the surface mesh. You can also see this in BOUNDS view mode: Deactivate visibility of Perimeters, Hot Points, Shadow, Wire and activate Bounds and Grids (The Grids flag is useful for the visual detection of small bounds in a big model). Checks Manager You can also use the Check>Checks Manager with predefined groups of checks for each stage of your work. These check templates can also be customized by the user for other tasks. BETA CAE Systems 40 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4. Watertight model preparation One of the challenging tasks in CFD model build up is the generation of a watertight surface mesh from complex geometry. Depending on the input format (CAD geometry or STL tessellated model) and data quality the user has the following possibilities: CAD nurbs data STL tessellated data TOPO functions If the geometry is relatively clean and easy to extract the watertight wetted surfaces, this is the recommended approach for high quality meshing (see section 2). Not applicable Shell Mesh> Intersect If the geometry is relatively clean and consists of several solid description unconnected parts in contact or proximity, this approach can work very well. The macros must be first meshed and then Released to FEmod mesh (see section 4.1). This approach works very well for solid description parts in contact or proximity. The original meshes should have no topological problems. The final mesh is a watertight model that preserves all the details of the original meshed parts (see section 4.1.). Octree>Wrap If the geometry is not clean and extracting the watertight surfaces is very difficult, this is the only approach (see section 4.2). If the mesh contains many topological problems (intersections, gaps, duplicate elements etc) then this is the only approach for efficient preparation of the watertight model (see section 4.2). Of course, depending on the model, one can use a combination of the above approaches in different areas of the model. For example, one area of the model can be treated at geometry level and meshed, while another area can be surface wrapped and so on. In the end, all areas can be connected together using the functionality of Shell Mesh>Intersect. 4.1. Intersecting meshed parts The function Shell Mesh>Intersect is a very powerful automatic function that allows the connection of FE-mod meshed parts as shown here. The user has the option to keep or not the connected common interior surfaces. OR Shell Mesh>Intersect function has various sub-options: Solid description Connects solid description meshed parts that are in intersection/contact/proximity Skin description Connects skin description parts that are intersecting Welding FE Automatically extends and connects free edges of surface mesh to nearby mesh Fuse panels Connects overlayed skin description parts keeping always the outermost parts and removing the covered ones (example are skin parts consisting an underbody) For the option Solid Description, the connection of parts in proximity is performed within a user specified tolerance and takes place via two options, fuse or inflate. Fuse is recommended for clean planar contacts, while inflate is intended for more complex and irregular interfaces between different parts. BETA CAE Systems 41 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4.2. Surface wrapping approach Surface wrapping is a technique that should be used when the input data are either too complex to extract the wetted surfaces from, create a water-tight geometry and clean it up, or when the input data is raw tessellated STL with several problems like intersections and gaps. The wrapping functionality of ANSA can be found in the function Octree>Wrap. The process of wrapping is described with the help of the following sketches. Initial surface description full of openings, intersections and overlaps Generation of background octree hexa mesh Identification of intersecting hexas with original surface description and marking of these elements in blue Extraction of the outer skin (green) of the identified intersecting hexas Projection of the green skin on the original surfaces A water tight surface mesh (green) is created In this way Wrapping overcomes all geometrical problems. Still, wrapping should only be used if the conventional way of geometry cleanup and shell meshing (which always gives the best quality results) is very labor intensive. You can find an example in the CFD tutorial for Surface Wrapping. BETA CAE Systems 42 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4.3. Preparation for wrapping Depending on the input data the following actions should be taken prior to the wrap tool: Input Data Pre-wrap actions STL 1) Examine the model for openings in Bounds view mode. 2) Use the function Shell Mesh>FEMTopo to close small gaps in the STL mesh 3) If the STL mesh is very dense use the function Shell Mesh>Reduce to coarsen it without loosing any detail. This will accelerate all subsequent steps. 4) Use the function Shell Mesh>Fill [Holes] Single bounds and feature line holes to close red bound holes and tubes or “caves” respectively 5) Use the function Shell Mesh>Fill [Manual] to manually close large openings in a regular pattern 6) Use the function Shell Mesh>Fill [Gaps] to automatically detect and close proximity areas 7) Use the function Elements>Stitch to manually quickly patch up irregular leak areas 8) Check for leaks using the leak tools described in section 6 Please refer to tutorial Watertight Preparation of STL data. CAD surfaces 1) Ensure that most of the Faces are topologically connected. Small gaps and triple CONS are not however a problem for wrapping. 2) If there are small openings that you do not want to keep, use Isolate [Tubes] to isolate on the screen small inner passages like tubes and bolt holes on solid parts. Delete these Faces and then use CONS>Fill Hole to close the created openings in the solid model. 3) Inspect the model and create new Faces to close any openings that are larger than the wrap minimum length, or to cover any details that should not be captured by wrap. 4) The Macros should be meshed! Meshing the model prior to wrapping ensures that you assign correct element length on the model, because the wrapping tool will create a wrap mesh with similar shell mesh variations as the original model. Hence meshing the model allows you to control the element length of the resulting wrap mesh. You should not worry about the quality of this mesh, just have it there as shell size information. The best way to mesh the model is to use Perimeters>Spacing [Auto CFD] (specifying a min/max length and sharp edge length) and then Mesh Gen.>CFD. Check for any remaining large unmeshed Macros and use another algorithm like Free. Check again if there are any large unmeshed Macros. The small ones you can ignore as the wrap mesh will cover them. Alternatively, if the model is very large, you can also use Perimeters>Spacing [Auto STL] and Mesh Gen>STL. This will be faster than CFD meshing process. 5) If the model is very large, you may consider after creating the base mesh to use the function Elements>Release and then Delete the original Faces, which will leave you only with the FE-mod tria shell elements. This will leave you with a “lighter” version of the model to work on and allows you to use the tools described in the STL section above. In general the wrapping tool is meant to be used for complex models. If however you have to prepare a very large model, you may try to wrap it in individual sub-assemblies independently and then merge the resulting wrap meshes using the functions Shell Mesh>Intersect (see section 4.1.). This will allow you to use wrap more quickly and with better control per sub-assembly. A good preparation of the structure of the assembly of the model in the ANSA Model Browser will highly help in this effort. In the Model Browser you can separate which Parts should be wrapped and which parts should be meshed in the standard ANSA way. BETA CAE Systems 43 ANSA v18.1.1 ANSA for CFD Brief User's Guide Surface Wrapping in ANSA has two options, Variable or Constant length, depending on the octree that is used in the background. The following table summarizes the advantages and disadvantages of both: Variable Length Constant Length Pros Cons - Variable size wrap ensures better detail capturing. - Mesh that adapts and refines in curvature areas and captures the model's feature lines. - Can handle proximities, variable parameters per PID, Size box refinement areas. - Includes leak check. - Labor intensive algorithm requiring time. - Ultra fast wrap algorithm. - Smooth surface result leading to no problems in volume meshing. - Includes leak check. - Creates a uniform size mesh. - Does not capture model feature lines. - For complex model it usually requires posttreatment to fix areas that may lead to problems in volume meshing. 4.4. Constant length surface wrapping Constant length wrapping is a very fast wrapping algorithm. Although it does not capture the features of the model like variable wrap does, it can generate a good quality watertight surface mesh at a fraction of the time. Starting point can be FE-mod STL mesh or unmeshed geometry. Geometry resolution length is important in case the geometry is unmeshed. User specifies the constant length of the octree and the amount of smoothing, from 0 (no smoothing) to 1 (high smoothing). They can also select if they want inner or outer wrap and define seed points for leak checking. Upon acceptance of the previewed octree, ANSA generates a problem free watertight surface of constant size. If the user wants to coarsen the result they can: - Use Improve [Recons] with target length=2*local. - Then use Improve [Reshape] with target length = local. The final result can be checked from Check Manager>Post Wrap Checks. If any problems are identified they can be fixed automatically using the UDF PostWrapFix. BETA CAE Systems 44 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4.5. Variable length surface wrapping Surface wrapping is a powerful tool that can be used in ANSA to create watertight models in a fraction of the time needed at geometry level. Here is a summary of its functionality, while more info can be found in the related CFD tutorial. Create a new Octree>Wrap [Variable Wrap] entity. Select if you want Outer or Inner wrapping. If you select inner specify the number of the first N largest identified volumes to be wrapped. Leak points allows the user to specify some points where the wrap should not reach. If it does, ANSA will stop and create leak paths so that the user can trace and locate the leak areas and close them. Double clicking on the Contents allows the selection of the PIDs to be added for wrapping. Local mesh control can be achieved via sub-domains called Areas. Areas can have their own contents already loaded in the main Octree and their local mesh parameters and proximity refinement settings. Double clicking in the Parameters allows the specification of: Min and Max length (these can later be changed for each Wrap Area). Map surface length factor the wrap mesh will “copy” or map the local element length of the original model. This factor can be used to scale up or down the “copied” element length. De-activating this option lets ANSA estimate the local length based on local curvature and local limits. Distortion Angle is applied to ensure good mesh resolution in curvature areas. Merge Property if area below Allows merging of small PID regions to their larger neighbor. Feature Angle Min angle above which an edge will be detected as a feature line for capturing. Improve wrap mesh provides options for mesh quality improvement after wrap. The Basic option is recommended. BETA CAE Systems 45 ANSA v18.1.1 ANSA for CFD Brief User's Guide If local areas are defined then the user can set the following local mesh parameters Min and Max length for local mesh controllable Property proximity to avoid merging together entities that belong to different PIDs Self proximity to avoid merging together entities of the same PID. Minimum length reduction factor in order to ensure adequate refinement the user can specify a min length reduction factor value in the range 0.1<f<1.0. In this way, ANSA is allowed to locally drop the local min length of the property in order to ensure contact prevention. For example for a PID with min length 4 and a reduction factor of 0.2, the length may drop down to 0.8. self proximity refinement PID proximity refinement Having defined the Octree the user can proceed with Visualize in order to get a quick preview of the octree that will be built for wrapping. The user can pan the preview cut planes in all three directions to better examine the size distribution and to see if there any leaks. In the Leaks tab ANSA displays any identified leak path based on the specified leak points. In addition the user can press the Find Path to pick two positions in the octree section and identify their common path. Once the user is satisfied with the octree preview they can complete the wrapping operation by pressing Run. BETA CAE Systems 46 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4.6. Post-wrap checks Performing a good quality wrap that captures all the important details of the model may take a few iterations until you achieve the best result. Once you are satisfied with the final wrap it is recommended that you delete the original mesh/geometry. In the Model Browser, ANSA places the wrap mesh in a separate Part. You can delete the original model with rightclick and delete. This will leave a “lighter” database and you will be able to focus more easily on the final checks of the wrap mesh. After wrap with post-wrap treatment the user must check for intersection, proximities, flipped elements and quality issues. The checks below should take place one after the other and possibly in more than one loops. Check>Penetrations [Intersections] Find problems and fix them with Grids>Paste and Elements>Delete and Shell Mesh>Fill [Holes]. Check>Mesh>Sharp Edges Check>Mesh>Concave Areas Find problematic flipped elements and fix them with right-click Fix or Grids>Paste. Check>Penetrations [Proximities] Find proximity problems and fix them with the right click option Fix (auto refinement) or with Grids>Move. Mesh quality check Use Improve [Reshape] [Select Violating] to fix remaining quality violations. Check>Duplicate Remove any duplicate elements. Isolate>Bounds [Single or Triple] Check if there are unwanted free edges or triple connectivity. All the above checks should be performed iteratively until all problems are eliminated. In addition you can also use the Checks>Checks Manager. This tool contains set of predefined multiple checks. One of them is a check for CFD_post_wrap that includes all the above mentioned checks. Press Execute to apply all these checks simultaneously. Note: You can also use the User Defined Function PostWrapFix accessed from the UDFs button in order to perform all the above fixes in an automated way. Finally, if you want to coarsen the mesh, you can set a Min Length value in F11 and then use Improve [Reshape] [Violating] again. This will remove smaller elements from the model and reduce the element length. BETA CAE Systems 47 ANSA v18.1.1 ANSA for CFD Brief User's Guide 5. Identifying leaks Leak detection can be a challenging task especially when the data consists of complex mesh models with gaps, overlaps and intersections. The Octree>Wrap function provides an integrated leak check tool as described in section 4.5 that allows fast detection and visualization of leak paths. The Constant option can be used to detect leaks of sizes down to the specified element length. The user can specify multiple leak check points in advance, so that the octree detects leaks to them. In the Visualize step of the Wrap Octree ANSA will display the paths to the specified leak points if any leak is present. De-activating the visibility of the octree background allows clear identification of the leak paths. In addition to the defined leak points, the user can press Find Path and click on two points on the octree plane preview and get their common path. There are other cases where we have a good quality, almost watertight mesh, but due to its complexity and presence of red and cyan bounds (baffles and interior faces) it is not easy to detect where the volume leaks. For these cases one can use the function Isolate>Short Path [Leaks]. The user specifies one or more inner points as seeds for the leak check. Points must NOT lie on the surface mesh but inside or outside the volumes in question. To select easily a point that lies inside the volume and not on the surface, select more than one points and ANSA displays the CoG of them and highlights it. Confirm with middle mouse button. Then proceed with the next source point. Finally confirm all selections with middle mouse and ANSA will calculate a curve of the Leak Path, if such a path exists. The leak can be found by tracing this path. Finally you can also perform a visual inspection of the model in Display Styles>TOPO Check Gaps and MESH Check gaps BETA CAE Systems 48 ANSA v18.1.1 ANSA for CFD Brief User's Guide 6. Layers When you generate layers with the function Volumes>Layers the user should consider the following: - Do not grow layers inside already defined Volumes. Remaining volumes should be Defined/Detected after layers generation. - Which are the surfaces from which you grow layers, so that they are placed in separate PIDs - Which are the surfaces on which you want to adjust/connect the layers sides to. Is the angle of these side meshes suitable for auto-connection? These surfaces should be visible when growing layers. - Start with a relatively good quality surface mesh (Fluent skew<0.7). However, thanks to the advanced ANSA capabilities of layer excluding, collapsing and squeezing, you can start with a moderate quality mesh and ANSA can automatically remove layers from bad surface mesh regions. There are three options that ANSA can automatically overcome layer generation problems (due to intersections, proximities or element quality violation). The function Layers has four tabs: 1) Basic parameters are: First height: Absolute value or Aspect (height=base length*factor). Growth factor: Geometric growth rate of subsequent layer heights. Number of Layers: Number X of layers to grow. Additional outer layers: ANSA starts with an X number of layers in absolute mode and then adds Y more layers so that the last aspect ratio is around 0.5. This is a very recommended way to generate layers as it leads to a very small volume change of the last layer and the first tetra element. 2) Side treatment parameters: Connect to Macros: Connect to meshed macros without releasing to FE-mod mesh. Auto-connect to neighboring mesh: Connect the sides of the layers to the neighboring mesh, provided the angle if less than the Auto-connect limit. Auto-connect to neighb. Map-QUAD mesh: Connect to pre-existing side mapped mesh using the same mesh nodes, provided the angle is less than the auto-connect limit. Generate Quad-Tria interfaces: If there are sides of the layers that do not connect to surface mesh (are free exposed) create an extra set of triangular mesh so that volume meshing can be done based on the trias and not the high aspect ratio quads. This will require the definition of a Non-conformal mesh interface between the side quads and tria interface meshes. Collapse free edges: If there are sides of layers that do not connect to surface mesh, collapse them so as not to leave exposed side quad facets. BETA CAE Systems 49 ANSA v18.1.1 ANSA for CFD Brief User's Guide 3) Vector treatment parameters: Smooth vectors: Option to allow vectors to deviate from their calculated normal vector (to within the max angle deviation) so as to be able to grow more layers Separate vectors at sharp edges: Option to split the layers at very acute angles to avoid mesh quality issues Smooth top cap shell mesh: Option for an extra smoothing step of the top cap of the layers. This allows the growth of more and higher layers in complex models. 4) Growth control parameters: Max top facet skew: Max allowed Fluent EquiArea skewness of top cap mesh Proximity factor: Check distance to ensure a good gap between opposite layers Minimum first layer height: Minimum height that will be respected by layer squeeze. Minimum layer aspect: Minimum height to base length ratio that will be respect by layer squeeze. Maximum layer aspect: maximum height to base length ration of layer to be generated. If value is reached ANSA will proceed with constant height or collapse layers locally. In case of failure retain valid layers: If layer growth comes to a problem ANSA will leave the layers that were already generated. Following the definition of global layer settings, the Layer Area card opens where the user can set different layer settings for different PID areas: Which PIDs to Grow layers from What first height, mode and growth factor each area has. Zero-thickness: should layers grow from both sides of a PID? What Property should the generated layer elements belong to? BETA CAE Systems 50 ANSA v18.1.1 ANSA for CFD Brief User's Guide ANSA layer generation algorithm provides several problem overcoming options as described below: Squeeze Layers Advantages: - Can be applied on penta or hexa layers. - Does not alter the mesh type. Disadvantages: - Cannot overcome all problems. In case where the original mesh has areas where no normal vector can be calculated or no layer of acceptable quality be generated, Layers Generation will stop and these areas will be placed in a SET for the user to examine. - Changes locally the specified layer height. Collapse Layers Advantages: - Can overcome any problem. Disadvantages: - Changes the mesh type around the collapsed areas and creates pyramids and tetras in the layers. Exclude Layers Advantages: - Can be applied on penta and hexa layers. - Can overcome any problem. - Does not change the mesh type. Disadvantages: - Leads to exposed side quad facets of the layers. In these cases it is recommended to use the option of non-conformal interfaces, as pyramid generation may have problems with very high aspect side quad facets. Layers sides can connect to exterior or interior shell mesh boundaries, if the option is active and the angle is within the limit. You should be careful though that these surfaces are placed correctly as shown here: BETA CAE Systems 51 ANSA v18.1.1 ANSA for CFD Brief User's Guide It is recommended that your first attempt of growing layers on a model does not use the options “Collapse” or “Exclude” but only “Squeeze”. Ideally, you can grow layers from all the selected surface mesh. However, in reality on complex models there may be areas where no layers can grow. In such cases ANSA will stop and will place these areas in a SET so that the user can isolate them from the SET list with Show Only and examine them. In many cases, a modification of the surface mesh can help things a lot. In some cases changing the proximity settings may allow the layers to be generated even at narrow corners like the tyre contact patch above. However there may also be cases where no valid vector can be generated at all. In such cases the user may either change the geometry locally and remesh, or allow ANSA to locally exclude or collapse the layers. There is also the option to use the UDF>Tools Mesh>FixLayersProblematicAreas which will smooth out the surface mesh in these regions. Growing layers on complex models is not an easy task. There is always a compromise between element quality and extent of layer collapsing or excluding at problematic areas. Here are some settings of the LAYERS function that are important for the tuning: 1) Vector treatment>Smooth Vectors Max Angle: The smaller the value the more orthogonal the layers, but also the more chances to end up with problematic regions that can only be solved with collapsing. 2) Vector treatment>Smooth top cap mesh: This option allows ANSA to perform extra smoothing of the layers so as to overcome problems without collapsing or squeezing. In some cases however it may lead to poorer element quality. 3) Growth controls>Max top facet EquiArea skew: The smaller the value the more strict the criterion and the more are the chances of ANSA stopping layer growth or needing to locally collapse the layers. 4) Growth controls>Proximity factor: The larger the value the more squeezing or collapsing will be required. The smaller the value the more in danger to end up with very tight spaces for volume meshing afterwards. For more Layer controls refer also to UDF>Tools_Mesh>AdvancedLayerParameters. BETA CAE Systems 52 ANSA v18.1.1 ANSA for CFD Brief User's Guide 7. Volume Meshing Having first created the boundary layer elements, you should now proceed with the definition of the Volume entities. This can be easily done with the function Volumes>Define [Auto Detect]. All the Volumes defined manually or detected by ANSA are listed in the Volumes>List window. You should check this list to monitor the type, Name, PID and status of the Volumes. Note that Large volumes (by default larger than 200 million elements) are drawn in “Outline Draw” mode. This means that only the outline of the volume is visible and no Focus commands can be applied, in order to accelerate the view manipulation of large models. Of course all remaining ANSA functionality, like quality improvement functions and output, can be performed normally on such volumes. 7.1. Manual Volume Definition First, isolate the Macros that define the Volume, using FOCUS commands either in PID or ENT mode and use Volumes>Define [Manual] and select all visible Macros with box selection. Place the Volume entity in a new separate Part (to facilitate later its handling) and then assign a PID to it. Here it is recommended to assign it to the same PID as that of the layers underneath it. In fact, if there is no specific need later for post-processing of volume zones, it is better to assign the same PID for all fluid elements. You can always manage the Volumes in your model using the Volumes>List list window, edit any volume and change its PID as well. 7.2. Auto Detect functionality for Volume Definition Defining Volume entities from complicated assemblies can be a complicated task. Sometimes the separation of PIDs from the list is not enough to isolate all the Macros that should form a closed Volume. For complicated models you can use the Volumes>Define [Auto Detect] function. This function can detect and define automatically volumes from meshed Macros or FE-model mesh. Remember to have the Highlight button activated in the Volume list. All Detected Volumes are placed in separate Parts in the Model Browser. 7.3. Meshing the Volume ANSA provides different meshing algorithms for volume meshing (after layers generation is completed), as described in this section. These algorithms are controlled by the Options window at the bottom right of the ANSA interface. Specify the maximum length for the tetras and the growth rate, and select a quality criterion type and target threshold value (for example Fluent skewness =0.85). BETA CAE Systems Tetra Rapid Very fast and robust tetra mesh generation for any model. Recommended for all cases. Tetra CFD Obsolete tetra mesh generation for CFD models with large variation in element length on the surface. Significantly slower than Tetra Rapid, it should only be used if Tetra Rapid fails to mesh a specific volume.. Tetra FEM Obsolete tetra mesh generation for smaller models with thin volumes. Significantly slower than Tetra Rapid, it should only be used if Tetra Rapid does not perform well in a specific case. 53 ANSA v18.1.1 ANSA for CFD Brief User's Guide Hexa Interior Fully conformal variable hexa mesh inside the domain with prism and pyramids transitions between different hexa sizes and with pyramids and tetras near the surface. HexaPoly A combination of variable size Hexa and Polyhedral elements inside the domain with transition with tetras near the surface via polyhedral elements. Conv2Poly A pure polyhedral mesh can be generated from the conversion of any Tetra or HexaInterior hybrid mesh. Ensure that the tetra mesh quality is good (Fluent Skew< 0.85 ) prior to conversion if possible. Converted Tetra mesh You can use the UDF>Tools_Mesh>FixVolumeQuality for this preparation step. Convertinh a HexaInterior volume results in poluhedral elements in the buffer zone next to the layers. Converted HexaInterior mesh If you have a mesh with very high aspect layers, you may consider excluding the layers from the conversion using the respective option. excluding layers option Converted volume and layers BETA CAE Systems Converted volume excluding layers 54 ANSA v18.1.1 ANSA for CFD Brief User's Guide You can also create Size Boxes that will control the maximum tetra size at certain locations of the model. These Boxes are created from any CFD Deck from the Size Box group of functions. 7.4. Semi-structured volume mesh For relatively simple volume shapes, like for example ducts, radiators etc, you can use the functions Volumes>Map in order to generate semi-structured penta or hexa mesh. You need to define three areas, the master that must be meshed with trias or quads, the slave which can be unmeshed as it will obtain an image of the mesh of the master, and the guiding side which must be meshed with map quad mesh. The result is hexa mesh (if master mesh is quads) or penta mesh (if master mesh is tria). ! Note: Map type volumes do not have to be defined/detected prior to the use of the Map function. The Map function will define and mesh the volume in one step. 7.5. Checking the Volume quality and fixing Check in the Volumes>List if all required Volumes are now meshed. Switch to HIDDEN mode to see if there are any OFF elements exceeding the quality threshold values in F11. You can get quality statistics in the Text Window (average quality, ranges and worst elements) for a selected meshed Volume entity using the Volumes>List [Info] function. Alternatively, you can get statistics for the whole model from Deck Info button in the main toolbar. Finally, fix any remaining violating solids with Volumes>Improve>Fix Qual [Visible], but ensure you set proper quality settings in F11 for solids first. It is recommended to set also Jacobian and Warp criteria when fixing skewness, in order to ensure that no pentas are affected by the fix of tetra skewness. Use the User Defined Function SetQualityCriteria to select predefined set of quality limits. BETA CAE Systems 55 ANSA v18.1.1 ANSA for CFD Brief User's Guide 8. Batch Meshing Batch Meshing is a tool that can automate all the meshing steps to build up a CFD model. The use of Batch Meshing ensures the following: 1) Automation: Meshing is performed without user intervention. 2) Consistency: Meshing can be re-applied in a consistent manner to subsequent models. 3) Traceability: The whole meshing process is saved in the file so that later on if the file is accessed the user can quickly be informed about the meshing specifications of the model. The Batch Meshing tool consists of templates that can be setup once and then they can be executed repetitively on new geometries, ensuring meshing consistency and automation. There are four types of so-called scenarios: - Surface Meshing - Surface Wrapping - Layers generation - Volume meshing The user can setup one or more of the above types of scenarios in Batch mesh. Each scenario consists of several sessions, so that each session can contain different PIDs that should be meshed with different element length and optionally different quality criteria. The distribution of PIDs in sessions can be done manually by the user or in a more automated way using filters based on name conventions or IDs. This allows the automatic re-application of a scenario to a new geometry. Please refer to the CFD tutorial Batch Meshing of a Pump. Surface batch meshing consists of the automatic application of all manual operations that would be used in order to obtain a good quality mesh in ANSA. So for example when setting up a CFD type surface mesh session, ANSA will perform the following steps on the Properties that have been placed in this session: 1) Apply Perimeters>Spacing>AutoCFD to assign a proper element length on the model based on the curvature, sharp egdes, and Size Boxes. 2) Apply Perimeters>Simplify in order to automatically join some Perimeters and create larger Macro Areas for a better flowing CFD mesh. 3) Apply a second step of Perimeters>Spacing>AutoCFD, as the previous step of SIMPLIFY has deleted some hot points and thus reset the nodal distributions. 4) Use Mesh Generation>CFD to mesh all Macro Areas. 5) Use Shell Mesh> Improve [Reshape Violating] to automatically join and reconstruct any violating elements according to the corresponding quality criteria of the session. All these steps are performed sequentially for each session one after the other, in the order in which they are listed. The sessions order affects significantly the result (as demonstrated in the next section) so the user must place some care in this issue and create them in the proper order. The order of the sessions can also be altered with drag and drop in the Batch Mesh list window. BETA CAE Systems 56 ANSA v18.1.1 ANSA for CFD Brief User's Guide 8.1. Setting up Batch Mesh sessions When setting up a batch mesh scenario for a CFD model you will probably need to use several sessions so that different areas of the model are meshed with different element length. The following example demonstrates the importance of the order by which the sessions will run one after the other. Consider the simple case where we have two PIDs, Fine each one placed in a separate batch mesh Curvature angle 5 degrees Min length = 1 mm session. Property “Fine” is to be meshed with CFD mesh with a feature angle of 5 degrees and a min length of 1mm while Property “Coarse” is to be meshed with CFD mesh with feature angle 20 degrees and min length 5mm. Coarse Curvature angle 20 degrees Min length = 5 mm Two Batch Mesh sessions are created with the corresponding mesh specs. In the first case the Coarse mesh session runs first followed by the Fine mesh session. As a result, the Perimeters that are common to both sessions are meshed with the Coarse length. This creates a bad mesh transition around that area. Fine session follows Coarse session first In contrary, if the Fine session runs first and then the Coarse follows, the common Perimeters are meshed with the fine mesh. Fine session first The result is much better. Coarse session follows Ensuring that the order of sessions is proper in this respect may not always be easy when dealing with a complex model with many properties, however it is a condition that must be fulfilled in order to get the best results from the Batch Mesh tool. For Layers and Wrap type scenarios there is an extra subdivision under each session, called Area. Sessions are run sequentially one after the other, while Areas are run simultaneously. So if for example you want to grow layers with different settings for different PIDs you need to define Areas under the session, so that the layers are generated in one step and are connected together in the common boundaries. BETA CAE Systems 57 ANSA v18.1.1 ANSA for CFD Brief User's Guide 9. Hexablock Meshing Hexablock meshing is a module in ANSA that can be used to generate pure hexa meshes. This approach can be applied on geometry data or FE-mod mesh, although geometry is much preferred as input. The concept is based on multi-block box topologies that are created and fit on the model. The mesh is generated in the boxes and projected on the original geometry. There are two approaches to construct the hexablock boxes. The most common one (topdown) is to start with a large box, split it in smaller ones, delete some and fit the rest on the model. The other approach (bottom up) is to start building and connecting the boxes one by one on the model. In this example we use the first approach (topdown), so a large box that includes the whole model is created. The function that is used to generate boxes is Boxes>New. The box is split in areas that are aligned with the main features of the model, using the function Boxes>Split. The boxes that are not needed are deleted. The remaining boxes are associated on the model. The user can associate Box Points, Edges and Faces, using the functions: Association>Points Association>Edges Association>Faces BETA CAE Systems 58 ANSA v18.1.1 ANSA for CFD Brief User's Guide The correct order of doing this, is first associating the Points.... ….Then associating the Edges. The advantage of using Geometry as input (not FE) is that the user can perform specific cuts in the TOPO menu, having the desired shape and alignment, so that the association of the box edges on them can be highly controllable. In most cases associating the Faces is not necessary. If in some rare cases the geometry is highly curved and the box faces are very far from the model, the resulting mesh may look distorted. In such cases, associating the box Faces on the model faces will help ANSA produce a better mesh. The final associated box topology looks like this. The user can check the quality of the model fit using the function Association>Check. Having associated the boxes, the user can proceed with the assignment of nodes on the box edges. This can be done with the functions Edges>Length, Number and Spacing. Then they can use Shell Mesh>Map or Free to generate the surface mesh. During meshing the user can select whether to project on the geometry. This option can be skipped for the first draft mesh in order to accelerate the result. The final mesh however must be performed with the option project on geometry active, so that the generated mesh lies exactly on the underlying geometry. The final step would be to generate layers using the Boxes>O-Grid function. This will improve the internal angles of the boxes and will also resolve better the boundary layer with better elements. Finally the user can generate the hexas using Volume Mesh>Pure Hexa or Map. The mesh quality depends highly on the shape of the created box. Some further quality improvement can be performed using the function Volumes>Improve>Fix Qual in the main MESH menu. BETA CAE Systems 59 ANSA v18.1.1 ANSA for CFD Brief User's Guide Important points for HexaBlock meshing Visibility Status flags Hexablock Box visibility is controlled by the green set of buttons at the bottom of the GUI. When you are working with the Hexablock module it is highly recommended to set the visibility of buttons as shown here, that is: BOX POINTS: OFF (you do not need to see the control points on the curved edges of boxes) BOX GRIDS: ON (you should see the nodal distributions on the edges as these affect the meshing) If you want to see the number of elements of your model you should also activate the View Mode>Mesh button in the Options List window. Associations You should associate all box edges that lie on curved CONS. Associated edges are colored in magenta color instead of cyan. There is no real need to associate straight edges to straight CONS. It helps if you first associate the points and then the edges. Association of Box Faces is not needed, unless: 1) You want to generate shell mesh on an interior box Face in order maybe to create shell mesh for post-processing purposes 2) The underlying Faces are very curved and deviate from the Box Face. In this case the mesh projections may be lost. Associating the box Face to the underlying Faces will help Mesh projection When using any shell or volume meshing function in Hexablock you should note the status of the Project on Geom flag in the Options List window There are two cases when you should have this flag de-activated: 1) When you are at the initial stages of meshing and you perform some trial and error about the mesh density and spacing and you may need to mesh and erase several times. This will save you time as you skip the projection step. In the end, when you are satisfied with the mesh, you can erase and mesh it again, this time with the projection flag activated. 2) When you want to shell or volume mesh a box (or some facets of it) without any geometry around. In this case you avoid lost projections that you would not expect. Combining Hexablock with unstructured mesh In some cases you may have to combine hexablock meshing with unstructured meshing for more complicated geometries. In order to achieve this, when you use the function Association>Edges [Project to Edges] to associate box edges on Perimeters of the geometry, you must activate the option Connect nodes to CONS in the Options List window. This will enable the automatic pasting of the FE-mod mesh generated by hexablock with the associated connected Perimeters and will ensure perfect connectivity with the unstructured mesh that will take place afterwards. This is confirmed by the yellow spots that will appear at the connection areas. Please refer to the CFD Tutorial Hexablock meshing for more details. BETA CAE Systems 60 ANSA v18.1.1 ANSA for CFD Brief User's Guide 10. CFD solver I/O formats Apart from the mesh generation, the user can also setup the names of the surface and volume properties from the Property list to setup properly the CFD model. You should always specify at the start for which solver you want to prepare a mesh. This is done from DECKs pull down menu (by default OpenFOAM). This will allow ANSA to provide also the respective boundary condition types in the Property List. As CFD volume models tend to be large, it is recommended to setup all the surface boundary condition names and types before volume meshing, while the file is still small. After volume meshing you can assign the correct fluid properties also before file output. An example of a model with boundary condition types for Fluent is shown below: The BC types can also be seen visually on the model if the user switches from VISIB>ENT to VISIB>BC. BCs are represented in Fluent convention coloring (blue inlet, red outlet etc). The Property list contains all zones and respective BC types. The user can double click on a property to Edit its BC type in the card. The property list supports also mass modification of several properties. Select the properties, right click on the column that you want to change and select the type. ANSA can generate CFD models for several solvers. Depending on the solver, there are various levels of support, from plain mesh I/O to full case and solver setup. BETA CAE Systems 61 ANSA v18.1.1 ANSA for CFD Brief User's Guide The following table lists all the supported CFD solvers/formats: OpenFOAM A full case can be setup in ANSA, including the mesh, property names, boundary and initial conditions and the solver settings (controlDict etc). Property names and boundary conditions can be setup from the Property list, while the rest is controlled from DECK>AUXILIARIES>SOLVER INFO You should output a full surface AND volume mesh for OpenFOAM. Fluent (*.msh)) A surface or volume mesh and their zone names and boundary condition types can be setup in the property list of Fluent Deck. Zone names and BC types are setup in the Property list. Fluent 2D (*.msh) Generate the model in the x-y plane and assign from the Property list the fluid zone names. From DECK>FLUENT 2D>BCs>BC [New] and [List] you can assign the edge boundary condition name and type on selected CONS or FE-mod edges. StarCCM+ (*.ccm) Specify in DECK>STAR>AUXILIARIES>SOLVER INFO if you want to create a mesh for StarCCM+. The respective BC types will be available in the Property list. You should output a full surface AND volume mesh for StarCCM+. StarCD (*.inp, *.vrt, *.cel, *.bnd) Specify in DECK>STAR>AUXILIARIES>SOLVER INFO if you want to create a mesh for StarCD. The respective BC types will be available in the Property list. CFD++ Mesh and property names are supported. 2D mesh output is not supported. For 2D meshes output Fluent 2D msh files and convert them to CFD++ afterwards. CFX (*.cfx5) Mesh and property names can be output in CFX5 format to be read into CFX through mesh>import. You should output a full surface AND volume mesh in cfx5 format All interior faces must be uniformly oriented before output! SC/TETRA (*.pre, *.mdl, *.s) Input and output of .mdl and .pre files. The *.pre file contains surface and volume mesh (properties and volume definitions) while the *.mdl file contains surface mesh. Also support of exporting and importing *.s files which contain all currently supported boundary conditions. Here all boundary areas are defined as regions. TAU (*.cdf, *.grid) Support of output of native DLR-TAU mesh files (*.cdf or *.grid and *.bmap) with boundary conditions as specified in the Property List for TAU Deck. Actuator disk surface are defined in the Property list. The actuator disk Face gray side, as well as the rotation axis must be oriented in the flight/thrust direction. For moderate size models use the standard mode during output. If your model exceeds around 200 million elements, use the HDF5 flag instead. UH-3D (*.uh3d) Mesh, property names and boundary condition types are supported for input/output of surface mesh files. PowerFLOW (*.nas) Surface mesh and property names can be read into PowerFLOW through the NASTRAN output format. CGNS (*.cgns) For other CFD codes (like AVL-FIRE, Code Saturn, SU2, ONERA's Elsa and Cedre or FOI's Edge) the CGNS format can be used for mesh I/O. Supports CGNS library v2.5-5, ADF version with FaceCentre BC location. Input accepts structured and unstructured formats, separated PIDs (per element type) or mixed. Output of separated PIDs (per element type) or mixed is available. Output of structured i,j,k format is also possible for hexa meshes created in HexaBlock only. CMSoft AERO- F (*.xpost) Input and output support via UDF functions CMSoftAeroFInput and CMSoftAeroFOutput (mesh and PID names) RadTherm (*.tdf) Full support for input/output of RadTherm files (mesh, names, BCs, materials etc.). Theseus FE (*.tfe) Full support for input/output of Theseus FE files (mesh, names, BCs, materials etc.). BETA CAE Systems 62 ANSA v18.1.1 ANSA for CFD Brief User's Guide 10.1. Definition of periodic boundary conditions Depending on the solver the user can create models with periodic BCs that are either conformal (matching nodes between two sides) or nonconformal (different mesh at each side). These periodic BCs can be rotational or translational. The following tables summarize the setup needed. Conformal periodic BCs Solver Fluent Interface defined in A single Shell Property. Open A single Shell FOAM Property. BC Type Communicati ng zones Type definition periodic In the PID card via two Rotational SETs of Faces, one for each side. Translational Rotation axis defined in property card of solid property contained between periodic faces. In the PID card via two Rotational SETs of Faces, one for each side. Translational Rotation axis defined in property card of periodic property. Two separate Periodic / Shell In-Place / Properties. Repeating CONDITION TYPE defined as ContactInterface. cyclic wall STAR AUXILIARIES> (it will be processed CCM+ INTERFACE automatically during output) TAU A single Shell Property. Periodic plane Additional information required - - In the PID card via two Rotation axis defined in Rotational / SETs of property card of periodic Translational Faces, one property. for each side. Non-conformal periodic BCs Solver Fluent Interface defined in BC Type AUXILIARIES> interface INTERFACE Communicati ng zones Type definition Two different Shell Properties. Open AUXILIARIES> cyclicAMI FOAM INTERFACE Two different Shell Properties. STAR AUXILIARIES> N/A CCM+ INTERFACE Two different Shell Properties. BETA CAE Systems 63 Rotational Additional information required Angle distance of matched faces in CFD_INTERFACE card. Translation vector of Translational matched faces in CFD_INTERFACE card. Rotational Rotation axis defined in CFD_INTERFACE card. Translation vector of Translational matched faces defined in CFD_INTERFACE card. Periodic / In-Place / Repeating CONDITION TYPE defined as ContactInterface. ANSA v18.1.1 ANSA for CFD Brief User's Guide 11. Model generation Checklist At every stage of the model preparation there are certain checks that should take place before proceeding to the next one. The table below lists a summary of the steps that should take place in the “traditional” CFD mesh preparation process. These are geometry clean up, watertight model creation, surface meshing, layers and volume mesh generation. For surface wrapping please refer to section 4.2. Geometry preparation Faces Resolution Different models require different discretization length. Assign a suitable element length on your model from Mesh>Perimeters>Length or Spacing [Auto CFD]. This will allow you to better display the model details. Faces Orientation Activate Visibility>Shadow mode. All Faces should be uniformly oriented. Gray is the positive side and yellow the negative. Use Faces>Orient to assign uniform or invert the orientation. Unnecessary Hot Points Perform a Hot Points>Delete with box selection to remove any unnecessary Hot Points. Check>Check Manager> Geometry Checks The user can use the Checks>Checks Manager functionality to identify several common problems in one click. Use the template Geometry Checks to find all the problems shown on the left. ANSA will report all the problems. Double clicking on each category will allow the user to right click and isolate or automatically fix the problems (if possible). Triple CONS may exist in a CFD model on purpose. Single CONS should only exist if the model has zero-thickness walls (baffles). If any penetrations are identified, the user should use the function Faces>Intersect to fix any intersecting parts. Isolate>Flanges> Proximity This check will identify parts that are very close together (although not actually intersecting). The absolute distance value is left to the user to decide. Very often such geometries also need to be topologically connected, using Topo functions like CONS>Project and Faces>Topo. Surface meshing Perimeters>Length or Perimeters>Spacing [Auto CFD] Ensure that you assign to all Perimeters the desired Element Length. For uniform element length mesh, use Perimeters>Length, while for variable, curvature dependent surface mesh use Perimeters>Spacing [Auto CFD]. Unmeshed Macros After using the various meshing algorithms (Adv.Front, CFD etc) the user should check for Unmeshed Macros in the legend on the left. Use right click for Show Only and then use alternative algorithms, or cut them into smaller macros, or check the underlying geometry. Visibility>Hidden Switching to Hidden mode allows you to check if there are violating elements, reported in the legend as OFF. Use Shell Mesh>Improve [Reshape Violating] to fix them automatically (perform twice if needed). If there are any remaining OFF elements, then use right click Show Only on the legend OFF to identify and examine these areas. You may have to use Shell Mesh>Fix Quality or even change the geometry or the element length to better resolve such areas. Do not proceed to layers generation or volume meshing if you still have OFF elements on the surface. OFF elements BETA CAE Systems 64 ANSA v18.1.1 ANSA for CFD Brief User's Guide Surface mesh orientation If layers are to be generated ensure that the orientation is uniform and correct for the whole of the model. Use Macros>Orient. Checks>Checks Manager> Surface Mesh Checks Use the Surface Mesh Checks template of the Checks Manager to identify all the problems of the surface mesh. Unmeshed Macros and Intersections Sharp edges: This check will identify very sharp angles in the surface mesh. These may be due to flipped elements on the surface or to the actual nature of the geometry. Such areas may cause problems, especially for layers generation, so you should treat them appropriately. Trias on Corner: identifies triangles at three edge corners and swaps them if needed so that layers with better quality can be generated afterwards. Duplicate and Triple Bounds: will identify duplicate elements or triple connectivity edges. Check for proximities that may lead to problems in layers of volume meshing. The check distance can be an absolute value, but it is better to specify an element length factor (<1). This implies that the check distance will be equal to the factor multiplied by the local element length. Activate also the options to check proximities among areas with the same PID (self-proximity) and provided that you have oriented your shell mesh (Macros>Orient) correctly, check only the positive side (gray one) for proximities. Layers generation Volumes>Layers Generate the Layers prior to Volume detection. Ensure you have assigned correct PIDs to the model, as the layers will be generated based on this grouping of the model. Ensure also that the surface mesh orientation is correct. Try to grow layers only with the squeeze option. If ANSA stops and detects problematic areas, open the SET window and make visible (Show Only) these areas. Investigate the cause of layer failure from these areas: poor mesh quality, very tight angles, proximities? If possible make corrections to the surface mesh. Otherwise activate also the “Collapse” or “Exclude” options and grow the layers again. Volume meshing Volumes>List After layers generation, ensure you have the whole model visible and use the function Volumes>Define [Auto Detect] to automatically identify all volumes. Mesh them with Volumes>Mesh Volume. Open the Volumes>List and check that all volumes are marked as Meshed. Check also that they have correct Property Name (Use Volumes>Set PID if needed). Select a Volume and press Info to get quality information. Visibility>Hidden Switching to Hidden mode allows you to check if there are violating elements, reported in the legend as OFF. You can optionally press right click Show Only on the OFF legend to isolate them. To fix them, press Focus>ALL, ensure that the visibility of Macros, FE-mod and Volumes are all active and then use Volumes>Improve>FixQual [Visible]. You may have to press the function again in order to fix any remaining elements. Output Before outputting the model it is recommended that you clear the database from any empty or unused grids, PIDs, etc, using the function Compress. Use also the UDF>Tools General>RenumberModel to renumber all PIDs and elements. Bring ALL entities you want to output to visible. Ensure Macros, Volumes and FE-mod are active. Use optionally the Check>Checks Manager>PRE_Volume Mesh Output checks template. Then use the Output Visible option. BETA CAE Systems 65 ANSA v18.1.1 ANSA for CFD Brief User's Guide 12. Recommendations for OpenFOAM model setup This section outlines a series of steps that should be followed in order to create a high quality mesh that meets the requirements set by OpenFOAM. Additionally, recommendations regarding OpenFOAM case set-up (numerical schemes, solution and algorithm control) are presented. 12.1. Setting up the quality criteria limits The most important OpenFOAM Quality Criteria that affect the convergence of a simulation are Skewness and Non-Orthogonality. A high quality mesh will keep Skewness below 4 and Non-orthogonality below 60. However, these values can be extended up to 5 and 70 respectively. You can automatically set the correct Quality Criteria thresholds by activating the User Defined Function SetQualityCriteria, and select among the three available options (Strict / Medium / Relaxed). (Note that OpenFOAM quality criteria apply only to volume elements. ANSA will set appropriate quality criteria for surface meshing based on Fluent definitions.) 12.2. Surface meshing It is important, before proceeding to layers creation, to ensure a good quality surface mesh that will report no OFF elements in Hidden mode. For this, follow the procedures described earlier in section 3.3. Another check that is important after the completion of surface meshing is Checks> Mesh> Trias On Corner, which searches for Tria elements having two of their edges lying on feature lines of the model. Areas where such elements exist, might lead to poor quality volume mesh later on. Activate the check and if any elements are found, right click on them in Checks Manager window and select Fix. Also, it is recommended to create two rows of elements in faces that form narrow ribs, like shown on the picture. This will ensure better quality for layers later on. Use the trailing edge refinement option in Spacing AutoCFD to achieve such a mesh. BETA CAE Systems 66 ANSA v18.1.1 ANSA for CFD Brief User's Guide 12.3. Layers generation Most frequently, elements with high skewness or nonorthogonality will appear in the layers section of the volume mesh. Regarding layers generation, it is advised that Exclude option is activated, in combination with Squeeze. This will ensure that in problematic regions, all layers will be excluded and over-squeezed elements will be avoided, as shown here for a concave area example. Additionally, Generate Quad-Tria Interfaces option should be activated along with Reconstruct Tria Interfaces flag, as shown in the image. These options are found in Side Treatment tab of Layers function. Thus, two superimposed PIDs will be created at the excluded areas, which will be used for the definition of a non-conformal interface later on. Also, in Vector Treatment tab, Separate vectors at sharp angles option can be enabled. This will separate layers at sharp angles (e.g. airfoil trailing edges), ensuring that highly skewed elements will be avoided in areas like the one shown below. Moving on to Growth Controls tab, an appropriate Minimum first layer height value should be set to avoid over-squeezing of layer elements. Moreover, Minimum layer aspect option can be set to a higher value (e.g. 0.05) to avoid elements with low aspect ratio that might increase non-orthogonality value. These settings will have effect only when layer squeezing will take place to overcome proximity issues. BETA CAE Systems 67 ANSA v18.1.1 ANSA for CFD Brief User's Guide When generating layers with Exclude and Generate Quad-Tria Interfaces options activated, a NonConformal-Interface is automatically defined. The two PIDs, side_quad and tria_interface are set by default of type CyclicAMI. In the OpenFOAM deck activate AUXILIARIES > INTERFACE function. Click Edit and in the window that opens, to examine the definition of the AMI Interface. 12.4. Final Volume mesh improvement After layers generation, it is recommended to proceed with volume meshing of the rest of the domain. Quality improvement of any reported OFF elements should be made in the end on the whole domain, as Fix Quality will give better result. In order to check the quality of the mesh, you can switch to Hidden view mode and isolate the reported OFF elements. In addition you can use the Check>CheckMesh tool that includes all the checks that are necessary for a mesh to be output and solved with OpenFOAM. Clicking Execute, any violating elements will be reported along with their values. In order to improve mesh quality, activate Volumes> Improve> Fix Quality [Visible] function, ensuring that all volume is visible and the correct Quality Criteria have been applied in Quality Criteria window. Before outputting the model it is recommended that you clear the database from any empty or unused grids, PIDs, etc, using the function Compress. Use also the UDF>Tools General>RenumberModel to renumber all PIDs and elements. Use OpenFOAM>Elements>Util>Renumber Mesh [Model] to reduce the bandwidth. Bring ALL entities you want to output to visible. Ensure Macros, Volumes and FE-mod are active. Use optionally the Check>Checks Manager>PRE_Volume Mesh Output checks template. Then use the Output Visible option. BETA CAE Systems 68 ANSA v18.1.1 ANSA for CFD Brief User's Guide 12.5. Setting up Boundary Conditions The table below summarizes the recommended boundary conditions for each variable (depending on the selected turbulence model) at each boundary, for a High Reynolds model (y+ 30-100). Note that there is a UDF called SetupOFCase that will assign correct parameters to each PID given minimum user input. Inlet Outlet Stationary Walls Moving Walls Rotating Walls p zeroGradient fixedValue zeroGradient zeroGradient zeroGradient U surfaceNormalFV zeroGradient or inletOutlet fixedValue 0 fixedValue The velocity of the wall rotatingWallVeloc ity k fixedValue k=(3/2)*(UI)2 U: Free stream velocity I: Turbulent intensity kqRWallFunction kqRWallFunction kqRWallFunction epsilon fixedValue zeroGradient epsilon=k*omega or inletOutlet epsilonWallFuncti on epsilonWallFuncti epsilonWallFuncti on on omega fixedValue zeroGradient omega=ρ*(k/μ)*(μ or -1 inletOutlet t/μ) ρ: Density k: Turbulent kinetic energy μ: viscosity μt: turbulent viscosity omegaWallFunctio omegaWallFuncti omegaWallFuncti n on on nuTilda fixedValue zeroGradient or inletOutlet zeroGradient zeroGradient nut calculated calculated nutkWallFunction nutkWallFunction nutkWallFunction zeroGradient or inletOutlet zeroGradient The table below summarizes the recommended boundary conditions for each variable (depending on the selected turbulence model) at each boundary, for a Low Reynolds model (y+ 1-5). Inlet Outlet Stationary Walls Moving Walls Rotating Walls p zeroGradient fixedValue zeroGradient zeroGradient zeroGradient U surfaceNormalFV zeroGradient or inletOutlet fixedValue 0 fixedValue rotatingWallVeloc ity k fixedValue zeroGradient or inletOutlet fixedValue 0 fixedValue 0 fixedValue 0 epsilon fixedValue zeroGradient or inletOutlet fixedValue (small value e.g. 1e-12) fixedValue (small value e.g. 1e-12) fixedValue (small value e.g. 1e-12) omega fixedValue zeroGradient or inletOutlet omegaWallFunctio omegaWallFuncti omegaWallFuncti n on on nuTilda fixedValue zeroGradient or inletOutlet fixedValue 0 nut calculated calculated nutUSpaldingWall nutUSpaldingWal nutUSpaldingWal Function lFunction lFunction BETA CAE Systems 69 fixedValue 0 fixedValue 0 ANSA v18.1.1 ANSA for CFD Brief User's Guide 12.6. Solver setup This section presents some tips regarding OpenFOAM case set-up that may help stabilize a diverging simulation. Keep in mind that nothing can substitute a good quality mesh, however if further improvement is not possible these hints might prove to be useful. Keep also in mind the UDF SetupOFCase that will automatically setup several case settings for BCs in the PID list and in the Solver Info section. - Solver Settings (fvSolution) Solution divergence may be observed in case of meshes with high non-orthogonality (above 70). In that case you can increase the Non Orthogonal Correctors of the SIMPLE algorithm in the fvSolution file from the default 0 to 2 (or even 5), as shown here: SIMPLE { nNonOrthogonalCorrectors 2; …......… } In the above example, two correctors have been used for the simpleFoam solver. This number may be reduced to improve the computational runtime. In general, for non-orthogonality above 60 but below 70, 1 corrector may be used. For non-orthogonality between 70 and 80, 2 or more may be needed. - Disable OpenFOAM Floating Point Exception Signal In some cases a simulation may crash in the first few iterations due to extremely high values of some variables. The crash may be avoided if the Floating Point Exception Signal is deactivated. To do so, navigate to the case folder and type: unsetenv FOAM_SIGFPE After unsetting it, the line marked in bold below should not appear at the beginning of the solution output: Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 12.7. Running the case To run an OpenFOAM case follow these steps: 1) Navigate inside the case folder and initialize the flowfield with potentialFoam to help solution convergence: potentialFoam -writep | tee potentialFoam.log 2) Start the solver with the output in a log file like: simpleFoam | tee -a simpleFoam.log 3) To monitor residuals and force coefficients you can navigate in the case directory and type the OpenFOAM v4.x command: foamMonitor -l postProcessing/residuals/0/residuals.dat to obtain a real-time plot of residuals as shown on the left, and foamMonitor postProcessing/forceCoeffs/0/forceCoeffs.dat for a similar plot of Cd and Cl Parallel execution To run a case in parallel, ensure you have specified the number of processors in Solver Info>decomposeParDict and then execute decomposePar to decompose the mesh and mpirun -np 20 simpleFoam -parallel | tee -a simpleFoam.log to run simpleFoam in 20 processors BETA CAE Systems 70 ANSA v18.1.1 ANSA for CFD Brief User's Guide 13. Importing CFD results in ANSA It is possible in ANSA to load, display and manage results calculated from CFD or other simulations. These results are handled by the DECK>AUXILIARIES>RESULT entity. Example of such results are: - Pressure or temperature loads to be mapped on meshes for FEA analysis. - y+ results to be used for modification of boundary layer first height distribution. - adjoint sensitivities to be used for morphing. - vector results like deformations, stresses etc. The following sections describe the steps the user must follow for different cases. 13.1. Importing results from the same mesh In case the user wants to import results in ANSA from a simulation performed on the same mesh, there are two options, depending on the solver used. OpenFOAM Results OpenFOAM results, as long they come from a single processor case (i.e. they are reconstructed), can be directly input in ANSA. Go to AUXILIARIES>RESULTS and press New in RESULT list window. As “Result type” choose OpenFOAM. In “Filename” field, you can press question mark “?” to open a file browser for choosing the file. This file should contain the OpenFOAM result of interest (p, U, yPlus etc). Press OK. In the RESULT list window, press the Apply button. The Status should change to Built. Note that if you have multiple Result entries only the Current one (marked in Red) can be visualized. You can change this using the Current button. Switch to Results view mode to visualize the current Result. All other CFD solver Results Results from a simulation performed in any other solver, apart from OpenFOAM, cannot be read directly into ANSA. Instead they should be read in META and META will output in a text file (readable by ANSA) all the information needed. Follow these steps: 1) In META, load the case along with the results that should be exported. 2) Isolate on screen the entities for which results should be exported. 3) In CFDPost toolbar, go to Output tab and press Refresh button. The drop-down list becomes populated with the available results. BETA CAE Systems 71 ANSA v18.1.1 ANSA for CFD Brief User's Guide 4) From the drop-down list choose the result that should be exported. 5) Press Output button. Results are written in a text file in the format: x y z value for scalar values x y z value_x value_y value_z for vector values Where x, y, z are the coordinates of element centroids. 5) In ANSA, go to AUXILIARIES>RESULTS and press New in Result [RESULT] window. As “Result type” choose Custom. In “Filename” field, press the question mark “?” to open a file browser for choosing the file. In case the results exported from mETA uses different length units from the model loaded in ANSA, you should define an appropriate Scale Factor (For example if your simulation is in metres and your ANSA model is in mm, then this scale factor should be 1000). 6) In RESULT window, press the Apply button. If all parameters have been defined correctly, the Status should change to Built. 7) Activate Fringe>RESULTS to visualize the loaded RESULT. 13.2. Importing results from a different mesh For importing simulation results in ANSA coming from a different mesh, mapping of results will be performed by a UDF. A text file containing the results to be mapped is required, as shown here: x y z value for scalar values x y z value_x value_y value_z (If this text file is available, go directly to step 6.) for vector values 1) In META, load the case along with the results that should be exported. 2) Isolate on screen the entities for which results should be exported. 3) In CFDPost toolbar, go to Output tab and press Refresh button. The drop-down list becomes populated with the available results. 4) From the drop-down list choose the result that should be exported. 5) Press Output button. 6) In ANSA open the target mesh. 7) Activate the UDF>TOOLS_DECKS>MapXYZResults. 8) Select the txt file containing the result information. 9) Select the target mesh and press Apply to map the Results. 10) Activate Fringe>RESULTS to visualize the loaded RESULT. BETA CAE Systems 72 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14. Morphing for CFD ANSA Morphing allows easy and accurate morphing of complicated CFD models. Morphing can be applied on Surface and Volume mesh and on Geometry itsefl. Morphing can be achieved either by using Morphing Boxes, or explicitely using Direct Fit Morphing (DFM) functions. The following table summarizes the capabilities of each option: Type Applicable to Characteristics Box Morphing (Create morph boxes and move their control points) Surface and Volume FE-mod mesh - Efficient algorithm for fast morphing of full volume CFD models - Highly controllable with suitably designed boxes - Ability to re-use existing morphing boxes on new models (see section 14.16) - Final results can also be applied on Geometry (see section 14.15) Direct Morphing (DFM function) Surface FE-mod mesh or Geometry (Faces) - Does not require construction of Boxes - Easy to perform (see section 14.12) Tangency condition This simple example demonstrates the box morph approach. Control point One box is split into two. Tangency condition is applied across the edges by default. Loaded elements in box Morph box edge Moving a control point results in the proportional morphing of the elements that are loaded in the boxes. The table summarizes the most common functions that should be used in order to perform Box Morphing: Task Morph Function Create Box Boxes>New – Select some elements to create a Box around them Split Box Boxes>Split – Split the Box at appropriate locations to limit the morphing area Modify Box shape Control Points>Insert – to insert additional Control Points if needed Box Morphing>Move – to move the Control Points and change the shape of the Box so that it follows better the geometry Fit Box Box Morphing>Fit – Snap selected Edges on selected features of the model Load elements Boxes>Load [Visible] – Always perform a Load Visible step to ensure that the proper elements are loaded in the corresponding Boxes. You can examine this using Boxes>Info Morph Box Morphing>Move – Select Control points to move with the Morphing Flag Active in the Options List Window!) BETA CAE Systems 73 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.1. Box Morphing Approach There are two approaches when constructing the Morphing Boxes: “Loose” morphing In this approach a large box is created and split in the three directions, to localize the effect of morphing, thus forming a lattice. Moving the outer Control Points results in morphing of the mesh. Always prefer this approach if you can achieve the desired outcome as it is less constraining than the tight edge fit approach. Tight edge-fit morphing As in the previous approach, a large box is created and splits are made, using Boxes>Split. The internal Morphing Box edges are snapped to the feature lines of the model, using Box Morphing>Fit [Edges]. This enables the user to morph or freeze certain feature lines very accurately. BETA CAE Systems 74 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.2. Box preparation When creating a large Box using the Boxes>New [Ortho] function, all selected elements are loaded in the Box. Using Boxes>Info the user can visualize the contents of a Morphing Box. When splitting this Box, ANSA automatically redistributes the elements to the proper Boxes, as shown below. In every change of the topology or shape of the Boxes during their preparation for the morphing, ANSA checks the contained entities and the boundaries of the Boxes. Because real CFD models usually contain very large number of elements, these checks delay the Box manipulations. It is therefore recommended to start your work with an “empty” Box. With an “empty” box the user can perform operations like split, and control point movement much faster than with a loaded Box. To empty the contents of the original Box, simply de-activate temporarily the visibility of the FE-mod flag and perform a Boxes>Load [Visible] operation. As nothing is visible, the selected boxes will be emptied of their contents. In the end when you have split, reshaped, edge-fit your boxes, just before doing the Morphing, you can perform a Boxes>Load [Visible] or [Whole DB] operation to load the proper elements to the proper Boxes. Remember that every time you make a modification of shape of the Boxes (without morphing) you should use the Boxes>Load function to ensure that the proper elements are loaded to the proper Boxes. Failure to do so may result to such discontinuities during morphing, like the one shown here. BETA CAE Systems 75 ANSA v18.1.1 ANSA for CFD Brief User's Guide When creating boxes around a vehicle try to use as few splits as possible. This makes the model easier to handle and also results in smoother morphing. Take also advantage of the Transform>Link [Symmetry] to create LINK boxes as shown. A change on one side is mirrored on the other. Observe how the splits “follow” the shape of the car.... …. in every direction. BETA CAE Systems 76 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.3. Box shape issues When splitting the Boxes in order to edge fit the internal edges onto the feature lines of the model, you should take care that the morphing Boxes are as orthogonal as possible, and certainly do not have internal angles that exceed 180o degrees. On the left image the Box that is bad internal angle good internal angle inside the vehicle has an angle higher than 180, while in the second image a better Box construction results in better angles. In the example below again the left model has two boxes with very wide angles. The Box topology on the right has much better shaped Boxes. Non-optimum topology improved topology Creating the Boxes is similar to creating Boxes for Hexa mesh. Like in hexa mesh, the better these blocks are, the better the result. You can also check for invalid boxes with Morph>Checks>Distorted. 14.4. Box boundaries The Boundaries of the Boxes should be placed sufficiently away from the model to be morphed. On the left the first model has some confined morphing space adequate morphing space boxes that are small. The model on the right has much better boxes. BETA CAE Systems 77 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.5. Larger Boxes maintain orthogonality The images below indicate that even if the initial Boxes have good internal angles, these angles may be violated if morphing takes place. Having larger boxes reduces this risk. Bad resulting box angle >180o confined morphing space adequate morphing space OK resulting box angle 14.6. Larger Boxes result in smaller deformations of the volume mesh confined morphing space squeezed solids good solids adequate morphing space BETA CAE Systems 78 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.7. Tangency condition Depending on the status of the Tangency flag in the Options List window, when you split Boxes ANSA assigns or not tangency conditions between adjacent Boxes. Tangency is indicated by the thicker lines and can be added or removed using the Edges>Tangency [Manual and Remove] functions. In most cases it is better not to have tangency applied because it may over constrain the form of the Boxes. It is therefore recommended that you remove all tangencies and then add them selectively at areas and along specific directions that you really want them. no constrain over constrain The following simple example demonstrates the effect of tangency. You could start without any tangency over all edges and then selectively add them manually, where it is really needed. with tangency without tangency without tangency BETA CAE Systems tangency only along one direction 79 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.8. Additional User Tangency condition Sometimes it is very useful to impose and freeze tangency in a certain direction. This can be achieved through Edges>Tangency [User] Select NEW pick an edge and confirm. When the window opens pick two point positions in order to define the required direction. By default ANSA creates the User Tangency in the current direction of the edge. A user imposed tangency is displayed with a yellow arrow. In this example, the tail of the vehicle is squeezed in width and the rear roof is lowered. These changes do not however affect the tangency of the model “upstream” and maintain a smooth shape variation. The image on the left shows how a User Tangency condition can improve the morphing results. Without any Tangency, sharp discontinuities arise. With standard Tangency there is no discontinuity in curvature BUT a movement of the rear end of the vehicle affects upstream the model as shown on the left. With User Tangency, on the right, the continuity is guaranteed and also there is no distortion upstream, because the edge is “frozen”. BETA CAE Systems 80 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.9. Tolerances Tolerances is an important issue, especially when morphing CFD models that contain very small elements (especially in volume boundary layer elements). To avoid accuracy errors you should activate the extra-fine tolerances in Settings>MORPH Optimization. (in general the tolerances should be two orders of magnitude smaller than the smallest element length). smooth mesh mesh wrinkles 14.10. Edge fitting on features of the model When using the Box Morphing [Fit Edges] function to snap the Morphing Box edges on the feature lines of the model it is not recommended to place an excessive number of Control Points. Too many Control Points delay all the algorithms without actually improving the accuracy of the result. excessive number of Control Points normal number of Control Points Fitting of Edges on the model should not be implemented on every feature of the model. As a general rule you should FIT edges on the model only when: - aiming to freeze a certain feature line so that nothing is moved around it - aiming to move a feature line either as a rigid body or to snap it to a different curve. For all the rest it is better to keep a more loose box structure with as few control points as possible, BETA CAE Systems 81 ANSA v18.1.1 ANSA for CFD Brief User's Guide In this example we have fitted the upper and lower edges of the rear windscreen. Note that the vertical edges of the screen do not have edges fitted on them. They are left to deform “freely”. Here we have fitted two edges only: - The one we want to move as rigid body or to snap to a different target curve - The one we want to freeze so that it is not affected by the neighboring morphing - when we want to morph a specific target 3D Curve. When moving only one side of an edge, the result will usually be better if there are no intermediate Control Points as shown below: With intermediate control points BETA CAE Systems Without intermediate control points 82 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.11. Using 1-D Box edges 1-D Box edges can also be easily created from the function Boxes>1-D Morph These edges have a radius of influence of the entities (Faces or shell elements). However it is more appropriate to use Load>Select function to load exactly the entities that you want in specific 1-D Morph entities. Then you can easily pick a control point of such an edge and morph your model. BETA CAE Systems 83 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.12. Troubleshooting morphing boxes Morph boxes should be as orthogonal as possible. Avoid severely distorted boxes because they will give bad morphing results. You can use the CHECKs>DISTORTED to find badly shaped Morph Boxes and fix them. The message “overlapping morphing boxes” may appear when trying to morph a model. In this case morphing will not be allowed because there is conflict with respect to the contents of the boxes. ANSA reports the Ids of conflicting boxes in the Text area, for example Overlapping morphing boxes selected (morph id: 201 and 222). In such cases use the DatabaseBrowser to locate these boxes. Double click in the MORPHBOX entry to open the list of Morphing Boxes. In the filtering section at the top, type the requested Ids and click on Show Only Overlapping boxes usually occur because some elements are loaded to more than one boxes, usually when one has morphing boxes inside other morphing boxes, and they move the control points of both boxes simultaneously. In such cases ANSA cannot understand how to move these elements (which box should affect them?) and prints this message. Overlapping boxes may also occur if the box construction is not proper. This happens when the shape of the boxes is severely distorted or if there are duplicate Control Points (that is points within a very small distance). Use Control Points>Rm.Dbl. in such cases and specify a tolerance, say 5mm and select and delete the identified duplicate control points. Use also Checks>Distorted to identify bad boxes. Then use Boxes>Load again to load the proper elements to the proper boxes and proceed with morphing. BETA CAE Systems 84 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.13. Direct Morphing (without morphing boxes) Morphing on Geometry (Faces) or surface mesh can be achieved very efficiently without the need of morphing boxes using the function: Direct Morphing>DFM (Direct Fit Morph) The user need to specify 3 groups of entities: O What Moves as a rigid body. O What deforms to absorb the morphing. O What boundaries stay frozen. Move Types can be: - Translation - Rotation - Scaling - Edge Fitting - Surface Fitting Note that several combined movements can be performed in one step if required, for example a translation of one part of the model and an edge fit of another feature of the model to a target curve. In this example the user selects the rear end of the vehicle to be moved in x direction. The magenda colored Faces will be deformed. The blue CONS will remain frozen. ANSA performs the morphing automatically. BETA CAE Systems 85 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.14. Define MORPH Parameters Once you have finalized the Morphing Box construction it is well worth defining the morphing Parameters from Controls>Parameters>New. Mainly used parameters are TRANSL, LENGTH (for slide action) and EDGE.FIT. Having defined the parameters you will not have to select again the control points to perform the morphing, and these parameters are saved in the database. 14.15. The Deformation Morph Parameter A different kind of Morphing parameter that is very useful is the DEFORMATION type. Create one before you begin your morph operations, so that at any time during the morphing you can retrieve the original state (0) from the current state (1), or interpolate between 0 and 1 or even extrapolate beyond this range. The Deformation type parameter allows also the user to re-apply the same morphing on another model. To achieve this the user must define the deformation parameter prior to morphing. Then, after all the morphing operations are complete and the final state is reached, the user can EDIT the parameter and set the Record status to OFF. This means that the target state (as well as the original) is now also locked. All intermediate states can be retrieved by Morphing the parameter from 0 (origin) to 1 (final state). The Boxes with the deformation parameter can be saved separately in another ANSA database (see next section). The Boxes saved as a separate ANSA database on their own can be morphed to their original state by MORPHING the value to 0, then loading or merging another mesh in them, loading the elements to the Boxes and then morphing the parameter back to 1 again. BETA CAE Systems 86 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.16. Imposing pre-defined deformations The function Controls>Deform.Map can be used in ANSA to apply predefined deformations on geometry or mesh like: - Deformations calculated from an FEA analysis or an adjoint sensitivity analysis - Deformations that were applied on mesh using morphing boxes and recorded by a deformation parameter. The following example demonstrates the second case. Start with your original meshed model. Ensure that you have the View Mode>Mesh status active in the Options List window. You should see the Geometry as meshed Macros and not as Faces. Create the Boxes and Load>Visible the FEEntities (that means the elements) and not the Faces. Prior to any morphing it is essential that you define a Deformation parameter. This will record the deformations of the mesh which will then be mapped on the geometry at a second stage. In Controls>Parameters select NEW and a Deformation type. Confirm in the card of the deformation parameter. Perform all the morphing actions on the mesh of the Macros. You will notice that the Perimeters of the Macros remain at their original position, as the underlying geometry is not morphed. Once you have finalized all the possible morphing actions on the mesh (which can be a sequence of several combined movements) you can check the deformation parameter and it will show you the total displacement from the origin. BETA CAE Systems 87 ANSA v18.1.1 ANSA for CFD Brief User's Guide Change the View Mode to Topo in the Options List and then you will notice that the Faces are still at their original position, as no morphing was applied on the geometry. The task now is to apply the deformation of the mesh on the geometry Faces. Activate the function Controls>Deform Map This function maps deformation data on new geometries (Faces or FE-mod). The deformation data can come from an existing deformation parameter, from a CFD results that contains sensitivity values, or from a text file containing columns of x, y, z, dx, dy, dz, as calculated from an FEA analysis. Select the option Parameters and the existing Deformation parameter that has recorded the applied deformation and press Next. In the selection of entities to be morphed switch to Geometry and ensure that the proper Faces are selected. Press Next Ensure that the correct CONS are selected to be frozen during morphing. Press Next BETA CAE Systems 88 ANSA v18.1.1 ANSA for CFD Brief User's Guide In this step the user can: - Filter the vectors, either by selecting deselecting from the screen, or by changing the min max value limits - Smooth the vectors (either magnitude or direction) to remove any unwanted “noise” in Vectors Smoothing tab - Specify the max deformation magnitude - Sample the number of vectors in order to accelerate the morphing. ANSA displays all the deformation vectors. This number may be very large for a real model. Note that the number that will finally be applied should not be excessive as the computation will require a lot of memory and time. Aim in number of vectors of less than 50,000 and avoid exceeding number of 100,000 or 200,000. You can manually edit the sampling points number and press the Reduce button to sample fewer vectors that can also be sufficient for the deformation mapping. Press Next. ANSA maps the deformation vectors that were previewed to the selected Faces. The geometry is morphed. The morphed model can now be output in IGES, STEP or VDA-FS format. BETA CAE Systems 89 ANSA v18.1.1 ANSA for CFD Brief User's Guide 14.17. Model Browser structure As a real life model morphing case can get complicated, it is highly advisable to use the Model Browser in order to manage the model. You should have in separate Parts or Groups the main mesh model, the Morphing Boxes, the original 3D curves of the feature lines of the model and the target 3D Curves, if any. The feature lines of your model in the form of 3D Curves can be extracted by you using Curves>Cons2Curv from the original geometry (if it is available) or using the Perimeters>FL2Curves function. Target Curves can be either obtained from CAD department or even created within ANSA using several CAD functions in TOPO. As Curves do not have a PID it is recommended to place them in separate Parts. !! Placing the Boxes in one Part allows the user to save them from the Model Browser (right-click SAVE) into a separate ANSA database. If there are any Morph Parameters, they will also be saved with the Boxes. This means that the user can use the same Boxes, input a new model in them, LOAD the boxes and perform morphing on the new model using the existing Boxes. In such a case the user may only have to make some adjustments or edge fit of the existing boxes to the new model. The Box topology or template can be the same. BETA CAE Systems 90 ANSA v18.1.1 ANSA for CFD Brief User's Guide 15. User Defined Functions for CFD models ANSA Scripting language allows the creation of user defined functions. Below are some user defined functions that may come to use in the manipulation of a CFD model. These user defined functions are automatically read by ANSA upon startup from the file CFD_TRANSL.py inside the ANSA installation directory (/full_path/ansa_v18.x/config/CFD_TRANSL.py). The user can save this file locally at /.../<user_home_dir>/.BETA/ANSA/version_18.x/CFD_TRANSL.py and edit it accordingly to modify the UDFs that they want to automatically read at start up. The UDFs are accessed by the function UDFs at the main pull down menu. TOOLS_TOPO: CreateDomain: Auto creation of CFD domain based on user specified offset distances of model. IsolateFaceArea: Isolate Faces below or above a user specified area. IsolateShortCONS: Isolate CONS below a user specified length. MergeOverlappingFaces: This function detects identical faces in contact and replaces them with one with a PID name containing the names of the two PIDs that it originated from. Useful for defining interfaces between solid components. SplitCurvaturePeaks: Automatic split of high curvature areas for better meshing afterwards TOOLS_MESH: AdvancedLayerParameters: Access to more controls for Layers generation. ChangeBafflesProperty: This function should be used after ISOLATE [Baffles]. It will change the property of the identidied baffles to a new property name with the added keyword *_zero_baffle. This function is useful to separate the PIDs of baffles in order to create layers from both sides of zero thickness walls afterwards. EliminateViolatingElements: Collapses negative or very bad quality volume elements. FixOFQuality: Performs fix quality for OpenFOAM for standard criteria. FixNearTopCap: Perform Fix Quality of volume mesh only around the top cap area of the layers.. ConnectSTLPerProperty: This function applies FEMTOPO on each PID of an assembly, separately. CosineSpacing: This function applies sine and cosine spacing on selected Perimeters. IsolateNormalVector: Isolate shell elements according to their normal vector. BETA CAE Systems 91 ANSA v18.1.1 ANSA for CFD Brief User's Guide MapPIDs: Map the PIDs of two similar models from one Part/Group to another Part/Group withing a user tolerance PostWrapFix: Automatic fixing of many wrap problems, like intersection, flipped elements, sharp edges etc. PreHexaBlockRecord: Preparation of geometry so that Hexablock mesh construction can be recorded and replayed on a parametric model. ResetMacros: This function resets all Macros to their original state by undoing all the actions of Batch Mesh or Reshape, releasing all joined perimeters, initializing lengths and bringing all nodes to their origin. The mesh is erased! ScaleBMValues: This function provides easy scale up or down of element length of selected Batch Mesh scenarios for quick mesh refinement studies. SetQualityCriteria: Set Quality Criteria in order to perform quality check and improvement for OpenFOAM and Fluent/CFX solvers LatticeBoltzmannVRZone Auto creation of Variable Refinement zones based on user specified offset values for PowerFlow or XFlow.. TOOLS_GENERAL: ClearDatabase: This function will remove all Sets and Includes in the ANSA file. It will also convert all 2 nd order elements to 1st order and compress the file, in order to remove unnecessary info and reduce filesize. CopyPIDCard: This function copies all the settings of one PID (BCs, etc) to several other PIDs simultaneously. MergePIDs: Merge PIDs if they have same name or colour, or contain a certain sting of characters. MergeSmallPIDAreas: Changes the property of small (in number of elements) PIDs to that of their larger neighbors, thus reducing the total number of properties of a large assembly. ORinXYZ: Isolates on the screen entities according to user specified min and max x,y,z values. PIDCharacterCase: Changes capital letters to lower case and vice versa of all the Property names. ReadPIDList: This function can read a list of Properties from a comma separated file (*.csv) with two columns: Property IDs and Property Names. RenumberModel: This function renumbers the IDs of the Nodes, Elements and Properties so that they all start from 1. There is also the option to renumber the elements sequentially for each increasing PID. RideHeightSetup: Easy and quick definition of DFM parameters to change the suspension setup of a watertight CFD model of a vehicle SeparateUnconnected: Separate unconnected PID regions and place them in separate PIDs. VtrapsBatch: Perform multiple VTRAPS runs in batch mode based on input from a txt file. TOOLS_DECKS: DistributedRESULTValues: This function can be used to assign variable first layer height (or growth rate), either as linear interpolation or following flat plate boundary layer growth. The function will create an Auxiliaries>Result that will be used as first height for Layers generation, though the UDF AdvancedLayerParameters. MonitorOFSolution: Create the files needed to monitor the residuals and forces during OpenFOAM solution. ReconstructOFMesh: This function will connect together a partitioned OpenFOAM mesh that was input in ANSA. RESULTsOperations: This function allows the combination of several Auxiliaries Results into a new one. RESULTsToLoads: This function create PLOAD or ELTEMP entries from Auxiliaries>Results SetupOFCase: Function that setups correct values for all PID boundary conditions and Solver Info, given minimum user input yPlusCorrectedLayers: Functionality to prepare model for generation of adapted layers with variable first layer, based on previous calculation of y+ BETA CAE Systems 92 ANSA v18.1.1 ANSA for CFD Brief User's Guide INPUT OUTPUT: CMSoftAeroFInput and CMSoftAeroFOutput: I/O in native CMSoft AERO-F format (*.xpost). InputAssembly: This function takes as input a folder path and will read recursively all sub folders and input all the contained STL or NASTRAN or IGES or STEP files. Each folder will become a Group and each file a Part. In this way the whole assembly structure will be reproduced in the ANSA Model Browser OutputOpenFoamPoints: This function can be used in order to output only the points file of the polymesh section of an OpenFOAM case. The idea is that after morphing you do not have to write the whole mesh but just the new point coordinate. PartToFile: This function outputs each Part or Group at the top level of the Model Browser in separate ANSA, STL or NASTRAN files. PidToFile: This function outputs each PID of a model in separate ANSA, STL or NASTRAN files. VIEWS: FlyingCamera This function creates a series of snapshots from intermediate user defined viewing angles. The resulting images can be combined in an animation of a flying camera path. Lock2Image: This function will output one image and one text file for each stored locked view. The text file will contain the comments of the lock view. MultiViewSnapshots: This function automatically takes JPEG images for three different pre-defined views and save them in the ANSA start up directory. SaveView: The user can save several custom viewing angles and zooming that can be re-applied again in other ANSA sessions. The views are saved in a text file (ANSA_saved_views.txt) in the start up directory. SetCustomView: This function assigns a user specified view angle based on three rotation angle values relative to the F1 view. CONVERSIONS: PartToPID: This function creates different PIDs for every Part in the Model Browser. PIDPerFace: This function separates the Macros of a PID to separate PIDs with the same name plus a counter. It will do this for all the PIDs of the database. PIDToSET: This creates one SET for every PID. SETToPID: This function creates different ANSA SETs for every PID. VolToPart: This function places each defined Volume in a separate Part in the Model Browser. VollToPID: This function can be applied on a model consisting of multiple volumes, but all shell elements or Macros are placed in a single PID. Using the function ANSA changes the PID of the shell elements for each different Volume. BETA CAE Systems 93 ANSA v18.1.1 ANSA for CFD Brief User's Guide 16. How To and Troubleshooting section GUI Place labels under the icon toolbars to better recognize the functions Press right-click on a toolbar and activate the flag Show Labels. You can also press Apply to All to make the same for all toolbars. Customize and save my CFD GUI Start ANSA in CFD GUI, make any change you want and then go to Settings and press Save GUI settings. Next time you start ANSA it will start as you left it. Create a new GUI Start the ANSA launcher, select the CFD mode and then activate also the Custom field. Type a new name for your new layout. ANSA starts based on the CFD layout. Make all your changes and then go to Settings and press Save GUI Settings and Save Settings. New xml and defaults files will be created. Next time you open the ANSA launcher, your new custom GUI will also be available for selection. Start ANSA with *.xml and *.defaults files read from a location other than the /homedir/.BETA/ANSA/ Start ANSA with the options ansa17xx -xml <full_path>/CFD.xml -changedir <full_path> -df CFD to start ANSA reading the CFD.xml and CFD.defaults that you place at <full_path> My CFD GUI seems messed up! Go to your home directory, locate the folder ./BETA/ANSA/version_17.x/ and remove the xml and defaults files. Start ANSA again with the CFD default settings My ANSA session tends to crash in random cases ANSA always uses the maximum capabilities of your graphics card to allow the fastest possible model manipulation. It is therefore very important to have the latest driver version of your graphics card to ensure stability. Start ANSA without UNDO functionality You can start ANSA without UNDO functionality (faster and less memory needed) using the command line option ./ansa64.sh --undo no TOPO The IGES or STEP file I open has topological problems or missing faces Neutral CAD files are translated by default via the ANSA translation libraries. If you encounter topological problems try to modify the tolerances and the option Settings>Translators>Neutral>Topology>Clean Geometry. If you have more problems like missing or untrimmed Faces try to use alternatively the CT translation libraries by changing the option in Settings>Translators>File Associations>Neutral [ANSA or CT] My CAD operations seem slow Make a measurement of a model dimension and check if this is compatible with the Settings>Units. Ensure for example that the setting is not metres if in fact your model is in millimetres. Check also that your Settings>Tolerances values are compatible with your model dimensions. In general, the tolerances should not be smaller than around 6 orders of magnitude of the dimensions, as this may cause delay in CAD operations. How can I check my geometry? Switch off SHADOW and red CONS visibility so that you can see red and cyan CONS, indicating single or triple connectivity (For quicker access you can also press the Drawing Style>TOPO Check Gaps button). These are possible problem areas that should be examined. Try also the function Check>Geometry Unchecked Faces? These are Faces that cannot be shaded, due to bad geometry or bad topology or even improper assigned element length. Try the following: - Right-click on Unchecked legend and select Fix - Cut the Face in two and see where shadow can be enabled again - Release topology and delete Hot Points - Use Surfaces>Untrim to extract the full surface as a Face Find the centre of a circle Use the Points>On CoG [Circle] Disconnect some part of geometry or mesh from the rest of the model Use the function Transform [Move] and translate these entities by a distance of 0 BETA CAE Systems 94 ANSA v18.1.1 ANSA for CFD Brief User's Guide Extract one side of thin solid Use the function Faces>Mid.Surf [Skin] or use Focus OR and NOT description parts functions with feature angle selection. Extract the wetted surface of bulk parts or assemblies Use the function Isolate>Skin and Isolate>Exterior Extract geometry description from imported FE-mod mesh For relatively simple geometries use the function Mesh>Elements>To Surf [Per Area] Find Faces that have no shadow (unchecked) Any Faces that cannot be shaded are reported as Unchecked in the legend on the right. Use right click Show Only to isolate them Find proximities in TOPO Use the function Isolate>Flanges>Proximities MESH Find unmeshed Macros Any Macros that are not meshed are reported in the legend on the right. Use right-click Show Only to isolate them on the screen Coarsen/refine a mesh If the model is meshed Macros (geometry), it is easy to assign a different Perimeter Length and remesh. If the model is imported FE-mod mesh, use the function Reshape and specify a different target element length. Setting also min and max element length limits in F11 window, will also allow you to constrain the mesh size. If your starting mesh is a very dense laser scan STL like mesh you may also want to try the function Shell Mesh>Reduce Dealing with proximities? Two options, either during meshing by activating the proximity option in Spacing AutoCFD and CFD meshing algorithms, or after meshing by using the Check>Penetrations>Proximities with the right-click option Fix Release Joined Perimeters Use Macros>Release and select which joined perimeter to bring back Copy nodal spacing from one perimeter to another Use the function Perimeters>Align, select one or more perimeters and then select the Master one from which spacing will be copied Find leaks In TOPO menu check for red CONS. In Mesh menu switch to Bounds view mode and look for red free bounds. If the model is too complex to identify leaks, use the leak check tool of the functions Isolate>Skin and Elements>Wrap [Variable length]. Create matching periodic meshes In order to ensure exactly matching periodic meshes the user must delete the Faces of one side and replace them with LINK type Faces. These are created from top toolbar buttons, Transform>Link. Once the two sides are linked at TOPO level the meshes will have exact matching of nodes. Both sides must be placed in one Property of type periodic in which each side will be referenced by a SET which must be previously defined for each side). Refine the mesh in a certain Go to DECK menu and create Size Box entities that have max limits for area of the model surface and volume mesh. The functions Spacing>AutoCFD and Mesh Generation>CFD as well as Volumes>Mesh Volume will follow the mesh size imposed by these Boxes. Alternatively for a small area, mesh it first with small size manually and then use Macros>Freeze and then Spacing>AutoCFD. The frozen mesh will act as a size source and the mesh will grow smoothly outwards. Check mesh quality Switch to Hidden view mode. ANSA will identify and report all elements that violate the criteria set in the Quality Criteria window (F11), under OFF in the legend. Use right-click show only (or show only worst) on the legend to isolate the bad elements. You can use the UDF SetQualityCriteria to set suitable quality criteria definitions and thresholds for different solvers. Improve my mesh quality Use Shell Mesh>Improve [Reshape Violating] for shell mesh and use the function Volumes>Improve>Fix Qual [Visible] for volume mesh. What is the difference between Reconstruct and Reshape? Reconstruct improves the mesh quality by reconstructing the mesh but it cannot overcome Perimeters (or identified feature lines for FE-mod mesh). Reshape however can also Join Perimeters (or feature lines) and BETA CAE Systems 95 ANSA v18.1.1 ANSA for CFD Brief User's Guide reconstruct the mesh. Hence Reshape is a more powerful function that can perform also de-featuring of very small unneeded details and produce a better quality mesh. I do not like the result of Reshape. How can I reset all its actions? Use Perimeters>Join all, then Perimeters>Release all, then Perimeters>Initialize and finally Grids>Origin. Alternatively use the UDF ResetMacros. Mesh will be erased! When should I use Surface Wrapping? If the CAD geometry is dirty (many red CONS, unchecked Faces, intersections etc) or if your input is tessellated FE data (STL) again with many intersections and gaps, your best option would be to use the function Elements>Wrap [Variable Length]. If on the other hand your geometry is mostly clean, you may get a better quality mesh if you use standard surface meshing approach. Create layers for a 2D Use the function Shell Mesh>Zonecut [Gradual]. analysis or anisotropic mesh at wing leading edges Volumes>Define [Auto Detect] does not find the volumes I expect First check that the existing Volumes in Volumes>List are correct, if not delete them and then run Auto Detect. Check in Bounds view mode to see if there are openings. Check if message for double elements is reported and investigate the area. SOLVER SETUP How can I exclude some PIDs from being output? You either make them Not visible and then Output Visible, or you select the PIDs in the Property list and un-check their USE IN MODEL status. In this way these PIDs will not be output, regardless of their visibility status. How to apply BCs Open the PID Property list and double click on a PID to assign its boundary condition type and settings depending on the active DECK (OpenFOAM, Fluent etc) How to make massive Select several properties from the list and right-click on the column that modifications of color, name you want to change, for example change their color or their BC type. If you and BC_type in the PID list want to make changes on the name, like adding an extension, select the PIDs, right-click on Name column and type $.”_baffle” This command will add to the current PID name, the extension _baffle How to make massive Select the PIDs and press Modify. Then in the window that opens press modifications of parameters the card icon button. This will open the Property card where you can inside Property Cards activate a field, type a value and press OK to apply the same change to all selected PIDs. MORPH Morph geometry Use direct morphing functions like DFM. Morph shell and volume mesh Use morphing Boxes approach or DFM. Can't find the answer to your question? Just ask us at ansa@beta-cae.com BETA CAE Systems 96