# UFO–CFD

Contents 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012

Introduction Input data file Input parameters Convergence Geometry STL file Check dead regions Serial/parallel solver Monitor convergence Paraview post-pro Development Example Cases

UFO–CFD
Introduction

https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012

The computational domain is defined by: the origin location, xm, ym, zm; the mesh cell size, sz; and the mesh array sizes, im, jm, km. This gives a uniform 3D cartesian mesh, which must enclose the STL geometry The boundaries of the flow domain can be labelled: xmin,xmax; ymin, ymax; and zmin, zmax.

The solver is written such that the xmin is the velocity inlet and xmax is the pressure outlet.
The ymin & ymax boundaries are symmetry planes, which can be changed to periodic boundaries by setting yper=1 in the input file, ufo-cfd.txt The zmin & zmax boundaries are set as symmetry planes. This means that the geometry has to lie within the domain, and should be oriented According to the domain boundaries.

UFO–CFD
Introduction

https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012

Once the STL geometry is positioned and oriented correctly within the domain, The user needs to specify a „LIVE‟ point location il, jl, kl (integers). This refers to the location in the mesh array, where the fluid zone exists. This is important because it will be used to distinguish between the solid and fluid regions.

When the solver is executed (run) it will mark all of the cells in the fluid zone, using a fill routine. There are 3 cells types after this has been done:
• CUT-CELLS are those cells intersected by the STL geometry • LIVE CELLS are those where the solver will be applied • DEAD CELLS are those (enclosed by STL geometry) After running the solver the VTK file is created, which may be loaded into Paraview. The STL file can be loaded into Paraview at same time as the VTK solution, Which allows the user to check the relative position of them both.

UFO–CFD
Introduction

https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012

After running the solver the VTK file is created, which may be loaded into Paraview. The array “cell_lcd” can be used to check that the fill operation has worked correctly As shown below there should be LIVE (red), DEAD (blue), and CUT (green) cells. If the LIVE cells have leaked through to the inside of the STL geometry, there may be hole in the STL file. Alternatively the user can increase the value „tdiv‟ which specifies the subdivisions of each STL triangle.

UFO–CFD
Introduction

https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012

NCELL=6000 This is essentially a 2D case - there is only 1 cell in the z-direction The domain cuts through the STL geometry at sphere midpoint, There is a „dead‟ mesh region inside the sphere geometry, and elsewhere the mesh is „live‟ - the cut-cells can be seen in green

NCELL=360000 This is a fully 3D case, and the mesh domain encases the sphere. This mesh is 100x60x60 cells. The origin is marked by green circle. Both cases (2D/3D) are easily specified within the input file, ufo-cfd.txt

com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 This shows the layout of the user input data file .google.txt https://sites.UFO–CFD Input data file: ufo-cfd.

ni2. ymin. laminar viscosity u.w. ymax etc) max number of STL tris number of STL tri sub-divisions (default = 8) toggle stl import display off / on (0 or 1) Rgas.ex2.com – August 2012 geometry STL filename size of background cells location of the mesh origin (x y z) size of the 3D mesh array (i j k) live cell location (i j k) number of expanding cells (at xmin. Cp.2) smoothing / averaging (default = 0.v.v.p initial flowfield values (whole domain) u. ymin.nk2 ex1.com/site/ufocfdsolver ufocfdsolver@gmail. ymax etc) mesh expansion factors (at xmin.p freestream ‘infinity’ values (at inlet / outlet) courant (cfl) number (default = 0.T.ez1.2) tangential surface velocity (on / off) ymin & ymax periodic boundary (on / off) total number of iterations screen output data write frequency (iterations) solution VTK file save frequency (iterations) .ez2 tmax tdiv tout rgas cp cv mul uini vini wini tini pini uinf vinf winf tinf pinf cfl avg tang yper nits nout nsav (char) (real) (real) (int) (int) (int) (real) (int) (int) (int) (real) (real) (real) (real) (real) (int) (int) (int) (int) (int) https://sites.nk1. xmax.ey2.UFO–CFD Input parameters geomfile sz xm ym zm im jm km il jl kl ni1.ey1.w.T. Cv.google.nj2. xmax.nj1.

txt) which control convergence: CFL: The CFL number should be in the approximate range 0.1 as default).1 to 0.UFO–CFD Convergence https://sites.1 or 0. and stabilises the solution. the solution will take a longer to converge AVG: The avg (smoothing) parameter should be in the range 0. But it is advisable to reduce this as much as possible to avoid excessive smoothing.com – August 2012 There are 2 parameters in the data file (ufo-cfd.com/site/ufocfdsolver ufocfdsolver@gmail. But if the CFL number is too small. to prevent oscillations in the solution.google.0 to 1.5 as default).5 (set to 0. . Reducing the CFL number reduces the time-step.2 would be preferable.0 (set 0. A value of 0.

google.stl https://sites.UFO–CFD Geometry STL file: ufo-geom.com – August 2012 .com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Check dead regions https://sites.com – August 2012 LIVE point location can be anywhere outside the geonetry .google.

txt • set OMP_NUM_THREADS=4 • echo %OMP_NUM_THREADS% • use task manager to monitor CPU • run ufo-cfd.google.UFO–CFD Running the solver • edit the input data file ufo-cfd.com – August 2012 • Note: pthreadGC2.exe until converged https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.dll must be in working directory .

google.txt into Excel file • plot the convergence data • direct gnuplot interface soon .txt • read output.com – August 2012 • ufo-cfd.UFO–CFD Monitor Convergence https://sites.exe > output.com/site/ufocfdsolver ufocfdsolver@gmail.

