Phi^{\rm B}$ as having nonzero value only in a single layer of ghost zones immediately outside the active domain. Then we can write the desired potential as $\Phi = \widetilde{\Phi} + \Phi^{\rm B}$ where the required boundary condition is $\widetilde{\Phi}=0$. From the definition of $\Phi^{\rm B}$, $\Delta^2
\Phi^{\rm B}$ will be nonzero only in the single layer of active zones adjoining the domain boundaries. We can thus define a modified density distribution $\rho \rightarrow \rho - \Delta^2
\Phi^{\rm B}/(4\pi G)$ which is the same as the original density distribution everywhere except in the layer just inside the domain boundaries. We then employ this modified density distribution following the procedure of Section \[sec:cart\_int\] or Section \[s:interior\_solver\_cylindrical\] to compute $\widetilde{\Phi}$. Within the interior, where $\Phi^{\rm B}=0$, this solution is then the desired final solution $\Phi$.

Note that in Sections \[sec:cart\_int\] and \[s:interior\_solver\_cylindrical\] below, $\rho_{i,j,k}$ is any arbitrary density distribution on the grid, and in fact represents a different quantity for each of the three instances where we solve for the interior potential.

Cartesian Grid Solution with Zero Boundary Value {#sec:cart_int}
------------------------------------------------

It is conventional to utilize the eigenfunctions of a differential operator in solving an elliptic partial differential equation. The same technique can be applied to the discretized Poisson equation, if the eigenfunctions of the corresponding discrete Laplace operator can be found.

Let ${\cal X}^l_i$, ${\cal Y}^m_j$, and ${\cal Z}^n_k$ be the eigenfunctions of the discrete Laplace operators $\Delta_x^2$, $\Delta_y^2$, and $\Delta_z^2$ satisfying $\Delta_x^2{\cal X}^l_i = \lambda_x^l{\cal X}^l_i$, $\Delta_y^2{\cal Y}^m_j = \lambda_y^m{\cal Y}^m_j$, and $\Delta_z^2{\cal Z}^n_k = \lambda_z^n{\cal Z}^n_k$, with respective eigenvalues $\lambda^l_x$, $\lambda_y^m$,
Phi^{\rm B}$ as having nonzero value only in a single layer of ghostwriter zone immediately outside the active domain. Then we can write the desired electric potential as $ \Phi = \widetilde{\Phi } + \Phi^{\rm B}$ where the required boundary condition is $ \widetilde{\Phi}=0$. From the definition of $ \Phi^{\rm B}$, $ \Delta^2 
 \Phi^{\rm B}$ will be nonzero only in the individual layer of active zones border the domain boundaries. We can therefore define a modified density distribution $ \rho \rightarrow \rho - \Delta^2 
 \Phi^{\rm B}/(4\pi G)$ which is the same as the original concentration distribution everywhere except in the layer just inside the knowledge domain boundaries. We then employ this modify density distribution following the procedure of Section \[sec: cart\_int\ ] or Section \[s: interior\_solver\_cylindrical\ ] to calculate $ \widetilde{\Phi}$. Within the interior, where $ \Phi^{\rm B}=0 $, this solution is then the desired concluding solution $ \Phi$. 

 Note that in Sections \[sec: cart\_int\ ] and \[s: interior\_solver\_cylindrical\ ] under, $ \rho_{i, j, k}$ is any arbitrary density distribution on the power system, and in fact represents a different quantity for each of the three instances where we clear for the interior potential. 

 Cartesian Grid Solution with Zero Boundary Value { # sec: cart_int } 
 ------------------------------------------------ 

 It is conventional to utilize the eigenfunctions of a differential operator in clear an elliptic partial differential equation. The same technique can be applied to the discretized Poisson equation, if the eigenfunctions of the corresponding discrete Laplace operator can be found. 

 permit $ { \cal X}^l_i$, $ { \cal Y}^m_j$, and $ { \cal Z}^n_k$ be the eigenfunctions of the discrete Laplace operators $ \Delta_x^2 $, $ \Delta_y^2 $, and $ \Delta_z^2 $ satisfying $ \Delta_x^2{\cal X}^l_i = \lambda_x^l{\cal X}^l_i$, $ \Delta_y^2{\cal Y}^m_j = \lambda_y^m{\cal Y}^m_j$, and $ \Delta_z^2{\cal Z}^n_k = \lambda_z^n{\cal Z}^n_k$, with respective eigenvalue $ \lambda^l_x$, $ \lambda_y^m$,
Phi^{\gm B}$ as having nonzero vxlue only in a single nayer kf ghost zones immediately outside tie axtive domain. Then we can wrkte the dvsired porentmal as $\Phi = \widevjlde{\Phi} + \Phi^{\rj B}$ wkece the required boundary wondition is $\whddtnlde{\Phi}=0$. From the definition of $\Phi^{\rm B}$, $\Delts^2
\Pji^{\rm B}$ will be noneerj onmj ln the single layer of active zohes adjmining the dokain boundaries. We can thud devine a modified dejsity distrubutyin $\rho \rightxrrow \rho - \Delta^2
\Phi^{\rm G}/(4\pi G)$ which is the same as the urigiual density dustghbution evecywherv except in tmv layer just imside the domaln bonndaeies. We then employ tiis modified density distribudikn following the pricedute of Secguon \[sed:cert\_jnt\] or Sertion \[s:intedior\_solver\_ctlindrical\] to compuue $\rpcetilde{\Phi}$. Wjthin ehq interior, where $\Phi^{\rm B}=0$, this solution ps tgen the desired final silution $\Phi$.

Note that ln Sectiogs \[sec:cart\_int\] and \[s:interior\_solver\_cylindrical\] belof, $\rho_{m,j,y}$ iw wvt wrbitrary density distribution on the grid, anq im nact represents c different quanyihy sor each of tfe thrzs jnstances where we solve sor tye interijr pptential.

Cartesian Grid Solurion with Zego Biundary Value {#sec:ccrt_int}
------------------------------------------------

It is eonvenjional to utilize the eigenfuuctiona of a difffrential koerator in solvivg sn elliptic partial differeneial equavion. Che same tecnnique can be apolied to the discretized Poisdot equation, if the eigenfunctions of the corresponding doswrene Laplacz operstor can be fjund.

Let ${\cal X}^l_n$, ${\cal Y}^m_l$, and ${\zal Z}^n_k$ be the eijenfunctions of the discraje Laplace opxrators $\Dqlta_z^2$, $\Deota_y^2$, ana $\Delta_z^2$ satisfuing $\Deltc_r^2{\cal X}^l_i = \lambda_x^l{\cal X}^l_i$, $\Dclta_y^2{\zzl Y}^m_j = \lambda_y^n{\cao Y}^m_j$, and $\Delta_a^2{\cau Z}^g_k = \kaitda_z^n{\cal Z}^n_k$, witf rdxpectkve eigtuvaojes $\kambda^l_x$, $\lambda_y^m$,
Phi^{\rm B}$ as having nonzero value only single of ghost immediately outside the write desired potential as = \widetilde{\Phi} + B}$ where the required boundary condition $\widetilde{\Phi}=0$. From the definition of $\Phi^{\rm B}$, $\Delta^2 \Phi^{\rm B}$ will be nonzero in the single layer of active zones adjoining the domain boundaries. We can define modified distribution \rightarrow \rho - \Delta^2 \Phi^{\rm B}/(4\pi G)$ which is the same as the original density distribution except in the layer just inside the domain We then employ this density distribution following the procedure Section or Section to $\widetilde{\Phi}$. the interior, where B}=0$, this solution is then the desired final solution $\Phi$. Note that in Sections \[sec:cart\_int\] and \[s:interior\_solver\_cylindrical\] $\rho_{i,j,k}$ is density distribution the and fact represents a for each of the three instances for the interior potential. Cartesian Grid Solution with Boundary Value ------------------------------------------------ It is conventional to utilize eigenfunctions of a differential operator in solving an partial differential equation. The same technique can be applied to the discretized Poisson equation, if of the corresponding discrete operator can be Let X}^l_i$, Y}^m_j$, ${\cal Z}^n_k$ the eigenfunctions of the discrete Laplace operators $\Delta_x^2$, $\Delta_y^2$, and $\Delta_z^2$ $\Delta_x^2{\cal X}^l_i = \lambda_x^l{\cal X}^l_i$, $\Delta_y^2{\cal Y}^m_j = \lambda_y^m{\cal Y}^m_j$, Z}^n_k \lambda_z^n{\cal Z}^n_k$, with eigenvalues $\lambda^l_x$, $\lambda_y^m$,
Phi^{\rm B}$ as having nonzero valuE only in a siNgle lAyeR of GhOst zOnes Immediately outSIde tHe active domain. Then we caN writE tHE desIReD poteNtial as $\pHi = \WIDetIlDe{\phi} + \phI^{\Rm b}$ wherE thE requirEd boundary ConDiTion is $\widetiLDe{\phi}=0$. From the DefInition of $\Phi^{\Rm B}$, $\delta^2
\PHi^{\Rm B}$ WIll be NonZero oNly in tHE singlE layer of aCtIVe zoneS AdjoiniNG ThE domAin boundaries. We caN ThUS define a modifiEd densItY DiSTRibUtiOn $\rho \rightArRow \rhO - \delta^2
\PhI^{\Rm b}/(4\PI g)$ whICh is the same as The original DEnsIty disTrIbuTIon eveRywheRe EXcePt in the layeR jusT inside thE domaiN BoundarIEs. We theN emploY thIs mOdifIEd DeNsiTy DIstRIbUtiON foLlowing tHe PrOceduRe of sECTIon \[sEc:cArt\_iNt\] or SEction \[s:interiOr\_sOlveR\_CylIndriCal\] to CompUtE $\wideTilde{\PHi}$. WitHiN the interior, wheRe $\PhI^{\rm B}=0$, this sOluTiOn iS tHen thE DesireD fiNal SolutioN $\Phi$.

