@@ -432,8 +432,10 @@ int physics_run(BoutReal t)
432432 }
433433 if (evolve_te)
434434 Te.applyBoundary (); // need this
435+
436+ // u.applyBoundary();
435437 static Field2D A = 0.0 ;
436- static Field2D C = 1e-24 ;
438+ static Field2D C = 1e-12 ;
437439 static Field2D D = 1.0 ;
438440 FieldFactory f (mesh);
439441
@@ -457,7 +459,8 @@ int physics_run(BoutReal t)
457459
458460
459461
460- phi = invert_laplace (u_prev, phi_flags,&A,&C,&D);
462+ phi = invert_laplace (u_prev, 49152 ,&A,&C,&D);
463+ // phi = invert_laplace(u_prev, 16384 ,&A,&C,&D);
461464 // fast way to incluce bias_phi in the physics without recoding
462465 Lambda_eff = Lambda;// - ramp(t-t0,20)*bias_phi/Te_;
463466 // output.write("ramp %g \n",ramp(t-t0,20*DT));
@@ -532,28 +535,8 @@ int physics_run(BoutReal t)
532535 region_select = f.create3D (" h(.3-x) +h(x-.02)" )-1.0 ;
533536 target_core = min ((n* region_select).DC (),true )-.02 ;
534537
535- // output.write("tarval_val %g \n",target_val);
536- // target_val = -6.0;
537- // ddt(n) -= (1e0*alpha*sink_in)*(1.0-exp(target_core)/exp(n));
538538 ddt (n) -= (1e0 *alpha*sink_out)*(1.0 -exp (target_sol)/exp (n));
539- // ddt(u) = lowPass(ddt(u)*sink_out,4) + ddt(u)*(1.0-sink_out);
540- // ddt(u) = lowPass(ddt(u)*(sink_sol+sink_core),int(MZ/8.0)) + ddt(u)*(1.0-sink_sol-sink_core);
541- // if (evolve_te){
542- // // region_select = f.create3D("h(.95-x) +h(x-.7)")-1.0;
543- // // target_sol = min((Te* region_select).DC(),true)*.98;
544-
545- // // region_select = f.create3D("h(.3-x) +h(x-.05)")-1.0;
546- // // target_core = min((Te* region_select).DC(),true)*.98;
547-
548- // // ddt(Te) -= (1e1*alpha*sink_core)*(Te - target_core);
549- // // ddt(Te) -= (1e1*alpha*sink_sol)*(Te - target_sol);
550- // //try low-pass filter on boundary
551539
552- // ddt(u) = lowPass(ddt(u)*(sink_sol+sink_core),5) + ddt(u)*(1.0-sink_sol-sink_core);
553-
554-
555-
556- // }
557540
558541
559542
0 commit comments