Hydrofoil Cavitation Example
This tutorial will cover the basics of setting up and running the fluid problem of a cavitating flow over a hydrofoil. Additionally, a comparison of Loci-Stream results will be presented. Files for running the case yourself can be found here: LOCI-STREAM RUN FILES.
The backward step problem is commonly used to validate simulation codes' turbulence models. It provides a case that is easy to setup and run, and there is quality empirical data available about the flow. In the backstep problem, a turbulent boundary layer encounters a sudden drop which causes a separation of the flow. The flow recovers some distance downstream of the drop. For a step height of H, the Reynolds number for this validation case is 36,000. This example is modeled after the data generated & provided by NASA Langley's Turbulence Modeling Resource webpage.
The domain is 3D which is created from an extrusion of a 2D geometry.
The flow inlet is prescribed using the Loci-Stream syntax: subsonicInlet(T=537.0 R, v=41.7096 m/s, k=0.00097, omega=5091) .
To see the Loci-Stream control file with the remaining boundary information & numerics info, click HERE.
Running the Code
Loci-Stream is an MPI based parallel code, so execution of the code is started with a call to mpirun. A template call is shown below where the terms in brackets(<>) are replaced by the specifics of your case.
mpirun -np <np> <path_to_stream_exec> --scheduleoutput -q solution <casename> <restart> > /dev/null >run.out 2>&1 &
For this example the call is:
mpirun -np 16 /home/user/Loci-Stream/bin/stream --scheduleoutput -q solution backstep > /dev/null >run.out 2>&1 &
The results from the Loci-Stream simulation of the backstep flow problem are compared to experimental data for the problem as well as simulation data from a different NASA CFD code(CFL3D). Four locations along the streamwise(horizontal) direction are sampled and data collected along the vertical direction.
A note about the data presented below, the left plot appears to not have data from Loci-Stream, but all data sets are presented. They overlap considerably in the velocity space(circle data points can be seen near the top of the plot). The discrepancy between CFL3D and Loci-Stream is somewhat more pronounced for the stress plot on the right.
The 'extract' utility is used to view the results of a simulation. For this case we view the simulation at the 10,000th time step. In the run directory extract the solution using: extract -vtk backstep 10000 P v . This will generate a solution directory with files in the Paraview VTK format which can be opened by Paraview. The case name is 'backstep' and the timestep is '10000', and the variables to extract are the pressure(P) and velocity(v).