How do I establish a connection between UQLab and my simulation code?

How Do I Establish a Connection Between UQLab and My Simulation Code?

As of V1.1, UQLab is shipped with the UQLink module, a universal code wrapper that allows you to define a computational model in UQLab involving a third-party software or code using templates and a mark-up system.

To wrap your own simulation code within UQLab, you need to do the following:

  • Create a template file based on the text-based input file of your simulation code and in which some markers are set. During an analysis, UQLab will generate input files of your simulation code by replacing the markers in the template with the actual values (e.g., realizations of the input random vector, points in the experimental design, etc.) and execute your simulation code with the generated input files;
  • Create a parser function in MATLAB that reads the text-based output file of your simulation code and extract the relevant quantities of interest for further analysis by UQLab;
  • Configure UQLink properly by defining the names of your template file, parser function, and executable of your simulation code.

After the wrapper has been configured, the corresponding computational model can be seamlessly used with any techniques available in other UQLab Modules to create complex analyses in no time.

To learn more about UQLink, read its User Manual and check out the relevant examples (including the couplings of UQLab with C/C++ executable, Abaqus and OpenSees) available on the UQLab website.

Back to the FAQ index