# 6.3. Reading the Chaparral log file

When enclosure radiation is defined and set up in the input file, an external library called Chaparral is utilized. Chaparral output is sent to a separate log file from the main Aria log file (usually named with `.chap.log`). Chaparral will output useful information regarding the viewfactor calculation, matrix smoothing, and the radiosity solver. Each section below will describe the output one may expect from Chaparral.

## 6.3.1. Instantiation

This output only occurs at the very start of the Chaparral output, but can help a user remember the number of processors used and the number of enclosures in the model:

    ******************************************************************
      C H A P A R R A L  --  Version 3.3.1 development  --  unreleased
    ******************************************************************

    Initializing for:
        number of processors  = 1
        number of enclosures  = 1
        max number of patches = 1000

## 6.3.2. Viewfactor Calculation

At the beginning of the viewfactor calculation, a banner will be displayed which shows the current simulation step and time, which is useful in correlating the Chaparral output to Aria output, as well as an estimate of the rowsum for each enclosure:

    ******************************************************************
    C O M P U T E    V I E W F A C T O R S
    Step = 214   Time = 2425.53
    ******************************************************************

    ******************************************************************
    V I E W F A C T O R    C A L C U L A T I O N
    ******************************************************************

    Calculating viewfactors for enclosure <space>
      enclosure geometry:    axisymmetric
      enclosure type:        partial (area=100), blocking
      # of rotations:        16
      # of patches:          62
      # of facets:           976
      # of nodes:            63
      spatial tolerance:     1e-06
      BSP target max depth:  10
      BSP target min length: 50
      BSP Tree num leafs:    28
      BSP Tree max depth:    5
      BSP Tree min length:   27
      BSP Tree max length:   45
      output level:          2

    Data segment memory size = 0.00Mb

    Calling VF_Hemicube()...
      resolution       = 400
      max subdivisions = 4
      min separation   = 5

    Minimum Partial Enclosure Area = 0.151296

      Minimum effective surface radius    = 0.00916667
      Minimum separation distance         = 0.00558985
      Maximum desired surface subdivision = 9, 46
      Actual maximum surface subdivision  = 4

    Data segment memory size = 0.00Mb

    Elapsed time = 3.92

While some of this output is merely a summary of user-specified or default tolerances, some information is useful during the simulation or for debugging. First, the user-defined name of the enclosure is shown in `< >` brackets (i.e., `space`). The number of facets and nodes that participate in the enclosure can also be useful in determining if the enclosure is complete in some instances. Last, if one is specifying a partial enclosure, then the `Minimum Partial Enclosure Area` is useful in correct specification of the corresponding parameter in the input file.

For simulations in which the enclosure does not change through time, the viewfactor calculation and corresponding text output will only appear once per enclosure after instantiation.

## 6.3.3. Viewfactor Smoothing

If viewfactor smoothing is specified, information about this step is also output. An example is shown below:

    ******************************************************************
    V I E W F A C T O R    M A T R I X    S M O O T H I N G
    ******************************************************************

    Smoothing of viewfactor matrix for enclosure <space>
      PCG Solver, wt = 2.0
      Max iterations = 500
      Tolerance      = 1e-07

      Enforcing reciprocity by addition...
        Nonzero lower triangular entries = 688 changed to 688
        Nonzero upper triangular entries = 687 changed to 688
        Elapsed time                     = 0.00
      Number of passes     = 1
      Number of iterations = 26
      Elapsed time         = 0.00

Again, the enclosure name is denoted within the `< >` brackets, with another summary of defined values. This section is useful for debugging problematic enclosures, since viewfactor smoothing can fail when the enclosure is ill-defined.

## 6.3.4. Viewfactor Summary

Once the viewfactors have been computed and smoothing has been applied, Chaparral will output the summary of how well the operations have done. This is shown in the `Viewfactor Matrix Summary`:

    ******************************************************************
    V I E W F A C T O R    M A T R I X    S U M M A R Y
    ******************************************************************

    Viewfactor matrix summary for enclosure <space>

    Target rowsum                  = 62
    Raw rowsum total               = 62.000000
    Raw rowsum error min           = -1.1479e-07
    Raw rowsum error max           =  1.1025e-07
    Raw rowsum error mean          =  4.9383e-09 +/- 4.9314e-08
    Smoothed rowsum total          = 62.000000
    Smoothed rowsum error min      = -7.0897e-08
    Smoothed rowsum error max      =  5.9255e-08
    Smoothed rowsum error mean     =  2.8875e-10 +/- 2.7300e-14

    Viewfactor matrix is 36.19% dense

    Total elapsed time = 3.93 (sec)
      (Initialization) = 0.01
      (Calculation)    = 3.92
      (Smoothing)      = 0.00

    Data segment memory size  = 0.00Mb

Here one can see that for the `space` enclosure, the computed rowsum closely matched the target rowsum, with and without smoothing. If one is also concerned about timing, an itemized timing summary is given for the viewfactor matrix setup. This is probably the most useful section to look at if one is concerned about issues with certain enclosures, as well as judging the cost and usefulness of viewfactor smoothing.

## 6.3.5. Radiosity Solution

After the viewfactor matrix has been populated, Chaparral will use this to compute the radiosity matrix. Output for one iteration of the radiosity matrix solver is shown below:

    ******************************************************************
    R A D I O S I T Y    S O L V E S
    Step = 214   Time = 2425.53 Time_Step = 6.18025 Iteration = 1
    ******************************************************************

    ********************************************************************
    R A D I O S I T Y    M A T R I X    S O L V E R
    ********************************************************************

    Solving radiosity equations with GMRES for enclosureID <space>

    Initial residual = 1.553372e+03    tol = 2.000000e-07
        iter:    0   residual = 1.553372e+03
        iter:    1   residual = 2.657621e+04
        iter:    2   residual = 6.553812e+03
        iter:    3   residual = 1.226445e+03
        iter:    4   residual = 3.526103e+02
        iter:    5   residual = 8.437261e+01
        iter:    6   residual = 3.212877e+01
        iter:    7   residual = 8.262992e+00
        iter:    8   residual = 2.397060e+00
        iter:    9   residual = 3.692025e-01
        iter:   10   residual = 1.010501e-01
        iter:   11   residual = 3.528043e-02
        iter:   12   residual = 6.867475e-03
        iter:   13   residual = 1.206750e-03
        iter:   14   residual = 9.768426e-05
        iter:   15   residual = 1.063625e-05
        iter:   16   residual = 1.902986e-06
        iter:   17   residual = 3.433117e-07
        iter:   18   residual = 9.218341e-08

        Real residual is  1.48685e-09
    Computing final fluxes

    Total iterations:    18
    Total elapsed time:  0.00 (sec.)
      GMRES setup time:  0.00 (sec.)
      GMRES solve time:  0.00 (sec.)
    Residual L2 norm:    1.48685e-09
    Flux Integration:    -0.219045
    Minimum Emissivity:  0.3
    Maximum Emissivity:  1
    Minimum Temperature: 443.752, Element: 778
    Maximum Temperature: 1200, Element: 415

This output is somewhat similar to the Aria run-time output, in that the linear iteration count is given along with the linear residual, though the Chaparral output is more detailed, as it gives the linear residual at each linear step instead of a summary. Minimum and maximum values of emissivity and temperature in the enclosure can also help in understanding the behavior of the radiosity solve through time.