Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Bálint Kaszás and George Haller, 'Capturing the Edge of Chaos as a Spectral Submanifold in Pipe Flows ', Journal of Fluid Mechanics, submitted, Figure 5 key words: spectral submanifold, reduced-order model, edge of chaos, pipe flow
Fitting the SSM-reduced model
In this notebook we use the training data located in the folder data/
to obtain an SSM-reduced model. The data was generated by Openpipeflow
, developed by Ashley Willis (see https://openpipeflow.org/).
We use the SSMLearn
library to obtain a parametrization of the two-dimensional mixed-mode SSM connecting the lower branch traveling wave with the laminar state. The restriction of the dynamics onto this SSM then yields a two dimensional SSM-reduced model.
We load several trajectories, each of which contains a time series of the energy input () and energy dissipation () values, as computed by Openpipeflow. We also load the time dependent velocity fields in a compressed format. Instead of every Fourier-coefficient returned by Openpipeflow we have only retain the leading 100 PCA-components of the full dataset.
We then determine the optimal polynomial order and the regularizing parameter via cross validation.
We visualize the two-dimensional SSM-reduced model as a vector field and explicitly calculate the stable manifold of the lower branch traveling wave. Since the edge of chaos intersects the mixed-mode SSM transversely, we can conclude that this intersection is formed as the stable manifold of the lower branch traveling wave in the SSM-reduced model.
Load the data from the pre-compiled dictionary
This file contains
Reduced coordinates of the trajectories (as computed by Openpipeflow)
Compressed version of the velocity fields. The compression is the projection onto the first 100 PCA modes
We initialize an SSMLearn
object from the training trajectories.
Fit the reduced dynamics in the form
We enforce that the lower branch traveling wave remains a fixed point of the reduced dynamics. Its coordinates are
To determine the coefficients , we minimize the cost function
where is a ridge-type regularizing term.
The parametrization, i.e. the mapping
with
is also determined via ridge regression.
Determining the optimal model order by cross validation
The maximal polynomial order for the regression and the parameter can be determined by cross validating against a trajectory that was withheld from the training set.
Given the true trajectory , we define the prediction error as
i.e. the averaged error between the image of the predicted reduced trajectory under the parametrization and the true trajectory.
After calculating the erorrs, we can visualize them over a grid of values and polynomial orders.
Based on the dependence of the validation error, we may select =1e-5, which is a relatively high value, allowing strong regularization.
Predictions of the optimal SSM-reduced model
First fit the parametrization and then the reduced dynamics.
We can check that the constraint is satisfied
Visualizing the prediction error along the validation trajectory
Visualizing the validation-prediction
This is the trajectory we have used to select and the polynomial order. We now compute the SSM-perdicted trajectory, by integrating its initial reduced-coordinates forward in time.
We now plot the time evolution of the predicted reduced coordinate and the time-dependent relative prediction error
Reduced phase portrait
Finally, we visualize the phase portrait generated by the vector field
identified above, i.e. the SSM-reduced model.
Computing the stable manifold of the lower branch traveling wave
To find the stable manifold of the lower branch traveling wave, we rely on information about its spectrum, as computed from the SSM-reduced model.
We have constrained the SSM-reduced order model to have a fixed point at the coordinates of the lower branch traveling wave. The following calculation verifies that this constraint is satisfied. We use scipy
's built-in root finder method to find the fixed point.
Given the precise location of the lower branch traveling wave in the SSM-reduced model, we can compute its spectrum, since the stable manifold can be well approximated by integrating a small vector tangent to the stable subspace of the Jacobian.
This matrix has the eigenvalues and eigenvectors
with
To approximate of its stable manifold, we integrate a small segment of the stable subspace in backward time, i.e. the segment defined by the two vectors
with .
We may then save the SSM-reduced model for later use: