1. ABOUT THE DATASET -------------------- Title: Dataset for `Parametric resonance, chaos and spatial structure in the Lotka-Volterra model' Creator(s): Mohamed Swailem[1,2] and Alastair M. Rucklidge[3] Organisation(s): 1. Department of Physics & Center for Soft Matter and Biological Physics, Virginia Tech, Blacksburg, Virginia 24061, USA 2. Laufer Center for Physical and Quantitative Biology, Stony Brook University, Stony Brook, NY 11794, USA 3. School of Mathematics, University of Leeds, Leeds LS2 9JT, UK Rights-holder(s):Unless otherwise stated, Copyright 2025 University of Leeds Publication Year: 2025 Description: The dataset contains the data for generating the figures in the paper, as well as the LaTeX tikz commands and sample python scripts. The calculations are done with some fixed parameters (kappa_0 = 0.25, a_star = 1, and for the PDE calculations, diffusion constants = 1, domain = 500x500, number of Fourier modes = 512x512). The parameters that are varied are alpha (from 0 to 1), kappa_1 (from 0 to kappa_0) and n (from 0 to 1). For each combination of parameter values, the mean-field ODEs and the PDEs are solved numerically. Cite as: Swailem, M.; Rucklidge, A. M. (2025) Dataset for `Parametric resonance, chaos and spatial structure in the Lotka-Volterra model'. University of Leeds. [Dataset] https://doi.org/10.5518/1756. Related publication: Swailem, M.; Rucklidge, A. M. Title: Parametric resonance, chaos and spatial structure in the Lotka-Volterra model (in preparation) Contact: A.M.Rucklidge@leeds.ac.uk 2. TERMS OF USE --------------- Copyright 2025 University of Leeds Unless otherwise stated, this dataset is licensed under a Creative Commons Attribution 4.0 International Licence: https://creativecommons.org/licenses/by/4.0/. 3. PROJECT AND FUNDING INFORMATION ---------------------------------- Title: DMS-EPSRC Eco-Evolutionary Dynamics of Fluctuating Populations Dates: December 2021 - May 2025 Funding organisation: Engineering and Physical Science Research Council (EPSRC) and National Science Foundation (NSF) Grant no.: EP/V014439/1, DMS-2128587 4. CONTENTS ----------- File listing Files common to all figures: figures.tex -- generate all five figures from tikz commands reading in data tikz_definitions.tikz -- common tikz colours and styles Python scripts: LV_ODE_mean_field_stability.py -- solve the ODEs from the paper at given parameter values, and evaluate whether the result is a periodic orbit or chaotic LV_mean_field_alpha.py -- compute a bifurcation diagram for the ODEs, varying the parameter alpha LV_PDE.py -- solve the PDEs from the paper with an initial condition close to a point in the mean field ODE trajectory LV_PDE_reread_and_replot_contours.py -- read the four .txt.gz files and produce contour plots LV_PDE_continue_two_forcing_periods.py -- same as LV_PDE.py but with parameters set to read _ic.txt.gz files and run two periods Files for Figure 1: LV_ODE_alpha_1p00_resonance_and_phase_portrait.tikz -- tikz commands for figure 1(a,b) (alpha = 1) LV_ODE_alpha_0p00_resonance_and_phase_portrait.tikz -- tikz commands for figure 1(c,d) (alpha = 0) LV_ODE_extract_tikz_data_files.sh -- read LV_ODE_alpha_1p0000_kappa0_0p2500_summary.txt and LV_ODE_alpha_0p0000_kappa0_0p2500_summary.txt and generate LV_ODE_alpha_0p0000_kappa0_0p2500_summary_1.txt etc In the next group of files (LV_ODE_alpha_?p0000_kappa0_0p2500_summary*), the columns are: Filename (including a run number as part of the survey) astar -- primary parameter in the ODE kappa0 -- primary parameter in the ODE kappa1 -- primary parameter in the ODE n -- primary parameter in the ODE alpha -- primary parameter in the ODE lamda0 -- secondary parameter in the ODE omega0 -- secondary parameter in the ODE omega -- secondary parameter in the ODE a_ic -- initial value of a, before the final orbit but after the transient b_ic -- initial value of b, before the final orbit but after the transient version -- version number of the LV_ODE_mean_field_stability.py code period -- period of the resulting orbit, in units of the forcing period. 0 = equilibrium point, -1 = chaos LV_ODE_alpha_1p0000_kappa0_0p2500_summary.txt -- complete list of all data for all parameter values, alpha = 1 LV_ODE_alpha_1p0000_kappa0_0p2500_summary_only_non_eqm.txt -- as above, but with equilibrium points (period = 0) removed LV_ODE_neutral_stability_curve.txt -- Neutral stability curve: the columns are (n,kappa1) values from Floquet analysis for alpha = 1 LV_ODE_alpha_1p0000_kappa0_0p2500_kappa1_0p2400_n_0p5000_0626_timeab.txt -- the columns are (time, a, b) for kappa1=0.25, n=0.7, alpha=1 LV_ODE_alpha_1p0000_kappa0_0p2500_kappa1_0p2400_n_0p5000_0626_timeab_stroboscopic.txt -- as above, but only at time = integer times forcing period LV_ODE_alpha_0p0000_kappa0_0p2500_summary.txt -- complete list of all data for all parameter values, as summary file above, but for alpha = 0 LV_ODE_alpha_0p0000_kappa0_0p2500_summary_1.txt -- as above, but including only the period-1 points LV_ODE_alpha_0p0000_kappa0_0p2500_summary_2.txt -- as above, but including only the period-2 points LV_ODE_alpha_0p0000_kappa0_0p2500_summary_4.txt -- as above, but including only the period-4 points LV_ODE_alpha_0p0000_kappa0_0p2500_summary_8.txt -- as above, but including only the period-8 points LV_ODE_alpha_0p0000_kappa0_0p2500_summary_more.txt -- as above, but including periodic points other than 1, 2, 4, 8 LV_ODE_alpha_0p0000_kappa0_0p2500_summary_chaos.txt -- as above, but including only the chaotic points LV_ODE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_0636_timeab_8.txt -- the columns are (time, a, b) for kappa1=0.25, n=0.7, alpha=0 LV_ODE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_0636_timeab_stroboscopic.txt -- as above, but only at time = integer times forcing period Files for Figure 2: LV_ODE_alpha_bifurcation_diagram.tikz -- tikz commands for figure 2 LV_ODE_alpha_kappa0_0p2500_kappa1_0p2400_n0p7000.txt -- data for bifurcation diagram, in columns (with astar, kappa0, kappa1, n: 1.0000 0.2500 0.2400 0.7000) alpha -- value of alpha: 0.1500 down to 0.0000 in steps of 0.0002 a -- value of a found after a transient, at time = large integer times forcing period b -- value of b found after a transient The (a,b) could be part of a period-1, period-2 ... chaotic orbit, so the rows with the same value of alpha give all of these: count -- indexing the row from 0 to period - 1 period -- period of the periodic orbit, in units of the forcing period n_transient -- large integer number of forcing periods (adjusted dynamically) Files for Figure 3: LV_ODE_alpha_0p00_stability.tikz -- tikz commands for figure 3 LV_ODE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_0636_timeab_8.txt -- same file as in Figure 1 The next three files are timeseries for astar, kappa0, n, alpha: 1 0.25 0.7 0.0, and kappa1 = 0.22, 0.23, 0.24 from solving the PDE (with LV_PDE.py) with an initial condition close to a point on the mean field trajectory The spatial parameters are Lx, Ly, Nx, Ny, Da, Db: 500.0 500.0 512 512 1.0 1.0 The timeseries is taken at time = integer times twice forcing period, with columns: strob -- counter istep -- number of timesteps time/period -- time / forcing period abar -- average of a(x,y,t) over (x,y) bbar -- average of b(x,y,t) over (x,y) arms -- RMS value of (a(x,y,t) - abar(t)) brms -- RMS value of (b(x,y,t) - bbar(t)) amax -- max of a(x,y,t) over (x,y) bmax -- max of b(x,y,t) over (x,y) amin -- min of a(x,y,t) over (x,y) bmin -- min of b(x,y,t) over (x,y) wavenumber -- an estimate of the wave number LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2200_n_0p7000_Lx_0500p0_0016_data_stroboscopic.txt LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2300_n_0p7000_Lx_0500p0_0326_data_stroboscopic.txt LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Lx_0500p0_0636_data_stroboscopic.txt The next file has the same columns but is a sample of a complete timeseries LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Lx_0500p0_0636_data_head.txt Files for Figure 4: LV_PDE_reread_and_replot_contours.py -- read the four .txt.gz files and produce contour plots LV_PDE_continue_two_forcing_periods.py -- same as LV_PDE.py but with parameters set to read _ic.txt.gz files and run two periods The next four files are the a(x,y) and b(x,y) for the final state after a long run, with paramter values kappa1=0.24 and n=0.6 and 0.7 These are used as input (initial conditions) to LV_PDE.py to produce the following four files The format is 512 rows of 512 columns, with y increasing along each row, and x increasing down each column LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a_ic.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_b_ic.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a_ic.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_b_ic.txt.gz The next four files are the a(x,y) fields one and two forcing periods after the ic files. These are input for the LV_PDE_reread_and_replot_contours.py, which produces the contour plots The format is the same as the first four files LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_penultimate_a.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p6000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_penultimate_a.txt.gz LV_PDE_alpha_0p0000_kappa0_0p2500_kappa1_0p2400_n_0p7000_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_0000_a.txt.gz Files for Figure 5: LV_PDE_alpha_0p0000_resonance_and_spatial_structure.tikz -- tikz commands for figure 5 Four files are the same as the files for Figure 1: LV_ODE_alpha_0p0000_kappa0_0p2500_summary_4.txt -> ../Figure_1/LV_ODE_alpha_0p0000_kappa0_0p2500_summary_4.txt LV_ODE_alpha_0p0000_kappa0_0p2500_summary_8.txt -> ../Figure_1/LV_ODE_alpha_0p0000_kappa0_0p2500_summary_8.txt LV_ODE_alpha_0p0000_kappa0_0p2500_summary_chaos.txt -> ../Figure_1/LV_ODE_alpha_0p0000_kappa0_0p2500_summary_chaos.txt LV_ODE_alpha_0p0000_kappa0_0p2500_summary_more.txt -> ../Figure_1/LV_ODE_alpha_0p0000_kappa0_0p2500_summary_more.txt The last file is generated from numerous runs of LV_PDE.py LV_PDE_alpha_0p0000_kappa0_0p2500_Da_001p0000_Db_001p0000_Lx_0500p0_Ly_0500p0_summary.txt The columns are: filename / run index number astar -- primary parameter in the PDE kappa0 -- primary parameter in the PDE kappa1 -- primary parameter in the PDE n -- primary parameter in the PDE alpha -- primary parameter in the PDE lamda0 -- secondary parameter in the PDE omega0 -- secondary parameter in the PDE omega -- secondary parameter in the PDE a_ic -- initial value of a, after the ODE transient, before adding random perturbations b_ic -- initial value of b, after the ODE transient, before adding random perturbations random_amplitude -- amplitude of random perturbations timesteps_per_period -- number of timesteps per period of the forcing n_timesteps -- intended maximum number of timesteps to run Lx -- domain size in the x direction Ly -- domain size in the y direction Nx -- number of Fourier modes in the x direction Ny -- number of Fourier modes in the y direction Da -- Diffusion constant for a Db -- Diffusion constant for b version -- version number of the LV_PDE.py code time -- time in units of the forcing period at the point of stopping abar -- average of a(x,y,t) over (x,y) at the point of stopping bbar -- average of b(x,y,t) over (x,y) at the point of stopping arms -- RMS value of (a(x,y,t) - abar(t)) at the point of stopping brms -- RMS value of (b(x,y,t) - bbar(t)) at the point of stopping amax -- max of a(x,y,t) over (x,y) at the point of stopping bmax -- max of b(x,y,t) over (x,y) at the point of stopping amin -- min of a(x,y,t) over (x,y) at the point of stopping bmin -- min of b(x,y,t) over (x,y) at the point of stopping wavenumber -- an estimate of the wave number at the point of stopping 5. METHODS ---------- The ODEs are solved with scipy's solve_ivp, with parameters method='RK45', rtol=1e-10, atol=1e-10, max_step=0.1 Periodic points are identified if (a,b) match a previous value of (a,b) with a tolerance of 1e-08. The PDEs are solved with ETD2 timestepping in spectral space (see Cox & Matthews J Comp Phys (2002) 176, 430) Typically there are 512x512 Fourier modes in a 500x500 domain, and 100 timesteps per period of the forcing The stopping criterion is arms < 1.0e-12 * abs(abar)