| 16 | |
| 17 | |
| 18 | === Some notes on periodic BC's and particles === |
| 19 | With periodic boundary conditions, we would like the total potential to be unchanged under the conversion of gas to particle. This requires adjusting the particle potential so that it has the same constant of integration as well as being periodic. When hypre solves for the potential, the constant of integration is a free parameter and I believe hypre adjusts it so that [[latex($<\phi>=0$)]]. To calculate the potential of a point charge, we need the Greens function corresponding to |
| 20 | |
| 21 | [[latex($\nabla_D^2 G(x,y) = \delta^D(x-y)$)]] |
| 22 | |
| 23 | where D is the dimenesion of the problem. For 3D, |
| 24 | |
| 25 | [[latex($G(x,y)=\frac{-1}{4\pi|x-y|}$)]] |
| 26 | |
| 27 | and for 2D, |
| 28 | |
| 29 | [[latex($G(x,y)=\frac{\ln(|x-y|)}{2\pi}$)]] |
| 30 | |
| 31 | and for 1D, |
| 32 | |
| 33 | [[latex($G(x,y)=\frac{|x-y|}{2}$)]] |
| 34 | |
| 35 | Now with periodic BC's, the solution to the gas potential is given by |
| 36 | |
| 37 | [[latex($\nabla^2 \phi = 4\pi G (\rho-\bar{\rho})$)]], so the solution to the potential would actually be given by [[latex($\phi(y)=-\int_V{\frac{M\delta(x-y)-M/V}{|x-y|}dx}$)]] where [[latex($M$)]] is the mass of the particle. Note this is not the same as using mirror versions of the particle... An easier way to solve this however, is to use fourier transforms. |
| 38 | |
| 39 | [[latex($k^2\hat{\phi}(k)=4\pi G\hat{\rho}(k)$)]] with [[latex($\hat{\phi}(0)=0$)]]. Now [[latex($\hat{\rho}(k)$)]] is just the fourier transform of a delta function times the mass, which is [[latex($M$)]], so [[latex($\hat\phi(k)=\frac{4\pi GM}{k^2}$)]] and [[latex($\phi(x)=4 \pi G M\int{\frac{1}{k^2}e^{ikx} dk}$)]] |
| 40 | |
| 41 | This can be discretized as |
| 42 | |
| 43 | [[latex($\phi(l)=4 \pi GM \Delta k^{D-2} \displaystyle \sum_{j=-N/2}^{N/2}{\frac{1}{j^2}e^{2\pi ijl/N}}=8 \pi GM (2 \pi/L)^{D-2} \displaystyle \sum_{j=1}^{N/2}{\frac{1}{j^2}\cos(2\pi jl/N)}$)]] |
| 44 | |