gemseo_umdo / use_cases / heat_equation

Hide inherited members

model module

The heat equation model.

This model solves the 1D transient equation, a.k.a. heat equation. It describes the temperature evolution $u$ in a $L$-length rod from the initial time 0 to the final time $T$ with a thermal diffusivity $nu(mathbf{X})$ depending on a random vector $mathbf{X}$. The heat equation is

$$frac{partial u(x,t;mathbf{X})}{partial t}
  • nu(mathbf{X})frac{partial^2 u(x,t;mathbf{X})}{partial x^2} = 0$$

with the boundary condition $u(0,t;mathbf{X})=u(L,t;mathbf{X})=0$ where $xinmathcal{D}=[0,L]$ and $tin[0,T]$.

To obtain an analytical solution, Geraci et al. (2015) chose $L=1$ and the uncertain initial condition:

$$u(x,0;mathbf{X}) =

mathcal{G}(mathbf{X})mathcal{F}_1(x) +mathcal{I}(mathbf{X})mathcal{F}_2(x)



  • $mathcal{F}_1(x)=sin(pi x)$,

  • $mathcal{F}_2(x)=sin(2pi x)+sin(3pi x)

    +50left(sin(9pi x)+sin(21pi x)right)$,

  • $mathcal{I}(mathbf{X})=3.5


  • $mathcal{G}(mathbf{X})=50prod_{i=5}^7(4|X_i|-1)$.

This uncertainty on the initial condition is modelled by the random variables $X_1,ldots X_7$ that are independent and distributed as:

  • $X_isimmathcal{U}(-pi,pi)$, for $iin{1,2,3}$,

  • $nu(mathbf{X})=X_4simmathcal{U}(nu_{min},nu_{max})$,

  • $X_isimmathcal{U}(-1,1)$, for $iin{5,6,7}$.

Then, Geraci et al. (2015) consider the integral of the temperature along the rod

$$mathcal{M}(mathbf{X}) = int_{mathcal{D}}u(x,T;mathbf{X})dx$$

and are interested in the estimation of its [HeatEquationConfiguration][gemseo_umdo.use_cases.heat_equation.configuration.HeatEquationConfiguration.expectation]:

$$mathbb{E}[mathcal{M}(mathbf{X})] = 50H_1+frac{49}{4}(H_3+50H_9+50H_{21})$$

where $H_k=frac{2}{k^3pi^3T} frac{exp(-nu_{min}k^2pi^2T)-exp(-nu_{max}k^2pi^2T)}{nu_{max}-nu_{min}}$.

The [HeatEquationModel][gemseo_umdo.use_cases.heat_equation.model.HeatEquationModel] computes the temperature at final time from instances of the random variables "X_1", …, "X_7" defined over the [HeatEquationUncertainSpace] [gemseo_umdo.use_cases.heat_equation.uncertain_space.HeatEquationUncertainSpace]. The temperature "u_mesh" is computed at each mesh node while the temperature "u" is an integral over the rod.

See also

Geraci et al., A multifidelity control variate approach for the multilevel Monte Carlo technique, Center for Turbulence Research, Annual Research Briefs, 2015.

class gemseo_umdo.use_cases.heat_equation.model.HeatEquationModel(mesh_size=100, n_modes=21, final_time=0.5, nu_bounds=(0.001, 0.009), rod_length=1.0)[source]

Bases: object

The discipline computing the temperature averaged over the rod at final time.

This discipline can also compute a first-order polynomial centered at the mean input value.

  • mesh_size (int) –

    The number of equispaced spatial nodes.

    By default it is set to 100.

  • n_modes (int) –

    The number of modes of the truncated Fourier expansion.

    By default it is set to 21.

  • final_time (float) –

    The time of interest.

    By default it is set to 0.5.

  • nu_bounds (tuple[float, float]) –

    The bounds of the thermal diffusivity.

    By default it is set to (0.001, 0.009).

  • rod_length (float) –

    The length of the rod.

    By default it is set to 1.0.


Evaluate the first-order Taylor polynomial.


input_samples (ndarray[Any, dtype[float]]) – The input samples shaped as (sample_size, input_dimension) or (input_dimension, ).


The output samples of the first-order Taylor polynomial shaped as (sample_size, n_nodes) or (n_nodes, ).

Return type:

ndarray[Any, dtype[float]]

configuration: HeatEquationConfiguration

The configuration of the heat equation problem.

taylor_mean: float

The expectation of the output of the first-order Taylor polynomial.