About: About blog posts

Browse by time:

- July 2022 (1)
- May 2022 (1)
- April 2022 (3)
- March 2022 (2)
- February 2022 (3)
- January 2022 (2)
- December 2021 (4)
- November 2021 (2)
- September 2021 (6)
- August 2021 (1)
- July 2021 (7)
- June 2021 (2)
- May 2021 (5)
- April 2021 (3)
- March 2021 (7)
- February 2021 (5)
- January 2021 (4)
- December 2020 (7)
- November 2020 (12)
- October 2020 (13)
- September 2020 (11)
- August 2020 (14)
- July 2020 (17)
- June 2020 (18)
- May 2020 (12)
- April 2020 (14)
- March 2020 (15)
- February 2020 (13)
- January 2020 (7)
- December 2019 (6)
- November 2019 (11)
- October 2019 (15)
- September 2019 (14)
- August 2019 (4)
- July 2019 (10)
- June 2019 (5)
- May 2019 (8)
- April 2019 (5)
- March 2019 (13)
- February 2019 (5)
- January 2019 (10)
- December 2018 (5)
- November 2018 (9)
- October 2018 (13)
- September 2018 (12)
- August 2018 (6)
- July 2018 (5)
- June 2018 (9)
- May 2018 (5)
- April 2018 (9)
- March 2018 (14)
- February 2018 (16)
- January 2018 (7)
- December 2017 (5)
- November 2017 (8)
- October 2017 (11)
- September 2017 (10)
- August 2017 (9)
- June 2017 (16)
- May 2017 (14)
- April 2017 (6)
- March 2017 (6)
- February 2017 (4)
- January 2017 (11)
- December 2016 (5)
- November 2016 (13)
- October 2016 (7)
- September 2016 (11)
- August 2016 (6)
- July 2016 (19)
- June 2016 (12)
- May 2016 (11)
- April 2016 (11)
- March 2016 (13)
- February 2016 (17)
- January 2016 (10)
- December 2015 (5)
- November 2015 (15)
- October 2015 (19)
- September 2015 (18)
- August 2015 (23)
- July 2015 (32)
- June 2015 (17)
- May 2015 (23)
- April 2015 (28)
- March 2015 (23)
- February 2015 (19)
- January 2015 (17)
- December 2014 (26)
- November 2014 (42)
- October 2014 (33)
- September 2014 (30)
- August 2014 (16)
- July 2014 (27)
- June 2014 (37)
- May 2014 (19)
- April 2014 (14)
- March 2014 (35)
- February 2014 (30)
- January 2014 (28)
- December 2013 (25)
- November 2013 (30)
- October 2013 (41)
- September 2013 (48)
- August 2013 (36)
- July 2013 (44)
- June 2013 (39)
- May 2013 (29)
- April 2013 (36)
- March 2013 (35)
- February 2013 (31)
- January 2013 (48)
- December 2012 (20)
- November 2012 (29)
- October 2012 (48)
- September 2012 (30)
- August 2012 (16)
- July 2012 (32)
- June 2012 (27)
- May 2012 (26)
- April 2012 (25)
- March 2012 (30)
- February 2012 (35)
- January 2012 (25)
- December 2011 (23)
- November 2011 (41)
- October 2011 (31)
- September 2011 (29)
- August 2011 (23)
- July 2011 (24)
- June 2011 (18)
- May 2011 (3)

Browse by author:

- rss Bo Peng (1)
- rss Yisheng (26)
- rss aanand6 (20)
- rss adebrech (151)
- rss afrank (30)
- rss aliao (6)
- rss alipnicky (2)
- rss amyzou (54)
- rss aquillen (1)
- rss blin (18)
- rss bliu (270)
- rss bpeng6 (7)
- rss brockjw (7)
- rss bshroyer (6)
- rss ceh5286 (2)
- rss dnp19 (7)
- rss ehansen (290)
- rss elambrid (12)
- rss erica (280)
- rss esavitch (43)
- rss fschmidt (35)
- rss gguidarelli (4)
- rss idilernia (35)
- rss johannjc (245)
- rss lchamandy (104)
- rss likuntian (5)
- rss lsabin (2)
- rss madams (61)
- rss martinhe (76)
- rss mblank (30)
- rss mccann (3)
- rss mehr (16)
- rss noyesma (6)
- rss rmarkwic (20)
- rss shuleli (146)
- rss smurugan (24)
- rss yirak (4)
- rss ytlee (1)
- rss zchen (165)

Browse by category:

