- #1
checkfrogger
- 2
- 0
Hi folks,
I was wondering how to code a Maxwell solver for a problem with time-dependent boundary conditions. This is not my homework, but I love programming and would like to implement what I learned in my physics undergrad course to get a better understanding.
More precisely, if I have an electrode with a time-dependent potential, how do I obtain the electric and magnetic field around it?
I basically came up with two ways, which both seem inappropriate to me:
1)
- calculate the potential using the Poisson equation with boundary conditions at time t=0
- then obtain E as the neg. gradient of the potential.
- calculate E and B at the next time step using the two curl equations of Maxwell equations
- repeat steps 1 and 2 at the next step and it might not be consistent with the third step...
I have the feeling that I mix electrostatics and electrodynamics here
2)
- set a boundary condition for E, solve the divergence equations of Maxwell equations at t=0
- calculate the next time step using the curl equations of Maxwell equations. The obtained E at t=1 might be inconsistent with the new potential at t=1.
-> similar problem here: I am not sure how to make this self-consistent
Thanks for your help!
Andrew
I was wondering how to code a Maxwell solver for a problem with time-dependent boundary conditions. This is not my homework, but I love programming and would like to implement what I learned in my physics undergrad course to get a better understanding.
More precisely, if I have an electrode with a time-dependent potential, how do I obtain the electric and magnetic field around it?
I basically came up with two ways, which both seem inappropriate to me:
1)
- calculate the potential using the Poisson equation with boundary conditions at time t=0
- then obtain E as the neg. gradient of the potential.
- calculate E and B at the next time step using the two curl equations of Maxwell equations
- repeat steps 1 and 2 at the next step and it might not be consistent with the third step...
I have the feeling that I mix electrostatics and electrodynamics here
2)
- set a boundary condition for E, solve the divergence equations of Maxwell equations at t=0
- calculate the next time step using the curl equations of Maxwell equations. The obtained E at t=1 might be inconsistent with the new potential at t=1.
-> similar problem here: I am not sure how to make this self-consistent
Thanks for your help!
Andrew