Closed haochey closed 3 weeks ago
This is a bit confusing to me - can you be more descriptive about what's going on here? also it looks like we use this computation many times. maybe we should create an intermediate variable for it:
0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ q_cons_vf(1)%sf(j - 2, k - 2, l)
This is a bit confusing to me - can you be more descriptive about what's going on here? also it looks like we use this computation many times. maybe we should create an intermediate variable for it:
0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ q_cons_vf(1)%sf(j - 2, k - 2, l)
Hi Spencer, this part of the code converts conservative variables to primitive variables when preparing the output variables for probes.
The previous code assumes hypoelasticity when computing primitive pressure for 2D cases, and then assumes non-hypoelasticity for 3D cases. I added conditional statement to discern conditions for hypoelasticity.
This is dynamic pressure:0.5d0*(q_cons_vf(2)%sf(j - 2, k - 2, l)**2.d0)/ q_cons_vf(1)%sf(j - 2, k - 2, l)
. Yes! I agree I can use an intermediate variable.
Sounds good, thanks!
Description
This PR corrects the primitive pressure output in probe files.
Type of change
Please delete options that are not relevant.
Scope
If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.
Test Configuration: