@@ -95,8 +95,6 @@ function chua_element_derivative(x, m0, m1)
9595 return m1 + 0.5 * (m0 - m1) * (- 1 < x < 1 ? 2 : 0 )
9696end
9797
98-
99-
10098"""
10199```julia
102100roessler(u0=[1, -2, 0.1]; a = 0.2, b = 0.2, c = 5.7)
@@ -2165,7 +2163,7 @@ A = 2.06, B = −2.6, C = 0.4, D = 1.0, E = 0.4
21652163 Multistable states in a predator–prey model with generalized Holling type III functional response and a strong Allee effect.
21662164 Communications in Nonlinear Science and Numerical Simulation, Volume 131, 107846
21672165"""
2168- function tristable_predator_prey (u0 = [0.5 , 0.5 ]; A = 2.06 , B = − 2.6 , C = 0.4 , D = 1.0 , E = 0.4 )
2166+ function tristable_predator_prey (u0 = [0.5 , 0.5 ]; A = 2.06 , B = - 2.6 , C = 0.4 , D = 1.0 , E = 0.4 )
21692167 function zeng_yu_2024 (u, p, t)
21702168 A, B, C, D, E = p
21712169 x, y = u
@@ -2178,4 +2176,52 @@ function tristable_predator_prey(u0 = [0.5, 0.5]; A = 2.06, B = −2.6, C = 0.4,
21782176 diffeq = (abstol = 1e-9 , rtol = 1e-9 )
21792177 ds = CoupledODEs (zeng_yu_2024, u0, p; diffeq)
21802178 return ds
2179+ end
2180+
2181+
2182+ """
2183+ ```julia
2184+ daisyworld(u0 = [0.01, 0.01]; S = 1.0, A_b = 0.25, A_w = 0.75, A_g = 0.5, T_opt = 22.5, delta = 17.5, gamma = 0.3, q = 0.2, L = 1.0)
2185+ ```
2186+ The continuous time Daisyworld model [^WatsonLovelock1983].
2187+ The model describes the coupled evolution of black and white daisy populations,
2188+ whose growth rates depend on local temperature, which is affected by planetary albedo.
2189+
2190+ Variables 1,2 are white and black daisies respectively.
2191+
2192+ Parameters:
2193+ - `S`: Solar constant (relative luminosity)
2194+ - `A_b`, `A_w`, `A_g`: Albedos of black, white daisies, and bare ground
2195+ - `T_opt`: Optimal temperature for growth (°C)
2196+ - `delta`: Width of growth temperature window
2197+ - `gamma`: Death rate
2198+ - `q`: Heat transport parameter
2199+ - `L`: Luminosity (scaling factor)
2200+
2201+ [^WatsonLovelock1983]:
2202+ Watson, A. J., & Lovelock, J. E. (1983).
2203+ Biological homeostasis of the global environment: the parable of Daisyworld.
2204+ Tellus B: Chemical and Physical Meteorology, 35(4), 284-289.
2205+ """
2206+ function daisyworld (u0 = [0.01 , 0.01 ]; S = 1.0 , A_b = 0.25 , A_w = 0.75 , A_g = 0.5 , T_opt = 22.5 , delta = 17.5 , gamma = 0.3 , q = 0.2 , L = 1.0 )
2207+ p = [S, A_b, A_w, A_g, T_opt, delta, gamma, q, L]
2208+ return CoupledODEs (daisyworld_rule, u0, p)
2209+ end
2210+
2211+ @inbounds function daisyworld_rule (u, p, t)
2212+ a_b, a_w = u[1 ], u[2 ]
2213+ S, A_b, A_w, A_g, T_opt, delta, gamma, q, L = p
2214+ a_g = 1.0 - a_b - a_w
2215+ # Planetary albedo
2216+ A = a_b * A_b + a_w * A_w + a_g * A_g
2217+ # Local temperatures (simplified, in °C)
2218+ T_b = q * S * L * (1 - A_b) - 273.15
2219+ T_w = q * S * L * (1 - A_w) - 273.15
2220+ # Growth rates (parabolic dependence)
2221+ beta_b = max (0.0 , 1.0 - ((T_opt - T_b)/ delta)^ 2 )
2222+ beta_w = max (0.0 , 1.0 - ((T_opt - T_w)/ delta)^ 2 )
2223+ # ODEs
2224+ da_b = a_b * (beta_b * a_g - gamma)
2225+ da_w = a_w * (beta_w * a_g - gamma)
2226+ return SVector {2} (da_b, da_w)
21812227end
0 commit comments