-
Notifications
You must be signed in to change notification settings - Fork 12
LaminarFlowSolver
This lives in source:Tools/setuptool/InletProcessing
The entry point is source:Tools/setuptool/InletProcessing/Run.py. As in:
python -m [[InletProcessing]].Run path/to/profile.pro
As in the docstring, this script will "Process all the Inlets specified by profileFile, solving the Navier- Stokes equations for steady flow down an infinite channel with the cross section of the inlet. Writes the point ID and the fluid velocity at that point, the velocity being such that the integral of the flow across the channel is unity.
Currently output is written as vtk[[PolyData]] to files like
"$GEOMETRYFILEBASENAME.inlet$ID.vtp""
The [[GeometryInletPointFinder]]
is a "Class to find all the INLET points contained within a geometry file
(.gmy). Data is returned as a vtkPolyData, with the 3D index of the points
supplied as CellData in an array named "PointsIds".
It's based on the hemeTools.parsers.geometry classes."
The [[SurfaceIntersectionFinder]]
"Contains a VTK pipeline to find the intersection of a Iolet plane with
the contents of an STL file, and return this data in SI units.
Pipeline is:
[[FileUnitLength]] ----------------> vtkTransform ------------------------
\
[[FileName]] -> vtkSTLReader -> vtkCutter -> vtk[[PolyDataConnectivityFilter]] -> vtk[[TransformPolyDataFilter]]
/ /
Iolet -----> vtkPlane - /
\-------- Centre ---------
The output of the filter is a vtkPolyData describing the closed loop around the tube.
The script iterates over all the inlets in the profile.
It creates a Tesselator
which is an "Object to transform the iolet sites and edge to the X-Y plane and
tesselate the interior with a triangular mesh.
Pipeline is:
Edge ---------------------------------------------------
\ \
Sites--> vtk[[AppendPolyData]] -> vtk[[TransformPolyDataFilter]] -> vtkDelaunay2D
/
/
Iolet -> vtkTransform-/
This has its inputs (EdgeConnection, SitesConnection, and Inlet) set and the output is sent to the PoiseuilleSolver. The tessellation uses those lattice points that have one or more inlet links, projected into the inlet's plane to form the mesh.
This "Solve[s] the boundary value problem, such that the volume flux (i.e.
the integral of the velocity across the inlet surface) is one." It uses the FiPy finite volume library to solve the NS equations assuming laminar flow, i.e. \partial_t v_i 0
, which is just a Poisson equation. The answer is normalised to give unit flux.
The solution is interpolated to point data and written to a VTP file.