{"action":"opened","issue":{"url":"https://api.github.com/repos/BoxLib-Codes/Castro/issues/15","repository_url":"https://api.github.com/repos/BoxLib-Codes/Castro","labels_url":"https://api.github.com/repos/BoxLib-Codes/Castro/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/BoxLib-Codes/Castro/issues/15/comments","events_url":"https://api.github.com/repos/BoxLib-Codes/Castro/issues/15/events","html_url":"https://github.com/BoxLib-Codes/Castro/issues/15","id":174621069,"number":15,"title":"Gravity sync source to energy is non-conservative","user":{"login":"maxpkatz","id":8052594,"avatar_url":"https://avatars.githubusercontent.com/u/8052594?v=3","gravatar_id":"","url":"https://api.github.com/users/maxpkatz","html_url":"https://github.com/maxpkatz","followers_url":"https://api.github.com/users/maxpkatz/followers","following_url":"https://api.github.com/users/maxpkatz/following{/other_user}","gists_url":"https://api.github.com/users/maxpkatz/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpkatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpkatz/subscriptions","organizations_url":"https://api.github.com/users/maxpkatz/orgs","repos_url":"https://api.github.com/users/maxpkatz/repos","events_url":"https://api.github.com/users/maxpkatz/events{/privacy}","received_events_url":"https://api.github.com/users/maxpkatz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T20:43:32Z","updated_at":"2016-09-01T20:43:32Z","closed_at":null,"body":"When we do a gravity sync after a reflux for Poisson gravity, we use a sync source to the energy that is non-conservative. Since the default in Castro is now to use the conservative energy scheme for the main gravity source term, we should do the same for the sync source.\r\n\r\nThe sync source is described in the first Castro code paper, it's the equations just after Equation 39. The momentum source term is straightforward and consistent with our current approach -- you just compute the 'corrected' source term accounting for the original gravitational force and the reflux, and then subtract off the term that was already added during the main advance. The energy source term for the sync is essentially computed by using the idea that Sr_E = v . Sr_mom, an idea that we use elsewhere when we're not concerned about strict conservation.\r\n\r\nIf we want this to be conservative in the same manner as the main source term, what we should do is to construct the full flux-based energy source term, using the final gravitational field and corrected fluxes, and then subtract off the energy flux that was contributed during the main advance.\r\n\r\nI am not sure yet exactly what the sync source should look like or whether we even have enough information in post_timestep to do it; will follow up on that."}}
{"actor":{"display_login":"maxpkatz"}}