Gauge correction to the induction equation for the sake of numerical stability.
Used in my dynamo work, but apparantly was not done to the main repo.
This commit is contained in:
@@ -449,11 +449,14 @@ induction(in VectorField uu, in VectorField aa)
|
||||
// yes this actually works. See pg.28 in arXiv:astro-ph/0109497)
|
||||
// u cross B - AC_eta * AC_mu0 * (AC_mu0^-1 * [- laplace A + grad div A ])
|
||||
const Vector B = curl(aa);
|
||||
const Vector grad_div = gradient_of_divergence(aa);
|
||||
//MV: Due to gauge freedom we can reduce the gradient of scalar (divergence) from the equation
|
||||
//const Vector grad_div = gradient_of_divergence(aa);
|
||||
const Vector lap = laplace_vec(aa);
|
||||
|
||||
// Note, AC_mu0 is cancelled out
|
||||
const Vector ind = cross(value(uu), B) - AC_eta * (grad_div - lap);
|
||||
//MV: Due to gauge freedom we can reduce the gradient of scalar (divergence) from the equation
|
||||
//const Vector ind = cross(value(uu), B) - AC_eta * (grad_div - lap);
|
||||
const Vector ind = cross(value(uu), B) + AC_eta * lap;
|
||||
|
||||
return ind;
|
||||
}
|
||||
|
Reference in New Issue
Block a user