|
TRUST 1.9.8
HPC thermohydraulic platform
|
As detailed in the Workflow guidelines, if you want your new and amazing developments in TRUST to be integrated, you need to create an associated validation form. The preferred way to build a validation form in TRUST and its BALTIKs is to write a Jupyter notebook.
You can find an example notebook at: $TRUST_ROOT/Validation/Rapports_automatiques/Verification/SampleFormJupyter or run on terminal:
This tutorial will help you get started with the validation form so that you can create detailed ones for your own developments.
First, copy the validation form named Source_canal_perio:
The command to launch your validation form is Run_fiche, you can see the command options with:
One useful option is:
which creates a PDF in the build directory that replicates the results of your validation form.
Now, we are going to modify the validation form. Launch it using:
First, let's add the mesh plot to the report. To do so, add a new Markdown cell at the end of the notebook:
and the following:
You can also add the evolution of residuals to the report in log scale. Create a new Jupyter text cell and write:
Then, in another cell, plot the residuals using:
In order to visualize the pressure field of the last time step, complete the section Additional information with a new cell:
Then try to find how to display that field by referring to the SampleFormJupyter available with Run_fiche -doc
Now, you will extract the number of cells and the simulation final time from the three .err files and write them in .dat files.
The extraction script, called extraction.sh, is already available in the src directory of this validation form, you can examine it there.
To use it from your validation form, use executeScript from the run module of trustutils (see SampleFormJupyter for help).
Add a table to display the results of .dat files, complete the chapter Additional information by creating new cells.
Now, we are going to add a fourth test case: debit4 which corresponds to the std test case with zero initial velocity and imposed flow rate to \(2 m^3 \cdot s ^{-1}\) on periox boundary.
Add the test case using substitute and addCase
Then, re-run the form from the beginning by clicking on the icon corresponding to the restart of the Jupyter kernel and running the whole notebook.
Finally, build the PDF report with: