{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Spectral analysis of the laminar flow and the lower branch traveling wave\n", "\n", "In this notebook we present calculations related to the spectrum of the two fixed point solutions, the lower branch traveling wave and the laminar flow. \n", "The eigenvalues are obtained using the Newton-Krylov algorithm built into ```Openpipeflow``` (developed by Ashley Willis, https://openpipeflow.org/).\n", "\n", "- We show the leading eigenvalues of the lower branch traveling wave and check that the nonresonance conditions required by results of Haller et al. 2023 hold.\n", "\n", "- We show the calculations necessary to explicitly compute the analytic (primary) slow SSM of the laminar flow" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Check for resonances in the spectrum of the lower branch traveling wave" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "eig2LB = np.loadtxt('data/arnoldi.dat', skiprows = 3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The existence results for the mixed-mode SSM apply if Sternberg's linearization theorem applies. \n", "Let us denote the eigenvalues as $\\lambda_i$ and ordering them according to descending real part. We then require that there is no resonance among eigenvalues, i.e\n", "\n", "$$\n", "\\lambda_j \\neq \\sum_{i} m_i \\lambda_i \\quad \\sum_i m_i \\geq 2\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We select the leading $15$ eigenvalues, but this corresponds to $24$ eigenvalues in total, due to the complex-conjugate pairs. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "ms = np.arange(0, 5, 1)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "eigenvalues = eig2LB[np.abs(eig2LB[:,1])>0.001, 1] + 1j*eig2LB[np.abs(eig2LB[:,1])>0.001,2]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "eigenvalues = np.unique(np.concatenate((eigenvalues, np.conjugate(eigenvalues))))" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "sort_ind = np.argsort(-np.real(eigenvalues), axis=0)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "eigenvalues = np.take_along_axis(eigenvalues, sort_ind, axis = 0)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "from sklearn.preprocessing import PolynomialFeatures" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "polyfeat = PolynomialFeatures(degree = 6)\n" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
PolynomialFeatures(degree=6)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
PolynomialFeatures(degree=6)