2D frequency domain forward modeling

Hello
good day
I’m trying to write an EM code for 2D frequency domain forward modeling using finite difference, and I need little help for the primary field, because I don’t know the exact equation that I should use, and how to use it…
thank you all in advance .