I am trying to validate my 2D local spatial stability code written in Cartesian coordinates system. I am using the results of Spatial stability of single jet to validate my code. Here is the code snippet where I am defining the mesh:load “PETSc-complex”
include “ffmatlib.idp”
macro dimension()2//
include “macro_ddm.idp”
real cpu = clock();
// =============================================================
// PARAMETERS AND FE DEFINITIONS
// =============================================================
func Pb2 = [P2, P2];
func Pc = [P2, P2, P2, P2, P2];
// =============================================================
// DOMAIN
// =============================================================
real x0 = -5, x1 = 5;
real y0 = -3, y1 = 3;
int n = 60, m = 60;
border C1(t = 0, 2pi) { x = 8cos(t); y = 8*sin(t); }
mesh Th = buildmesh(C1(15000));
// =============================================================
// INITIAL MESH ADAPTATION
// =============================================================
fespace Kh(Th, P1);
Kh r = sqrt(x^2 + y^2);
real Rj = 1.2;
real deltam = 1.0;
Kh indicator = 2 * exp(-((r - Rj)^2) / (deltam^2));
Th = adaptmesh(Th, indicator,
err = 0.01,
hmin = 0.002,
hmax = 0.3,
iso = false,
nbvx = 200000);
// =============================================================
// BASE FLOW PROFILE
// =============================================================
real zpos = 1;
real a = 0.59 + 0.09 * tanh(sqrt(zpos) - 2.9);
real delta = (39 + 24zpos + 0.11zpos^4) / (1000 + zpos^3);
func real Vz(real rr)
{
return 0.5 * (tanh((rr + a) / delta) - tanh((rr - a) / delta));
}
func real vcoflow(real rr)
{
return 0.005 * (tanh((rr + a) / delta) - tanh((rr - a) / delta));
}
real a0 = 0.59 + 0.09 * tanh(sqrt(0.0) - 2.9);
real delta0 = (39 + 240.0 + 0.110.0^4) / (1000 + 0.0^3);
func real Vzref(real rr)
{
return 0.5 * (tanh((rr + a0) / delta0) - tanh((rr - a0) / delta0));
}
func real Vzsim(real rr)
{
return (Vz(rr) + vcoflow(rr)) / (Vzref(0.0) + vcoflow(rr));
}
// =============================================================
// BASE FIELD ON MESH
// =============================================================
fespace Vh(Th, P2);
Vh W, Wx, Wy, Wxx, Wyy;
W = Vzsim(sqrt(xx + y*y);
Above is the base velocity profile.
But I am not getting the good convergence for the eigen values with this mesh definition. What changes should I do?
