From 020142137d97ba7954e979bae64b4a43459e41f1 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Wed, 18 Feb 2015 15:36:01 -0200 Subject: [PATCH] EQUATIONS: Get the W guess from previous step in SRHD and SRMHD. Signed-off-by: Grzegorz Kowal --- src/equations.F90 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/equations.F90 b/src/equations.F90 index 54e35ba..2e2b18e 100644 --- a/src/equations.F90 +++ b/src/equations.F90 @@ -3246,9 +3246,9 @@ module equations en = u(ien,i) + u(idn,i) dn = u(idn,i) -! get the lower bound for W updated by the minimum pressure with assumed Γ = 1 +! prepare the initial guess using pressure from the previous step ! - wm = en + pmin + wm = en + q(ipr,i) ! set the initial W to the minimum value ! @@ -3896,7 +3896,7 @@ module equations integer :: i real(kind=8) :: mm, mb, bb, en, dn real(kind=8) :: wm, w, wt - real(kind=8) :: vv, vm, vs + real(kind=8) :: vv, vm, vs, vb real(kind=8) :: fc ! !------------------------------------------------------------------------------- @@ -3920,9 +3920,12 @@ module equations en = u(ien,i) + u(idn,i) dn = u(idn,i) -! get the lower bound for W updated by the minimum pressure with assumed Γ = 1 +! prepare the initial guess using velocity and pressure from the previous step ! - wm = en + pmin - 0.5d+00 * bb + vv = sum(q(ivx:ivz,i) * q(ivx:ivz,i)) + vb = sum(q(ivx:ivz,i) * u(ibx:ibz,i)) + vm = 1.0d+00 + vv + wm = en + 0.5d+00 * (vb * vb - vm * bb) + q(ipr,i) ! set the initial W to the minimum value !