The Problem.
This case study simulates a separated, transonic diffuser
flow. The results can be compared to experimental data
presented the AIAA paper 81-1197, J.T. Salmon. T.J. Bogar,
and M. Sajben, Laser Velocimeter Measurements in Unsteady,
Separated, Transonic Diffuser Flows.", AIAA paper 81-1197,
1981. The diffuser geometry is shown below. We
generate a structured mesh and apply an internal turbulent
flow solver to compute the location and strength of the
shock and the region of separation.
We store the computed values for velocity
in the x and y directions, pressure, temperature and
density.
PDELab simplifies the process of using the CFD solver by providing
Step 1:When PDELab top level window appears,
select 2-D and
FEM
and click on
New File.
The PDELab 2-D Finite Element Method Session appears.
The Session toolkit is to the right of the Session window.
Step 2: Click on the Framework Editor in the Session toolkit.
Step 3: Choose PELLPACK from the Framework menu and
CFD Template from the Equation Form menu.
The Framework Editor allows users to select the framework and form of the
equation for defining the problem.
In this case, selecting the CFD template tells the symbolic processor that the
internal turbulent gas flow model will be solved, and the user should provide
the parameter values describing the equations (such as heat capacity, streamwise and
crosswise smoothing, ratio, etc) and boundary conditions (such as inflow and outflow
pressure, inflow temperature, wall thickness, etc). Selecting the CFD template
also determines what code will be generated automatically by GenCray to
define the problem for the PELLPACK-CFD interface.
Click on PDE System and
enter the two parameter values in the PDE System editor as shown here.
Click on Done when finished.
While the domain for the
CFD model is arbitrary, a structured grid will be imposed. This implies that the
number of (mapped) boundary pieces is 4. This value appears in the Number of Boundary
Pieces text field and cannot be modified.
Now click on Boundary Conditions and enter the parameters
associated with the boundary conditions for this model.
Step 4: The template values have been specified, so click on Generate Framework. The Maxima symbolic processor is accessed to check for errors, and the GenCray code generator generates the appropriate PDELab problem specification. Any input errors are printed out in the Maxima window of the Framework Editor.
Step 5: When the input has been successfully processed, select Quit from the File menu. The PDELab language program appears in the Session window. The generated program is shown below. The equation segment lists the cfd model for the equation specification and the boundary segment uses a default cfd domain specification. The PDELab triple lists the cfd-turbulent model solver with the user-specified parameters and standard default values for output data.
PDELab language `.e' file
options.
cfd
equation.
cfd
boundary.
inflow on x=0, y=t for t=0.0 to 1.0
wall on x=t, y=1 for t=0.0 to 1.0
outflow on x=1, y=1-t for t=0.0 to 1.0
wall on x=1-t, y=0 for t=0.0 to 1.0
triple.
cfd-turbulent model &
(dispfile='cfd.disp', neutraloutfile='cfd.ntl', pellpackoutfile='cfd.out',&
dispflag=.true., neutralflag=.true., pellpackflag=.true., &
cv=717.5, ga=1.4, smoothx=0.02, smoothy=0.02, mgsizex = 3, mgsizey = 3, &
feedback = 100.0, relax = 0.05, timestep = 0.50, maxtsteps = -1, &
p1 = 88377.1, p2 = 73562.4, po1 = 102170.0, to = 300.0, alpha = 0.0, &
hd = 0.0, hu = 0.0, inmach = 0.0)
end.
END.
Step 13: We are now ready to enter the ExecuteTool environment, where the
PDELab language program will be processed. A fortran main program will be generated
from the .e file. It will be compiled and linked with the PDELab module libraries and
the standard PDELab I/O libraries. Click on the
ExecuteTool button in the Session toolkit.
Step 14: The PDELab .e file is loaded
automatically.
Click on the Run button
The trace of the process for compiling and linking the PDELab executable appears
in the trace window. When the compiling and
linking process is complete, the executable program is run and the solution and
trance files are generated and placed in your user directory.
Click on Quit to exit the ExecuteTool.
Step 17:
The solution output has been generated during execution.
You should find the output file containing the stored data in the
location specified by the outputfile parameters of the
cfd-turbulent model
solver specification (neutraloutfile and dispfile parameters).
If no path was specified,
these files are located in the execution directory.
The neutral file (copyright PATRAN) contains the output mesh definition in neutral format,
and the disp file contains the computed values for the solution components:
the x velocity, y velocity, the
density, pressure, and temperature.
Click on the OutputTool in the Session toolkit.
Select Neutral Mesh & Component in the File menu.
Select the output files that were generated by your program when the OutputTool requests
the file names. The Select Solution Box is displayed after the two files are loaded.
The selection box contains a list of the computed components.

Step 18: Select x-velocity and y-velocity from the Select Solution Box. Then choose the Flow2D visualization package and press Run Tool. The magnitude and direction of the velocity vectors is shown on the left in the image above. You can see the location and strength of the shock as it moves through the diffuser. Select Quit to exit Flow2D. Return to the OutputTool and from the Solutions Selection Panel under Solutions in the menu bar, de-select the selected components and select pressure. Now choose the Contour2D visualization package and press Run Tool. The pressure is displayed as in the image above on the right labeled pressure. In the same manner, use Contour2D to visualize the remaining components of the computed solutions.