From 963189cbfc48bfc6757e9cb1773c6efc2aa45c30 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 8 Nov 2024 11:30:41 -0500 Subject: [PATCH] a more accurate initial model --- pyro/compressible/problems/convection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyro/compressible/problems/convection.py b/pyro/compressible/problems/convection.py index f5816b320..abbebe6b9 100644 --- a/pyro/compressible/problems/convection.py +++ b/pyro/compressible/problems/convection.py @@ -62,11 +62,11 @@ def init_data(my_data, rp): elif dens[0, j] <= dens_cutoff + 1.e-30: p[:, j] = p[:, j-1] else: - p[:, j] = p[:, j-1] + 0.5*myg.dy*(dens[:, j] + dens[:, j-1])*grav + #p[:, j] = p[:, j-1] + 0.5*myg.dy*(dens[:, j] + dens[:, j-1])*grav + p[:, j] = pres_base * (dens[:, j] / dens_base)**gamma - # set the energy (P = cs2*dens) - ener[:, :] = p[:, :]/(gamma - 1.0) + \ - 0.5*(xmom[:, :]**2 + ymom[:, :]**2)/dens[:, :] + # set the energy (P = cs2*dens) -- assuming zero velocity + ener[:, :] = p[:, :]/(gamma - 1.0) # pairs of random numbers between [-1, 1] vel_pert = 2.0 * np.random.random_sample((myg.qx, myg.qy, 2)) - 1