Hello,
I am currently doing a 1 dimensional linear stabiity solver (for fluid mechanics). To do so I solve an eigenvalue problem as AX = lambda BX where A and B are terms from the linearized Navier-Stokes equations and of the mean flow and X is the small perturbation that is unknown (u, v, w, p).
In these matrices A and B must be added boundary conditions, for some case only Neumann or Dirichlet boundary conditions need to be imposed (case m = 0 and m>1 in page 3). For these two cases, Freefem works perfectly well.However, for the case m=±1, the first perturbation u depends on the second perturbation v as 2u’(0)+mv’(0)=0.
Would there be a way to impose such kind of boundary condition if Freefem ? I have put the case that work for m = 0. In the code F stands for u, G for v, H for w and Pr for p.
real ymin = 0.;
real ymax = 1.;
border yline(t=ymin,ymax){x=0.;y=t;}
int np = 1000;
meshL Th=buildmeshL(yline(np));
fespace Xh(Th, P2);
fespace Mh(Th, P1);
Xh W=1-y^2, V=0, U=0, Re=100.0, Visco=1/Re, PrMean = 0.;
Xh alpha=10.0, m=0.0;
fespace Vh(Th, [P2, P2, P2, P1]);
Vh [F, G, H, Pr], [X1, X2, X3, X4];
varf opLHS([F, G, H, Pr], [X1, X2, X3, X4]) =
int1d(Th)( -(1iy^2/Re)dy(F)dy(X1)-((1i/Re)((m^2+1)+y^2alpha^2))FX1+y^2alphaWFX1-(1i)(y/Re)Fdy(X1)-(21im/Re)GX1+y^2Prdy(X1)
+(1i)(-(y^2/Re)dy(G)dy(X2))-((1i)/Re)((m^2+1)+y^2alpha^2)GX2+y^2alphaWGX2-(1i)(y/Re)Gdy(X2)-(2m(1i)/Re)FX2+myPrX2
-(1i)(y^2/Re)dy(H)dy(X3)-(1i)(y/Re)Hdy(X3)+y^2alphaWHX3-(1i/Re)(m^2+alpha^2y^2)HX3+y^2dy(W)FX3+1iy^2alphaPrX3
-X4*(F+mG+alphayH)+yF*dy(X4)
)
+on(1, F=0, G=0)
+on(2, F=0, G=0, H=0);
// get the RHS function
varf opRHS([F, G, H, Pr], [X1, X2, X3, X4]) = int1d(Th)(y^2FX1 + y^2GX2 + y^2HX3)
+on(1, F=0, G=0)
+on(2, F=0, G=0, H=0);