You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure zero divergence of B with inhomogeneous magnetic user profiles we can't just rely on the prescribed analytical function of have zero divergence. We need to evaluate the function so that it has zero divergence on the Yee grid.
The way to do that is to allow user prescribe the vector potential and calculate magnetic field components as the curl of that vector potential, with a curl operator that knows about the Yee Layout.
So far our profile functions are :
defBx(x,y):
returnx+0.1*y# dumb example
we need user to prescribe vector potential components Ax, Ay, Az :
defAz(x,y):
returnx+0.1*y# dumb example
then the magnetic field functions would be obtained by computing the curl
defBx(x,y):
# here do some stuff to get Bx from Ay and Az# we need x, y, but also the dx, dy# dx and dy are those of the coarsest level since this is only where# fields are initialized via python.# we need to return:# dAy/dz - dAz/dy at x, y.
The simplest and most ergonomic way for the user is probably to give the vector potential to the MaxwellianFluidModel.
So far it only accepts the magnetic field components:
but it should also accept ax, ay, az, but if those are provided:
they should all 3 be given
bx, by, bz can't be provided together with ax, ay, az, they're mutually exclusive.
then MaxwellianFluidInitializer could internally defined bx, by, bz functors that use the vector potential components to get the magnetic field ones from the curl computation without the user having to care...
The text was updated successfully, but these errors were encountered:
To ensure zero divergence of B with inhomogeneous magnetic user profiles we can't just rely on the prescribed analytical function of have zero divergence. We need to evaluate the function so that it has zero divergence on the Yee grid.
The way to do that is to allow user prescribe the vector potential and calculate magnetic field components as the curl of that vector potential, with a curl operator that knows about the Yee Layout.
So far our profile functions are :
we need user to prescribe vector potential components Ax, Ay, Az :
then the magnetic field functions would be obtained by computing the curl
The simplest and most ergonomic way for the user is probably to give the vector potential to the
MaxwellianFluidModel
.So far it only accepts the magnetic field components:
but it should also accept
ax, ay, az
, but if those are provided:then
MaxwellianFluidInitializer
could internally definedbx
,by
,bz
functors that use the vector potential components to get the magnetic field ones from the curl computation without the user having to care...The text was updated successfully, but these errors were encountered: