Hi there !
I’m trying to implement a linear stability module in my Navier-Stokes code with no sucess so far. My idea was to take advantage of the “derivative” function to compute the jacobian then solve the eigenvalue problem.
So far I have something like that:
wbf = Function(space) ubf, pbf = split(wbf) v, q = TestFunctions(space) Fs = (nu * inner(grad(ubf), grad(v))\ + dot(dot(grad(ubf), ubf), v)\ - pbf * div(v)\ - q * div(ubf)\ - dot(f, v)) * dx
I solve this steady problem for a given nu, then I calculate the jacobian applied to the baseflow previously calculated (is the derivative function doing that?):
Js = derivative(Fs, wbf) Js = assemble(Js)
Then I have two options, use dolfin.SLEPcEigenSolver or export my matrix and do the calculation later.
-
If I use dolfin.SLEPcEigenSolver how to specify that I want to solve a complex eigenvalue problem, even though the matrix is real?Looks like it’s looking for complex eigenvalues by default. -
For now I’m exporting the matrix and converting it to a complex one while reading it. Then I solve the eigenvalue problem.
-
In both case, should I impose Dirichlet BC egal to zero everywhere except at the outflow?(answered myself, Yes in order to have a proper weak form obviously) If yes does Js.apply(BC) do the thing?
I don’t have any MWE but if you need one I will implement one quickly.
EDIT : Most of the code is working properly now but my eigenvalues are not what expected. Do anyone has references for Linear Stability Analisys theory in the case of PDE ?
Thank you for your help !