Commit a535d83a authored by ph's avatar ph

up

parent 9ba42af3
......@@ -178,17 +178,13 @@ void exact_sol(real *x, real t, real *w) {
void exact_smooth_vortex(real *x, real t, real *w) {
#define MHD2D_VORTEX_KAPPA 1.0_F
#define MHD2D_VORTEX_UREF 0.2_F
#define MHD2D_VORTEX_MU 1.0_F
#define MHD2D_VORTEX_BREF 0.2_F
const real gam = 1.6666666666_F;
const real rref2 = 1.0_F;
const real rref2 = 1;
const real sigmam2 = 0.5_F;
const real kappa = MHD2D_VORTEX_KAPPA;
const real uref = MHD2D_VORTEX_UREF;
const real bref = MHD2D_VORTEX_BREF;
const real mu = MHD2D_VORTEX_MU;
const real kappa = 1;
const real uref = 0.2_F;
const real bref = 0.2_F;
const real mu = 1;
const real udrift[2] = {1.0_F, 1.0_F};
const real xstart[2] = {5._F, 5._F};
//
......@@ -311,13 +307,14 @@ __kernel void time_step(__global const real *fn, __global real *fnp1) {
// first order relaxation
w2f(wnow + 0, fnext + 0);
real om = 2._F;
// second order relaxation
for (int iv = 0; iv < _M; iv++) {
for (int d = 0; d < 4; d++) {
int ik = d * _M + iv;
// if (iv == ePsi) {
// fnext[ik] = 1.0_F * fnext[ik];
fnext[ik] = 1.9_F * fnext[ik] - 0.9_F * fnow[ik];
fnext[ik] = om * fnext[ik] - (om - 1) * fnow[ik];
//} else {
// fnext[ik] = 1.9_F * fnext[ik] - 0.9_F * fnow[ik];
// fnext[ik] = 2.0_F * fnext[ik] - 1.0_F * fnow[ik];
......
......@@ -59,7 +59,7 @@ def solve_ocl(m=_m, n=_n, nx=_nx, ny=_ny, Lx=_Lx, Ly=_Ly, Tmax=_Tmax,
dy = Ly / ny
# lattice speed
vmax = 21.
vmax = 12
# time stepping
cfl = 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment