Post Processing¶
Simulation Output¶
Below is a sample of the output log, histor.dat
:
1  0.000E+00  1.834E+01  (  0)  8.209E+01  4.917E+25  <  173 9  12> [  0  0] 
1  1.000E+00  1.342E+01  (  1)  2.997E01  5.017E02  <  26910  13> [  0  0] 
1  1.000E+00  5.032E+00  (  5)  1.416E01  1.922E01  <  27010  12> [  0  0] 
1  1.000E+00  3.139E+00  (  7)  3.029E02  5.698E03  <  26910  12> [  0  0] 
1  1.000E+00  1.636E+00  (  10)  2.997E02  3.644E02  <  27010  11> [  0  0] 
2  1.000E+00  1.024E+02  (  7)  3.599E01  1.125E01  <  26910  11> [  0  0] 
2  1.000E+00  1.540E+01  (  0)  4.275E02  5.029E04  <  11310  10> [  0  0] 
2  1.000E+00  6.642E+00  (  4)  6.714E02  1.697E01  <  51410  9> [  0  0] 
2  1.000E+00  3.870E+00  (  6)  1.070E02  2.346E04  <  26910  12> [  0  0] 
2  1.000E+00  1.946E+00  (  9)  1.418E02  2.712E03  <  27010  12> [  0  0] 
3  1.000E+00  1.186E+02  (  8)  1.201E01  6.028E02  <  26910  12> [  0  0] 
3  1.000E+00  1.094E+01  (  2)  1.863E01  3.961E01  <  173 9  11> [  0  0] 
3  1.000E+00  9.879E+00  (  2)  1.234E02  8.488E05  <  26910  13> [  0  0] 
3  1.000E+00  5.180E+00  (  5)  5.644E02  3.730E02  <  10 6  12> [  0  0] 
3  1.000E+00  2.757E+00  (  8)  1.851E02  3.964E03  <  401 6  10> [  0  0] 
4  1.000E+00  1.630E+02  (  9)  1.106E01  4.384E02  <  26910  12> [  0  0] 
4  1.000E+00  1.482E+01  (  0)  1.591E01  3.043E01  <  371 6  10> [  0  0] 
4  1.000E+00  1.209E+01  (  1)  1.232E02  8.112E05  <  26910  13> [  0  0] 
4  1.000E+00  6.494E+00  (  4)  2.323E02  3.934E03  <  48810  13> [  0  0] 
4  1.000E+00  3.595E+00  (  7)  3.799E02  3.346E02  <  48810  11> [  0  0] 
The solver output consists of multiple columns, however the most important are the first 4 columns which we describe in detail now.
In the first column is the current time step. Note that each time step appears multiple times as within each step the blood flow equations are solved multiple times, increasing the accuracy of the numerical solution before proceeding to the next step. The values in this column begin at 1 and end at the total number of time steps defined for our problem, here set to 1100.
In the second column is the elapsed simulation time in seconds.
In the third column is the nonlinear residual. This value is a measure of the quality of the current solution. This number indicates how accurate the current solution is, with lower values indicating an improved solution. Within each time step, the value of the residual decreases, indicating the solution is improving.
In the fourth column is the logarithmic value of the current residual compared to the initial residual at the start of the simulation. This number provides a measure of the current residual relative to the initial starting point. The lower the negative number, the more accurate the solution is relative to its initial starting point.
Simulation Analysis¶
The solver will create a folder called nprocscase
(where n is the number of processors). To postprocess the results, navigate to the nprocscase
folder in the desired simulation.
The executables described below (postsolver
and multipostsolver
) can be found in the CRIMSON flowsolver install files, cd to this directory or add it to your PATH
:
cd 'C:/Program Files/CRIMSON XXXX.XX.XX/bin/Python/lib/sitepackages/CRIMSONSolver/SolverStudies/flowsolver'
First, we can generate the ybar (error) file:
postsolver sn <last step> td ph ybar
then to combine the restart files:
multipostsolver <first step> <last step> <increment> <foldername>`
This command retrieves the results every N steps. So if you had 1000 steps and set N to 100, you would have the results from every 100 steps (100,200,300... etc.)
Once this is finished you should have a folder
restarts<foldername><first step><last step><increment>
(a directory up) containing the simulation results. This will have all files you need to postprocess and visualize your results.
The residuals can be plotted using a Matlab script plotResidual()
using the histor.dat file. Mass conservation can be verified by inspecting FlowHist.dat
, and pressure can be confirmed to be in the appropriate range by looking at PressHist.dat
.
Some postprocessing can be done on Conflux using gnuplot
. To plot the reisduals run the following command from the nprocscase
folder:
writeresiduals.gpi histor.dat
These can then be plotted using gnuplot
. Type gnuplot
in the command line to enter the program and then enter the following lines depending on your desired output:
Type exit
to leave the gnuplot
environment.
Notes:

Always copy
myjob
andmultidomain.dat
(what is this??) from home to folder with simulation files 
In
solver.inp
put experimental on 3 lines before RCR 
For steady flow use
bct_steady.dat
and renamebct.dat

Check for convergence with
tail f 80procscase/histor.dat