Changes between Version 28 and Version 29 of SelfGravityDevel
- Timestamp:
- 02/04/13 15:21:37 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SelfGravityDevel
v28 v29 22 22 [[latex(\nabla^{2}\phi=4\pi G\rho)]] 23 23 24 where [[latex($\rho$)]] is the mass density. This equation describes how the potential [[latex($\phi$)]] is determined by the mass density distribution.25 26 For example, consider the uniform density distribution24 where [[latex(\rho)]] is the mass density. This equation describes how the potential [[latex(\phi)]] is determined by the mass density distribution. 25 26 For example, consider the uniform density distribution 27 27 28 28 {{{ … … 34 34 \end{equation} 35 35 }}} 36 Use spherical coordinates, the Poisson equation for the density distribution Equation (1) can be written as36 Use spherical coordinates, the Poisson equation for the density distribution Equation (1) can be written as 37 37 38 38 {{{ … … 64 64 === Free-fall Time === 65 65 66 The free-fall time is the characteristic time that would take a body to collapse under its own gravitational attraction, if no other forces existed to oppose the collapse.67 Using the Gauss's theorem, the gravitional acceleration [[latex($g_{r}$)]] is given by66 The free-fall time is the characteristic time that would take a body to collapse under its own gravitational attraction, if no other forces existed to oppose the collapse. 67 Using Gauss's theorem, the gravitational acceleration [[latex(g_{r})]] is given by 68 68 {{{ 69 69 #!latex … … 72 72 \end{equation} 73 73 }}} 74 where [[latex($M_{r}$)]] is the mass inside [[latex($r$)]]74 where [[latex(M_{r})]] is the mass inside [[latex(r)]] 75 75 {{{ 76 76 #!latex … … 79 79 \end{equation} 80 80 }}} 81 So the equation of motion for a gas molecule under a control of the self-gravity can be written as81 So the equation of motion for a gas molecule under a control of the self-gravity can be written as 82 82 {{{ 83 83 #!latex … … 86 86 \end{equation} 87 87 }}} 88 Equation (7) can be written as the form of the conservation of mechanical energy88 Equation (7) can be written as the form of the conservation of mechanical energy 89 89 {{{ 90 90 #!latex … … 93 93 \end{equation} 94 94 }}} 95 Suppose the gas molecule is initially located at [[latex($r=R$)]]. So the total energy95 Suppose the gas molecule is initially located at [[latex(r=R)]]. So the total energy 96 96 {{{ 97 97 #!latex … … 100 100 \end{equation} 101 101 }}} 102 Now consider gas collapse. So [[latex($M_{r}= M_{r}(R)$)]]. Equation (8) gives102 Now consider gas collapse. So [[latex(M_{r}= M_{r}(R))]]. Equation (8) gives 103 103 {{{ 104 104 #!latex … … 114 114 \end{equation} 115 115 }}} 116 From the initial state we have [[latex($\eta(t=0)=0$)]]. So Equation (10) reduces to116 From the initial state we have [[latex(\eta(t=0)=0)]]. So Equation (10) reduces to 117 117 {{{ 118 118 #!latex … … 121 121 \end{equation} 122 122 }}} 123 Solve Equation (12) we have123 Solve Equation (12) we have 124 124 {{{ 125 125 #!latex … … 128 128 \end{equation} 129 129 }}} 130 Let [[latex($r=0$)]] or [[latex($\eta=\frac{\pi}{2}$)]]. we have the free-fall time130 Let [[latex(r=0)]] or [[latex(\eta=\frac{\pi}{2})]]. we have the free-fall time 131 131 {{{ 132 132 #!latex … … 138 138 \end{equation} 139 139 }}} 140 where140 where 141 141 {{{ 142 142 #!latex … … 145 145 \end{equation} 146 146 }}} 147 is the average density of the gas.147 is the average density of the gas. 148 148 149 149 150 150 == Implementation == 151 151 === Uniform Density Cloud === 152 In this section we consider the problem of the collapse of a pressureless ([[latex($T=0$)]]), uniform, initially motionless cloud which has an analytic solution.153 154 The definition of [[latex($\eta$)]] in Equation (11) can also be written as152 In this section we consider the problem of the collapse of a pressureless ([[latex(T=0)]]), uniform, initially motionless cloud which has an analytic solution. 153 154 The definition of [[latex(\eta)]] in Equation (11) can also be written as 155 155 {{{ 156 156 #!latex … … 159 159 \end{equation} 160 160 }}} 161 From Equations (13) and (14) we have161 From Equations (13) and (14) we have 162 162 {{{ 163 163 #!latex … … 166 166 \end{equation} 167 167 }}} 168 Equation (17) describes the time it takes for the cloud to collapse to a density [[latex($\rho$)]].168 Equation (17) describes the time it takes for the cloud to collapse to a density [[latex(\rho)]]. 169 169 170 170 === Boundary Conditions === … … 175 175 176 176 === Some notes on periodic BC's and particles === 177 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 to178 179 [[latex( $\nabla_D^2 G(x,y) = \delta^D(x-y)$)]]177 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 178 179 [[latex(\nabla_D^2 G(x,y) = \delta^D(x-y))]] 180 180 181 181 where D is the dimenesion of the problem. For 3D, 182 182 183 [[latex( $G(x,y)=\frac{-1}{4\pi|x-y|}$)]]183 [[latex(G(x,y)=\frac{-1}{4\pi|x-y|})]] 184 184 185 185 and for 2D, 186 186 187 [[latex( $G(x,y)=\frac{\ln(|x-y|)}{2\pi}$)]]187 [[latex(G(x,y)=\frac{\ln(|x-y|)}{2\pi})]] 188 188 189 189 and for 1D, 190 190 191 [[latex( $G(x,y)=\frac{|x-y|}{2}$)]]191 [[latex(G(x,y)=\frac{|x-y|}{2})]] 192 192 193 193 Now with periodic BC's, the solution to the gas potential is given by 194 194 195 [[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.196 197 [[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}$)]]195 [[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. 196 197 [[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})]] 198 198 199 199 This can be discretized as 200 200 201 [[latex( $\phi(l)=\frac{4 \pi GM}{\Delta k^2} \displaystyle \sum_{j=-N/2}^{N/2}{\frac{1}{j^2}e^{2\pi ijl/N} \frac{\Delta k}{2\pi}}=\frac{4 \pi GM}{(2 \pi/L)^2}\left(\frac{2 \pi}{L}\right) \displaystyle \sum_{j=1}^{N/2}{\frac{1}{j^2}\cos(2\pi jl/N)}$)]]202 203 This still requires summation over many wave numbers - although the higher wave numbers have less impact because of the [[latex( $k^{-2}$)]] dependence. However in 2D this is lessened because there are more wave vectors in each anuli, and in 3D there is equal power in each shell. This then, becomes an order N^6 operation :|201 [[latex(\phi(l)=\frac{4 \pi GM}{\Delta k^2} \displaystyle \sum_{j=-N/2}^{N/2}{\frac{1}{j^2}e^{2\pi ijl/N} \frac{\Delta k}{2\pi}}=\frac{4 \pi GM}{(2 \pi/L)^2}\left(\frac{2 \pi}{L}\right) \displaystyle \sum_{j=1}^{N/2}{\frac{1}{j^2}\cos(2\pi jl/N)})]] 202 203 This still requires summation over many wave numbers - although the higher wave numbers have less impact because of the [[latex(k^{-2})]] dependence. However in 2D this is lessened because there are more wave vectors in each anuli, and in 3D there is equal power in each shell. This then, becomes an order N^6 operation :| 204 204 205 205 Solutions: