How To Set-Up and Run A 2D Flow Simulation in Siemens Simcenter NX12
How To Set-Up and Run A 2D Flow Simulation in Siemens Simcenter NX12
8 Troubleshooting 33
9 Extra Resources 34
How to set-up and run a 2D Flow Simulation in Simcenter NX12 3/34
— The solution verbose and the convergence graph should be reviewed within the “Solution Moni-
tor” window.
— The results can be loaded in order to plot the field of interest : velocity, pressure maps, 2D graph
along a path, streamlines, ... A html report with extra results (force on a face for instance) is also
generated if it was defined at step 3.
— At the end of this step, you can save again your working .sim file as a reference before experimen-
ting with different meshes, constraints or solver parameters.
Each step will be explained with more details using a practical example in the following chapters. Extra do-
cumentation about workflow for Flow simulation can be found here :
https://docs.plm.automation.siemens.com/tdoc/nx/12/nx_help#uid:xid1128419:index_advanced:id1245911:
id629501
How to set-up and run a 2D Flow Simulation in Simcenter NX12 4/34
p2
U1 D u
Because the fluid is viscous, it is not allowed to use Bernoulli equation. Nevertheless, by neglecting entrance
effects and taking the mean velocity ū = U1 , the pressure loss can be computed with the Darcy–Weisbach
equation (adapted from a 3D cylindrical pipe to a 2D plane pipe),
L
∆p = f ρU 2
4D 1
with f the Darcy friction factor, obtained (experimentally) for √
a turbulent flow in a smooth pipe (here, Re =
U1 D
= 2.2 10 4 > 2000 thus turbulent) with √1 = 2 log(Re f ) − 0.8 or with Moody diagram. We found
ν f
f = 0.0253 and thus ∆p = 31.2 Pa.
Physically, the most important part to understand in the numerical setup in the boundary conditions choice.
The fluid is entirely described by Navier-Stokes (NS) equations (differential equations for 4 unknowns : 3
components for u and 1 for p). 4 boundary conditions are thus needed to solve the computation. Velocity and
pressure are linked together thanks to NS equations, when one is known, the other to. Boundary conditions
are needed for the whole control surface. Here, the velocity is imposed at the inlet (3 values) and the pressure
at the outlet (1 value). The rest of the control surface is a wall, for which the condition is a no slip wall (here,
we have a viscous flow, with zero velocity at the wall). When the flow is turbulent, a special treatment of the
wall has to be done, using a wall function (modelling the turbulent boundary layer, more details in section
7.1. If the flow is inviscid the condition is a slip wall (or equivalently, impose a zero velocity across the wall).
How to set-up and run a 2D Flow Simulation in Simcenter NX12 5/34
You shall have this view and you are ready to create your part.
NX12 is based on an tree structure (the left blank panel) where you can check what you have done, go back
and modify previous steps. If you have several files opened in NX12, click on the top tab Switch window
to navigate.
To navigate in space, you can use rather navigation icons or using a mouse :
— Useful shortcuts are available when holding down the right mouse button.
— Clicking the central mouse button and dragging will rotate the view.
— Clicking the central mouse button, then the right mouse button and dragging will move the view. You
can do the same more easily by holding down the SHIFT key and clicking only the central mouse button
and dragging.
— Rolling the mouse wheel will zoom in/out.
— As you work in a sketch plane, if you unintentionally moved the view out of plane, you can use short-
cut SHIFT+ F8 to get back to the top view. You can also choose a point of view (on a plane, isomeric...)
using
Draw the following sketch using the Line command. The dimensions do not have to be the same at this
moment, only the general shape matters.
Closed sketch : To be sure that your sketch is a closed contour (to be able to create a solid body in section
1.5), be sure that you select the same point when drawing intersecting lines (orange point). NX12 helps you
to draw vertical or horizontal line by adding some orange dashed lines.
Delete : If you want to delete/modify an element, be sure to deselect the tool you used first (if you not, you
will still be in drawing mode). Right click on the element you want to delete and select (or click on the
element and CTRL+D).
Element selection : The different elements are selected just by clicking them successively, there is not need
to hold down CTRL key. To deselect all : press ESC. To deselect one item only : click it with left mouse holding
down SHIFT
Dimensions and constraints : You will see that grey dimensions appear automatically in such a way to fully
define your sketch. These are auto-dimensions but not constraints so your sketch is free to move. To add
constraints, you can either
How to set-up and run a 2D Flow Simulation in Simcenter NX12 8/34
1. Double-click on grey dimension and adjust the value to make them constraints, they will appear in
dark blue color.
3. Add more complex constraints, like parallelism, same length, perpendicularity, etc.. by selecting suc-
cessively different elements and then choosing suggested constraints.
Dimensions constraints can be found under Direct Sketch > "Rapid Dimension". You can also find all
constraints under Direct Sketch > More > "Sketch Constraints"
It shouldn’t contain any grey dimensions (auto dimensions) but only dark blue constraints (px = ...). This
means the sketch is fully constrained. "Sketch is fully constrained" will appear at the bottom of the window.
If you have red/purple constraints, it means that your sketch is over-constrained, you should remove some
constraints in this case.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 9/34
Draw a round corner : Select the Filet tool in Direct Sketch and then successively the two inner legs of
the corner. Repeat with the two outer legs. You should have the following sketch with two additional degree
of freedom, being the two arc radius.
To keep a constant section for the pipe, you will select the two horizontal legs of the pipe and force them to
the same length as shown-here below. Because of the other constraints, imposing only the two horizontal
legs is enough.
The only remaining degree of freedom is the radius of the outer arc that you should force to 400mm. The
final sketch should appear as follows.
1.5 Extrude
Select your sketch > Click "Extrude" under Feature toolbox > Choose an extrusion length (end distance) of 10mm
(for example) > OK
By rotating the view with the middle mouse button you can verify that you have now a 3D solid body (if you
did not have close your sketch, it will be a shell).
Under Feature toolbox > More > Trim > "Split body"
How to set-up and run a 2D Flow Simulation in Simcenter NX12 11/34
Select your body, choose "Extrude" under Tool Option and then under Tool > Section > Select Curve > Click on
"Sketch Section".
Draw split limit : After clicking on "Sketch Section", you will enter in a temporary sketch, where you have to
first select the system coordinate (same as before, CSYS).
You should split the body in three parts by adding two perpendicular lines at the entry and exit of the corner.
You should also have this new sketch fully constrained. When you are done with the sketch, Click "Finish
Sketch" in the upper left corner.
Make sure to tick the box for “Keep Imprinted Edges” under Settings and click OK. By doing so, the software
automatically creates Glue Coincident type mesh mating conditions between the bodies when you switch to
the FEM file. You should inspect these mating conditions and ensure that they were created at all appropriate
locations
How to set-up and run a 2D Flow Simulation in Simcenter NX12 12/34
When drawing split limits, your elements should referring to the first sketch geometry. By doing so, if you
change a dimension in the first sketch later, this split body and the meshing will follow and adapt automa-
tically. If you want to split the body in more complex parts inside a body part, start from the new split body
part and re-do a split body procedure (example in section 6. You should end up with this design,
Make sure you save your model as a yourproject.prt file. Do not hesitate to save it often using CTRL+S.
If it appears that two polygon bodies have common face but are not connected, you can add the connection
manually by clicking Mesh Mating under Connections toolbox.
Here, we will set the mesh constraints, on one face only (upper face of the extrude, be sure to select always
edges from the same face).
Biasing on edge : we will apply on the 4 perpendicular section a “bias on edge” with option “Center of edge”,
30 elements and bias ratio of 1.12 to have smaller elements close to the wall where the velocity gradients are
more important. The orientation of the orange arrow does not matter here because the biasing is centered.
Remark : A matching edge between two polygons should be specified once only. NX12 automatically applies
the mesh constraint on both sides.
Size on edge : Next, you force the elements size to be 10mm on the entry and exit lateral sections. You shall
put all those constraints in the same plane, here the upper plane.
Repeat the same operation and set a size on edge of 5mm on the outer arc of the corner.
Number on edge : you shall also set the short edges along the thickness (z-axis) to have one single element,
as the simulation is 2D. Do not hesitate to zoom a lot on the thickness and to rotate the view to be sure only
the small thickness edge is selected.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 16/34
Tips : You can set a constraint on multiple edges at a time. For the biasing on edge (especially useful for
boundary layer), you have to select the orientation (start of edge, end of edge or middle of edge) and it
varies from edges to edges depending on the edge natural direction.
You can always modify constraints already defined by double click on it in the arborescence. You can also
rename the constraint to identify it more easily.
For more complex geometry, you can set the view to static wireframe to view all your constraints at once. An
edge density is shown with a yellow diamond, see here-under.
Mesh > More > "2D Mapped" > Click the face where you set the edge constraints. Select either QUAD4 or TRI3
elements. In this tutorial we select quad (structured) elements. When working with quadrilaterals mesh, if
you have correctly set the edge constraints, the “Element Size” parameter should have no effect and can be
left to a default value. Click the icon next to “Show Result” to get the preview before clicking OK.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 17/34
Mesh all the other polygon faces of the plane similarly (3 in total). In more complex geometry, make sure not
to over-constrain the mesh. At the end, you obtain 3 shells below "2D Collectors". Each shell contains a 2D
mapped mesh (3 for the 3 parts of the upper face only) : do not mesh the face along the thickness, this will
be done in the 3D mesh section.
Every time you generate a 2D mapped mesh with quadrilateral elements, the constraint of one edge is repor-
ted to the opposed edge. This constraint appears as “Mapped Mesh Edge Density” in the arborescence and
as blue diamond in the main view (see image here- above). This also means there might be a logical order
on how to mesh the different faces.
Mesh > More > "2D dependent" > Select the master (upper) face (already meshed) > Select the corresponding
face on the opposite side (lower) as the target face > OK.
Repeat the process for all 2D meshes separately. Sometimes, the selection of the upper face as the "Master
Face" is not possible/easy : in this case, check that you have created one 2D mesh for each upper face (see
section 2.4) and rotate the view in 3D to be able to select it.
Now, all 3 shells (below "2D Collectors") contain two 2D meshes (the "2D Mapped" and the "2D dependent"
ones, see the figure below in section 2.6).
How to set-up and run a 2D Flow Simulation in Simcenter NX12 18/34
Mesh > More > "3D Swept Mesh" > Type "Until target" > Click the upper face with the 2D mapped mesh, then
click in the dialog box to select the target face and click on the lower face of your polygon > OK
You should use HEXA8 if you have 2D map with QUAD4 elements. Here again, the “Source Element Size” pa-
rameter should have no effect if you had correctly set a constraint of 1 single element on the edges along
thickness.
Proceed similarly for all the 3 polygon bodies. You will obtain 3 Solids under "3D Collectors", each one contai-
ning a 3D mesh. You can verify that you have well a 3D mesh with only one element for the whole thickness
and that the top and bottom meshes match such that the elements are vertical prisms. You can again use
the static wireframe view.
Remark : Even if the extension changes from the yourproject.prt, it seems it can’t have the same name and
you should append _fem to the file name.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 19/34
— Inlet Flow : to set a velocity (input). In this tutorial, you will set "Velocity" Mode to 0.34 m/s (input
velocity at the extremity of long leg of the pipe (on the inlet face)).
— Opening : to set a pressure (output). Select External Conditions "Ambient" pressure at the extremity of
the short leg (outlet face).
3.3.2 Symmetry Plane : On the upper (and lower) face of the solid, you can impose "Symmetry Plane" to
ensure a pure bi-dimensional problem. You can select all faces on one side simultaneously (all 3 faces on the
upper surface for example then apply and proceed the same for all 3 faces on the bottom surface), but make
sure not to select upper and lower faces together.
3.3.3 Boundary Flow Surface : The faces along the thickness (6 polygon faces in total) represent the walls
of the pipe. For them, choose "Flow Surface", with a "Type" of "Boundary Flow Surface". For the "Wall Treat-
ment", select either "Slip Wall" (inviscid fluid) or "Non-Slip Wall" (viscous fluid, zero velocity at the wall), de-
pending on the problem. At the end every single face should have a boundary condition. For laminar flow,
you can keep "Non-Slip Wall" but when you use a turbulence model, you have to change it to “Wall Function”
(see section 7.1).
How to set-up and run a 2D Flow Simulation in Simcenter NX12 21/34
You can rename and change the color of the boundary conditions. You can untick the box later in the tree
structure (under Simulation Objects) for more clarity.
Setting the initial conditions should speed up the convergence to the solution. In this tutorial, this is not
necessary.
Simulation Object Type > Report > Type "Lift & Drag". Click the surfaces of interest (i.e. the walls, thus the 6
faces along the thickness, as done in the figure below).
In the subpanel “Axes” you should select the coordinate system as previously defined and choose the right
orientation for Lift and Drag Axis.
You can also enter some data to compute directly the aerodynamic coefficient if applicable, like the density
ρ (this is not the case for this tutorial).
Do not forget to save your project as yourproject_sim.sim. Even if the extension changes from the your-
project.prt, it seems it can’t have the same name and you should append _sim to the file name.
Before running the simulation, check that boundary conditions are active and that all the 3 files (.prt, .fem
and .sim) are in the same folder.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 22/34
How to set-up and run a 2D Flow Simulation in Simcenter NX12 23/34
In some cases, you might need to play with the “Steady-State Relaxation Time Step” and the “Time Step”
under the 3D Flow Solver tab. It has to respect the Courant–Friedrichs–Lewy (CFL) condition U ∆t/∆x ≤ 1,
with U the velocity (m/s), ∆t the time step and ∆x the minimal mesh size. You can also change the "Maxi-
mum Residuals" of the numerical solver, in order to study the convergence of the solution based on the mesh
refinement.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 24/34
During the computation, you have two windows : Information showing eventual errors or warnings and the
Solution Monitor. On this window, you can click Graph(s) > Convergence to check the progress of the com-
putation in real time and/or watch the verbose in real-time (check the residuals). Under Graph(s) > Track
Results, you can also track in real-time min/max/average velocity/pressure convergence. It is important to
check that your solution has converged, i.e. that the numerical transient phase is finished (the flow needs
time to set-up, from rest to the conditions you specified) and that your global quantities reach a plateau.
Export : you can export the graph of convergence/results in .png directly or in .csv to plot it after in Matlab.
Remark : As the simulation is purely bi-dimensional, the residual for W (velocity along z-axis) is constant
at 10−12 . This is a quick check for any mistake that could make the flow not purely bi-dimensional. Once,
you could run the simulation and it converged, do not forget to save before analyzing the results and trying
different configurations.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 25/34
Pick up values of interest to evaluate validity and convergence of the solution : like minimum pressure over
a surface or maximum velocity over the entire model.
In this tutorial, we will select the min and max velocity and the min and max pressure over the entire domain,
and the average pressure at the inlet.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 26/34
Edit Plot : At the bottom of the tree, right-click the active Post-view > Edit Post View. Or, click directly on
the Edit Post View button on the top tool bar (Results tab). You can choose the Color Display : iso-lines, ar-
rows.... For clarity, you can remove the display of the mesh under Edges & Faces > Edges "Feature" but it is
not recommended to present results during mesh convergence analysis, if results are linked to the mesh.
Streamlines : To plot streamlines, choose Color Display "Streamlines", under Seedset tab, click on Create.
On the Seed Set window, thick Select Nodal Location and Pick "All on face" on the inlet face for example, to
plot streamlines in the whole pipe.
Animation : Click on "Animate" to create an animation of particles on streamlines. You can export it
as .gif file.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 28/34
2D graph : Once you have plotted a data field (velocity magnitude for example), you can also create 2D graph
under Tools toolbox. In this tutorial, we will plot the velocity profile along the pipe :
After OK, a small pop-up window will then ask you if you want to plot it in a new window or in an existing
one, chose to Create New Window.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 29/34
Plot different 2D graphs on same window : Repeat the same steps to plot the velocity profile at different
lengths. When you have your plots under Graphs tab (in the tree structure), select all plots that you want,
right click Plot.
You get then several curves showing the velocity profile at different lengths from the entry. The turbulent
flow profile goes from flat at the inlet (uniform profile at inlet) to a parabolic curve as the boundary layers
grow and merge. Within the curve, the profile becomes asymmetric with higher velocity at the inner side of
the curve.
Export 2D graph : On a Graph Window, cllick on Toolbar and then Save Graph. When you have several plots,
choose which one to Export and select .csv as file format (to import and show in Matlab for example).
— First click the top-left icon Return to home to exit the result analysis and go back to the simula-
tion navigator.
— In the tree structure, under yourproject_sim.sim/yourproject_fem.fem double-click yourpart.prt
two times in a row to open it again. Now you can switch between the part, the mesh and the simulation
via the button in the header bar Switch Window.
— When in the Modeling window (.prt), select the Part Navigator (3rd icon in the left vertical toolbar).
— Now you can edit your sketch by double-clicking it. Change the radius from 400 to 70 mm.
— Click Finish Sketch.
— Switch window to go back to the Simulation.
— In the top-left, click Activate Meshing
— In the top-left, click Update, to automatically update the meshing to the new geometry. Then again in
the top left Activate the Simulation and Solve for this new configuration.
— The same process can be used to change the meshing constraints, if you want to refine the meshing
for instance. You can jump between the .prt, the .fem and the .sim files and they should be linked
together as you modify them.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 31/34
Plot the velocity field using streamlines to see the dead zone after the corner.
After loading the solution, Under Home tab > Solution > Result Manager you will see that the values are dis-
played in red, you can select them and click the bottom Update button to get the new values.
R = 400 mm R = 70 mm
Inlet average pressure 35.9 Pa 75.13 Pa
Maximum velocity 0.39 m/s 0.72 m/s
Maximum pressure 38 Pa 81.57 Pa
Minimum pressure -3 Pa -281.58 Pa
As expected, you can see that the inlet pressure is higher, more than twice what was needed for the large
radius. Minimum, maximum pressure and maximum velocity are also higher in absolute values over the do-
main.
Compared to the analytical prediction (∆p = 31.2 Pa), the pressure drop for the large radius is slightly higher.
Indeed, we neglected the entry region (the velocity profile is not fully developped and shear stress are the
same along the whole pipe wall). Moreover, the turn at 90° increases the pressure loss and its radius has a
strong influence on ∆p.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 32/34
This is computed by selecting Y+ and Turbulence Model Quantities (containing Y Plus) in Results Options before
solving the simulation. The validity of y + is crucial since the boundary layer has to be well modeled. You can
check it by displaying Y Plus in the results. Then, instead of "smooth" colors, select "banded" to highlight
zones of y + . Because y + is displayed in the whole domain but you are only interested in the values close to
the wall between 30 and 70, you can change the boundaries of the legend. On the arborescence, click on Post
View, Legend tab and under Value Control, select Specified for Legend Extremes with Min = 10 and Max = 100
for example. You can find more information about it on the documentation : https://docs.plm.automation.
siemens.com/tdoc/nx/12/nx_help#uid:xid1128419:index_advanced:xid389654:id627221:xid457884
It is also possible to add Initial Conditions from a specified "Uniform" state or "From Results in Other Direc-
tory", to start from a previous state, which is already computed.
To trigger unsteady phenomena (for example, to force vortex shedding behind a cylinder), you can change
the solver scheme : go to Solve > Edit Solver Parameters > 3D Flow Solver > Advection Schemes and change
"First-order" to "Second-order (SOU)".
8 Troubleshooting
— A part of the model disappears : In some cases, the 3D view can bug and a part of the model may
seem to disappear, as if it were hidden. In this case, you can always go back to any automatic point of
view you want thanks to the navigation shortcuts.
How to set-up and run a 2D Flow Simulation in Simcenter NX12 34/34
— 2D dependent mesh : As mentioned, you might have some difficulties to create the 2D dependent
(not easy to select the Master Face). In this case, check thta you have one 2D mesh for each face and
try to change and rotate the view, or you can re-do on the lower face the same procedure as you have
done for the upper one to construct the 2D Mapped Mesh.
— Unexpected abortion of the solver :
9 Extra Resources
NX 12 help menu :
https://docs.plm.automation.siemens.com/tdoc/nx/12/nx_help/#uid:index