Posts in category randomfields

python-randomfields: a Python module for identifying non-stationary non-Gaussian random fields

Hi all,

On the occasion of the Material Ageing Institute Scientific Network (MAI-SN) partnership (initiated by EdF, TEPCO and EPRI), Phimeca Engineering, EdF R&D and Institut Navier (ENPC) implemented a prototype Python module for the simulation and the identification of non-stationary non-Gaussian random fields based on the Karhunen-Loève expansion representation. Provided some suitable measurements are made this could help modelling the randomness in the material properties of ageing structures.

It is our pleasure to announce this module is available for using and contributing. In this respect, a dedicated github repos has been created:

Please feel free to fork it or simply clone/download the code.

The main page of the repos displays a README file whose reading is highly recommended. It also features a non-exhaustive todo list. Contributions are welcome!

The module is essentialy based on Numpy and the ever-improving Python bindings to OpenTURNS (Thanks J!). It implements a single object named KarhunenLoeveExpansion which is self-documented using python dosctrings. The object discretizes the random field at instanciation by solving the Fredholm integral equation using a Legendre-Galerkin scheme. Integrals are numerically approximated using Gauss-Legendre quadrature (from OpenTURNS). Other Galerkin schemes could possibly be used (eg. wavelet-based Galerkin schemes) but the Legendre scheme is the only scheme implemented yet. The instanciated object is callable and takes the field index vector (eg space, time, potatoes, ...) and the seed as input. See the references in the README file if this already sounds like gibberish to you!

The repos contains 4 scripts in addition to the module for illustrating how the KLE object can be used for simulation and identification. Regarding identification, once the sample paths have been transformed into a sample of coefficients vector, we are back into basic statistics! Hence, OpenTURNS can be used for identifying the joint distribution of this coefficients vector. Karhunen-Loève theory states they are zero-mean, unit-variance and uncorrelated (by construction) but their joint distribution is generally unknown if the field is not assumed to be Gaussian. Identifying such large vectors is still a technically (if not scientifically) openned question though so...

Enjoy and give us feedback!

Marine Marcilhac & Vincent Dubourg

PS: Thank Marc Berveiller and Géraud Blatman at EdF for the very first feedback which helped reaching this first public version.