Previous Topic   Next Topic   Contents   Features

Color Contours in Sabrina


Color "contour" plots, where a region is colored according to the value of some quantity in a predictable manner, aid interpretation and understanding and impress the boss and potential sponsors. Sabrina gives the capability to show color contours in together with the 3-dimensional geometry. How to display the color coding together with the geometry is highly problem-dependent and requires some imagination; we cannot provide an automatic solution as for a slice through a model where data exists on a grid.

The approach we have used with Sabrina is to define a color-coding scheme that is given to Sabrina as a color map (QPALET INITIALIZE), retrieve a value for each cell (such as a flux calculated by MCNP), assign a color based on that value, and set the color of the cell accordingly. We use a FORTRAN program that prepares a Sabrina input file with the above elements. In addition to preparing the geometry model with appropriate views, cutter bodies, etc., the user must prepare a list of cells to color code and devise a method for assigning a value to each of those cells. We omit most variable declarations. Some Sabrina commands include problem-specific data such as cell and material numbers.

The examples directory contains the source file contour.f. To emphasize that user code must be added to obtain a useable program, the file will not compile as distributed.