This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Using physical parameter as a Gaussian Random Variable in a simple Poisson Problem

0 votes

I want to vary an input parameter of an elastodynamics problem as a Gaussian Random variable and view the resulting Probability Density Function. I want to begin with a simple Poisson problem in c++, before I go there. I have mentioned my thoughts below. If you have done this before, pls. help me through your own approach.

In Poisson problem, I need to vary 'k', i.e., the 'spatial variability' parameter, as a RV with some statistical distribution. Let's assume a mean of 1 and a std. deviation of 0.3, or any other convenient value. Now, I want to run this code multiple times for different values of the parameter - 'k'. So, lets say, I generate an array of 100 values using randn() function of matlab/python. Now, maybe a shell script or python script is needed with a for loop to use this array and run the fenics code 100 times for each value of 'k'. How will the fenics code be mentioned in the loop? How will it accept those values of 'k' ? Does any one have a generic script that can help?

I would also really appreciate some suggestions/ comments on post processing. I believe, the output .vtk files can be used to create Probability density function (PDF) in Paraview. I am also a little confused on the generation of PDF. I believe, I ' ll have to chose a single point on the mesh and for each point i have output values in 'x' and 'y' direction, since it is a 2D problem. Therefore, I' ll have to chose 1 direction too. So, the PDF of output on 1 point, in 1 direction is what I am looking for. Is that correct? I am not sure.

Thanks for your help!

asked Oct 17, 2016 by Chaitanya_Raj_Goyal FEniCS User (4,150 points)
edited Oct 18, 2016 by Chaitanya_Raj_Goyal

I want to perform non-intrusive polynomial chaos expansion using quadrature or sampling, but taking a step at a time, I am starting with Monte Carlo, so I at least have some idea about pre and post processing.

...