LDDS

Tutorial 11: Dynamics using a vector field dataset

In Tutorial 7 we studied the dynamics of a system for which the Potential Energy Surface (PES) was only available as a dataset.

This took us a step forward to deal with a more realistic situation where for a dynamical system observables are not available as analytical expressions.

Now in this tutorial, we will illustrate the setup for computing the LDs for the dynamics of a system where a time-dependent vector field is only available as a dataset.

We will deal with a discretised version of the vector field of the forced Duffing oscillator, that we studied in Tutorial 2

Discretised forced duffing oscillator

As before, we call all the necessary functions first

For this example, we sampled vector field data frames using its analytical expression to illustrate the LDDS setup. Then, we compare the LD outputs from when analytical or the numerical inputs of the vector field are employed.

We sampled the time-dependent vector field from a uniform grid in the $XY$ plane, and a regular 1D grid in time ($t < 0$ and $t>0$), and save this as a datafile.

Once the file is generated, the LDDS setup proceeds as usual for any system.

BUT with the difference that the vector_field is defined as below.

The function fit_vector_field will fit the vector field dataset provided its filename, outputing a Python function. Currently, only possible for HDF5 files. This function will take by default files from the folder ldds/vector_field_files

See help(fit_vector_field) for details of the fitting method or check the documentation.

Then, we execute the cells below as before, for the system as in Tutorial 2.

And we're done!