Ufo CFD
Ufo CFD
Introduction Input data file Input parameters Convergence Geometry STL file Check dead regions Serial/parallel solver Monitor convergence Paraview post-pro Development Example Cases
UFOCFD
Introduction
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.
UFOCFD
Introduction
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.
UFOCFD
Introduction
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.
UFOCFD
Introduction
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
UFOCFD
Input data file: ufo-cfd.txt
UFOCFD
Input parameters
geomfile sz xm ym zm im jm km il jl kl ni1,ni2,nj1,nj2,nk1,nk2 ex1,ex2,ey1,ey2,ez1,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)
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, xmax, ymin, ymax etc) mesh expansion factors (at xmin, xmax, ymin, 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, Cp, Cv, laminar viscosity u,v,w,T,p initial flowfield values (whole domain) u,v,w,T,p freestream infinity values (at inlet / outlet) courant (cfl) number (default = 0.2) smoothing / averaging (default = 0.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)
UFOCFD
Convergence
There are 2 parameters in the data file (ufo-cfd.txt) which control convergence:
CFL: The CFL number should be in the approximate range 0.0 to 1.0 (set 0.5 as default). Reducing the CFL number reduces the time-step, and stabilises the solution, But if the CFL number is too small, the solution will take a longer to converge
AVG: The avg (smoothing) parameter should be in the range 0.1 to 0.5 (set to 0.1 as default). But it is advisable to reduce this as much as possible to avoid excessive smoothing. A value of 0.1 or 0.2 would be preferable, to prevent oscillations in the solution.
UFOCFD
Geometry STL file: ufo-geom.stl
UFOCFD
Check dead regions
UFOCFD
Running the solver edit the input data file ufo-cfd.txt set OMP_NUM_THREADS=4 echo %OMP_NUM_THREADS% use task manager to monitor CPU run ufo-cfd.exe until converged
UFOCFD
Monitor Convergence
ufo-cfd.exe > output.txt read output.txt into Excel file plot the convergence data direct gnuplot interface soon
UFOCFD
Switch ON the Auto Accept option, otherwise you have to press Apply after each operation.
UFOCFD
Paraview STL manipulation Start Paraview
UFOCFD
Paraview STL manipulation Read STL file
UFOCFD
UFOCFD
Paraview STL manipulation Transform
UFOCFD
you must Extract Surface before you can SAVE your new STL file !
UFOCFD
Paraview STL manipulation File Save Data
UFOCFD
UFOCFD
Paraview Contour plots
UFOCFD
Paraview Contour plots View mesh
UFOCFD
Paraview Contour plots View flow-field
Select velocity magnitude to view the flow-field Press arrow button to rescale the data range
UFOCFD
Paraview Contour plots Slice option
UFOCFD
Paraview Contour plots Normal direction
UFOCFD
UFOCFD
UFOCFD
Paraview Velocity vectors Glyph
UFOCFD
Paraview Velocity vectors Change number
UFOCFD
Paraview Velocity vectors
Vector options
UFOCFD
Paraview Streamlines Clip filter
Load VTK file Select Cell data to Point data Select the Clip icon/filter
UFOCFD
adjust the clip origin until you can see the whole domain
UFOCFD
Paraview Streamlines Stream tracer
Select stream tracer icon/filter You will see just one or two lines
UFOCFD
Paraview Streamlines Line source
UFOCFD
Paraview Streamlines Line location
Change the line location - point1 & point2 And change stream colour to solid
UFOCFD
Paraview Streamlines
UFOCFD
Paraview Streamlines Resolution
And finally Adjust the number of streamlines And load in the STL file
UFOCFD
Development Plan
Validation Cases
64-bit compilation Large aero test-cases
Parallelization (done)
Mesh expansion (done)
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
UFOCFD
Example Cases
THE END