Skip to content

Notes on noncircular inlets

Derek Groen edited this page Mar 4, 2016 · 3 revisions

The InletProcessing module in Tools/setuptool requires a number of other Python packages, namely: -fipy -gist -pysparse -ez_setup

Components needed for this project:

Tools/setuptool/InletProcessing

Code/lb/iolets/ (velocity-based iolets) Code/lb/streamers/LaddIoletDelegate.h (to put correct streaming from the inlet)

First test inlet dataset:

  • nhnn_4beats_ave (please check if the velocity plane locations are aligned on the main artery or whether they've been placed in a branch (this was the case in one of Aditya's debug data sets))

Chunk Graph for Arbitrarily shaped velocity inlets

This chunk graph lays out the pieces of work to be done for this. It can be modified at will as insights evolve. /italics/ means done, bold means blocked due to problems, normal text means ongoing or not yet started.

  1. create Tools/setuptool/InletProcessing/Run.py (done by Rupert)
  2. build an output writer for Tools/setuptool/InletProcessing/Run.py
  3. use Tools/setuptool/InletProcessing/Run.py to generate a weighted velocity profile (henceforth named 'WVP').

Integration with HemeLB

  1. Read in the WVP with a single process.
  2. As previous, but do it for relevant parts of the WVP for a single process.
  3. As previous, but do it for all IOlet processes.
  4. Convert the obtained weightings to sensible units for HemeLB.
  5. Trace down the global site coordinates to the coordinates locally on the process.
  6. Add the weight value to each of the iolet sites as a fixed variable (should be in the IOlet class, not the Lattice Site class, to prevent complexity infection)
  7. Impose velocities according to the weights in the inlets.

Testing

  1. Write unit tests for the new functionality.
  2. Test for correctness, using unit tests and visual analysis.
  3. Test for performance.

NOTES

Input format for noncircular inlet velocities

The input format is ASCII, two important fields are:

After "PointIds" comes a list of 3D global site coordinates in order, format X Y Z X Y Z X Y Z

(3 points on one line)

After "LOOKUP_TABLE default" comes a list of velocities in order vX vY vZ vX vY vZ vX vY vZ

Testing

I have a decent testing set at /home/derek/hemelb-shared/bifurcation-50um/

Complications for huge problem sizes

The fipy/hemelb code needs to be changed to behave well for huge inlets. The following should be changed in fipy for example (FILE: <base_dir>/solvers/trilinos/LinearLUSolver.py):


class LinearLUSolver(TrilinosSolver):

"""
The `LinearLUSolver` is an interface to the Amesos KLU solver in Trilinos.

"""

def __init__(self, tolerance=1e-10, iterations=10, precon=None, maxIterations=10):

Here, both iterations and maxIterations should be set to at least 50.

Clone this wiki locally