add random darcy flow using MLMC#246
Conversation
f44a283 to
ce5db29
Compare
|
Nice. I look forward to seeing the final version. Please leave a comment if you want us to look at it once you're done! |
|
@bangerth I think it is ready now. In case I find any minor issues I'll fix them in the future. |
bangerth
left a comment
There was a problem hiding this comment.
Nice! Is there a publication, or a thesis, that shows further details and that you might want to link to?
| @@ -0,0 +1 @@ | |||
| Jonas Plank <jonas.plank@tum.de> No newline at end of file | |||
There was a problem hiding this comment.
For historical reasons, UNIX typically asks that every file ends in a newline. If you go to the github page of your pull request and click on the "Changes" tab, you'll see that most files are missing a newline at the end. Could you fix this?
| @@ -0,0 +1 @@ | |||
| step 5 No newline at end of file | |||
| @@ -0,0 +1 @@ | |||
| mlmc for random darcy flow No newline at end of file | |||
There was a problem hiding this comment.
I think it would be useful to spell mlmc out -- not everyone might know what it stands for.
| # Multilevel Monte Carlo for random Darcy flow | ||
|
|
||
| ## Motivation | ||
| Numerical simulations rely on input parameters such as material data, boundary conditions, and geometry. These parameters are almost always derived from measurements and are therefore subject to uncertainty. Some PDEs, such as the Kardar-Parisi-Zhang equation [1], even incorporate uncertainty directly into the governing equation. This uncertainty propagates through the simulation; consequently, quantifying its impact on the solution is of great interest. |
There was a problem hiding this comment.
| Numerical simulations rely on input parameters such as material data, boundary conditions, and geometry. These parameters are almost always derived from measurements and are therefore subject to uncertainty. Some PDEs, such as the Kardar-Parisi-Zhang equation [1], even incorporate uncertainty directly into the governing equation. This uncertainty propagates through the simulation; consequently, quantifying its impact on the solution is of great interest. | |
| Numerical simulations rely on input parameters such as material data, boundary conditions, and geometry. These parameters are almost always derived from measurements and are therefore subject to uncertainty. Some PDEs, such as the [Kardar-Parisi-Zhang equation](https://en.wikipedia.org/wiki/Kardar%E2%80%93Parisi%E2%80%93Zhang_equation) [1], even incorporate uncertainty directly into the governing equation. This uncertainty propagates through the simulation; consequently, quantifying its impact on the solution is of great interest. |
| ## Motivation | ||
| Numerical simulations rely on input parameters such as material data, boundary conditions, and geometry. These parameters are almost always derived from measurements and are therefore subject to uncertainty. Some PDEs, such as the Kardar-Parisi-Zhang equation [1], even incorporate uncertainty directly into the governing equation. This uncertainty propagates through the simulation; consequently, quantifying its impact on the solution is of great interest. | ||
|
|
||
| However, this can be a costly undertaking. The standard Monte Carlo estimator converges at a rate of @f[ \mathcal{O}(N^{-\frac{1}{2}}) @f], potentially requiring tens of thousands of samples for a reasonable estimate of the mean. This is often unfeasible for complex problems where computing a single sample on a fine mesh may take hours. |
There was a problem hiding this comment.
| However, this can be a costly undertaking. The standard Monte Carlo estimator converges at a rate of @f[ \mathcal{O}(N^{-\frac{1}{2}}) @f], potentially requiring tens of thousands of samples for a reasonable estimate of the mean. This is often unfeasible for complex problems where computing a single sample on a fine mesh may take hours. | |
| However, this can be a costly undertaking. The standard Monte Carlo estimator, which simply solves the equation $N$ times with different realizations of the random noise and then averages the $N$ solutions, converges at a rate of @f[ \mathcal{O}(N^{-\frac{1}{2}}) @f], potentially requiring tens of thousands of samples for a reasonable estimate of the mean. This is often infeasible for complex problems where computing a single sample on a fine mesh may take hours. |
|
|
||
| We approximate this random field using a Karhunen-Loève Expansion and set a pressure difference of 1 between the left and right boundaries. | ||
|
|
||
| It is easy to observe that the actual PDE code is very similar to the one demonstrated in Step-5. This is on purpose. In recent years, invasive techniques have fallen out of favor since they, as the name suggests, require reprogramming of existing finite element codes. |
There was a problem hiding this comment.
| It is easy to observe that the actual PDE code is very similar to the one demonstrated in Step-5. This is on purpose. In recent years, invasive techniques have fallen out of favor since they, as the name suggests, require reprogramming of existing finite element codes. | |
| It is easy to observe that the actual PDE code is very similar to the one demonstrated in step-5. This is on purpose. In recent years, invasive techniques have fallen out of favor since they, as the name suggests, require reprogramming of existing finite element codes. |
|
|
||
| ## Results | ||
| The following plots illustrate the convergence rate of our MLMC implementation. | ||
|  |
There was a problem hiding this comment.
Perhaps give it a better name? Same below.
|
Let me know when you have the final version and we can merge! |
3bcfd36 to
d2a6657
Compare
|
@bangerth I've incorporated all the feedback and squashed the commits into one. This should be fine now. |
This example adds a relatively simple MLMC code, i wrote for my seminar on MLMC, that solves darcy flow with hydraulic permeability modeled by a random field.
This is currently WIP, but will be finished soon.