13.5.5. Macro “sensitivityRBDFunctionFlowrate.C

13.5.5.1. Objective

The objective of this macro is to perform a RBD sensitivity analysis on a set of eight parameters used in the flowrateModel model described in Presentation of the problem.

13.5.5.2. Macro Uranie

void sensitivityRBDFunctionFlowrate(const string& figure="figure.png", const string& style="", 
    const string& filename="", const string& treename="", int seed=0)
{
    gROOT->LoadMacro("UserFunctions.C");
          
    // Define the DataServer
    TDataServer *tds = new TDataServer("tdsflowrate", "DataBase flowrate");
    tds->addAttribute( new TUniformDistribution("rw", 0.05, 0.15));
    tds->addAttribute( new TUniformDistribution("r", 100.0, 50000.0));
    tds->addAttribute( new TUniformDistribution("tu", 63070.0, 115600.0));
    tds->addAttribute( new TUniformDistribution("tl", 63.1, 116.0));
    tds->addAttribute( new TUniformDistribution("hu", 990.0, 1110.0));
    tds->addAttribute( new TUniformDistribution("hl", 700.0, 820.0));
    tds->addAttribute( new TUniformDistribution("l", 1120.0, 1680.0));
    tds->addAttribute( new TUniformDistribution("kw", 9855.0, 12045.0));
      
    // \param Size of a sampling.
    Int_t nS = 4000;
    // Graph
    TRBD * trbd = new TRBD(tds, "flowrateModel", nS);
    trbd->setDrawProgressBar(kFALSE);
    trbd->computeIndexes("graph");

    trbd->getResultTuple()->Scan("Out:Inp:Order:Method:Value","Algo==\"--first--\"");
}

The function flowrateModel is loaded from the macro UserFunctions.C (the file can be found in ${URANIESYS}/share/uranie/macros)

    gROOT->LoadMacro("UserFunctions.C");

Each parameter is related to the TDataServer as a TAttribute and obeys an uniform law on specific interval

    TDataServer *tds = new TDataServer("tdsflowrate", "DataBase flowrate");
    tds->addAttribute( new TUniformDistribution("rw", 0.05, 0.15));
    tds->addAttribute( new TUniformDistribution("r", 100.0, 50000.0));
    tds->addAttribute( new TUniformDistribution("tu", 63070.0, 115600.0));
    tds->addAttribute( new TUniformDistribution("tl", 63.1, 116.0));
    tds->addAttribute( new TUniformDistribution("hu", 990.0, 1110.0));
    tds->addAttribute( new TUniformDistribution("hl", 700.0, 820.0));
    tds->addAttribute( new TUniformDistribution("l", 1120.0, 1680.0));
    tds->addAttribute( new TUniformDistribution("kw", 9855.0, 12045.0));

To instantiate the TRBD object, one uses the TDataServer, the name of the function and the number of samplings needed to perform sensitivity analysis (here \(n_S\) =4000):

    TRBD * trbd = new TRBD(tds, "flowrateModel", nS);

Computation of sensitivity indexes:

    trbd->computeIndexes("graph");

13.5.5.3. Graph

../../_images/sensitivityRBDFunctionFlowrate.png

Figure 13.21 Graph of the macro “sensitivityRBDFunctionFlowrate.C”

13.5.5.4. Console

--- Uranie v4.11/0 --- Developed with ROOT (6.36.06)
                      Copyright (C) 2013-2026 CEA/DES 
                      Contact: support-uranie@cea.fr 
                      Date: Thu Feb 12, 2026

 <URANIE::WARNING> 
 <URANIE::WARNING> *** URANIE WARNING ***
 <URANIE::WARNING> *** File[${SOURCEDIR}/dataSERVER/souRCE/TDataServer.cxx] Line[8531]
 <URANIE::WARNING> TDataServer::getTuple Error : There is no tree!
 <URANIE::WARNING> *** END of URANIE WARNING ***
 <URANIE::WARNING> 
 <URANIE::WARNING> 
 <URANIE::WARNING> *** URANIE WARNING ***
 <URANIE::WARNING> *** File[${SOURCEDIR}/dataSERVER/souRCE/TDataServer.cxx] Line[8531]
 <URANIE::WARNING> TDataServer::getTuple Error : There is no tree!
 <URANIE::WARNING> *** END of URANIE WARNING ***
 <URANIE::WARNING> 
 <URANIE::INFO> 
 <URANIE::INFO> *** URANIE INFORMATION ***
 <URANIE::INFO> *** File[${SOURCEDIR}/meTIER/sampler/souRCE/TSpaceFilling.cxx] Line[167]
 <URANIE::INFO> TSamplerStochastic::init: the TDS [tdsflowrate] contains data: we need to empty it ! 
 <URANIE::INFO> *** END of URANIE INFORMATION ***
 <URANIE::INFO> 
************************************************************************
*    Row   *       Out *       Inp *     Order *    Method *     Value *
************************************************************************
*        0 * flowrateM *        rw *     First *       RBD * 0.7558010 *
*        2 * flowrateM *         r *     First *       RBD * 0.0026080 *
*        4 * flowrateM *        tu *     First *       RBD * 0.0035324 *
*        6 * flowrateM *        tl *     First *       RBD * 0.0032848 *
*        8 * flowrateM *        hu *     First *       RBD * 0.0408758 *
*       10 * flowrateM *        hl *     First *       RBD * 0.0469345 *
*       12 * flowrateM *         l *     First *       RBD * 0.0347870 *
*       14 * flowrateM *        kw *     First *       RBD * 0.0165843 *
************************************************************************
==> 8 selected entries