{"action":"created","issue":{"url":"https://api.github.com/repos/zingale/pyro2/issues/4","labels_url":"https://api.github.com/repos/zingale/pyro2/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/zingale/pyro2/issues/4/comments","events_url":"https://api.github.com/repos/zingale/pyro2/issues/4/events","html_url":"https://github.com/zingale/pyro2/issues/4","id":118448913,"number":4,"title":"reflecting boundary conditions do not ensure zero mass flux","user":{"login":"BenWibking","id":1781919,"avatar_url":"https://avatars.githubusercontent.com/u/1781919?v=3","gravatar_id":"","url":"https://api.github.com/users/BenWibking","html_url":"https://github.com/BenWibking","followers_url":"https://api.github.com/users/BenWibking/followers","following_url":"https://api.github.com/users/BenWibking/following{/other_user}","gists_url":"https://api.github.com/users/BenWibking/gists{/gist_id}","starred_url":"https://api.github.com/users/BenWibking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenWibking/subscriptions","organizations_url":"https://api.github.com/users/BenWibking/orgs","repos_url":"https://api.github.com/users/BenWibking/repos","events_url":"https://api.github.com/users/BenWibking/events{/privacy}","received_events_url":"https://api.github.com/users/BenWibking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-11-23T19:05:22Z","updated_at":"2015-11-24T17:08:37Z","closed_at":null,"body":"Using reflecting boundary conditions in a (nearly) isothermal exponential atmosphere, I find that pyro does not ensure a zero mass flux at the lower boundary, whether or not I include gravity, *and* whether or not I reflect the gravity vector at the boundary (it should, of course, be reflected to match the boundary conditions, and I do so by adding a new gravitational acceleration state variable and setting its boundary condition to reflect y-odd).\r\n\r\nI have tested this setup in Castro and Athena, which both produce identically zero mass flux at the reflecting boundary.\r\n\r\nThe initial conditions are prescribed by the following:\r\n```\r\nxmom.d[:,:] = 0.0\r\nymom.d[:,:] = 0.0\r\ndens.d[:,:] = 0.0\r\ngrav.d[:,:] = grav_const # this will be reflected via the boundary conditions routines              \r\n\r\n# set the density to be stratified in the y-direction                                               \r\nmyg = my_data.grid\r\n\r\np = myg.scratch_array()\r\n\r\ndens.d[:,:] = dens1*numpy.exp(-myg.y2d/scale_height)\r\np.d[:,:] = dens.d*cs*cs/gamma\r\n\r\n# set the energy (P = cs2*dens)                                                                     \r\nener.d[:,:] = p.d[:,:]/(gamma - 1.0) + \\\r\n    0.5*(xmom.d[:,:]**2 + ymom.d[:,:]**2)/dens.d[:,:]\r\n```"},"comment":{"url":"https://api.github.com/repos/zingale/pyro2/issues/comments/159341886","html_url":"https://github.com/zingale/pyro2/issues/4#issuecomment-159341886","issue_url":"https://api.github.com/repos/zingale/pyro2/issues/4","id":159341886,"user":{"login":"BenWibking","id":1781919,"avatar_url":"https://avatars.githubusercontent.com/u/1781919?v=3","gravatar_id":"","url":"https://api.github.com/users/BenWibking","html_url":"https://github.com/BenWibking","followers_url":"https://api.github.com/users/BenWibking/followers","following_url":"https://api.github.com/users/BenWibking/following{/other_user}","gists_url":"https://api.github.com/users/BenWibking/gists{/gist_id}","starred_url":"https://api.github.com/users/BenWibking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenWibking/subscriptions","organizations_url":"https://api.github.com/users/BenWibking/orgs","repos_url":"https://api.github.com/users/BenWibking/repos","events_url":"https://api.github.com/users/BenWibking/events{/privacy}","received_events_url":"https://api.github.com/users/BenWibking/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T17:08:37Z","updated_at":"2015-11-24T17:08:37Z","body":"This seems not to support an exponential atmosphere above it. The atmosphere just collapses onto the lower boundary as if it had no pressure support.  It looks like this:\r\n![iso_0000 pyro](https://cloud.githubusercontent.com/assets/1781919/11374439/113df14c-92a4-11e5-9921-6247ba6dcd96.png)\r\n![iso_0015 pyro](https://cloud.githubusercontent.com/assets/1781919/11374442/15a0f8ce-92a4-11e5-9dcf-c002c19f9730.png)\r\n\r\n"}}