com – August 2012 Paraview AUTO ACCEPT Toggle Auto Accept ON Switch ON the Auto Accept option. .google. otherwise you have to press Apply after each operation.UFO–CFD https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com – August 2012 .google.UFO–CFD Paraview STL manipulation Start Paraview https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 Using File > Open .google.UFO–CFD Paraview STL manipulation Read STL file https://sites.

com – August 2012 Paraview STL manipulation Surface with edges To view the triangles of the STL file .google.com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD https://sites.

com – August 2012 You can translate / scale / rotate your STL file……BUT….UFO–CFD Paraview STL manipulation Transform https://sites. .google.com/site/ufocfdsolver ufocfdsolver@gmail.

UFO–CFD https://sites.google.com – August 2012 Paraview STL manipulation Extract Surface Filter …you must “Extract Surface” before you can SAVE your new STL file ! .com/site/ufocfdsolver ufocfdsolver@gmail.

google.com – August 2012 File Save Data. and select STL format .UFO–CFD Paraview STL manipulation File Save Data https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD https://sites.com – August 2012 Paraview STL manipulation Save ASCII format Choose a filename and then select ASCII… (for ufo-cfd solver) .google.

UFO–CFD Paraview Contour plots https://sites.com/site/ufocfdsolver ufocfdsolver@gmail. GREEN=cut-cells . BLUE=solid.google.com – August 2012 Read in the VTK file By default it shows the cell_lcd values RED=live.

com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Paraview Contour plots View mesh https://sites.google.com – August 2012 Select “surface with edges” to view the mesh .

com – August 2012 Select “velocity magnitude” to view the flow-field Press arrow button – to rescale the data range .UFO–CFD Paraview Contour plots View flow-field https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.

google.UFO–CFD Paraview Contour plots Slice option https://sites.com – August 2012 Select the slice glyph .com/site/ufocfdsolver ufocfdsolver@gmail.

UFO–CFD Paraview Contour plots Normal direction https://sites.com – August 2012 Change the Normal direction to Z=1 .google.com/site/ufocfdsolver ufocfdsolver@gmail.

UFO–CFD https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 Paraview Contour plots Show plane and orientation Deselect ”show plane” and reorient the view .google.

google.UFO–CFD https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 Paraview Velocity vectors Cell data to point data Starting from slice filter… Select cell data to point data .

UFO–CFD Paraview Velocity vectors Glyph https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.com – August 2012 Select glyph to view arrows .

com – August 2012 Change number of points .com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Paraview Velocity vectors Change number https://sites.google.

UFO–CFD Paraview Velocity vectors https://sites.com – August 2012 Vector options Change arrow to solid colour Select 2D glyph .google.com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.google.com – August 2012 Load VTK file Select Cell data to Point data Select the Clip icon/filter .UFO–CFD Paraview Streamlines Clip filter https://sites.

com/site/ufocfdsolver ufocfdsolver@gmail.google.UFO–CFD https://sites.com – August 2012 Paraview Streamlines Change clip origin location adjust the clip origin until you can see the whole domain .

com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 Select stream tracer icon/filter You will see just one or two lines .google.UFO–CFD Paraview Streamlines Stream tracer https://sites.

UFO–CFD Paraview Streamlines Line source https://sites.com – August 2012 In the options go down And select Line source .google.com/site/ufocfdsolver ufocfdsolver@gmail.

UFO–CFD Paraview Streamlines Line location https://sites.point1 & point2 And change stream colour to solid .google.com – August 2012 Change the line location .com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.google.UFO–CFD Paraview Streamlines https://sites.com – August 2012 Add slice background Set up a slice behind streamlines Change slice position (to behind) .

com/site/ufocfdsolver ufocfdsolver@gmail.google.com – August 2012 And finally… Adjust the number of streamlines And load in the STL file .UFO–CFD Paraview Streamlines Resolution https://sites.

com – August 2012 • Gnuplot interface for convergence • • • Validation Cases 64-bit compilation Large aero test-cases • • Parallelization (done) Mesh expansion (done) .com/site/ufocfdsolver ufocfdsolver@gmail.google.UFO–CFD Development Plan https://sites.

google.com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com – August 2012 .UFO–CFD Example Cases https://sites.google.com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 .google.UFO–CFD Example Cases https://sites.

com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.

google.com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Example Cases https://sites.com – August 2012 .

com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.

com/site/ufocfdsolver ufocfdsolver@gmail.com – August 2012 .UFO–CFD Example Cases https://sites.google.

com/site/ufocfdsolver ufocfdsolver@gmail.google.UFO–CFD Example Cases https://sites.com – August 2012 .

google.com – August 2012 .com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Example Cases https://sites.

UFO–CFD Example Cases https://sites.com – August 2012 .google.com/site/ufocfdsolver ufocfdsolver@gmail.

google.com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Example Cases https://sites.google.com – August 2012 .

UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.com – August 2012 .

com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Example Cases https://sites.com – August 2012 .google.

com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.google.

google.com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

google.com – August 2012 .UFO–CFD Example Cases https://sites.com/site/ufocfdsolver ufocfdsolver@gmail.

com – August 2012 .com/site/ufocfdsolver ufocfdsolver@gmail.google.UFO–CFD Example Cases https://sites.

com – August 2012 .com/site/ufocfdsolver ufocfdsolver@gmail.UFO–CFD Example Cases https://sites.google.

UFO–CFD Example Cases https://sites.com – August 2012 THE END .google.com/site/ufocfdsolver ufocfdsolver@gmail.

Sign up to vote on this title