{"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":2,"created_at":"2015-11-23T19:05:22Z","updated_at":"2015-11-23T19:16:53Z","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    xmom.d[:,:] = 0.0\r\n    ymom.d[:,:] = 0.0\r\n    dens.d[:,:] = 0.0\r\n    grav.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\n    myg = my_data.grid\r\n\r\n    p = myg.scratch_array()\r\n\r\n    dens.d[:,:] = dens1*numpy.exp(-myg.y2d/scale_height)\r\n    p.d[:,:] = dens.d*cs*cs/gamma\r\n\r\n    # set the energy (P = cs2*dens)                                                                     \r\n    ener.d[:,:] = p.d[:,:]/(gamma - 1.0) + \\\r\n        0.5*(xmom.d[:,:]**2 + ymom.d[:,:]**2)/dens.d[:,:]\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zingale/pyro2/issues/comments/159033841","html_url":"https://github.com/zingale/pyro2/issues/4#issuecomment-159033841","issue_url":"https://api.github.com/repos/zingale/pyro2/issues/4","id":159033841,"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-23T19:16:53Z","updated_at":"2015-11-23T19:16:53Z","body":"My fork is here: https://github.com/BenWibking/pyro2-1\r\nRunning ./failure_mode.sh should reproduce this problem."}}