The calculation of Ez from phi currently uses first order one-sided derivatives at the top and bottom electrodes.
This seems not accurate enough.
We can call the new implemented kernel Dphi/Dz, which uses the second order derivative at the top and bottom electrodes.
In the code, this lines should be implemented:
Ez_arr(i,j,k) = - DphiDz(phi, z, z_hi, z_lo, prob_lo, prob_hi, Phi_Bc_hi, Phi_Bc_lo, i, j, k, dx);
in replacement of the current
The calculation of Ez from phi currently uses first order one-sided derivatives at the top and bottom electrodes. This seems not accurate enough. We can call the new implemented kernel
Dphi/Dz
, which uses the second order derivative at the top and bottom electrodes.In the code, this lines should be implemented:
Ez_arr(i,j,k) = - DphiDz(phi, z, z_hi, z_lo, prob_lo, prob_hi, Phi_Bc_hi, Phi_Bc_lo, i, j, k, dx);
in replacement of the current