XFlow 2015 Tutorial Guide
XFlow 2015 Tutorial Guide
All rights reserved. This document, in whole or in part, may not be copied, reproduced, translated, transferred,
transmitted or publicly performed, in any form or by any means - graphic, electronic, machine-readable, or
mechanical, including photocopying, recording, or information storage and retrieval systems - without the prior
written permission of Next Limit Dynamics SL.
All images in this book have been reproduced with the knowledge and prior consent of the artists concerned
and no responsibility is accepted by Next Limit Dynamics SL, producer, publisher, or printer for any
infringement of copyright or otherwise, arising from the contents of this publication. Every effort has been made
to ensure that credits accurately comply with information supplied.
While every precaution has been taken in the preparation of this document, Next Limit Dynamics SL, the
publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the
use of information contained in this document or from the use of programs and source code that may
accompany it. In no event shall Next Limit Dynamics SL, the publisher or the author be liable for any loss of
profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this
document.
Use of the XFlow software and its documentation has been provided under a software license agreement. Next
Limit Dynamics SL assumes no responsibility or liability for any damages or data loss caused by installation or
use of the software. Information described in this documentation is furnished for information only, is subject to
change without notice, and should not be construed as a commitment by Next Limit Dynamics SL.
The software and its documentation contain valuable trade secrets and proprietary information and are
protected by copyright laws. Unauthorized use of the software or its documentation can result in civil damages
and criminal prosecution.
This guide contains several tutorials that illustrate how to use XFlow in different types of problems:
Tutorial 01 - Flow around a NACA 0012 airfoil
Tutorial 02 - Vehicle aerodynamics
Tutorial 03 - Advanced post processing
Tutorial 04 - Dam break
Tutorial 05 - Breaking waves
Tutorial 06 - Ball check valve
Tutorial 07 - Wind turbine
Tutorial 08 - Heat transfer
Tutorial 09 - Radiation
Tutorial 10 - Cyclone flow
Tutorial 11- FMI standard co-simulation: OpenModelica Pendulum
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
Tutorial 13 - Helmholtz resonator
The user can either create a new project and follow the steps described in the tutorials (recommended), or
load the project file .xfp provided in the Documentation section of the client area in XFlow website (http://
www.xflowcfd.com/index.php/client_area/documentation/view/1).
Please take into account that the tutorials presented in this guide have been set to compute in a short amount
of time. To have more accurate results, you will have to lower the resolution.
Conventions
Several typographical conventions are used in this guide:
Menu options are indicated in orange.
Names of windows are in italics.
Items and options in the project tree are indicated in Verdana font.
Links are underlined in blue colour.
Routes to files are indicated in courier new font.
Keys are indicated in bold blue.
Cascading menus are represented as: Menu1 > Menu2 > Menu3. This means that in Menu1, click on
Menu2. Then, in the Menu2 that comes up, click on Menu3 and so on.
Additional explanations and recommendations are enclosed in a message box.
Tip: Explains an easy way to do a task or just to improve the work flow.
Please note: Contains a brief explanation on what must be taken into account when doing an
specific task.
Units
All units are in the international system (SI).
Please note: Angles are given in degrees, while angular velocities are given in radians per second.
Coordinate system
Special attention needs to be paid to the coordinate system. In XFlow the Y-axis is assumed to be
vertical instead. The user may have thus to rotate the geometry when importing it from the CAD software.
This can be done either in the CAD or in XFlow.
Please note: The aim of this first tutorial is to introduce and illustrate the basic XFlow features to the
user with a NACA 0012 profile. The setup used in this tutorial cannot be considered as a best practice or a
guide to perform accurate validations of the NACA profiles. For any validation purpose, please refer to the
Validation Guide of XFlow where some airfoil profiles are validated and their setup are explained.
Contents
Step 0: Execute XFlow
Step 1: Create geometry
Step 2: Problem setup
Step 3: Run
Step 4: Post-processing
Step 5: Refine the resolution
Step 6: Moving NACA - Enforced motion
Step 7: Moving NACA - Rigid body dynamics
Execute XFlow through the direct link in your desktop or by double-clicking the XFlow.exe file located in the
installation folder. The application displays the Graphical User Interface with the default layout and the Project
Manager window.
In the Project Manager enter the project name, the project path (you may need to browse to specify the path
or create a new folder) and press the button Create a new project.
Geometry > Create object > Create NACA, or in Toolbar Object Creation.
Introduce the geometrical data of the NACA airfoil as in the following dialogue box (Units in SI):
The NACA 0012 airfoil appears as a Shape in Project Tree > Geometry > Entities:
1.2 Check the position of the airfoil with the help of the grid
The red and green lines indicate the X and Y axis, respectively.
The scale of the grid is displayed at the top left-hand corner of the Graphic View window.
Please note: Linux users might need to press Ctrl+Shift instead of Alt. If this is the case, the user
can change the "Movement key" to Alt in the "Window Preferences" of the Linux distribution.
selecting the View only mode in the Toolbar Selection Filter, and clicking either on the NACA in
the Graphic View or on the word Shape in Project Tree > Geometry > Entities. Once the object
is selected, it is highlighted in blue in the Graphic View.
selecting the Object filter mode in the Toolbar Selection Filter ,and clicking either on the NACA
in the Graphic View or on the word Shape in Project Tree > Geometry > Entities. Once the
object is filtered, it is highlighted in blue and the object Gizmos is automatically shown in the Graphic
View.
Gizmos allow the user to translate, rotate and scale the geometry. To familiarize yourself with the
Gizmos please perform the following actions:
click on any of the Gizmos axes - the translation dialogue box appears - and enter X = 3 m, Y = 2 m,
Z = 1 m. Observe the new position of the NACA.
click on any of the Gizmos arcs - the rotation dialogue box appears - and enter X = 30 º, Y = 0 º, Z =0
º. Observe the new orientation of the NACA.
click on any the Gizmos axes center - the scale dialogue box appears - and enter 2. Observe the new
size of the NACA (twice the original).
Select the NACA and press Delete to delete the modified object and create the NACA again as
indicated in Section 1.1
Select the NACA and measure its dimensions: Main menu > Geometry > Dimensions, or (
Toolbar geometry).
Please note, that the user may need to zoom, translate or rotate the view to see the numbers clearly
(see navigation).
With the airfoil still selected, click on again to hide the dimensions and click the right mouse
In this menu, select Set visualisation material to change the colour of the airfoil surface:
Select geometry > right mouse button in the Graphic View > Graphic View menu > Set
visualisation material > Colour
In the same menu, select the option Visualisation mode and visualise the NACA as shading,
wireframe, bounding box and mesh:
Select geometry > right mouse button in the Graphic View > Graphic View menu > Visualisation
mode > Shading
Select geometry > right mouse button in the Graphic View > Graphic View menu > Visualisation
mode > Mesh
Select geometry > right mouse button in the Graphic View > Graphic View menu > Visualisation
mode > Wireframe
Select geometry > right mouse button in the Graphic View > Graphic View menu > Visualisation
mode > Bounding box
Now, select the option Show geometrical properties, to get a report of the main geometrical
properties of the NACA:
Select geometry > right mouse button in the Graphic View > Graphic View menu > Show
geometrical properties. Press Accept to close this window.
The surface of the NACA is automatically tessellated by XFlow when it is created. The surface mesh
properties (Polygons and Vertices) are displayed as well as other geometrical properties (area, volume,
etc.). The NACA geometry is generated as a native XFlow mesh format (.nfb) by default.
For parametric geometries (STEP, IGES, etc.), the geometry tessellation is generated by XFlow
automatically and depends on the parameter:
Main menu > Options > Preferences > Graphic View: OpenGL mesh deflection
which varies between 0 and 2. The larger the mesh deflection, the coarser the tessellation will be.
Check: Make sure that OpenGL mesh deflection = 0.1. If that is not the case, please change the
parameter to 0.1, delete the geometry: Select geometry > right mouse button in the Graphic View
> Graphic View menu > Remove selected, and create it again (see above). The geometry has to
be created again in order to take into account the change of the OpenGL mesh deflection value.
Please note: There is no Undo option. Please, save the project frequently: Main menu > File >
For external aerodynamic applications, such as the object of this tutorial, XFlow features a Virtual Wind
Tunnel module that allows to accelerate the setup process.
The setup of the problem is done in the following sections of the Project Tree:
Environment > Engine
Environment > Environment
Materials
Geometry
Simulation
Please note: The flow in the wind tunnel is by default assumed to move from -X (inlet) to +X (outlet).
Please note: The initial condition Wind tunnel default allows to initialise the flow using the same
wind tunnel conditions.
By default in single phase the fluid material is called Material 1, which is initialised with the air
thermophysical properties. To get a Re = 104, given a fluid velocity of 10 m·s -1 and an airfoil chord length
(a) Project Tree > Materials > Fluid > Density : 1 kg·m -3
(b) Project Tree > Materials > Fluid > Viscosity model: Newtonian
(c) Project Tree > Materials > Fluid > Viscosity model > Dynamic viscosity: 0.001 Pa·s
(d) Project Tree > Geometry > Entities > Shape: Naca-0012-4Digit > Boundary
conditions: Wall, with Automatic wall model and zero roughness
stored.
(g) Store data > Frames frequency: 100 Hz (which means that a total of 100 frames will be
saved for 1 second of simulation time)
(h) Store data > Numerical data frequency: Solver time step, which means any curve
plotted in the Function Viewer will be updated at the frequency of the solver steps.
(i) Store data > Save averaged fields: Off
(j) Store data > Save resume file: Off. In case you need to stop and resume your simulation
you can switch it to On, however this consumes more hard disk space.
(k) Store data > Compute makers: Off
(l) Store data > Fields to save: Leave On all the fields, which means that all the flow fields will
be saved on the hard disk.
At this point the setup has been finished and the computation can be launched.
Tip: You can directly load the setup of this problem from the project file naca.xfp in Main menu
> File > Load project or Open an existing project in the Project Manager window that appears
when executing XFlow.
Step 3: Run
Save the project before running the computation: Main menu > File > Save project, or in Toolbar
File.
XFlow project files have the extension .xfp.
Main menu > Options > Preferences > Engine, or in Toolbar File.
1 or 2 processors are enough for this tutorial.
Note that the Message View window shows the message "Connected to Engine Daemon on port 20225".
The port can be changed in
Main menu > Options > Preferences > Engine: Engine Socket Port
Please note: The Graphical User Interface (GUI) can be closed while the simulation is running. The
Process Manager is the minimum interface with your computation. XFlow will reconnect the simulation to
the interface by means of the Process Manager when reopening the project again.
Each line corresponds to one time step (solver frequency). For each time step, XFlow outputs:
Sim. time: the total simulation time reached at the current time step
Stability param.: the value of the stability parameter at the current time step, see Step 3: Run
Wall clock time: the total time which has been required to compute the time step
When enough time steps are computed to create a new frame, XFlow will show the message "Saving
data..." and then "[[Data file]] 1 Done!!!" (for the 1st frame). Every time a frame is
computed, the following information is also shown:
Frame wall clock time: total time which has been required to compute the current frame
Overall wall clock time: total time which has been required to compute from frame 0 to the
current frame
Num elements: number of elements in the fluid domain at the current frame
A low stability parameter (< 1) means the stability of the numerical scheme is ensured and the solution
should therefore be consistent. If it is very close to 0, you may increase your time step to save
computation time.
A stability parameter of 1 means the stability of the numerical scheme is not ensured and the simulation
may diverge. You must therefore decrease your time step to ensure the convergence.
Ideal value would be around 0.2 - 0.4.
The Stability parameter can be monitored in the Function Viewer window. To this end, do right click on
the Function Viewer window and select Stability parameter. In this case we can observe the stability is
stable and within the ideal range.
Step 4: Post-processing
The post-processing is completely managed from the Post-Processing section of the Project Tree.
If the GUI is left opened during the computation, the resulting numerical data can be post-processed
immediately after their generation (data automatically loaded to the GUI). Otherwise, data has to be loaded
into the GUI from the folder where it is stored:
Main menu > Simulation data > Load simulation data or in Toolbar Data Processing.
Please note: The project has to be saved before you are able to load the data.
(a) Right-click on Cutting planes and select Add cutting plane, or press in the Post-
Processing Toolbar, or go to Main menu > Post-Processing > Create cutting plane
(b) Cutting plane > Axis: Select Z (The position of the plane cannot be modified, as it is a 2D
simulation)
(c) Cutting plane > Visualisation mode: 3d field
(d) Cutting plane > Visualisation mode > Field: Velocity, to visualise the velocity field on the
cutting plane, at the time (frame) indicated on the timeline.
(e) Switch on the interpolation in General > Interpolation mode: Convolution to interpolate
data and have smoother contours
(f) In the Graphic View window, select view from the right hand side
(g) In the timeline, select the last frame corresponding and observe the velocity field:
Please note: Even if the flow has already stabilised at t = 1 s, the fluctuations of the
wake and the separation of the boundary layer are not captured properly.
4.2 Use the playback controls to navigate through the transient results
(a) Go to the last calculated frame by clicking on
(a) In Main menu > Simulation data > Analysis settings or using the toolbar icon
prescribe the velocity legend range to [0,15] m·s-1 by disabling the automatic range and inputting the
minimum and maximum values.
An alternative to change the range is to click on the maximum and minimum values of the color bars to
edit them directly:
In the Preferences window, click on the cross of Graphic View to pull down its options Environment
and Lights. Click on Environment, select One colour background, click on the coloured rectangle at
the right hand side and pick the white colour in the palette.
The look up tool displays numerically the value of the visualisation field at the position pointed by
the mouse.
To deactivate this mode, press again the same toolbar icon.
(b) Hide Cutting planes > Cutting plane 1 by unchecking the box in front of it and make sure the
checkbox of Sensors > Sensor 1 is checked in order to visualise the location of the sensor in the
Graphic View.
(c) Refresh the sensor: Right click on Post-Processing > Sensors > Sensor 1 > Refresh or click
the icon
(d) Go to the Function Viewer 1 window by switching to the Function Viewer tabulation:
(e) Plot the chosen field at sensor 1: Right click on Function Viewer > Sensors > Sensor 1
(f) You may want to resize the Function Viewer window by dragging its borders, and fit the plot in the
window by clicking on Auto fit to refit in X and Y axis, V. fit to refit in Y-axis only, and H. fit to refit on X-
axis only.
Drag the mouse to left and right while pressing Middle mouse button or Scroll in/out to zoom in and
out the graph, and drag the mouse while pressing Left mouse button to pan the graph.
To change the scale of the graph in only in X or Y separately, drag the mouse horizontally or vertically
while pressing Alt + Right mouse button to rescale respectively the X-axis or Y-axis.
(g) Save the sensor data to a text file Right click on Function Viewer > Export current data and give it
a name. The first column in the file represents time (in seconds) and the second column the values of the
field measured by the Sensor 1, i.e. the velocity module (in m·s -1).
These coefficients and the forces can be plotted in the Function Viewer:
Right click on Function Viewer > Shapes > Naca-0012-4Digit > Cx
Right click on Function Viewer > Shapes > Naca-0012-4Digit > Cy
The aerodynamic coefficients are calculated based on the reference velocity and area defined in
Environment > Global attributes > Reference area/velocity. If correct values were not set before
the simulation was launched, the coefficients can always be computed from the forces in Newton:
Right click on Function Viewer > Shapes > Naca-0012-4Digit > Fx
Right click on Function Viewer > Shapes > Naca-0012-4Digit > Fy
Please note: With such a coarse resolution it is not possible to capture the correct physics and the
numerical results are far from the correct ones. For aerodynamics validations, please check the
Validation Guide.
(c) Disable the Cutting plane 1 and plot the domain structure by checking the box in Post-
Processing > General > Show > Domain structure
The crosses "x" show the distance between each element of the lattice next to the walls and allows to
estimate how fine or coarse is your simulation.
In this case one can realize the resolution used is quite coarse. For this reason the expected behaviour
of the flow is not achieved: the transient behaviour of a flow around a NACA airfoil with an angle of attack
of 20 degrees must show a periodic flow motion developing in the wake region as well as a large
separation of the boundary layer.
The Step 5: Refine the resolution will teach how to refine the solution in order to observe the expected
behaviour in the wake and boundary layer regions.
We will now run the same simulation using multi-resolution, i.e. a finer resolution close to the NACA airfoil
walls to better resolve the flow velocity gradients. As you have seen in the previous simulation, the flow has
stabilized but the wake and the boundary layer did not develop as expected. Therefore, the goal of this section
is to capture the wake fluctuations and the separation of the boundary layer.
0.02 m
(e) Resolution > Shapes refinement > Shape: Naca-0012-4Digit > Curvature adapted: Off
(f) Store data > Folder: Change the name of the folder, where the results will be stored, to
"naca_fine"
(g) Store data > Frames frequency: 100 Hz (as in the previous case)
(h) Store data > Fields to save: On, for all the fields
Main menu > File > Save project as or in Toolbar File with a different name.
Tip: It is recommended that you save the project with a different name because the settings have
changed. Name it "naca_fine.xfp" as for the simulation folder.
Tip: You can directly load the setup of this problem from the project file naca_fine.xfp in Main
menu > File > Load project or Open an existing project in the Project Manager window that
appears when executing XFlow.
where, x indicates the border between fluid and wall, and + indicates the border of a region with uniform
resolution and also indicates the size of the cells in this region.
Note that the regions around the airfoil walls have been refined. The domain has two levels of refinement
now: h = 0.04 m and h = 0.02 m.
Border between finest lattice level (yellow) and coarser lattice level (blue)
IMPORTANT: Due to the Cartesian structure of the lattice, the choice of the different resolutions
must be related by a factor 2n , n being an integer. Example here with h = 0.04/2^1 = 0.02 m near the
wall.
Velocity field showing the fluctuations of the wake and the separation of the boundary layer around the
airfoil at frame 100
The proper separated flow patterns are now observed, the recirculation area is much larger on the upper
side of the NACA.
(d) Switch now the Visualisation mode: Vectors, and set the Arrow density to 0.93 and the Arrow
NACA airfoil.
(a) Time > Simulation time: 1 s
(b) Project Tree > Simulation > Resolution > Refinement algorithm: Near static walls
(c) Project Tree > Simulation > Resolution > Shapes refinement: Naca-0012-4Digit > Target
resolved Scale: 0.02 m
(d) Project Tree > Simulation > Resolution > Regions: Right click and select to Add region
(e) Project Tree > Simulation > Resolution > Regions > Region 1: Rectangular
(d) Project Tree > Simulation > Resolution > Regions > Region 1 > Min: (-0.3, -0.6, -0.5) m
(e) Project Tree > Simulation > Resolution > Regions > Region 1 > Max: (2.5, 0.2, 0.5) m
(f) Project Tree > Simulation > Resolution> Regions > Region 1 > Orientation: (0, 0, -20) deg.
This way the refinement region will be aligned with the NACA airfoil that has an angle of attack of 20
degrees.
(g) Project Tree > Simulation > Resolution > Regions > Region 1 > Resolved scale: 0.02 m
(h) Project Tree > Simulation > Store data > Folder: Change the name of the folder, where the
results will be stored, to "naca_region"
(i) Project Tree > Simulation > Store data > Frames frequency: 100 Hz
Tip: You can directly load the setup of this problem from the project file naca_region.xfp
Domain structure
(m) Show the cutting plane 1 by checking the box: Post-Processing > Cutting planes > Cutting
plane 1, and select
Axis: Z
Visualisation mode: 3d field
Visualisation mode > Field: Velocity
(n) Load the frame 100 to see the velocity field at time t = 1 s, shown in the figure below:
The flow in all the region around the airfoil is solved more accuracy with the refinement region. This
makes the flow separation fluctuations larger in this case compared to the case without the refinement
region.
Please note: The gradients in the solution may become smoothed across the border of the
refinement region. Therefore the region should be large enough to contain the relevant flow features. The
next section will present the Adaptive refinement algorithm which allows the dynamic refinement of the
wake.
Now we are going to prescribe an enforced oscillating motion to the NACA through an analytic function and
see its interaction with the flow.
(d) Check the position law in the Function Viewer window by Right clicking on the mentioned law and
selecting: Edit in Function Viewer 1
(e) Click Auto fit in the Function Viewer to adjust the scale of the graph to the size of the window. The
position law is plotted below:
You can also check the behaviour of the airfoil if you play the frames timeline.
Main menu > File > Save project as or in Toolbar File with a different name.
Tip: You can directly load the setup of this problem from the project file naca_enforced.xfp
Any moving geometry has a new set of numerical data available in the Function Viewer: the position
(Px, Py, Pz), the angular position (Eux, Euy, Euz), the velocity (Vx, Vy, Vz), and the angular velocity
(Wx, Wy, Wz).
(d) Create two additional Function Viewer windows clicking the icon . Click on each window
and drag & drop them below the current Graphic View: the interface automatically adapts the
positions and sizes of each window to fit the Function Viewer in the new location. Align the three
Function Viewers vertically to have their X-axis aligned:
Now plot the three following quantities in the three Function Viewers: Euz, Cx, and Cy of the NACA
geometry:
Right click on the Function Viewer > Shapes > Naca-0012-4Digit > Euz
Right click on the Function Viewer > Shapes > Naca-0012-4Digit > Cx
Right click on the Function Viewer > Shapes > Naca-0012-4Digit > Cy
Observe the drag and lift are oscillating as expected: the drag has higher values for +45 and -45
degrees and the lift has higher values for -45 degrees and lower values for +45 degrees.
We will now allow the NACA airfoil to move vertically under the effect of the vertical force (lift) applied on it by
the fluid. The airfoil movement will simultaneously affect the flow, and this is therefore a Fluid-Structure
Interaction (FSI) analysis.
7.1. Model the airfoil with one degree of freedom in the vertical direction:
Go to Project Tree > Geometry > Entities > Shape: Naca-0012-4Digit, and set up the tree as
follows:
(a) Behaviour: Rigid body dynamics
(b) Behaviour > Mechanical properties > Inertia tensor: Automatic
(c) Behaviour > Mechanical properties > Inertia tensor > Density: 500 kg·m -3
(d) Behaviour > Interaction properties: Leave the default values
(e) Behaviour > Constraints > Translation (Global): Axis y, the translation in the vertical Y
(b) Save the project with a different name: Main menu > File > Save project as or in Toolbar File.
Tip: You can directly load the setup of this problem from the project file naca_rbd.xfp
In the Py curve plotted in the Function Viewer, it can be checked that the elevation of the Naca airfoil
under the lift force is around 0.65 m after 1 second of simulation time.
(b) Save the vertical displacement in a file, by Right clicking on the Function Viewer window and
choosing Export current data
(a) Check that the X and Z displacements, and all the rotational Euler angles are constant for the Naca-
0012-4Digit:
Right click on Function Viewer window > Shape > Naca-0012-4Digit > Px
Right click on Function Viewer window > Shape > Naca-0012-4Digit > Pz
Right click on Function Viewer window > Shape > Naca-0012-4Digit > Eux
Right click on Function Viewer window > Shape > Naca-0012-4Digit > Euy
Right click on Function Viewer window > Shape > Naca-0012-4Digit > Euz
This is the second tutorial of XFlow. It illustrates the setup and solution of the three-dimensional air flow
around a reference vehicle (the ASMO model) and the study of the forces generated by the flow on the vehicle.
This is a typical external aerodynamic case using the virtual wind tunnel.
At this point, it is assumed that the reader has completed Tutorial 01. Thus, some steps in the setup and
post-process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Contents
Step 1: Import geometry
Step 2: Set up the problem
Step 3: Run
Step 4: Post-processing
Main menu > Geometry > Import a new geometry (or use the toolbar icon ) and select the file
asmo.nfb. The Model Units window, shown in the figure below, will appear automatically. Select
"Single shape" structure, visualization "Shaded" and press Apply to all.
The imported geometry will be shown in the Graphic View, and it will appear as a Shape in the
Geometry section of the Project Tree.
(a) Check the orientation of the model in the Graphic View window. Remember that the Y direction is the
height and that the flow in the wind tunnel goes from -X to +X.
(b) Show geometrical information of the model by selecting the geometry, right clicking on the Graphic
View window and choosing in the Graphic View Menu > Show geometrical properties
(c) Measure the dimensions of the model. Select the geometry object and press Main Menu >
Keep the geometry selected and click again to hide the dimensions.
(d) Check the quality of the surface tessellation. To this end: select the geometry object, right click on
the Graphic View window and choose Graphic View Menu > Visualisation mode > Mesh
(e) Check the surface normals enabling the culling; thus select the geometry object, right click on the
Graphic View window and choose Graphic View Menu > Back-face culling. Now reverse the
orientation of the normals to learn the different representations of the vehicle depending on the normals
orientation: Graphic View Menu > Reverse orientation. Eventually, leave the normals pointing to the
exterior of the vehicle as shown in the figure below on the right.
Please note: It is essential that the surface normals point to the fluid region. You can see where the
normals are pointing by means of the Back-face culling option. If the surface is coloured then its normals
are pointing to the user, but if the surface looks like a wireframe, then the normals are pointing inside the
geometry.
(f) Check that the model is free of holes: Main menu > Geometry > Show/hide holes, while
displaying the geometry in bounding box mode: Graphic View Menu > Visualisation mode >
Bounding Box
Please note: If the model has holes, fluid will leak inside. This fluid inside the geometry is initialised
with the inlet velocity condition as the rest of the fluid but, because it is confined, generates pressure
waves inside of the geometry that lead to wrong forces. Furthermore, closed volumes with a small
opening will equilibrate the interior pressure to the local static pressure at the hole, leading to wrong
overall forces.
Some holes can be directly repaired in XFlow: Main menu > Geometry > Healing. See Tutorial 07 for
more information about the healing feature.
Tip: When using the Wind tunnel default initial condition, XFlow initialises the velocity field
according to the inlet Velocity laws. This is a good practice for external aerodynamic simulations.
(h) Wind tunnel > Boundary conditions: Velocity. Set the Velocity laws at inlet equal to (50, 0, 0)
m·s-1
Please note: The wake distance control allows to limit the length of the refined wake in the flow normal
direction starting from the geometry end. It allows to limit the increase of the number of elements in the wake.
Tip: To visualize just one lattice level at the Graphic View: plot the domain structure in Post-
Processing > General > Show > Domain structure, left clicking on the Graphic View and press
+/- buttom to change the lattice level.
IMPORTANT: Due to the Cartesian structure of the lattice, the choice of the different resolutions
must be related by a factor 2n , with n an integer. In this tutorial, n = 4: h = 0.2 / 24 = 0.0125 m near the
wall. The wake is developing only because of the flow surrounding a body, therefore the wake resolution
must be equal or greater than the near wall resolution.
(i) Store data in the Folder "asmo", with a Frames frequency of 200 Hz and Numerical data
frequency to Frames frequency; this will save hard disk space although the curves in the Function
Viewer will have less points than if Solver time step frequency had been chosen.
(g) Leave disabled the computation of averaged fields and markers, as well as resume file. Leave all the
Fields to save: On.
Please note: In aerodynamic applications it is essential to properly resolve the turbulent wake. The
Adaptive refinement algorithm is well suited for such applications and one must specify enough
simulation time to let the wake develop: typically 6 or 7 times the length of the vehicle divided by the
velocity.
Please note: The adaptive wake refinement is not yet supported for DMP (MPI) simulations.
Step 3: Run
Tip: You can directly load the setup of this problem from the project file asmo.xfp
Main menu > Options > Preferences > Engine, or in Toolbar File.
One or two processors are enough for this tutorial.
Every time a new frame is calculated, XFlow advises you with the following message: [[Data file]] #frame
done!!!; then you can select that frame in the timeline to load its data for post-processing.
Tip: As the calculation progresses, it is possible to post-process the calculated frames even when
the simulation has not reached the final time yet. However, this uses computer resources and therefore
slows down the calculation. It is recommended that you set the timeline to an empty frame when you are
Tip: Run the case setting up a different number of CPUs and compare the computation time. The
optimal number may depend on the size of the problem.
Step 4: Post-processing
Main menu > Simulation data > Load simulation data or in Toolbar Data Processing.
(a) Right-click on Cutting planes > Add cutting plane or press in the Post-Processing toolbar
(b) Plot the Cutting plane with a Z-axis normal, and set its position at the middle of the fluid domain:
Cutting plane 1 > Position: 0.5
(c) Visualise the velocity in the cutting plane by setting: Cutting plane 1 > Visualisation mode: 3d
field, and choose the Field: Velocity
(d) Activate the interpolation mode: General > Interpolation mode: Convolution
(e) Set the velocity range to [0,60]: Main menu > Simulation data > Analysis settings or press
in Toolbar Data Processing.
Note that the internal domain is initialised (frame 0) with the inlet velocity of the virtual wind tunnel.
Go back to point (c) and visualise other quantities such as Vorticity, Static pressure or Turbulence
intensity, which provide meaningful insight about the flow.
Domain structure showing the adaptive wake refinement over a cutting plane of vorticity
vx(x,y,z) X-component of velocity at a discrete point of the domain, given by coordinates (x,y,z)
vy(x,y,z) Y-component of velocity at a discrete point of the domain, given by coordinates (x,y,
z)
vz(x,y,z) Z-component of velocity at a discrete point of the domain, given by coordinates (x,y,z)
vmod(x,y,z) Velocity magnitude at a discrete point of the domain, given by coordinates (x,y,z)
sp(x,y,z) Static pressure at a discrete point of the domain, given by coordinates (x,y,z)
u(x,y,z) Temperature at a discrete point of the domain, given by coordinates (x,y,z)
sp Static pressure
rho Reference density defined in the Materials tab
vmod Module of the velocity
vrt Vorticity
cf Skin friction coefficient
ti Turbulence intensity
tp Total pressure
u Temperature
nx X-component of the surface normal
ny Y-component of the surface normal
nz Z-component of the surface normal
(a) To create a custom field go to Project Tree > Post-Processing, do right-click on Custom fields
)
(c) Switch the visualisation field of the Cutting plane 1 to Field: Custom field 1 to observe the
pressure coefficient on the cutting plane.
(d) Hide the cutting plane by unchecking its box .
(a) Create an isosurface by right-clicking on Isosurfaces > Add isosurface or press in the
Post-Processing Toolbar
(b) Choose a field to be visualised in the isosurface,e.g. the vorticity: Isosurfaces > Isosurface 1 >
Field: Vorticity
(c) Set the Value to 500 s -1. Isosurfaces > Isosurface 1 > Value: 500. XFlow will plot an isosurface
representing all the fluid elements that have a vorticity value of 500 s -1.
(d) The user can colour the isosurface by other fields (e.g. velocity) rather than the isosurface field in:
Isosurfaces > Isosurface 1 > Coloured by field: Velocity
(e) Refresh the isosurface.
(f) Go to point (c) and change the Value (between the min and the max values of vorticity colour bar).
Recompute the isosurface by right-clicking on Isosurface 1 and select > Recompute isosurface
or press , which appears next to Isosurface 1. It may take a few seconds to calculate the
isosurface.
(c) Create a stream tracer in Project Tree > Post-Processing. Right-click on Stream tracers and
(e) Right click on Tracer 1 and select Recompute. Save the project. It will take a few minutes.
(f) Note that a second timeline appears in red colour (over the yellow timeline), this is the timeline of to
the stream tracers. Press play and observe the particles trajectory.
(g) Show the streamlines in Post-Processing > Stream tracers: Tracer 1 > Path lines. Set From
frame: 0 and To frame: 30 to indicate the stream tracer frames to use in order to plot the path lines
of the stream tracers. In our case we will draw path lines from the beginning (frame 0) until the end
(frame 30)
(h) Show the streamlines in Post-Processing > Stream tracers: Tracer 1 > Show > Path line:
Line
(i) Right click on Tracer 1 and select Generate path lines to create the streamlines or just press
next to Path lines. The path lines are now visible
(j) Hide the stream tracer by unchecking its box
Please note: See Tutorial 10 for more details on the computation of stream tracers.
(b) Note that you can specify on which geometry you will project the field by the option From shape:
asmo.
The Graphic View window will now show the surface distribution as illustrated in the figure above. The four
graphs show the projection of the pressure coefficient Cp on the +Y, -Y, -X and +X side of the geometry.
They can be saved in text files by Main menu > Simulation data > Export data of cutting plane
distribution.
The default names for the files are field_distribution_1_minusY.txt for distribution of Cp at the
bottom of the vehicle (underbody), field_distribution_1_minusX.txt at the front of the vehicle,
field_distribution_1_plusX.txt at the back (base) and field_distribution_1_plusY.
Please note: The drag coefficient obtained with this coarse resolution is far from the experimental
values 0.153-0.158. You should refine the resolution near the walls and in the wake (e.g. target scale
around 0.0025 m) to properly resolve the turbulent wake and obtain accurate drag values. The verification
of XFlow results for this problem can be found in the Validation Guide.
Tip: The assemblage of the image sequence to a video file can be done e.g. with the open source
software VirtualDubMod http://virtualdubmod.sourceforge.net :
drag the first image of the sequence into VirtualDubMod, it should find and append the rest of the
image sequence
go to Video > Frame Rate and enter the desired frame rate
choose a processing mode and compression in the Video menu
go to File > Save As
(d) Image frequency: 100 Hz, frames per second. Since the duration is 1 second, the animation will
consist of a sequence of 100 images.
(e) Animation time: 0.15 s. This implies, that time will be frozen at t = 0.15 s for the animation, thus
only the results of the last frame of the simulation will be shown in the image sequence.
(f) Go to Animated items > Cutting planes and press Add. Select Cutting plane 1.
(g) Leave blank the Visibility law of the Cutting plane 1, this means that the cutting plane will be visible
during the whole animation.
(h) Cutting plane 1 > Position law: t_animation. This variable ranges from 0 to the animation
duration, in this case duration is 1 s. Hence, the Cutting plane will move from Z = 0 to Z = 1 sweeping
the whole spatial domain.
(i) Image properties, leave the default values.
(j) Save > Image base name: Image_advanced
(k) Change the animation folder name to C:/XFlow/Tutorial02/asmo/img_advanced for example
.
(l) Press button Create animation
(n) Create a text file named "position.txt" in the same folder where you have saved the project file (.xfp)
with the following data:
position.txt
0 0
0.4 0.5
0.6 0.5
1 0
First column indicates t_animation, which ranges from zero to duration, whereas the second
column stands for the normalised position of the Z-plane (0 = -Z; 1 = +Z).
(o) Go back to point (a) and create a new animation where: Cutting plane 1 > Position law:
tabulardatalinearinterpolated(t_animation, "./position.txt") and click on to check if the data
is read correctly by XFlow:
Note that the cutting plane now moves from Z = 0 to Z = 0.5, it remains there during 0.2 s (real time)
and then goes back to Z = 0.
It is assumed that the reader has completed Tutorial 01 and 02. Hence, some steps in the setup and post-
process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Contents
Step 1: Advanced post-processing
Advanced post-processing
(b) Save the project with a new name in a new folder by hitting , e.g.
Tutorial03_AdvPostProcessing.xfp
Change the GUI style in: Main menu > Options > Preferences, > Application > Application
style: Classic
The user will need to restart XFlow for the changes to be effective. This will be indicated by a warning like
the one shown in the figure below:
new geometry or use the toolbar icon ) . In the pop-up window, leave the default options and
press OK
(b) Move every new Shape to position (-0.57, -0.63, 0) to make it to coincide with the original geometry
(c) Remove the original geometry "asmo" by selecting the Shape: asmo in the Project Tree >
Geometry > Entities, right clicking in the Graphic View and selecting Remove selected in the
Graphic View menu or just pressing key Del. To permanently remove this geometry, press Ok in the
pop-up window.
(d) Remove the original geometry "Line" by selecting the Shape: Line in the Project Tree >
Geometry > Entities and pressing key Del. To permanently remove this geometry, press Ok in the
pop-up window.
(e) Collapse the subfields of all Shapes in the Project Tree > Geometry by right clicking on the
background a drop-down menu will appear, where the user should select Collapse all
(f) The user can assign different visualisation properties (e.g. colours) to the different parts of the asmo
geometry. To do so, select a Shape, right click in the Graphic View and select > Set visualisation
material in the Graphic View menu.
(g) Click the coloured rectangle, select the desired colour from the palette and press Apply. Repeat the
process to change the colour of every Shape (car and four wheels).
improve the quality of the rendering. If the configuration of your Graphics Card is not enough good, we
recommend to decrease these parameters, this way, lower graphical resources will be used.
Change the colour of the ground wall: Main menu > Options > Preferences, > Graphic View >
Environment > Ground wall colour
Click on the coloured rectangle and select for instance the gray colour.
Disable now the visualisation of the geometries wires: Main menu > Options > Preferences, >
Graphic View > Real time > Show wires: uncheck box
(a) Main menu > Options > Preferences, > Graphic View > Environment: Background
select Two colours and choose them by clicking on the coloured rectangles
(b) Now, Main menu > Options > Preferences, > Graphic View > Environment:
Background select Texture, and browse for a texture image (e.g citysquare.png)
To hide the ground wall: Project Tree > Environement > Environement > Wind tunnel > Ground
wall: Off.
in Project Tree > Simulation > Store data > Folder, save the project file and click on to load
the simulation data.
(b) In Post Processing > General > Show > Volumetric field select the vorticity as visualisation
field
(c) In Main menu > Simulation data > Analysis settings or using the toolbar icon prescribe the
vorticity legend range to [0, 2000] by disabling the automatic range and inputting the minimum and
maximum values.
(d) Switch off the interpolation Post-Processing > General > Interpolation mode: Off. Otherwise
the render of the volumetric field will be too slow.
(e) Show the volumetric field by ticking the Volumetric field checkbox . By default, the transference
law is a*a, which assigns a higher opacity to the higher vorticity. Try different transference laws, e.g. a
and a*a*a.
(a) first create a box (Main menu > Geometry > Create object > Create box or just clicking on
in Object Creation toolbar) with lower corner (-3,-0.75,-0.3) and upper corner (-2,-0.4,0.3). Then eliminate
all the box surfaces except the one at x = -2 by selecting the face filter in the toolbar, select each
surface indicated in red wireframe in the image below and remove them by pressing Del
In this way only the surface remaining is the one pointing to the vehicle. In Project Tree > Geometry
> Entities, rename this Shape as "surfstreams" and set its behaviour as Disabled.
(b) Go to Project Tree > Post-Processing > Stream tracers. If Tracer 1 already exists enable it,
otherwise create it by right clicking on Stream tracers and select Add stream tracer. This creates
Tracer 1.
(c) Define Tracer 1 according to the following setup: passive steady tracer consisting of 20 tracers
released from a random but constant position at the shape "surfstreams" and calculated from the results
at frame 25, as indicated in the figure below
(d) Right click on Tracer 1 and select Recompute or hit next to Tracer 1
(e) To visualise the path lines, right click again on Tracer 1 and select Generate path lines or hit
(g) Untick the Tracer 1 checkbox to stop the stream tracer visualisation. The timeline will now be
free.
For example, define a camera from the top by defining From = (0, 10, 0), To = (0, 0, 0), Up = (1, 0, 0),
behaviour Fixed and perspective On. To activate this camera, go to Post-Processing > Views >
Graphic View 1 > Camera settings > Link to camera and select Camera 1.
To return to the interactive camera, select Link to camera: Graphic View 1.
It is also possible to define a moving camera. Select Enforced behavior. Now the entries for all the
parameters allow the use of functions (it is indicated by the brackets).
(a) Enter the following expressions to describe the camera motion:
(b) Display the graph of the From X-coordinate in the Function Viewer (you may need to create one) by
right clicking the expression and selecting Edit in Function Viewer 1. Check that it is periodic with a
period of 0.15 s.
(c) Link the Graphic View to Camera 1: Post-processing > Views> Graphic View 1 > Camera
settings > Link to camera: Camera 1.
(d) Play forward the results. The camera follows a loop around the vehicle.
(a) Create a new Graphic View window by hitting . This creates a new floating window
corresponding to Graphic View 2.
(b) Create a second camera with the following parameters:
(c) Link the Graphic View 2 to Camera 2. Select Show volumetric field as indicated in step 8 and play
forward the results.
XFlow can also be applied to problems that involve a free surface between a liquid and a gas. Examples of this
type of problem include simulating the waves produced by a ship or the forces exerted by waves that break
against an oil platform.
This tutorial illustrates the setup and solution process of a dam break flow. The problem consists of a
rectangular tank with an obstacle. In the right part of the tank there is a water column that will flow through the
tank due to the effect of gravity and impact against the obstacle.
It is assumed that the reader has completed Tutorials 01 and 02. Some steps in the setup and post-process
will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
geometry or press in toolbar Geometry . In the Import Geometry pop-up window, leave the the
default options and press OK. The geometry is then displayed in the Graphic View 1.
Show the grid (Main menu > Options > Preferences > Graphic View: Show grid) to observe that the
coordinate origin is at the location where the water column begins.
Tip: You can directly load the setup of this problem from the project file DamBreak.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Step 2: Post-processing
Markers options
(a) To show only the particles at the free surface, select Makers > From: Surface; otherwise, select
All to show the whole domain of fluid
(b) To represent the particles with different shapes, go to the last frame, and select Arrows and Sphere
in Markers > Representation.
Please note: To avoid to have to refresh the sensors, a smart alternative is to use the Probes
instead, Simulation > Store data > Probes. However, the Probes need to be defined before running
your computation.
This second tutorial on free surface flows consists of traveling water waves approaching a beach.
It is a channel flow where waves will be generated following the linear wave theory. The beach will be modeled
first as impermeable and later as a porous medium. A buoy will be included to track the water movement.
It is assumed that the reader has completed Tutorials 01, 02 and 04. Some steps in the setup and post-
process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Contents
Step 1: Problem setup
Step 2: Post-processing
Step 3: Gravitational potential
Step 4: Porous volume
(a) Create a box (Main Menu > Geometry > Create Object > Create box or ) with lower corner
(-1, -1, -1) and upper corner (1, 1, 1)
(c) Move the box to position (-68, 0, 0) m: Geometry > Entities > Shape: Box > Behaviour >
Position
Please note: You could also create the cube directly in the right position, i.e. lower corner (-69, -1, -
1) and upper corner (-67, 1, 1); but observe that then the center of gravity would be in the global origin (0,
0, 0), which would make the simulation to fail. In this case you should move the center CoG to the cube
center: Select the geometry > Right click in Graphic View > Modify CoG/CoR position: X = -68, Y = 0,
Z= 0
(b) To check that the center of gravity is located in the center, select the box and show its local axes:
right click on the Graphic View window to show the Graphic View Menu> Show > Local axes. The
origin of the local axes is the center of gravity and the center of rotation of the object.
Local axes
(d) Hide the local axes: Select the geometry and right click on the Graphic View window and choose >
Show > Local axes
(e) Set the Geometry > Shape: Box > Behaviour to Rigid body dynamics, with a Density of 250
kg·m -3 (i.e. mass = 2000 kg) and leave free the three degrees-of-freedom: displacements in X and Y
and rotation around Z in 2D. Thus set both Constraints > Translation and Constraints > Rotation
to Free, with External force global Y: -20000 N ( gravity*mass). Keep the default wall boundary
conditions.
Buoy properties
Tip: You can directly load the setup of this problem from the project file BreakingWaves.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Step 2: Post-processing
Please note: the Initial condition: Water channel default sets to zero the initial static
pressure when Gravitational potential is Off.
(b) Play forward the results. Observe how the waves accelerate when they arrive at the beach and end
For Free surface flows, the feature Gravitational potential allows the user to easily consider external body
forces derived from a potential function. This is the case of the gravity.
In this section, the feature Gravitational potential is used to compute the Breaking waves case.
(a) Switch On the Gravitational potential in Environment > Environment > Global attributes. It
should appear a pop-up window like the one shown in the figure below:
This message indicates that the setup contains a non-zero External acceleration law together with
the Gravitational potential, which accounts for the gravity. In this case, the Ext. acceleration
laws represent the gravity ((0, -10) m·s -2 ) introduced by hand in Step 1. Since the user only wants to
consider the gravity effects once, press Yes to reset the Ext. acceleration law to zero.
(b) Leave the earth gravity as the Fluid gravity: (0, -9.81, 0) m·s-2
(c) Leave the Gravitational potential > Potential origin: Automatic, which by default sets the
potential origin at the free surface.
(a) Rename the Simulation > Store data > Folder as BreakingWaves_GravitationalPotential
Tip: You can directly load the setup of this problem from the project file
BreakingWaves_GravitationalPotential.xfp
3.3 Post-processing
(a) Visualise the initial static pressure field (frame 0). Activate the markers visualisation in Post-
processing > General > Show > Markers by ticking the box .
Set Markers > From: All, to see all the markers in the domain, and select the Static pressure in
Please note: the Gravitational potential: On initialises the static pressure according to the
hydrostatic pressure.
(b) Visualise the free surface by activating the markers visualisation as follows:
Enable Post-processing > General > Show > Markers by ticking the box .
Set Markers > From: Surface
Set Markers > Color by field: Velocity
Press Play
Disable Post-processing > General > Show > Markers.
100 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 05 - Breaking waves
save it with another name, , for example: BreakingWaves_Porous.xfp. To define the beach as
a porous volume please proceed as follows:
(a) Set the boundary conditions of the beach, Geometry > Entities > Shape: beach > Boundary
conditions > Others > Porous volume, with Porosity type: Isotropic.
(b) Specify a Permeability coefficient of 1e-6 and zero Ergun coefficient
(c) Modify the initial water surface to leave void part of the beach interior, in Environment > Water
Channel > Water initial surface: if(x<60,y<-sin(0.207303*x),0)
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 101
Step 4: Porous volume
Tip: You can directly load the setup of this problem from the project file BreakingWaves_Porous.
xfp
4.3 Post-processing
(a) Select the beach and display it in wireframe visualisation mode. Observe the different initial
configurations in both cases (1) impervious beach, and (2) porous beach.
(b) Play forward the results and observe how the flow evolves inside the porous region.
102 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
This tutorial illustrates how to set up a fluid-structure interaction problem, namely the case of a ball check
valve working with a spring. It consists of a valve with inflow and outflow ducts. The inflow duct is blocked by a
sphere mounted on a spring at rest with an extension of l0. When the fluid flows in it pushes the ball and
exerts a force which opposes the spring reaction. If the fluid flow is ceased on the inlet duct the ball goes back
to its original location and seals the passage.
The spring will be modeled by an external force on the sphere acting in the X-direction. The system will be
analysed first without and then with a damping force, in order to simulate different regimes of the spring.
The differential equation that describe the movement of the ball due to the spring is:
The parameter ξ is called the damping ratio and determines the behavior of the system, while k is the spring
constant. This leads to the following expression of the force exerted by the spring on the sphere:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 103
Visualise the different damping regimes
It is assumed that the reader has completed Tutorial 01, 02, 03, 04 and 05. Some steps in the setup and post-
process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Contents
Step 1: No damping case
Step 2: Under-damping case
Step 3: Critical-damping case
Step 4: Over-damping case
In this case no damping will be modeled for the spring. This means ξ will be considered equal to zero.
(a) Import the geometry file named Valve.stp . In the Import Geometry pop-up window, leave the
the default options and press OK
(b) In order to orientate the flow from -X to +X, make a rotation of 180 degrees around Y-axis by changing
to (0, 180, 0) the geometry orientation: Geometry > Entities > Shape: Valve > Behavior >
Orientation. The valve is now correctly oriented as shown in the picture below.
104 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
Valve geometry
(c) Check the orientation of the geometry. Remember that the back-face culling helps to distinguish the
orientation of the normals of a surface (see Tutorial 02, Step 1, 1.2). The normals always have to point
toward the fluid region. To reverse the normals orientation right click on the Graphic View window and
in the Graphic View Menu choose Reverse orientation
(d) You can notice that the valve inlet and outlet surfaces are not defined. Create the inlet boundary
surface: use the "Edge filter" button to select the circular inlet contours of the inlet cylinder as
shown below. Please hold the Ctrl key down to select several edges.
(e) Now click on the "Create surface" button from the Toolbar Object Creation and a new circular
surface will appear in the geometry tree: Geometry > Entities > Shape: Surface.
(f) Repeat steps (d) and (e) at the valve outlet to get the outlet closing surface.
(g) It is recommended to rename the geometries created with more explicit names. Here, for instance, it
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 105
Step 1: No damping case
The final geometry should consist of a valve with Inflow and Outflow surfaces and a ball obstructing the
passage at the inlet, as it is shown in the figure below.
106 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 107
Step 1: No damping case
108 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
(d) Ball - Shape: Sphere: set up the Sphere to simulate the spring. In this section the spring is
modeled with no damping:
Behaviour: Rigid body dynamics since we want to apply spring forces on it which is a 1D
constrained movement
Make sure that the Position is still (-0.014, 0, 0) as defined previously. Leave velocity,
orientation, and angular velocity as they are by default (0, 0, 0).
Inertia tensor will be left Automatic, assuming a uniform mass distribution, and Density:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 109
Step 1: No damping case
110 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
(b) Resolution > Resolved scale: 0.001 m with no refinement (Refinement algorithm: Disabled)
(c) Store data > Frames frequency: 300 Hz
(d) Store data > Folder: BallCheckValve_NoDamping
(e) Leave the Numerical data frequency to Solver time step
(f) Leave the computation of the averaged fields and markers disabled
Please note: The Resolved scale is in fact quite coarse for such a case because the dimensions of
the valve are very small. This choice is made on purpose for this tutorial in order to reduce the calculation
time since it is enough to simulate and show the interaction between the fluid and the sphere for different
damping. Such a coarse resolution should not be used for an accurate analysis of the solution.
Tip: You can directly load the setup of this problem from the project file
BallCheckValve_NoDamping.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Tip: To accelerate the calculation time you can select an empty frame (the last one for instance).
This way XFlow will not post-process data in real-time which saves the computer resources for the
calculation.
numerical data
(a) Create a cutting plane by clicking on the icon on the Post-processing toolbar. A Cutting plane
1 will appear in the Post-processing tab. Change its position to 0.5 to visualise the flow at the mid
section of the Valve geometry.
(b) Select Vectors as Visualisation mode of the Cutting plane 1. Adjust Arrows density to 1.000
and Arrows length to 0.8.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 111
Step 1: No damping case
Observe that the fluid is pushing the sphere and that the sphere has a periodic movement as expected
since, in this case, there is no damping.
(a) Reset to the first frame by pressing and switch off the Cutting plane 1 with help of its
checkbox
(b) Plot the X-position of the Shape: Sphere by right-click on the Function Viewer, in the drop-down
menu select Shapes > Sphere > Px
(c) Refit the range of view by clicking on Auto fit at the right-top of the Function Viewer
(d) Play the simulation again and observe the evolution of the sphere position in real time
Note that the evolution is periodic until 0.3 seconds when the mass flow goes down to 0 kg·s -1. The
simulation of the non-damping spring is therefore successful.
112 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
In this case the spring will be modeled with under-damping. The value of the spring constant will be taken as ξ
= 0.5.
Tip: You can directly load the setup of this problem from the project file
BallCheckValve_UnderDamping.xfp
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 113
Step 2: Under-damping case
In this case the spring will be modeled with critical-damping. The value of the spring constant will be taken as
ξ = 1.
Tip: You can directly load the setup of this problem from the project file
BallCheckValve_CriticalDamping.xfp
114 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
the mass flow stops and the sphere is then going back to its original location slightly slower than on
the previous cases
In this case the spring will be modeled with over-damping. The value of the spring constant will be taken as ξ =
6 to show an extreme case.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 115
Step 4: Over-damping case
(b) Change the name of the folder in Simulation > Store data > Folder to
BallCheckValve_OverDamping
(c) Save the case, check the number of CPUs
Tip: You can directly load the setup of this problem from the project file
BallCheckValve_OverDamping.xfp
116 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 06 - Ball check valve
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 117
Tutorial 07 - Wind turbine
This tutorial illustrates the setup and solution of the flow around a wind turbine and its aeroacoustics analysis.
The rotor will rotate first with a prescribed angular velocity and later due to the forces exerted by the flow. The
wind profile is assumed to follow a power-law.
It is assumed that the reader has completed Tutorial 01, 02 and 06. Some steps in the setup and post-
process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Please note: This tutorial requires several hours of computation and large hard disk resources.
Contents
Step 1: Geometry healing
Step 2: Enforced behaviour - Setup
118 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 119
Step 1: Geometry healing
You can view all the holes in the model by selecting the object, clicking Main menu > Geometry >
Show/hide holes or and visualizing the object in bounding box mode (right click in the Graphic
View window > Visualisation mode > Bounding Box).
120 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
XFlow allows intersecting surfaces but holes in the model may cause the fluid to enter inside it. The
tolerance is approximately 1% of the finest resolution used in the computation.
Tip: A good practice is to make sure your model is exported as a solid: all the surfaces must be
joined with no naked edges to avoid gaps. XFlow is tolerant to crossing surfaces, but the computation
may encounter problems with surface patches separated by gaps.
To clean the information about the holes, press again Main menu > Geometry > Show/hide holes or
1.4 Healing
XFlow has some basic healing operations such as fix small lines, fix small faces, remove isolated lines,
or sew faces.
(a) Select the geometry shape and perform the following healing operations (please make sure that the
geometry is selected when performing such operations):
Main menu > Geometry > Healing > Fix small lines
Main menu > Geometry > Healing > Sew faces
Main menu > Geometry > Healing > Complete healing
(b) Check that most of the holes have disappeared after healing.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 121
Step 1: Geometry healing
Please note: If the geometry has holes, fluid will leak inside and it will be initialised with the inlet
velocity condition as the rest of the fluid but, because it is confined, generates pressure waves inside of
the geometry that lead to wrong forces. Furthermore, closed volumes with a small opening will equilibrate
the interior pressure to the local static pressure at the hole, leading to wrong overall forces.
122 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
with reference height yref = 50 m, velocity at the reference height uref = 10 m·s-1, ground height y0 = -
75 m and coefficient α = 0.143 corresponding to neutral conditions. The XFlow input is 10((y+75)/50)
^0.143 m·s-1
(i) Display the graph of the X-velocity law in the Function Viewer by right clicking the expression and
selecting Edit in Function Viewer 1. Check the exponential shape of the wind profile. At height 50
m (y = -25) the wind velocity is 10 m·s -1. To adjust the range of the Function Viewer:
Zoom: middle (wheel) mouse button + drag or roll wheel
Pan: left mouse button + drag
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 123
Step 2: Enforced behaviour - Case setup
(e) Check the enforced motion of the blades by pressing or dragging the current frame along the
timebar
124 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
2.7 Probes
Probes are predefined points where data (velocity, pressure, etc.) are measured and saved during
computation. They allow to save this data at the solver time step frequency instead of the frames
frequency as with the sensors, and therefore provide better measurements.
(a) Create a probe by right clicking the string Probes and choose Add probe
(b) Set Probe 1 > Position to (50, -10, 0) m
(c) Create two additional probes at locations:
Probe 2 > Position: (15, 10, 0) m
Probe 3 > Position: (15, -20, 0) m
(d) Show the probes position by selecting them in the Project Tree
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 125
Step 2: Enforced behaviour - Case setup
Probes location
Tip: You can directly load the setup of this problem from the project file WindTurbine.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Tip: During the calculation it is recommended that you set the timeline to an empty frame not to
slow down the XFlow performance.
126 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
In the Message View, the number of particles in the domain can also be checked at each iteration by
looking at "Num elems [xxx]" during the computation.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 127
Step 3: Enforced behaviour - Post-processing
Surface velocity at t = 10 s
(c) Show the pressure coefficient (Show > Surface info: Cp). Adjust the range to [-5, 5] in Main
menu > Simulation data > Analysis settings > Surface info.
128 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
(c) Export only the Velocity field measured by the probes 1 to 3 and leaving the "Save probes in
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 129
Step 3: Enforced behaviour - Post-processing
XFlow will export the Velocity measurements of the three probes to one file called "probe_1_3.txt
".
Please note: The Probes are working in a similar way as the Sensors (used in the Tutorial 04 for
example). The main difference is that Probes can measure the information at the numerical data
frequency instead of the frames frequency as for the sensors.Therefore, the Probes need to be defined
before running the calculation. Furthermore, Probes do not need to refresh at every frame in order to load
the data as with Sensors, reducing time for post-processing when it is known in advance where to probe.
130 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
Please note: The automatic inertia tensor calculation is done assuming a uniform mass distribution.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 131
Step 4: Rigid body dynamics behaviour
Tip: You can directly load the setup of this problem from the project file WindTurbine_RBD.xfp
3D vorticity field at t = 30 s
(c) Display in the Function Viewer the X-angular displacement of the blades
right click in the Function Viewer > Shapes > blades > Eux
132 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 07 - Wind turbine
(d) Display in the Function Viewer the X-angular velocity of the blades
right click in the Function Viewer > Shapes > blades > Wx
Observe that the blades achieve a uniform rotational speed of approximately 2 rad/s = 19 rpm
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 133
Tutorial 08 - Heat transfer
This tutorial illustrates the setup and solution of a conjugate heat transfer problem, where both solid
conduction and fluid convection are solved simultaneously.
It consists of a square cavity with differentially heated vertical walls and adiabatic horizontal walls. The cavity
is filled with air and a solid box is placed in its center. Fluid convection is driven by buoyancy forces, which
are modeled using the Boussinesq approximation:
= 0[1- (θ-θ0)]
The Rayleigh number of the flow is Ra~106, leading to strong convection. At the initial time instant, the solid is
at a temperature of 400 K and it will be cooled by the surrounding fluid.
134 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 08 - Heat transfer
It is assumed that the reader has completed Tutorial 01 and 02. Some steps in the setup and post-process
will not be described in detail.
Contents
Step 1: Problem setup
Step 2: Post-processing
(a) Create the cavity as a box ( ) with lower corner (-1.5, -1.5, -1.5) and upper corner (1.5, 1.5, 1.5).
Check with the help of the Back-face culling that the box normals are orientated towards the interior
and rename this Shape as Cavity.
(b) Create the inner solid as a box with lower corner (-0.5, -0.5, -0.5) and upper corner (0.5,0.5, 0.5).
Check that the box normals are orientated to the exterior.
Remember: Back-face culling helps to distinguish the orientation of the normals of a surface (see
Tutorial 02, step 1). To reverse the orientation: Select the geometry > Right click in Graphic View >
Reverse orientation
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 135
Step 1: Problem setup
Shapes
The effect of viscous dissipation in natural convection is appreciable only when the induced kinetic
energy becomes comparable to the amount of heat transferred, and this occurs when either the
buoyancy force is large or when the convection region is extensive. Viscous heat dissipation will not be
relevant in this example. You may test both cases, with the viscous term enabled and disabled.
136 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 08 - Heat transfer
(a) Choose the selection mode "Face filter" in the toolbar . Select a vertical face of the Shape:
Cavity (it highlights), do right click on the Graphic View and choose Apply boundary conditions to
faces from the contextual menu
(b) In the Geometry > Entities section of the Project Tree, check that two surfaces appear in the
Cavity Shape: "surface 1" is the one you have selected and "surface 0" contains the rest of the cavity
surfaces
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 137
Step 1: Problem setup
(c) Select the opposite face, right click in the Graphic View, and choose Apply boundary conditions
to faces
(d) Check that a new surface called "surface 2" appears in the Project Tree
(e) Rename "surface 0" to "walls", "surface 1" to "hot-wall" and "surface 2" to "cold-wall"
(f) Return to the View only selection mode by choosing in the toolbar
(g) Set all surfaces to Wall Boundary conditions, with Automatic Wall model and zero Wall
roughness
(h) Let the Conjugate heat transfer option switched Off
(i) Set the Thermal boundary conditions of the cavity's hot-wall to a prescribed Temperature of 600
K, the cold-wall to a prescribed Temperature of 300 K and the rest ("walls") to Adiabatic
Initial temperature law: 600 K, Specific heat capacity: 20 J·(kg·K)-1 and Density: 983 kg·m -3
138 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 08 - Heat transfer
Tip: You can directly load the setup of this problem from the project file HeatTransfer.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Step 2: Post-processing
Load the results data by: Main menu > Simulation data > Load simulation data or
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 139
Step 2: Post-processing
Temperature
(d) Create a second cutting plane and display the temperature distribution along the Box walls by
selecting Post-Processing > Cutting planes > Cutting plane 2 > Visualisation mode:
Surface field distribution
Please note: This is the temperature of the fluid in contact with the box walls, not the walls
temperature.
140 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 08 - Heat transfer
You should see the superposition of the two cutting planes, showing the graphs of the temperature
fields along the Box as well as the temperature contours inside the Cavity and the Box.
The figure above shows the temperature field and distribution along the Box surfaces at frame 150 (t =
3 s).
You can now switch off the temperature distribution by unticking the Cutting plane 2 checkbox.
(e) Show the isocontours: Post-Processing > General > Show > Isocontours with Number: 5
(f) Go to frame 150 (t = 3 s) and create a line graph by right clicking on Plot lines and selecting Add
plot line. Set Vertex 1: (0, -1.5, 0) and Vertex 2: (0, 1.5, 0) and observe its location on the
Graphic View 1. Choose the Temperature as the Field to be visualised over the line.
(g) Refresh the Plot lines > Right click on Line 1 > Refresh or click on . Then, in the Function
Viewer do right click and choose Plot lines > Line 1 to display the temperature along the line. In the
Function Viewer graph: X-coordinate is length from Vertex 1 to Vertex 2 and Y-coordinate is
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 141
Step 2: Post-processing
temperature. Click Auto fit and adjust the scale of the graph to [0, 3] in the X-coordinate and [300,
650] in the Y-coordinate. To do so, remember that:
(f) Export the data from the plot line to a file: Right click in Function Viewer > Export current data
(e) Enable only the Cutting plane 1 with the temperature field selected. Then export the temperature
results at the cutting plane by Main menu > Simulation data > Export cutting plane data to raw
format. This creates the file currentCuttingPlane0.txt in the project directory with the (non-
interpolated) temperature value at the center of every cell. It contains four columns: position X, position
Y, position Z and temperature value in K, and can be processed with spreadsheet software. Compare
the data plot line values with those of the current cutting plane at X = 0.
142 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 08 - Heat transfer
(b) Change the visulisation mode of the Box to Shading: Select the Box in Graphic View > Right click >
Visualisation mode > Shading
(c) Note that the flux is constant at the top and bottom walls of the Cavity. Check that it is zero, as
corresponds to an adiabatic wall.
(d) Adjust the legend range to distinguish the heat flux variation along the box walls Main menu >
Simulation data > Analysis settings: Surface info or for example, min -10000 and max 0.
(e) In the Function Viewer, display the evolution of the overall heat flux at the box. Right click in Function
Viewer > Shapes > Box > Heat
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 143
Tutorial 09 - Radiation
This tutorial illustrates the setup and solution of a radiation problem. It consists of a heat source at 400 K
surrounded by two obstacles at 0 and 200 K and an outer wall at 0 K. The temperature of the wall behind the
obstacles will be lower than the other part of the wall since the obstacles block the heat radiation energy.
XFlow simulates the reflection and absorption of heat radiation energy at the surfaces.
It is assumed that the reader has completed Tutorial 01, 02 and 08. Some steps in the setup and post-
process will not be described in detail.
Contents
Step 1: Problem setup
Step 2: Post-processing
144 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 09 - Radiation
(a) Create the outer walls as a box (toolbar icon ) with lower corner (-1, 0, -1) and upper corner (1, 1,
1). Check that the box is orientated to the interior and rename it as OuterWall.
(b) Create the obstacles also as boxes. Obstacle1 with lower corner (-0.6, 0.25, -0.25) and upper corner
(-0.5, 0.75, 0.25), Obstacle2 defined by lower corner (0.5, 0.25, -0.25) and upper corner (0.6, 0.75,
0.25). Check their orientation and rename the shapes.
(c) Create the heat source as a cylinder (toolbar icon ) with centre at (0, 0.4, 0), direction (0, 1, 0),
radius 0.15 m and height 0.2 m. Notice that the cylinder is closed, it has lids.
(d) Check that the orientation of the cylinder is to outside and rename it as HeatSource. Remember that
the culling helps to distinguish the orientation of the normals of a surface. The normals have to point
always to the fluid region, see figure in the previous page. To reverse the orientation (if required):
Select the geometry > Right click in Graphic View > Reverse orientation
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 145
Step 1: Problem setup
(b) Set OuterWall and Obstacle1 to the same boundary conditions than the HeatSource but
prescribed temperature to 0 K
(c) Set Obstacle2 to the same boundary conditions than the HeatSource but prescribed temperature to
200 K
Tip: You can directly load the setup of this problem from the project file Radiation.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
146 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 09 - Radiation
Step 2: Post-processing
In this problem the fluid is static (no forced flow nor natural convection) because the goal is to analyse the
capabilities of the radiation solver in XFlow.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 147
Step 2: Post-processing
Progress: 64%
Irradiance map generated!
Saving data...
The heat flux with Obstacle2 should be smaller because it is at a higher temperature (200 K).
(b) Now set the Surface info range to [0, 50] and observe the solution at the walls. Notice that on the
surface of the OuterWall behind Obstacle1, the heat flux is smaller than behind Obstacle2.
148 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 09 - Radiation
Heat flux at frame 0 is pure radiative, while in frames 1 and 2 the heat flux has also contributions from the
energy equation (diffusion + convection).
The farther from the source and with less visibility, the noisier is the solution. This is due to the
stochastic nature of the Montecarlo model. Increase the ray density and/or number of iterations and
observe the improvement of the solution.
If you analyse the temperature at the surfaces (choose Show > Surface info: 3d field with Field:
Temperature), in frame 0 the temperature is constant to 250 K on all surfaces. Remember that this is
the temperature of the fluid touching the walls, not the temperature of the solid objects. Solids must have
conjugate heat transfer thermal boundary conditions (see Tutorial 08) to be able to display their
temperature.
Refine the resolution to achieve better results, remember to adjust the simulation time depending on the
time step size.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 149
Tutorial 10 - Cyclone flow
This tutorial illustrates the setup and post-processing of a cyclone flow. Cyclones are used in many industrial
applications, specially in separation processes such as dust from a gas stream.
Dust particles can be modeled in XFlow with the Discrete Phase Model (DPM), which represents solid
spherical particles with physical properties (inertia, drag and gravity).
The inflowing fluid rotates inside the chamber and is constrained to follow a swirling flow path. In cyclones of
this type the larger suspended particles move outwards to the chamber wall where they travel in a downward
spiral to the base. The smaller particles move slowly and therefore their distribution across the flow changes
little. Those in the center are captured in the upward flow and exit the chamber through the upper outlet.
Cyclones are commonly used when the density of the inflowing fluid (the carrier phase) is less than that of the
suspended phase.
150 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
It is assumed that the reader has completed Tutorial 01, 02 and 03. Some steps in the setup will not be
described in detail.
Contents
Step 1: Problem setup
Step 2: Post-process
Step 3: Run
> Import a new geometry or ). Note that the vertical direction of the chamber, when it is
imported, is in the Z-axis.
(b) Rotate the chamber so that the vertical direction is parallel to Y-axis: Geometry > Entities >
Shape: CycloneChamber > Orientation: (-90, 0, 0) deg
(c) Check the orientation of the normals and make sure they are pointing inside the geometry, i.e. to the
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 151
Step 1: Problem setup
region with fluid. If required, select the geometry and do right click in Graphic View > Reverse
orientation. The geometry should look as follwoing:
152 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
Boundaries schematic
Check that in the Geometry section of the Project Tree, two surfaces appear in the
CycloneChamber shape: "surface 1" is the one you have selected and "surface 0" contains the
rest of the chamber surfaces
Select the outlet surface, right click in the Graphic View, and choose Apply boundary
conditions to faces
Check that a new surface called "surface 2" appears in the Project Tree
Rename "surface 0" to "chamber", "surface 1" to "inlet" and "surface 2" to "outlet"
(c) Leave the Wall Boundary condition at the CycloneChamber with an Automatic Wall model
(d) Set the Boundary condition > Inlet > Mass flow to the inlet surface. It will be assumed that
the air inflow rate is 0.08 m3·s -1. This is equivalent to a Mass flow law of (air density)*(volumetric flow
rate) = 0.0964 kg·s-1
(e) Set the Gauge pressure outlet to the outlet surface, with Gauge pressure law: 0 Pa, and both
Allow backflow and LODI options switched Off
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 153
Step 1: Problem setup
Tip: You can directly load the setup of this problem from the project file CycloneChamber.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation
Please note: Depending on your hardware, the computation of this tutorial may take a few hours
154 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
Step 2: Post-processing
settings or )
(h) Press play and note that there is no data before t = 0.3 s as we specified for the averaging
initial time
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 155
Step 2: Post-processing
(h) Change to Instantaneous data and play forward the results. Observe the differences with the
averaged data for the same frame.
(f) Change between Instantaneous and Averaged and refresh the cutting plane with the icon
156 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
(d) Set the vorticity range to [0, 1000] (Main menu > Simulation data > Analysis settings or )
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 157
Step 2: Post-processing
(h) Change the Transference law to a. You will see that the low vorticity values are more visible now.
Stream tracers integrate the streamlines in the velocity field and so allow to track the trajectory of Lagrangian
particles along the flow.
The particles can be massless (passive) particles advected by the fluid, or solid spherical particles (discrete
phase model) with physical properties (inertia, drag and gravity).
(a) Choose "Face filter" mode in the toolbar and select the surface corresponding to the inlet
(b) Duplicate the inlet surface with Main menu > Geometry > Duplicate
158 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
(c) The new surface (called "CycloneChamber-Duplicated") appears as a Shape in the Geometry
section of the Project Tree. Rename it to "Surface" and move it 1 cm to the interior (-Z direction).
(d) Set the surface Behaviour to Disabled to avoid that it affects the stream tracers. If the behaviour
would be fixed/enforced/rigid-body-dynamics, the surface could act as a wall for the stream tracers
(e) Return to the "View only" selction mode by choosing in the toolbar
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 159
Step 3: Stream tracers
Data: Averaged
Turbulent dispersion: Off
Transient: Off
Reference frame: 200
Time: 2 s
Frequency: 200 Hz
Backtracking: Off
Observe that appears a second timeline (in red colour) related to the stream tracers, and that the
frame 200 is locked. To unlock the visualization of the Tracer 1, you must untick its checkbox.
(e) Choose Tracer > Show > Current marker: Point and press play to see the motion of the
passive particle.
(f) Once the stream tracers have been computed, it is possible to generate the path lines of the stream
tracers to see the associated streamlines. Set Path lines > From frame: 0 and Path lines > To
frame: 400 and refresh the Path lines by the refresh icon or by Right clicking on Tracer 1
160 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
You can observe the streamline of one particle which goes to the outlet after a while.
(h) Right click on the Function Viewer and select Stream tracers > Tracer 1 > Active particles and
refresh the Tracer 1. The function viewer will show the number of particles in the domain as a
function of time. In this case, there is only one particle in the domain from time 0 s to 1.2 s, at this
moment this particle exits the domain through the outlet and no particles remain
Function Viewer > Stream tracers > Tracer 1 > Active particles
(i) Untick the checkbox of Tracer 1 to disable its visualisation and leave the timeline free
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 161
Step 3: Stream tracers
Observe that now second timeline is placed on top of the simulation timeline and that the path line
is rougher due to the fact that the computation uses less data than before. The frames frequency is
162 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 163
Step 3: Stream tracers
164 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 10 - Cyclone flow
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 165
Step 3: Stream tracers
(b) Vary the Restitution coefficient: 1 and recompute. The collision is perfectly elastic. If the particle
happens to be caught in the inner cyclone, it will exit the chamber by the outlet.
(c) Vary the Restitution coefficient to 0, increase the Frequency to 500 Hz and recompute. The
collision is perfectly inelastic (the particle does not bounce off the wall and sticks to it)
(d) Vary the Number of tracers to 4 and the Standard deviation (in diameter size) to 0.005. Now 4
tracers will be created at the source surface and at the initial time. The particle sizes follow a normal
distribution with mean diameter 0.001 m and Standard deviation: 0.005. Therefore each particle
has a different diameter. Show the current marker as a point and play to see the motion of the
particles.
(e) Vary the Number of tracers to 0 and Particles flux rate to 4. Now particles will be created at a
rate of 4 particles per second from random positions at the source surface.
(f) Set Turbulent dispersion: On to take into account the fluctuations in the velocity field due to
turbulence
166 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
FMI Standard works with the master-slave concept: the slaves simulate sub-problems whereas the master is
responsible for both coordinating the overall simulation as well as transferring data. XFlow works just as a
slave, so it can be connect to external software defined as a master.
OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial
and academic usage. It is able to work as master so the coupling with XFlow is possible.
It is assumed that the reader has completed Tutorials 01, 02 and 06. Some steps in the setup and post-
process will not be described in detail.
This tutorial shows how to:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 167
Coupling with a master software: OpenModelica
Please note: This tutorial requires having activated the Labs mode. The Labs mode can be activated in:
Main menu > Options > Preferences > Application mode
Please note: The version used of OpenModelica is 1.9.1 (r22929) available online.
Contents
Step 1: Problem setup - XFlow
Step 2: Set FMI standard in XFlow
Step 3: Problem setup - OpenModelica
Step 4: Execution of Co-simulation
Step 5: Post-processing
Main menu > Geometry > Import a new geometry (or use the toolbar icon ) and select the file
Pendulum.nfb. Select "Single shape" structure, visualization "Shaded" and press Ok.
The imported geometry will be shown in the Graphic View, and it will appear as a Shape in Project
Tree > Geometry > Entities:
The local axis are centered at the top extremity with the global axis orientation, it belongs with the axis
rotation.
168 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
Pendulum geometry
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 169
Step 1: Problem setup - XFlow
170 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 171
Step 1: Problem setup - XFlow
Please note: Currently XFlow only is able to simulate geometries with Enforced behaviour.
172 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
you can switch it to On, however this consumes more hard disk space.
(m) Store data > Compute makers: Off
(n) Store data > Fields to save: Leave On all the fields, which means that all the flow fields will
be saved on the hard disc.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 173
Step 1: Problem setup - XFlow
Region refinement
At this point the setup is finished and the FMI Standard has to be exported.
Please note: Before executing the Export to FMI standard command it is necessary to generate
the binary files to create the folder where XFlow saves the FMI standard files.
Main menu > Simulation data > Generate binary files
This last command is available only in Expert or Labs mode.
Export FMI Standard file which contains the input/output variables to communicate with OpenModelica :
Main menu > Options > Export to FMI standard
The Pendulum modeling needs an angular position as input and the internal forces (Fx and Fy) as output.
174 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
Select "Pendulum.Angular laws Z" FMI input and press .Select "Pendulum.Fx" and "Pendulum.
Fy" FMI outputs and press . Finally press Accept and the file xflowFMI.fmu is created in the
Please note: Currently XFlow is only able to use the geometry translational and angular positions
as FMI inputs, and any variable stored in the numerical data as FMI outputs.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 175
Step 2: Set FMI standard in XFlow
176 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
Please note: The version used of OpenModelica is 1.9.1 (r22929) available online.
In the Libraries tree (left) a new Modelica Class has appeared, called
"Pendulum_Coupling_XFlow_Openmodelica".
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 177
Step 3: Problem setup - OpenModelica
Import the file xflowFMI.fmu created by XFlow to OpenModelica Main menu > FMI > Import FMU.
In this simulation the Pedulum equation is going to be introduced as an extern library. It contains the
following code:
Open the file Pendulum_equation.mo which contains the equation of the pendulum behavior Main
menu > File > Open Model/Library file(s).
178 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
Libraries tree
3.4 Modeling
Open in the libraries tree the "Pendulum_Coupling_XFlow_Openmodelica" by double clicking the left
mouse button, then pick and drag the "xflowFMI_cs_st_FMU" and "Pendulum_equation" libraries on the
Diagram view. Connect the inputs (blue arrows) and the output (white arrows) between them through
wires as following:
Diagram OpenModelica
(a) StartTime: 0 s
(b) StopTime: 10 s.
(c) communicationStepSize: 0.002 s.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 179
Step 3: Problem setup - OpenModelica
Please note: These values should match with the XFlow values.
xflowFMI_cs_st_FMU parameters
Configure the "Pendulum_equation" simulation parameter by selecting the Simulation setup icon
(d) StartTime: 0 s.
(e) StopTime: 10 s.
180 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 181
Step 3: Problem setup - OpenModelica
Save the project before running the computation: Main menu > File > Save project, or in Toolbar
File.
XFlow project files have the extension .xfp.
If user has change some simulation parameter in XFlow has to generate binary files: Main menu >
Simulation data > Generate binary files
Message View:
Full domain has 50800 elements.
Equivalent single-resolution domain has 160000
182 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
setup icon in the main menu bar and press Simulate. Save the file
Pendulum_Coupling_XFlow_Openmodelica.mo in the Pendulum folder generate by XFlow.
Message View:
FMU simulation start time: 0 stop time: 1.79769e+308
Waiting first FMU DoStep...
Saving data...
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 183
Step 4: Exectution of Co-simulation
[[Data file]] 0 done!!! | Frame wall clock time[0]s | Overall wall clock
time[0]s | Num elements[50800]
Sim. time [4.000000e-003]s | Stability param. [1.734903e-004] | Wall clock
time [2.810000e-001]s
Sim. time [8.000000e-003]s | Stability param. [1.734903e-004] | Wall clock
time [4.060000e-001]s
Sim. time [1.200000e-002]s | Stability param. [2.347426e-003] | Wall clock
time [4.520000e-001]s
Sim. time [1.600000e-002]s | Stability param. [7.856966e-003] | Wall clock
time [3.740000e-001]s
Sim. time [2.000000e-002]s | Stability param. [1.385617e-002] | Wall clock
time [4.370000e-001]s
Sim. time [2.400000e-002]s | Stability param. [2.012526e-002] | Wall clock
time [4.840000e-001]s
Sim. time [2.800000e-002]s | Stability param. [2.625810e-002] | Wall clock
time [3.900000e-001]s
Sim. time [3.200000e-002]s | Stability param. [3.169038e-002] | Wall clock
time [4.210000e-001]s
Sim. time [3.600000e-002]s | Stability param. [3.618427e-002] | Wall clock
time [4.370000e-001]s
Sim. time [4.000000e-002]s | Stability param. [3.939046e-002] | Wall clock
time [4.840000e-001]s
Saving data...
[[Data file]] 1 done!!! | Frame wall clock time[4.213000e+000]s | Overall
wall clock time[4.213000e+000]s | Num elements[50800]
Sim. time [4.400000e-002]s | Stability param. [4.137910e-002] | Wall clock
time [5.930000e-001]s
Sim. time [4.800000e-002]s | Stability param. [4.209257e-002] | Wall clock
time [3.590000e-001]s
Sim. time [5.200000e-002]s | Stability param. [4.167101e-002] | Wall clock
time [4.520000e-001]s
Sim. time [5.600000e-002]s | Stability param. [4.090447e-002] | Wall clock
time [4.680000e-001]s
...
184 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 11 - FMI standard co-simulation: OpenModelica Pendulum
Please note: The stop time 1.79769e+308 in the log is given by OpenModelica ignoring the value
fixed in the Simulation parameters. The effect that this behavior produces is that XFlow's simulation
could get to the last frame but do not stop, it does not affects the simulation's results.
Step 5: Post-processing
The post-processing is possible to in XFlow completely managed from the Post-Processing section of the
Project Tree and OpenModelica allows to do a similar Post-processing adding the calculated variables by the
Pendulum equation.
Activate the XFlow variables Fx, Fy and Angular_laws_Z in the Variable Browser. It can be observed how the
sign of the forces changes when the Pedulum passes over the equilibrium position.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 185
Step 5: Post-processing
OpenModelica postprocessing
186 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
Please note: This tutorial requires having activated the Labs mode. The Labs mode can be activated in:
Main menu > Options > Preferences > Application mode
Please note: Check that OpenFSI is installed in your computer. Please see the "XFlow User Guide"
section Co-simulation > MSC Nastran > XFlow OpenFSI Service Installation.
Contents
Step 1: Problem setup - SimXpert
Step 2: Problem setup - XFlow
Step 3: Execution of Co-simulation
Step 4: Post-processing
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 187
Step 1: Problem setup - SimXpert
The first step of the tutorial is the setup of the MSC Nastran structural analysis. The MSC SimXpert pre-
processing software is here used to setup the case and generate the MSC Nastran analysis file (.bdf).
The Turek Hron benchmark consists of a solid cylinder and an attached elastic bar submerged in a channel
flow, as illustrated in the following figure. The characteristics of the solid and fluid materials, as well as the
inlet velocity, are chosen so that self-induced oscillations in the fluid and the deformable part of the structure
are obtained. In this analysis the fluid is considered to be incompressible and in the laminar regime.
L = 2.5 [m]
H = 0.41 [m]
The cylinder and bar geometries are defined by the following geometrical quantities:
188 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
C = (0.2,0.2) [m]
r = 0.05 [m]
l = 0.35 [m]
h = 0.02 [m]
a) Set the unit to [m] in Tools > Options > Units Manager > Length: m
b) Create the cylinder geometry with the Arc command and using the settings:
c) Create a surface of the Cylinder. Select the Cylinder perimeter and use the filler command :
d) Create the Bar geometry using the planar command and the settings:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 189
Step 1: Problem setup - SimXpert
a) Generate a mesh of the Cylinder and Bar surfaces using the Surface command and the
settings shown below:
190 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 191
Step 1: Problem setup - SimXpert
b) Detach the created mesh from the geometry, using the command Detach Mesh and selecting the two
geometries (Cylinder and Bar):
192 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
c) Match the Cylinder and Bar Meshes using the equivalence command , leaving the default
Settings:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 193
Step 1: Problem setup - SimXpert
The mesh of the Cylinder and Bar should now match at the interface, as shown below:
Before Equivalence
After Equivalence
d) Extrude the surface mesh in the z-axis to create 3D solid elements using the normal command .
Select all the 2D elements and input the values shown in the image below:
194 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
e) Create a new Part named MESH. Select only 3D solid elements as visible in the graphic viewer, (icon
). Select all elements in the GUI and move them to the newly generated MESH part by right-click
Assign Part...
f) Delete the original Part.
b) Apply Material and Properties to the 3D Solid Elements using the command Solid . Select all
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 195
Step 1: Problem setup - SimXpert
c) Apply Boundary Conditions. We are going to fix the cylinder's nodes, selecting them in the viewer and
using the fixed BC . Also, we are allowing only the X and Y translation and Z rotation of the Bar
196 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
The applied Boundary Conditions should look as below, where the green nodes are Fixed and the grey ones
are allowed only XY plane movements (the colors shown are not the default ones).
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 197
Step 1: Problem setup - SimXpert
a) Create an OpenFSI server, under User Services , using the settings below indicated. If the
User Services tab is not visible, please make sure you are in Structures mode
b) Create the Wetted Surface which will be exchanging the load and displacement information with XFlow.
198 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
In order to select all the 3D Solid faces please select the Element Faces filter ONLY in the Wetted Surface
dropdown list: .
a) Create a Nastran Job by right clicking the top branch of the project tree (FileSet) and selecting Create
new Nastran job command. Select General Nonlinear Analysis (SOL 400) as Solution Type and
deselect the Create Default Job Layout option.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 199
Step 1: Problem setup - SimXpert
b) In the project tree Simulations > Turek Hron > Solver Control, right click and select Properties.
Under the Analysis Option tab select Large Displacement and Follower Force to model the Large
Displacement Effects and Apply.
c) Right click on Load cases and create a new Loadcase selecting Create Loadcase.
200 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
Create Loadcase
d) Right click on Simulations > Turek Hron > Load Cases > Coupling > Load Case Control and set
the following parameters under Generic Control:
a. Total Time: 20 (s)
b. Minimum Iterations for each Increment: 6
c. Maximum Iterations for each Increment: 25
Please note: The Total Time parameter set in MSC Nastran will override the XFlow Simulation time.
e) Right click Output Requests and select Nodal Output Requests > Create Displacement output
request. Leave the Default values.
f) Right click Output Requests and select Nodal Output Requests > Create Applied Load output
request. Leave the Default values.
g) Right click in LBC Container > Select LBc Set and select the default boundary condition set
DefaultLbcSet.
h) Export the Nastran Turek_Hron.bdf job from File>Export > Nastran Model
The second step of the tutorial is the setup of the simulation in XFlow. A 2D simulation will be setup, using
glycerine as fluid and setting the input parabolic velocity profile as specified in the Turek-Hron benchmark
case:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 201
Step 2: Problem setup - XFlow
The velocity profile results in zero velocity at the boundary of the domain, and a maximum value at the center,
as illustrated in the picture below.
The velocity is initialized to zero in the entire domain and a ramp-up function is used to slowly increase it to its
maximum value:
202 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
1.1 Environment
a) Open a new XFlow window and create a new project called Turek_Hron.xfp.
b) In Project Tree > Environment> Engine set the following parameters:
(a) Kernel: 2d
(b) Advanced Options > Structural Analysis: Nastran
c) In Project Tree > Environment> Environment set the following parameters:
(a) Domain type: Generic rectangular domain
(b) Position: (1.25,0.205,0.005)
(c) Dimension: (2.5,0.41,0.15)
(d) X periodic: Off
a. -X Boundary condition: Inlet > Velocity
Velocity laws
X: [(t<2)((1.5*2*4/0.1681*y*(0.41-y))*(1-cos(pi*t/2))/2)+(t>2)(1.5*2*4/0.1681*y*(0.41-y))] ms
-1
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 203
Step 2: Problem setup - XFlow
Please note: The Structural Analysis option is only available in Labs mode.
1.2 Materials
d) In Project Tree > Materials set the following parameters for the Fluid material:
(a) Molecular weight: 92.09
(b) Reference density: 1000
(c) Viscosity model: Newtonian
Dynamic viscosity: 1 Pa s
1.3 Geometry
e) In Project Tree > Geometry import the geometry using the command Geometry > Import a new
geometry and selecting the MSC Nastran Turek_Hron.bdf file generated in Step 1 of this tutorial.
f) Fix the normals orientation of the imported geometry by selecting it and using the command Geometry >
Reorientate normals
204 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
g) Reverse the normals so that they point outward by selecting the geometry, right click with the mouse and
selecting Reverse orientation
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 205
Step 2: Problem setup - XFlow
1.4 Simulation
i) In Project Tree > Simulation set the following parameters
(a) Simulation time: 20 s
(b) Time step: 1.5e-4 s
(c) Resolved scale: 0.005 m
(d) Folder: Turek_Hron
(e) Frames frequency: 10 Hz
206 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
XFlow's Message View will prompt the "Waiting for initial sync point with Nastran"
message.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 207
Step 3: Execution of Co-simulation
a) Start MSC Nastran simulation by executing MSC Nastran and selecting the Nastran Turek_Hron.bdf file
208 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 12 - MSC Nastran co-simulation: Turek Hron
c) The co-simulation will start and the two software will synchronize at each timestep to exchange loads and
deformations, as indicated in XFlow's Message View.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 209
Step 3: Execution of Co-simulation
Please note: When launching a simulation in a folder containing previously generated MSC Nastran
output files, pleas do delete those (.op4, .op6. .DBALL, etc...) before running the new Nastran-XFlow co-
simulation.
It is possible to see how the beam deforms under the effects of the fluid loads, but as well the influence of the
beam deformation on the way the vortices are shed.
210 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
It is assumed that the reader has completed Tutorial 01, 02 and 07. Some steps in the setup and post-
process will not be described in detail.
Before starting the tutorial, please download the project data files from the Documentation section of XFlow
website (http://www.xflowcfd.com/index.php/client_area/documentation/view/1).
Contents
Step 1: Problem setup
Step 2: Post-processing
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 211
Step 1: Problem setup
are in Expert mode through the preferences options : Options > Preferences > Application >
Application mode: Expert.
named the numerical speed of sound and is defined by the relation: , where dx
212 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
menu > Geometry > Import a new geometry or press in Toolbar Geometry . In the Import
Geometry pop-up window, leave the the default options and press OK. The geometry is then displayed in
the Graphic View 1.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 213
Step 1: Problem setup
In Project Tree > Geometry > Entities > Shape: inlet set the following parameters:
(c) Behaviour: Fixed
(d) Boundary conditions: Velocity, with Velocity laws as (7.76, 0, 0) m.s-1
In Project Tree > Geometry > Entities > Shape: outlet set the following parameters:
(e) Behaviour: Fixed
(f) Boundary conditions: Gauge pressure outlet, with Gauge pressure law as 0 Pa.
In this case the dx = 0.00022 m, and Cthermody namic = 340.112 m/s. Hence dt = 3.73456e-7 s.
214 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
Tip: You can directly load the setup of this problem from the project file helmholtz_resonator.xfp
(b) Set the number of CPUs in Main menu > Options > Preferences > Engine
(c) Press Run button > Start computation.
Step 2: Post-processing
2.1 Flow visualisation
(a) Select the Vorticity field in General > Show > Volumetric field > Visualisation field, adjust its
range to [0, 15000], disable General > Interpolation mode and show the volumetric field with
Transference law: a
(b) In order to see the the reflections of the pressure waves inside the flute cavity, create a cutting plane
of static pressure: Right click on Post-Processing > Cutting planes and Add cutting plane with
Field: Static pressure. Adjust the colour bar legend to [-50, 80] Pa.Then play backward the time control
bar in order to visualize the reflections of the pressure waves in function of time.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 215
Step 2: Post-processing
The purpose of this acoustic post-processing is to measure the resonance frequency of the flute and
compare it with the theoretical value provided by the Helmholtz theory: 1197 Hz.
(a) Monitor the evolution in time of the static pressure at the probe location:
right click in Function Viewer > Probes > Probe 1 > Static pressure
(b) In order to apply the FFT on the time pressure signal measured at Probe 1, right click in Function
Viewer with the Static pressure of Probe 1 displayed > Data management > Set graph to [Frequency
space] mode. In the Signal filtering window, let all the options by default and press Accept.
Doing zoom at low frequencies, between 0 Pa and 10000 Pa, the main harmonics can be observed.
216 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
Moving the pointer to the higher peak, one can check that its frequency is 1100 Hz. This
corresponds to the resonance frequency of the flute obtained by XFlow.
2.2.2 Windowing
In spectral analysis, the Fourier transform can be multiplied by a window function which is a
mathematical function that is zero-valued outside of some chosen interval. It is useful to filter out
spurious frequencies due to applying the Fourier transform to a non-periodic signal.
Furthermore, the window function can be applied in the relevant time range. For instance, the
temporal pressure signal shows a transient regime where the pressure signal is not clear before
0.01 s, therefore it is convenient to apply the FFT and the window function from 0.01 s to 0.02 s. To
proceed, please follow the steps:
(c) Apply the FFT again on the probe signal: Right click in Function Viewer > Data management >
Set graph to [Frequency space] mode.
The Signal filtering window, shown below, will appear automatically. Select "Hamming" window
type for example. Then select the time range from 0.01 s to 0.02 s in order to remove the transient
part of the signal and press Accept.
As you can see in the following plot, the obtained FFT is cleaner after applying the window filter.
Some high frequencies due to the transient period have been reduced and the main frequency
appears clearly now:
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 217
Step 2: Post-processing
Static pressure signal in Frequency space applying Hamming window (t from 0.01 s to 0.02 s)
(d) Try to change the window type, with the same time range from 0.01 s to 0.02 s, and check the
difference.
Please note: The window type affects the signal treated due to the distribution function used. For more
information about these windows types and their formulations is available in the User Guide section Post-
processing > Function viewer > Data management .
Please note: The higher is the order and the longer the computation of the filter, therefore it may take a
while before you can apply higher order filters.
218 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
Once the filter is applied, you can see that the time evolution of the static pressure is cleaner and
only contains 1 frequency (the main frequency). All the other frequencies has been removed.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 219
Step 2: Post-processing
You can also check it in the Frequency Space (Right click in Function Viewer > Data
management > Set graph to [Frequency space] mode), where the main harmonic is
represented filtering all the other harmonics:
Please note: For more information about the filters formulations, please check the User Guide section
Post-processing > Function viewer > Data management.
where pref is the reference pressure equal to 2.10-5 Pa (i.e. threshold of human hearing).
220 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL
Tutorial 13 - Helmholtz resonator
a) Plot a temporal pressure signal such as the pressure read at probe: Right click in Function Viewer >
Probes > Probe 1 > Static Pressure.
b) Apply FFT and compute SPL: Right click in Function Viewer > Data management > Set graph to
[SPL vs freq] mode.
c) Leave the window type to none and the time range from 0 to 0.02 s, and click Accept.
d) Zoom in the frequency range [0; 20000] Hz which is the audible range and rescale the Y axis.
The mean harmonic peak at 1100 Hz is clearly shown and reaches an amplitude of noise of 130 dB
approximately. Other harmonics seem to appear as well at higher frequencies. Mean noise seems
around 90-100 dB.
As shown above, the pressure signal present a transient period from 0 to 0.01 s and periodic
oscillations after 0.01 s. For a better signal processing, it is recommended to remove this transient
period as it may generate additional spurious noise and only consider the periodic part of the signal.
e) Plot again the SPL graph to show the window type and time range to apply to the temporal signal
again: Right click in Function Viewer > Data management > Set graph to [SPL vs freq] mode.
f) Change now the parameter "From time" to 0.01 s instead of 0.0 s. Click Accept.
The SPL is similar to the previous one, but some of the secondary peaks have lowered in intensity
and the signal is more consistent. Mean noise is now lower and seems around 80-90 dB.
XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL 221
Step 2: Post-processing
Please note: For more explanations about this case, please check the Validation Guide, section
Helmholtz resonator: Flute.
222 XFlow 2015 Tutorial Guide © Copyright 2015 Next Limit Dynamics SL