CUSP
- class otp.cusp.CUSPProblem
- Bases: - otp.Problem- A 1D PDE combining a “cusp catastrophe” model with the van der Pol oscillator. - The CUSP problem [HW96] (pp. 147-148) is the PDE \[\begin{split} \frac{\partial y}{\partial t} &= -\frac{1}{ε} (y^3 + a y + b) + σ \frac{\partial^2 y}{\partial x^2}, \\ \frac{\partial a}{\partial t} &= b + 0.07 v + σ \frac{\partial^2 a}{\partial x^2}, \\ \frac{\partial b}{\partial t} &= (1 - a^2) b - a - 0.4 y + 0.035 v + σ \frac{\partial^2 b}{\partial x^2}, \end{split}\]- where \(v = u / (u + 0.1)\) and \(u = (y - 0.7)(y - 1.3)\). The spatial domain \(x ∈ [0, 1]\) has periodic boundary conditions. Discretization with second order finite difference on a grid with \(N\) cells gives \[\begin{split} y'_i &= -\frac{1}{ε} (y_i^3 + a_i y_i + b_i) + σ N^2 (y_{i-1} - 2 y_i + y_{i+1}) \\ a'_i &= b_i + 0.07 v_i + σ N^2 (a_{i-1} - 2 a_i + a_{i+1}) \\ b'_i &= (1 - a_i^2) b_i - a_i - 0.4 y_i + 0.035 v_i + σ N^2 (b_{i-1} - 2 b_i + b_{i+1}), \end{split}\]- where \(i = 1, …, N\). Values at cell indices \(i=0, N+1\) are specified by the periodic boundary conditions. - Notes - Type - PDE - Number of Variables - arbitrary multiple of 3 - Stiff - typically, depending on \(ε\), \(σ\), and number of grid points - Example - >>> problem = otp.cusp.presets.Canonical; >>> sol = problem.solve(); >>> problem.plotPhaseSpace(sol, 'View', [45, 45]); - Constructor Summary
- CUSPProblem(timeSpan, y0, parameters)
- Create a CUSP problem object. - Parameters:
- timeSpan ( - numeric(1, 2)) – The start and final time.
- y0 ( - numeric(:, 1)) – The initial conditions.
- parameters ( - otp.cusp.CUSPParameters) – The parameters.
 
 
 
- Property Summary
- RHSStiff
- Right-hand side containing the diffusion terms and the reaction terms multiplied by \(ε^{-1}\). - This partition of the RHS is used in [JM17]. - See also 
 - RHSNonstiff
- Right-hand side containing the reaction terms not scaled by \(ε^{-1}\). - This partition of the RHS is used in [JM17]. - See also 
 - RHSDiffusion
- Linear right-hand side containing the diffusion terms. - See also 
 - RHSReaction
- Right-hand side containing the reaction terms. - See also 
 
 
Parameters
- class otp.cusp.CUSPParameters
- Bases: - otp.Parameters- Parameters for the CUSP problem. - Constructor Summary
- CUSPParameters(varargin)
- Create a CUSP parameters object. - Parameters:
- varargin – A variable number of name-value pairs. A name can be any property of this class, and the subsequent value initializes that property. 
 
 
- Property Summary
- Epsilon
- The stiffness parameter \(ε\) for the “cusp catastrophe” model. 
 - Sigma
- The diffusion coefficient \(σ\) for all three variables. 
 
 
Presets
- class otp.cusp.presets.Canonical
- Bases: - otp.cusp.CUSPProblem- The CUSP configuration from [HW96] (pp. 147-148) which uses time span \(t ∈ [0, 1.1]\), \(N = 32\) grid cells, and initial conditions \[\begin{split} y_i(0) &= 0 ,\\ a_i(0) &= -2 \cos\left( \frac{2 i π}{N} \right), \\ b_i(0) &= 2 \sin\left( \frac{2 i π}{N} \right), \\ \end{split}\]- for \(i = 1, …, N\). The parameters are \(ε = 10^{-4}\) and \(σ = \frac{1}{144}\). - Constructor Summary
- Canonical(varargin)
- Create the canonical CUSP problem object. - Parameters:
- varargin – - A variable number of name-value pairs. The accepted names are - N– The number of cells in the spatial discretization.
- epsilon– Value of \(ε\).
- sigma– Value of \(σ\).