-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the issue:
Hi all,
I have in my simulations an asymmetric behaviour of the toroidal magnetic field component (BX3 in spherical coordinates) between the north and south poles of the spherical grid.
Looking at the axis boundary condition, I noticed this part that regularises the current JX1 on the axis:
idefix/src/fluid/boundary/axis.cpp
Lines 130 to 138 in 54482d5
| // Use the circulation around the pole of Bphi to determine Jr on the pole: | |
| // Delta phi r^2(1-cos theta) Jr = int r sin(theta) Bphi dphi | |
| idefix_for("fixJ",0,data->np_tot[KDIR],0,data->np_tot[IDIR], | |
| KOKKOS_LAMBDA(int k,int i) { | |
| real th = x2(jc); | |
| real fact = sign*sin(th)/(deltaPhi*x1(i)*(1-cos(th))); | |
| J(IDIR, k,js,i) = BAvg(i)*fact; | |
| }); |
I think the relation
cannot be true, since
By recalculating the Amper's law around the axis, I get
or
which converge to the same result as the current relation near
So line 136 should be replaced by
real fact = sign*4.*sin(th)/(deltaPhi*x1(i)*(1-cos(2*th)));
or
real fact = sign*2./(deltaPhi*x1(i)*sin(th));.
Is this correct or am I missing something?
Error message:
runtime information:
idefix V2.2.00