AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
299 stars 97 forks source link

still have issues with pressure in 1-d momentum fluxes #2803

Open zingale opened 6 months ago

zingale commented 6 months ago

It looks like we adding the pressure to the momntum flux in 1-d Cartesian in scale_flux(), but I think this is wrong -- it should already be added since mom_flux_has_p is always true for Cartesian. So I think that we need to remove this addition in advection_util.cpp

zingale commented 6 months ago

it looks like this was missed in #2468

zhichen3 commented 2 weeks ago

I agree that the addition should be removed. #2468 makes mom_flux_has_p to return true instead of false for 1D cartesian, which is certainly the correct behavior. So now pressure is already included in the definition of flux in compute_flux_q