|
1 | 1 | classdef Lorenz96Problem < otp.Problem |
2 | | - %LORENZ96PROBLEM The Lorenz 96 model is a classic model for testing data assimilation techniques. |
| 2 | + % A chaotic system modeling nonlinear transfer of a dimensionless |
| 3 | + % quantity along a cyclic one dimensional domain. |
3 | 4 | % |
4 | | - % See also otp.loren96.Lorenz96Parameters |
| 5 | + % The $N$ variable dynamics :cite:p:`Lor96` are represented by the equation, |
| 6 | + % |
| 7 | + % $$ |
| 8 | + % y_i' = -y_{i-1}\left(y_{i-2} - y_{i+1}\right) - y_i + f(t), \quad i = 1, \dots, N, |
| 9 | + % $$ |
| 10 | + % |
| 11 | + % where $y_0 = y_N$, $y_{-1} = y_{N - 1}$, and $y_{N + 1} = y_2$, exhibits |
| 12 | + % chaotic behavior for certain pairs of values of the dimension $N$ and |
| 13 | + % forcing function $f$. |
| 14 | + % |
| 15 | + % Notes |
| 16 | + % ----- |
| 17 | + % +---------------------+-----------------------------------------------------------+ |
| 18 | + % | Type | ODE | |
| 19 | + % +---------------------+-----------------------------------------------------------+ |
| 20 | + % | Number of Variables | $N$ for any postive integer four or greater | |
| 21 | + % +---------------------+-----------------------------------------------------------+ |
| 22 | + % | Stiff | no | |
| 23 | + % +---------------------+-----------------------------------------------------------+ |
| 24 | + % |
| 25 | + % Example |
| 26 | + % ------- |
| 27 | + % >>> problem = otp.lorenz96.presets.Canonical('Forcing', @(t) 8 + 4*sin(t)); |
| 28 | + % >>> sol = problem.solve(); |
| 29 | + % >>> problem.movie(sol); |
| 30 | + % |
| 31 | + % See also |
| 32 | + % -------- |
| 33 | + % :doc:`Lorenz '63 Problem </problems/Lorenz63Problem>` |
5 | 34 |
|
6 | 35 | properties (SetAccess = private) |
7 | 36 | DistanceFunction |
8 | 37 | end |
9 | 38 |
|
10 | 39 | methods |
11 | 40 | function obj = Lorenz96Problem(timeSpan, y0, parameters) |
| 41 | + % Create a Lorenz '96 problem object. |
| 42 | + % |
| 43 | + % Parameters |
| 44 | + % ---------- |
| 45 | + % timeSpan : numeric(1, 2) |
| 46 | + % The start and final time. |
| 47 | + % y0 : numeric(:, 1) |
| 48 | + % The initial conditions. |
| 49 | + % parameters : Lorenz96Parameters |
| 50 | + % The parameters. |
| 51 | + % |
12 | 52 | obj@otp.Problem('Lorenz 96', [], timeSpan, y0, parameters); |
13 | 53 | end |
14 | 54 | end |
|
37 | 77 | 'Vectorized', 'on'); |
38 | 78 |
|
39 | 79 | % We also provide a canonical distance function as is standard for |
40 | | - % localisation in Data Assimilation. This is heavily tied to this |
| 80 | + % localization in Data Assimilation. This is heavily tied to this |
41 | 81 | % problem. |
42 | 82 |
|
43 | 83 | obj.DistanceFunction = @(t, y, i, j) otp.lorenz96.distanceFunction(t, y, i, j); |
|
0 commit comments