NotE ThaT iN sECtIons \[sec:cart\_int\] and \[s:InTERiOr\_solver\_CylindRIcAl\] BElow, $\rho_{i,J,k}$ Is aNy arBITrary DensITy DistribuTion on THe GrId, and in FaCt reprEsEntS a dIfferENt quAntity For each oF the tHRee instances whERe we solve for tHE iNTErIOr poTenTial.

CartesiAn GrID SolUtioN WiTh ZERo BouNdary vaLUe {#SEc:cart_int}
------------------------------------------------

It is convenTiOnal to UtiliZe the eigenfunCtions of a dIFFErential OperAToR In solving an ellIptic Partial difFErential EquatIon. The saMe techniqUE Can be appLieD to The DisCREtIzed Poisson eqUATion, If The eigeNfuNctions Of tHe cOrrEspOnDing discrEte LaplaCe OpErAtOr cAn be fOUnd.

Let ${\caL X}^L_i$, ${\cAl y}^m_j$, And ${\caL z}^n_k$ be tHe eigEnfuNcTiONs oF the disCReTE laplAcE oPeraTorS $\DElta_x^2$, $\deltA_Y^2$, anD $\Delta_z^2$ SatisfyinG $\DeLTa_x^2{\cAl x}^l_I = \lambda_X^l{\cal X}^l_i$, $\Delta_Y^2{\cAl Y}^m_j = \lambdA_y^M{\caL Y}^m_j$, anD $\dElta_z^2{\cal z}^n_k = \lambda_z^n{\cal Z}^n_k$, with reSPective EigEnvalUes $\lAmbda^l_x$, $\laMbdA_y^m$,
Phi^{\rm B}$ as having non zero value  only  in  asi ngle  lay er of ghost zo n es i mmediately outside the  acti ve doma i n.  Then  we can wr i t e t he  d esi re d  p otent ial  as $\P hi = \wide til de {\Phi} + \Ph i ^{ \rm B}$ wh ere  the require d b oundar ycon d ition  is  $\wi detild e {\Phi} =0$. From  t h e defi n ition o f $\ Phi^ {\rm B}$, $\Delta ^ 2\ Phi^{\rm B}$ w ill be  n o nz e r o o nly  in the si ng le la y er of a c ti v e zon e s adjoining t he domain b o und aries.  W e c a n thus  defi ne a m odified den sity  distribu tion $ \ rho \ri g htarrow  \rho- \ Del ta^2 \P hi ^{\ rm B}/ ( 4\ piG )$which is  t he  same  ast h e orig ina l de nsity  distribution  ev eryw h ere  exce pt in  the  l ayerjust i nside  t he domain bound arie s. We the n e mp loy  t his m o dified  de nsi ty dist ributio n  fo ll o w i ng  the procedure ofSe c t io n \[sec: cart\_ i nt \] or Secti on  \[ s:in t e rior\ _sol v er \_cylind rical\ ]  t ocompute  $ \widet il de{ \Ph i}$.W ithi n theinterior , whe r e $\Phi^{\rm B } =0$, this sol u ti o n  i s  the n t he desiredfina l  sol utio n  $ \Ph i $.

N ote t ha t  i n  Sections \[sec:car t\ _int\]  and\[s:interior\ _solver\_c y l i ndrical\ ] be l ow ,  $\rho_{i,j,k} $ isany arbitr a ry densi ty di stributi on on the g rid, and  in  fa ctrep r e se nts a differe n t  qua nt ity for  ea ch of t hethr eeins ta nces wher e we sol ve  f or  t heinter i or poten ti al. 
Car tesia n  GridSolut ionwi th Zer o Bound a ry V alue  { #s ec:c art _i nt}
- ---- - --- ------- --------- --- - ---- -- -- ------- ----

It is c on ventionalto  ut ilizet h e eigenf unctions of a different i al oper ato r insolv ing an el lip tic pa rti a l diff erenti al eq ua tio n .  Thes a me  te ch nique canb e  ap plied  t o th e discr etized Poisson equ a tio n, if the eig enf unct i o ns  of th e  co rr e spo n d ing discrete La place oper at o rcan be fou n d.
L et ${\c al X}^l _i$,$ {\cal Y }^m_j$, a nd ${\cal  Z }^n_ k $  be  the eigen function s of thed iscre t eLapla ceoperat or s $ \Delt a_x^2$ ,  $\ Delta _y^2$,  a nd $\D elta_ z^ 2$ satis fying $\Delta_x^2{\calX}^l_i  = \l amb da_x^l{\c alX }^l _i$, $\De lta_ y^2{\cal Y }^m _j= \la mbd a _y^m{ \cal Y} ^m_ j $, an d $\ D elta_z^2{ \ ca l Z } ^ n_ k = \lambda _ z ^ n{\ cal Z }^n _ k$, wi th r espective eigenva l ues $\lambda^l _x$, $ \la mbd a _y^m $, 
Phi^{\rm B}$_as having_nonzero value only in_a single_layer_of ghost_zones_immediately outside the_active domain. Then_we can write the_desired potential as_$\Phi_= \widetilde{\Phi} + \Phi^{\rm B}$ where the required boundary condition is $\widetilde{\Phi}=0$. From the_definition_of $\Phi^{\rm_B}$,_$\Delta^2
\Phi^{\rm_B}$ will be nonzero only_in the single layer of_active zones_adjoining the domain boundaries. We can thus define_a_modified density distribution_$\rho \rightarrow \rho - \Delta^2
\Phi^{\rm B}/(4\pi G)$ which is_the same as the original density_distribution everywhere except_in_the_layer just inside the_domain boundaries. We then employ this_modified density distribution following the procedure_of Section \[sec:cart\_int\] or Section \[s:interior\_solver\_cylindrical\] to_compute $\widetilde{\Phi}$. Within the interior, where_$\Phi^{\rm B}=0$, this solution is_then the_desired final solution $\Phi$.

Note that_in Sections \[sec:cart\_int\]_and \[s:interior\_solver\_cylindrical\]_below, $\rho_{i,j,k}$ is_any arbitrary density distribution on the_grid, and in_fact represents a different quantity for_each_of the three_instances_where_we solve_for the interior_potential.

Cartesian_Grid Solution_with_Zero Boundary Value {#sec:cart_int}
------------------------------------------------

It is conventional_to_utilize the eigenfunctions of a differential operator_in solving an elliptic_partial_differential equation. The same_technique can be applied to_the discretized Poisson equation, if the_eigenfunctions of_the corresponding_discrete Laplace operator can be found.

Let ${\cal X}^l_i$, ${\cal Y}^m_j$, and_${\cal Z}^n_k$ be the eigenfunctions of_the discrete Laplace operators_$\Delta_x^2$, $\Delta_y^2$,_and_$\Delta_z^2$ satisfying $\Delta_x^2{\cal_X}^l_i_= \lambda_x^l{\cal_X}^l_i$, $\Delta_y^2{\cal Y}^m_j = \lambda_y^m{\cal Y}^m_j$, and_$\Delta_z^2{\cal Z}^n_k_= \lambda_z^n{\cal Z}^n_k$, with respective eigenvalues_$\lambda^l_x$, $\lambda_y^m$,