STOCHASTIC_DIFFUSION
Stochastic Diffusivity
STOCHASTIC_DIFFUSION
is a MATLAB library which
implement several versions of a stochastic diffusivity coefficient.
The 1D diffusion equation has the form
 d/dx ( DC(X) d/dx U(X) ) = F(X).
where DC(X) is a function called the diffusivity and F(X) is
called the source term or forcing term.
In the 1D stochastic version of the problem, the diffusivity function
includes the influence of stochastic parameters:
 d/dx ( DC(X;OMEGA) d/dx U(X;OMEGA) ) = F(X).
The 2D diffusion equation has the form
 Del ( DC(X,Y) Del U(X,Y) ) = F(X,Y).
In the 2D stochastic version of the problem, the diffusivity function
includes the influence of stochastic parameters:
 Del ( DC(X,Y;OMEGA) Del U(X,Y;OMEGA) ) = F(X,Y).
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
STOCHASTIC_DIFFUSION is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
BLACK_SCHOLES,
a MATLAB library which
implements some simple approaches to
the BlackScholes option valuation theory;
CNOISE,
a MATLAB library which
generates samples of noise obeying a 1/f^alpha power law,
by Miroslav Stoyanov.
CORRELATION,
a MATLAB library which
contains examples of statistical correlation functions.
ORNSTEIN_UHLENBECK,
a MATLAB library which
approximates solutions of the OrnsteinUhlenbeck
stochastic differential equation (SDE) using the Euler method and
the EulerMaruyama method.
PCE_LEGENDRE,
a MATLAB program which
assembles the system matrix associated with a polynomal chaos expansion
of a 2D stochastic PDE, using Legendre polynomials;
PCE_ODE_HERMITE,
a MATLAB program which
sets up a simple scalar ODE for exponential decay with an uncertain
decay rate, using a polynomial chaos expansion in terms of Hermite polynomials.
SDE,
a MATLAB library which
illustrates the properties of stochastic differential equations, and
common algorithms for their analysis,
by Desmond Higham;
STOCHASTIC_GRADIENT_ND_NOISE,
a MATLAB program which
solves an optimal control problem involving a functional over a system
with stochastic noise.
Reference:

Ivo Babuska, Fabio Nobile, Raul Tempone,
A Stochastic Collocation Method for Elliptic Partial Differential Equations
with Random Input Data,
SIAM Journal on Numerical Analysis,
Volume 45, Number 3, 2007, pages 10051034.

Howard Elman, Darran Furnaval,
Solving the stochastic steadystate diffusion problem using multigrid,
IMA Journal on Numerical Analysis,
Volume 27, Number 4, 2007, pages 675688.

Roger Ghanem, Pol Spanos,
Stochastic Finite Elements: A Spectral Approach,
Revised Edition,
Dover, 2003,
ISBN: 0486428184,
LC: TA347.F5.G56.

Xiang Ma, Nicholas Zabaras,
An adaptive hierarchical sparse grid collocation algorithm for the solution
of stochastic differential equations,
Journal of Computational Physics,
Volume 228, pages 30843113, 2009.

Fabio Nobile, Raul Tempone, Clayton Webster,
A Sparse Grid Stochastic Collocation Method for Partial Differential
Equations with Random Input Data,
SIAM Journal on Numerical Analysis,
Volume 46, Number 5, 2008, pages 23092345.

Dongbin Xiu, George Karniadakis,
Modeling uncertainty in steady state diffusion problems via
generalized polynomial chaos,
Computer Methods in Applied Mechanics and Engineering,
Volume 191, 2002, pages 49274948.
Source Code:

diffusivity_1d_xk.m,
a 1D stochastic diffusivity function from Xiu and Karniadakis.

diffusivity_2d_bnt.m,
a 2D stochastic diffusivity function from Babuska, Nobile, and Tempone.

diffusivity_2d_elman.m,
a 2D stochastic diffusivity function from Elman.

diffusivity_2d_ntw.m,
a 2D stochastic diffusivity function from Nobile, Tempone, and Webster.

r8vec_normal_01.m,
returns a vector of normally distributed values.

r8vec_print.m,
prints an R8VEC.

r8vec_uniform_01.m,
returns a vector of uniformly distributed values.

timestamp.m,
returns the YMDHMS date as a timestamp.
Examples and Tests:

stochastic_diffusion_test.m,
calls all the tests.

stochastic_diffusion_test_output.txt,
the output file.

bnt_contour.m,
a function which plots two realizations of the diffusivity, one using
a uniform PDF, the second using a Gaussian (normal) PDF.

bnt_contour.png,
the contour plot for a diffusivity as a function of X and Y.

elman_contour.m,
a function which plots a realization of the diffusivity.

elman_contour.png,
the contour plot for a diffusivity as a function of X and Y.

ntw_contour.m,
a function which plots a realization of the diffusivity.

ntw_contour.png,
the contour plot for a diffusivity as a function of X and Y.

xk_contour.m,
a function which plots a realization of the diffusivity.

xk_contour.png,
a plot of the diffusivity as a function of X.
You can go up one level to
the MATLAB source codes.
Last modified on 23 July 2013.