Introduction of XSim

Updated : October 26 2017

What is XSim?

XSim is a web-base preprocessor for OpenFOAM®.

You can make analysis setting data for OpenFOAM with web-base GUI and download it as a zip file.

Features

  • Importing

    You can import shapes in Binary STL file or ASCII STL file. Each file is read as a assembly and can be visualized them in 3D view.

    Importing
  • Mesh settings

    You can set target number of base mesh, domain for meshing, feature angle and number of layer for each region etc...

    Mesh-control
    Mesh-3d
  • Analysis settings

    Steady or Transient can be selected as analysis type. And laminar (DNS) or RANS (Standard k-epsilon, RNG k-epsilon or Realizable k-epsilon) can be selected as flow model.

    BasicSettings
  • Physical Property

    Newtonian, power-law, Cross-power-law fluid can be selected as fluid type and edit each parameters.

    PhysicalProperty
  • Boundary conditions

    You can use following boundary condition types and condfirm them in 3D view.

    • Fixed flow velocity
    • Fixed mass flow rate
    • Fixed volume flow rate
    • Fixed normal direction velocity
    • Fixed static pressure
    • Fixed total pressure
    • Nature inflow/outflow
    • Slip wall
    • Stationary wall
    • Moving wall
    BC-control
    BC-3d
  • Output settings

    You can set output interval, format (ASCII, binary...), precision and conversion to 3rd party format that OpenFOAM supported.

    Output
  • Exporting

    You can export setting data as a zip file in OpenFOAM version 4 format.

Tutorial

  1. Prepareing shapes and Starting XSim

    Download zipped sample STL files from "tutorial-pipes.zip" and extract it. Then start XSim with following button.

  2. Crateing a project

    Type "MyFirstProject" as Project Name and click Create button to create project.

    ProjectName
    ProjectNameDialog
  3. Features of each view

    XSim has 3 views. "Navigation view" (left side), "Control view" (center), and "3D view" (right side).

    If you click top level element in Navigation view after loading model shapes, a corresponding setting page will be displayed in Control view. And you can also confirm model shapes in 3D view.

    If you want to change language settings, click gear button at top-right of window to show preference dialog. Current version of XSim supported "English" and "Japanese".

    Views
  4. Import Shape

    To begin with, import shapes from the downloaded STL files.

    Drag&Drop the STL files "Inlet1.stl", "Inlet2.stl", "Outlet.stl" and "Wall.stl" onto the area below "Drop files" tab. So the STL files will be loaded and the shapes will be displayed in 3D view.

    3D view operations with mouse is following.

    3D view operations
    PanZoomRotation
    Mouse left button + Drag Mouse wheel roation Mouse middle button + Drag
    Mouse left button + Drag Mouse wheel roation Mouse middle button + Drag

    You can confirm each region by clicking region name in Navigation view. The selected region is filled with orange in 3D view. To deselect region, click region name agein.

    Import Shape Loading the STL files and select region "Inlet1".

    Click Next button to go to Mesh settings page.

  5. Mesh

    In Mesh settings page, a base mesh area and a coordinate that defines computational domain will be displayed with white line in 3D view.

    Mesh

    Click "Number of base meshes" input-box and set the value to "500000".

    Click "Computational domain" input-box and set the coordinate to (50, 55, 0).

    Mesh-ComputationalDomain

    Next, we will set layer mesh settings. Select "Wall" as region from a combobox in "Laye mesh settings" and set "Number of layer" to "3".

    Then click Set button. When the settings are done properly, blue rectangular block will be displayed.

    When you want to delete and reset the settings, click "×" button at top-right of a block.

    Mesh-Layers

    Click Next button to go to Basic settings page.

  6. Basic settings

    In this tutorial, we will execute steady analysis until 200 cycles and use standard k-epsilon model as RANS model.

    So It is not necessary to change a settings in this page. Leave the settings as default.

    Basic settings

    Click Next button to go to Physical Property page.

  7. Physical Property

    In this tutorial, we will use water as fluid.

    So It is not necessary to change a settings in this page. Leave the settings as default.

    Physical Property

    Click Next button to go to Initial Condition page.

  8. Initial Condition

    In this tutorial, we not need to edit this settings.

    Click Next button to go to Flow Boundary Condition page.

  9. Flow Boundary Condition

    In this page, we set flow bondary condition for the analysis.

    At first, select "Inlet1" as region and "Fixed flow velocity" as type from comboboxes. Then change "Flow velocity" value in "Flow boundary parameters" to (10, 0, 0) m/s and click Set button to set the boundary condition to the region.

    In the same way, set "Fixed flow velocity" (0, -10, 0) m/s to region "Inlet2".

    Next, select "Outlet" as region and "Fixed static pressure" as type from comboboxes. After confirming the "Static pressure" value is set to "0.0" Pa, click Set button to set the boundary condition to the region.

    At last, select "Wall" as region and "Stationary wall" as type from comboboxes. click Set button to set the boundary condition to the region.

    The conditions will be dislpayed as blue blocks in "Boundary conditions". If you want to delete and reset a settings, click "×" button at top-right of a block.

    Flow Boundary Condition

    Some types of condition will be displayed as an arrow in 3D view and you can check the region that the condition is applied. Transparency of 3D shapes can be switched with clicking a blue icon below 3D view.

    Flow Boundary Condition 3D view

    Click Next button to go to Calculation Settings page.

  10. Calculation Settings

    In this tutorial, we not need to edit this settings.

    Click Next button to go to Output page.

  11. Output

    In this page, we can set calculation output settings. Confirm "Type" is set to "Each specified cycles" and change "Interval" to 50 cycle(s).

    Output

    Click Next button to go to Export page.

  12. Export

    Finally we finished all setings. Click Export button to export the analysis setting as zipped OpenFOAM case directory "MyFirstProject.zip". The zip file download starts immediately.

    Export

    You can close XSim on webbrowser. Unfortunately current version of XSim cannot save your analysis settings before exiting XSim. Future version may be able to save the data...

  13. Running exported analysis on OpenFOAM

    You need OpenFOAM on your machine. If you have not installed OpenFOAM version 4 on your machine, please refer to "Download v4.0 | Ubuntu | OpenFOAM" or "OpenFOAM for Windows 10 | OpenFOAM" and install OpenFOAM.

    Extract "MyFirstProject.zip". There is an bash-script "Allrun " in the case directory. So run the script to make mesh and calculate the OpenFOAM solver by following command.

    ./Allrun

    You can check mesh and calculation result with the ParaView. So run ParaView to visulalize the mesh and the result by following command.

    parafoam

    Calculating and Visualizing operations are same as standard OpenFOAM operations.

    ParaFoam-Mesh Meshes
    ParaFoam-LayerMesh 3 layers of mesh are inserted as specified.
    ParaFoam velocity result Flow velocity