- rss Accretion (1)
- rss Bonner-Ebert (1)
- rss Bvn (1)
- rss CollidingFlows (27)
- rss Disks (1)
- rss FieldLoop (1)
- rss Magnetic-tower (1)
- rss Meeting-outline (1)
- rss RAID (1)
- rss RT (1)
- rss Resistive_MHD (1)
- rss Test (1)
- rss alfalfa (3)
- rss animation (1)
- rss bamboo (2)
- rss bipolar (1)
- rss bluehive2 (1)
- rss bluestreak (3)
- rss cameraobjects (6)
- rss clover (1)
- rss clump (4)
- rss cooling (1)
- rss data-management (4)
- rss development (1)
- rss disks (3)
- rss documentation (15)
- rss dust (32)
- rss gpu (1)
- rss grass (2)
- rss hydrostatic (1)
- rss mGlobal (1)
- rss magnetic-field (1)
- rss mass (2)
- rss movies (1)
- rss mx (1)
- rss nebula (1)
- rss notification (1)
- rss others-research (1)
- rss outreach (1)
- rss parameter (1)
- rss plugins (1)
- rss query (1)
- rss scaling (1)
- rss script (1)
- rss shape (3)
- rss sinks (1)
- rss stampede (2)
- rss streamlines (2)
- rss study (1)
- rss tasks (7)
- rss testing (6)
- rss ticketchart (1)
- rss tutorial (1)
- rss visit (4)
- rss visualization (3)
- rss vnc (1)
- rss vpn (3)
- rss w00t (1)
- rss wind (4)
- rss wind-capture (1)

# Momentum Conserving Self Gravity

Making the momentum be conserved requires recasting the gravitational force as a total differential

\dot p=-\rho \nabla \phi = -\nabla \cdot F so we need to find F such that

\nabla \cdot F = \rho \nabla \phi

Since \nabla^2 \phi = 4\pi G (\rho-\bar{\rho})

we can substitute for \rho and we have

\nabla \cdot F = (\frac{\nabla^2\phi}{4 \pi G}+\bar{\rho}) \nabla \phi which is equivalent (in 1D) to \nabla \cdot \left [\frac{1}{2} \frac{\left (\nabla \phi\right )^2}{4 \pi G} + \bar{\rho} \phi \right ]

where we can identify the equivalent momentum flux tensor as F=\frac{1}{2} \frac{\left (\nabla \phi\right )^2}{4 \pi G} + \bar{\rho} \phi

- In more than 1D we have

or we can write it as \mathbf{T}=\frac{1}{4\pi G}\left [ \nabla \phi \nabla \phi - \frac{1}{2} \left ( \nabla \phi \right ) \cdot \left ( \nabla \phi \right ) \mathbf{I} \right ]

## Momentum Conserving Self Gravity Source Terms in AstroBEAR

- q - initial state
- qLx - left edge of x - interface in predictor
- qLy - lower edge of y - interface in predictor
- qRy - upper edge of y - interface in predictor
- q2 - intermediate cell centered quantities
- q2Lx - updated left edge of x - interface used for final riemann solve
- fx - predictor x flux
- f2x - final x flux
- q3 - new values

Normal CTU:

- qLx = Reconstruct(q), etc… (for all 6 qxx states)
- fx=Riemann_Solve(qLx,qRx), etc… (for all 3 edges)
- q2 = q+fx+fy+fz
- q2Lx=qLx+fy+fz etc… (for all 6 q2xx states)
- f2x=Riemann_Solve(q2Lx,q2Rx) (for all 3 edges)
- q3=q+f2x+f2y+f2z

Strang split self-gravity:

**q = q + sg(q,phi)*hdt**- qLx = Reconstruct(q), etc… (for all 6 qxx states)
- fx=Riemann_Solve(qLx,qRx), etc… (for all 3 edges)
- q2 = q+fx+fy+fz
- q2Lx=qLx+fy+fz etc… (for all 6 q2xx states)
- f2x=Riemann_Solve(q2Lx,q2Rx) (for all 3 edges)
- q3=q+f2x+f2y+f2z
**q3=q3+sq(q3,phi)*hdt**

where

sg=sg_x+sg_y+sg+z and sg_x has two non-zero terms…

Momentum conserving self-gravity

- qLx = Reconstruct(q), etc… (for all 6 qxx states)
**qLx(px) =qLx(px)+sg_x(q,phi)*hdt****qLy(py) = qLy(py)+sg_y(q,phi)*hdt****qLy(pz) = qLy(pz)+sg_z(q,phi)*hdt**- fx=Riemann_Solve(qLx,qRx), etc… (for all 3 edges)
- q2 = q+fx+fy+fz
**+ sg(q,phi)** - q2Lx=qLx+fy+fz etc… (for all 6 q2xx states)
**q2Lx=q2Lx+sg_y(q,phi)+sg_z(q,phi)**(for all 6 q2xx states)- f2x=Riemann_Solve(q2Lx,q2Rx) (for all 3 edges)
**f2x(p)=f2x(p)+SG_PFlux_x(phi)**(same for y and z)- q3=q+f2x+f2y+f2z
**+SG_E(f2x(rho),f2y(rho), f2z(rho), phi)**

The final updates for momentum include true 'fluxes'

SG_PFlux_x(phi) has only 1 non-zero term

and an energy update term that is derived from mass fluxes.

SG_E(f2x, f2y, f2z, phi)

For a description of an algorithm that also conserves energy see http://adsabs.harvard.edu/abs/2013NewA...19...48J

- Posted: 11 years ago (Updated: 11 years ago)
- Author: Jonathan
- Categories: (none)

### Attachments (2)

- Screen Shot 2013-10-22 at 4.35.47 PM.png (26.7 KB) - added by Jonathan 11 years ago.
- Screen Shot 2013-10-22 at 4.35.24 PM.png (25.4 KB) - added by Jonathan 11 years ago.

Download all attachments as: .zip

## Comments

No comments.