The CHAM LOGO

The PHOENICS-Direct Simulation Scenario: CAD-to-CFD

by James Stewart, CHAM Ltd.
May 2013


Click here for general information about Simulation Scenarios.

Contents

  1. Purpose
  2. Menu items
    1. Geometry
    2. Variables Solved
    3. Material Properties
    4. Model Choices
    5. Boundary conditions
    6. Output-related settings
    7. Computational grid
    8. Other numerical
  3. Some results
  4. A Demonstration Case

    1. Purpose

    The CAD-to-CFD simulation scenario (SimScene) has been designed to illustrate CHAM's ability to utilise CAD files in an array of commerical CAD output formats for use within a CFD model. The case has been set up to replicate a wind tunnel environment in which the simulation of steady air flow around an object can be performed.

    The scenario includes a multitude of CAD files representing objects from a range of industries. Each CAD object uses a different file format suitable for use with CHAM's PHOENICS CFD code. For each object a default computational grid has been prescribed which will allow results to be obtained with the default computational settings. Users can then utilise one of the post-processing environments: PHOTON or the PHOENICS VR-Viewer, to view vectors, contours, streamlines and isosurfaces to illustrate the flow behaviour.

    2. Menu items

    The CAD-to-CFD SimScene opens with a 'Top Page' containing a descriptive document detailing the features of the scenario and it's interface. Upon launching the CAD-to-CFD SimScene the 'Top Page' content is seen as shown below:

    Clicking on the 'Inspect or modify input data' tab from the menu-bar of the CAD-to-CFD SimScene interface accesses the menu structure for the scenario. It is within this section of the interface that the input data for the case can be viewed and adjusted, allowing for user-customisation of the case. The 'Inspect or modify input data' tab for the CAD-to-CFD Simscene can be seen below:

    Within the left-hand panel of this section of the interface, as seen above, there are eight 'parameter groups' into which the input parameters have been divided, these are:

    1. Geometry
    2. Variales Solved
    3. Material properties
    4. Model Choices
    5. Boundary conditions
    6. Output settings
    7. Computational Grid
    8. Other Numerical

    Each of the groups listed above contains parameter(s) governing the case.

    2.1 Geometrical

    The previous image shows the contents of the 'Geometry' parameter group, as is indicated by the blue highlighting of the 'Geometry' button on the left. It is from within this parameter group that the object geometry for the case can be adjusted. Clicking on the arrow symbol beside the select object geometry file parameter causes the following to appear:

    As can be seen from the previous image, a list of possible object geometries appears. This list contains all of the files included with the CAD-to-CFD SimScene package together with the CAD file type for each. The final option within this list is user_set, which can be used in conjuction with the user_set geometry file name parameter to import a custom CAD file within the scenario. By default, selecting user_set will use the my_geom.dat geometry file listed as the entry for the user_set geometry file name parameter. To use an alternative file, the user must simply type the file name for the CAD file they wish to use (including the file extension) into the appropriate 'white-box'. The file entered must also be placed within the C:\phoenics\d_sapps\CAD2CFD\working directory or a subdirectory thereof.

    The third parameter within the 'Geometry' parameter group governs the position in the vertical (Z) direction of a user_set object geometry. There are two possible options built into the CAD-to-CFD SimScene, namely: on_ground or mid_domain.

    The next three parameters within this parameter group can be used to adjust the size of a preset object within the case set-up. Entering a positive value will increase the object size in the specified direction by the user-set amount. Conversely, entering a negative value will reduce the object size by the user-specified value.

    The next three parameters within the 'Geometry' group are used to set the size of a user_set object geometry file. These parameters have no effect on the case if one of the preset object geometries is being used.

    The final parameter within this parameter group governs the orientation of a user_set object geometry. From time to time custom CAD models will be imported with the incorrect orientation due to a discrepancy with the native CAD program axis orientation and that used within the CAD-to-CFD SimScene set up. If this occurs, the user_set object rotation position (1 - 24) parameter can simply be toggled until the correct orientation of the object geometry is achieved.

    2.2 Variables solved

    Clicking on the 'Variables solved' button from the left-hand panel of the SimScene interface will cause the following to appear:

    As can be seen from the image above, the variables to be solved for the case can be switched on or off by toggling the appropriate drop-down box from True to False and vice-versa. The variables included here are pressure, P1, and the three components of the velocity: U1, V1 and W1.

    In addition, the CAD-to-CFD SimScene case is set-up as a turbulent flow utilising the standard (or a variation of) the KE turbulence model. As a result, the turbulent kinetic energy KE and the turbulent dissipation EP are also solved within this case. However, since only a turbulent flow regime is incorporated, these variables cannot be deactivated.

    2.3 Material properties

    Clicking on the 'Material properties' button from the left-hand side of the SimScene interface will cause the following to appear, displaying the material property settings for the case:

    The parameters within this group can be used to adjust the domain material property settings for the case, in particular, the domain fluid density, the coefficient of thermal expansion and the kinematic viscosity can be set by typing the desired value into the appropriate 'white-box'.

    2.4 Model choices

    Clicking on the 'Model Choices' button within the left-hand panel of the interface accesses the turbulence model setting for the case via the select turbulence model parameter seen within the image below:

    There are only two possible turbulence model selections which can be made within the CAD-to-CFD SimScene, namely: KE_CHEN_KIM and the standard KE_MODEL, the user simply has to select that which they wish to use for the case.

    2.5 Boundary conditions

    Clicking on the 'Boundary Conditions button from the left-hand panel of the interface causes the following to appear:

    As can be seen from the image above, the 'Boundary Conditions' group contains three parameters, namely: the inlet velocity, m/s, the domain fluid reference temperature, K and the domain fluid reference pressure, Pa. Each of these quantities can be adjusted to the users' specifications by simply entering the desired values within the appropriate 'white-boxes'.

    2.6 Output settings

    Clicking on the 'Output settings' button from the left-hand panel of the SimScene interface causes the following to appear:

    The first two items seen in the image above relate to additional quantities to be calculated and printed to the PHOENICS result file at the end of a simulation run. When set to true, the calculate drag forces acting on object parameter activates the drag force calculation and produces a print-out similar to that seen below within the result file:

    The second parameter within the 'Output settings' group can be used to incorporate the friction forces within the drag calculation by simply toggling between the values of true and false as appropriate.

    The final two parameters belonging to the 'Output Settings' group can be used to echo input settings to the inforout file to be displayed within the View File tab of the SimScene interface at the end of a run, e.g.

    As can be seen above, the first five lines of data print-out relay the domain fluid settings for the case. These values are printed provided the parameter print domain fluid settings? is set to true. The final line of the print-out echoes the inlet velocity for the case. This output is present if the parameter print inlet velocity? is set to true.

    2.7 Computational grid

    Clicking on the 'Computational grid' button from the left-hand panel of the SimScene interface causes the following parameters to be displayed:

    As can be seen from the image above, this parameter group contains the grid settings for the case when using a user_set object geometry. Each parameter describes a geometrical region of the domain in relation to the user_set object position and gives the default value of computational grid cells used within that region. The user is free to adjust the values to make the grid either more coarse or finer by simply replacing the default values by their chosen values.

    For cases in which a default object geometry is used, for example, car.3ds, the computational grid has been pre-defined and the user cannot make any adjustments to this.

    2.8 Other numerical

    Clicking on the 'Other Numerical' button from the left-hand panel of the SimScene interface causes the following to appear:

    This parameter group simply contains a single parameter to set the maximum number of iterations to be performed by the solver for the case. By default this value is set to 450, which for the default cases is sufficient to provide convergence or a solution which is clearly converging.

    3. Some results

    On termination of the calculation the EARTH-Monitor Plot will close and the View File tab of the SimScene interface will become active, by default displaying the inforout file as seen below:

    Clicking on the 'Display results Graphically' button from the top-menu bar of the SimScene interface, as seen below, will activate the PHOENICS VR-Viewer post-processing environment for the user to view the results for the case.

    After clicking 'OK' when prompted to accept the default result files, the VR-Viewer will display the set-up for the case in post-processor mode, e.g. for the object geometry plane.stl, the user will see something similar to that shown below:

    The buttons along the top-bar of the VR-Viewer environment, as seen in the image above, can be used to create numerous graphical displays of the results for the case. For example, a plot of the velocity vectors on the y-plane along the centre (in y) of the domain, as seen below:

    Or the velocity contours, again displayed on the same plane, as seen below:

    Alternatively, contours of pressure can also be displayed as seen below:

    The pressure contours can also be plotted onto the surface of the object, in this case the geometry plane.stl, as seen below:

    The PHOENICS VR-Viewer environment allows users to create a multitude of graphical outputs of the simulation results, for more information on how to use the VR-Viewer to create graphical displays, please see the PHOENICS-VR reference Guide, TR 326, available here.

    To view a complete step-by-step guide demonstrating a case using a custom CAD geometry file, please click here.