implementations.problem_classes.Brusselator module¶
- class Brusselator(alpha=0.1, **kwargs)[source]¶
Bases:
IMEX_Laplacian_MPIFFTTwo-dimensional Brusselator from [1]. This is a reaction-diffusion equation with non-autonomous source term:
\[\frac{\partial u}{\partial t} = \varalpha \Delta u + 1 + u^2 v - 4.4u _ f(x,y,t), \frac{\partial v}{\partial t} = \varalpha \Delta v + 3.4u - u^2 v\]with the source term \(f(x,y,t) = 5\) if \((x-0.3)^2 + (y-0.6)^2 <= 0.1^2\) and \(t >= 1.1\) and 0 else. We discretize in a periodic domain of length 1 and solve with an IMEX scheme based on a spectral method for the Laplacian which we invert implicitly. We treat the reaction and source terms explicitly.
References
- get_fig()[source]¶
Get a figure suitable to plot the solution of this problem
- Returns:
self.fig
- Return type:
matplotlib.pyplot.figure.Figure
- plot(u, t=None, fig=None)[source]¶
Plot the solution. Please supply a figure with the same structure as returned by
self.get_fig.- Parameters:
u (dtype_u) – Solution to be plotted
t (float) – Time to display at the top of the figure
fig (matplotlib.pyplot.figure.Figure) – Figure with the correct structure
- Return type:
None