Basic Tutorials: Ex. 8. 2D Flow Over A Cylinder Using The ICFD Solver
Basic Tutorials: Ex. 8. 2D Flow Over A Cylinder Using The ICFD Solver
LS-DYNA / LS-PrePost
Ex. 8. 2D Flow over a cylinder
using the ICFD solver
Contents
1 Introduction ............................................................................................................................2
1.1 Prerequisites...................................................................................................................2
2 Problem description................................................................................................................2
2.1 Files included in the tutorial .............................................................................................3
3 Setting up the CFD simulation ................................................................................................3
3.1 Creating the geometry and meshing it .............................................................................3
3.2 Meshing the geometry ....................................................................................................4
3.3 Converting the mesh to the ICFD mesh format. ...............................................................5
3.4 Create the CFD model ....................................................................................................6
3.4.1 Boundary Conditions...................................................................................................8
3.4.2 Control cards ............................................................................................................ 10
3.4.3 Controlling the boundary layer................................................................................... 11
3.4.4 Outputting the results ................................................................................................ 11
4 Run the simulation................................................................................................................ 12
5 Post-processing ................................................................................................................... 12
5.1 MS-Post ....................................................................................................................... 12
5.2 Basic post processing ................................................................................................... 12
6 Optional exercises ................................................................................................................ 13
7 Summary and where to learn more ....................................................................................... 13
1 LS-DYNA / LS-PrePost
1 Introduction
1 Introduction
The ICFD solver is available from LS-DYNA R7, but we recommend that you use the latest version
(or at least version R9) as the solver performance in the later versions is much improved. The ICFD
solver must always be run using the double precision version of LS-DYNA. The ICFD solver uses a
fully implicit time-stepping and solution method. The ICFD solver is an incompressible CFD solver
based on the Finite Element Method (FEM). Modern FEM based ICFD-solvers of the type used in
LS-DYNA are a fairly recent addition to the CFD-solver market and most other CFD solvers on the
market today are based on the Finite Difference Method (FDM) or Finite Volume Method (FVM).
This tutorial will show you how to setup a 2D CFD simulation using LS-PrePost 4.3. The geometry is
not complicated but the flow is very complex since a laminar von Karman vortex street, see Figure
1, is developed behind the cylinder for Reynolds numbers between 40 and 150. After Reynolds
number 150 does the transition to a turbulent vortex street starts and occurs to Reynolds number
300 where the vortex street is fully turbulent.
The Reynolds number is a dimensionless number that is used to classify flows to get similar flow
conditions. The definition of the Reynolds number is the ratio between inertial forces and viscous
forces and can be written as:
𝑈𝜌𝐿
𝑅𝑒 = 𝜇
U free stream velocity, 𝜌 fluid density, L characteristic length, and 𝜇 the dynamic viscosity. The
characteristic length in this case is the diameter of the cylinder.
If you want to learn more about a specific keyword or if you feel that some information is missing in
this tutorial regarding a keyword look in the keyword manual vol. 3.
1.1 Prerequisites
• Basic knowledge about LS-DYNA and LS-PrePost.
• Basic understanding of FEM and CFD.
• LS-PrePost 4.3 or later and LS-DYNA R8.1 or later.
2 Problem description
It is a 2D example with flow over a circle in a rectangular domain. This example uses a Reynolds
number of 100 and therefore you can say that the units in the example is dimensionless. The mesh
that will be used in the example will be quite coarse since it is a demonstration example. You will see
that you get a Von-Karman vortex street after the cylinder when the flow has stabilized.
2 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
3 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
5. Now you will see the control options for the line tool below the toolbar,
click the KeyIn option to enter the coordinates for the first line.
6. Enter zero in the x1 and y1 field.
7. Enter zero in the x2 field and 10 in the y2 field.
8. Now press Create and you will see the line in the drawing area.
9. Create the next line by changing the x1 and x2 fields to 15, keep the y-
values.
10. You should now have two vertical lines in the drawing area and to connect
them change to the Pick option.
11. Connect the lines by clicking on the top points in the drawing area.
12. Do the same for the bottom points.
13. To create the circle, press the circle tool in the toolbar.
14. Use the KeyIn option.
15. Enter a x1 value of 4 and a y1 value of 5.
16. Click the Radius option and enter a value of 0.25.
17. Then press Create to create the circle and view it in the drawing area.
18. If the geometry looks like Figure 2 press Exit in the 2D Mesh Generation
window.
4 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
1. In the MSMesh window change Starting PID, Starting EID, and Starting NID to one.
2. In the Sel. Parts window select ByPart.
3. Press Whole to select all active parts in the current model.
4. Press Apply in the MSMesh window and if you are satisfied with the result press Accept.
5. Save the file as fluid_mesh.k for example, by clicking on File/Save/Save Keyword.
5 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
2. Locate the keyword *INCLUDE in the Keyword Manager and double click on it.
3. Locate the mesh file, fluid_mesh.k, if you have all files in the same folder you only need the
filename and not the path to the file.
4. Then press Insert and then Accept before pressing Done. If you do not press Accept the
changes made on the keyword is not saved.
5. To view the mesh, you must save the model and open it again. Save it as main_fluid.k and
open it in a new LS-PrePost window.
6. Locate the keyword *ICFD_SECTION and double click on it.
7. The keyword *ICFD_SECTION needs to be defined but currently it has no purpose.
8. Press Accept and then Done.
6 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
9. The next keyword defines the fluid properties, locate and double click on the keyword
*ICFD_MAT in the Keyword Manager.
10. Enter a density of one on the parameter RO and a dynamic viscosity of 0.005 the parameter
VIS.
11. Press Accept and Done.
12. Now locate the keyword *ICFD_PART if you did not have it defined in the mesh file it is
automatically created. Double click it and make sure that the MID and SECID are the same
as we defined previously, they should have the ID one if you did not change the ID value
when defining the section and material keywords.
13. Either you enter the ID value on the parameters SECID and MID or click on the black circle
next to the parameter.
14. Make this change for all four parts and remember to press Accept before changing part
otherwise will the change not be saved.
15. Open the keyword *ICFD_PART_VOL.
16. This keyword is used to tell the solver which material the volume nodes will have. Enter the
correct SECID and MID and enter all four parts before pressing Insert and then Accept. If
you have more than eight parts, define the first eight and then enter a new row with the rest
of the parts.
7 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
2. In the field O1 enter the value 1 and press Insert, now change the A1 value to 10000 and
press Insert. This creates a curve that has a constant value of one during the whole
simulation. Press Accept to save the curve.
3. Press NewID in the top left corner to create a new curve, change value of the O1 parameter
for both points to zero by clicking on them and changing the value and then pressing
Replace. Then press accept, if you want you can add a title to the curves.
8 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
5. Enter part one in the parameter PID, this defines where the velocity will be applied.
6. Set the DOF to one which means that the x-velocity will be prescribed, the VAD parameter
describes the velocity profile use the default option one a linear profile.
7. Select load curve 1, that had a constant value of one in the parameter LCID, press Insert
and Accept.
8. Press NewID change the DOF parameter to 2, meaning y-velocity and change the load curve
to number 2 that had a constant value of zero.
9. Press Replace, Accept and Done.
10. Open the keyword *ICFD_BOUNDARY_PRESCRIBED_PRE.
11. Enter part 2 which is the outlet in the PID parameter and use load curve 2 in the LCID
parameter.
12. Press Insert, Accept and Done.
9 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
13. Locate the keyword *ICFD_BOUNDARY_NONSLIP that will be applied on the circle, part 4.
10 LS-DYNA / LS-PrePost
3 Setting up the CFD simulation
2. Set the end time to 100 on the parameter TTM and use the default values on the rest of the
parameters. Click Accept and Done. A zero time-step size means that the solver uses an
automatic time step based on the CFL criterion.
3. An optional keyword is the *ICFD_CONTROL_OUTPUT that controls the message level and
output format.
4. The MSGL parameter controls how much information that is printed from the solver, the
OUTL parameter controls if the results should be outputted in another format than the d3plot
format. The DTOUT parameter controls how often these results should be printed and the
last parameter controls if the fluid volume mesh should be printed to a separate file.
3.4.3 Controlling the boundary layer
To control and generate the boundary layer of Part 4, the circle, use the keyword *MESH_BL. This
keyword tells the solver to generate a boundary layer mesh. You as a user have several ways to
control how the boundary layer is created, for more information see the Keyword Manual Vol. III.
1. Open the keyword *MESH_BL.
2. The first parameter PID tells the solver from which part the boundary layer will grow, enter
part 4 which is the circle.
3. The NELTH parameter controls the number of nodes between the wall and the last node in
the boundary layer. Enter two which means that a boundary layer with three elements will
be generated, keep the default values for the other parameters.
3.4.4 Outputting the results
To output the results, use the keyword *DATABASE_BINARY_D3PLOT.
11 LS-DYNA / LS-PrePost
4 Run the simulation
2. Enter one in the parameter DT which means that you will get one hundred states since the
end time was 100.
5 Post-processing
Use LS-PrePost 4.3 or a later version. For the most recently features, use LS-PrePost 4.5 which is
the current beta version. To view the results, open the d3plot file with LS-PrePost. From version 4.2
a new GUI is available for multi-physics located under MS/MS-Post.
5.1 MS-Post
When opening a d3plot file containing ICFD results the ICFD menu will automatically be
opened. If you have closed it and need to open it again, click on the MS button and then
on the MS-Post button. In the current beta version 4.5 of LS-PrePost, the post window is
attached to the left side of the graphical window and it is displayed when a d3plot file
contains data from a CFD simulation or a multi-physics simulation.
12 LS-DYNA / LS-PrePost
6 Optional exercises
6 Optional exercises
Play around with the different options and see how it affects the results, here is some suggestions
that you can test.
1. Refine the mesh especially the boundary mesh.
2. Change the time step size.
3. Change the boundary layer and test the other methods that are available.
4. Add a refinement zone with the keyword *MESH_SIZE_SHAPE.
13 LS-DYNA / LS-PrePost