.h and .cpp files in include and src - TU-DSE2/Wing-Design-Tool GitHub Wiki
All of the header and definition files used in the code are included under the /include and /src path respectively. Names of certain declarations, definitions, or functions are such that their purposes logically deduced.
- CustomProfile.h and .cpp
- ExactBdry.h and .cpp
- GridBdry.h and .cpp
- Profile.h and .cpp
- Rod.h and .cpp
- Cylinder.h and .cpp
- SolverParameters.h and .cpp
- DiffOps.h
- Func.h
- Interpolate.h
- PoissonSolver.h
- ViscousWallVorticityFlux.h
1. CustomProfile.h and .cpp
Allows for the use of custom profiles in the tool, declares and defines a constructor, open_file, rotatecoods, scalecoods, createoriginalnormals, pnpoly, ExactBoundary, CreateGridBndryCube, scalecoodsdown, CreateGridBndry, FindOmega, and a destructor function
2. ExactBdry.h and .cpp
Class object which holds the exact locations of the points of the test piece. Interpolates points from a Cartesian grid onto exact boundary points. As input it receives a matrix containing loc (the point coordinates in an float matrix of M x 2), ds (the associated boundary arc length in a matrix of M x 1), and n (the unit normal vector in a matrix of M x 2). Computed is the unit tangent vector, the basis fns for bi-linear interpolation from the grid to the exact boundary as a 4 x M matrix, locx and locy (the "bottom left" grid point of a cell containing an exact point as two M x 1 matrices), and loco (the offset within each cell as a M x 2 matrix). Functions defined are a constructor, npoints, interp, interp_tangent, interp_normal, local_coords, and destructor.
3. GridBdry.h and .cpp
Class object which holds the grid based locations of the points of the test piece. Defined are a constructor, setPoints, setGamma, setN, setOmegaI, npoints, and interp_normal functions.
4. Profile.h and .cpp
Creates profile class for the purpose of returning GridBdry or ExactBdry objects. Functions defined are getGridBdry and getExactBdry.
5. Rod.h and .cpp
Places a standard rod cross section in the flow visualizer. Functions defined are a constructor, getGridBdry, getExacyBdry, and setSize
6. Cylinder.h and .cpp
Places a standard cylinder cross section shape in the flow visualizer. Defineds a constructor and setSize function.
7. SolverParameters.h and .cpp
The parameters which define the solver, conveniently located in one location.
8. DiffOps.h
All necessary differential operators included as functions: laplace, grad, curl, curl2, grad_bdry. The laplace function is the Laplace operator with Neumann boundary conditions. The curl function finds the curl of a vector which results in a scalar value. The curl2 function finds the curl of a scalar which results in a vector. The grad_bdry function is the gradient boundary of the vector field where dphi is replaced at the internal boundary with a 1-sided difference, on the outside of the body.
9. Func.h
Does some really jazzy stuff
10. Interpolate.h
Interpolation of data points for which is defined one function named interpolate_M4. Used in the vortex remeshing step to evaluate the vorticity at the grid-nodes given the nearby vorticity strength and respective coordinate offset. Important assumption is that the points are displaced by less than one unit of mesh spacing in each direction. It may be interesting to relax this condition to allow for bigger steps before computing the basis functions.
11. PoissonSolver.h
Solver for the Poisson PDE. Functions defined for that purpose are PoissonMat for the creation of a spare Poisson matrix and pSolve for solving the actual differential equation.
12. ViscousWallVorticityFlux.h
Viscosity implementation and zero flow on walls