Skip to content

Commit

Permalink
add user arguments for check_igndelay function
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Sep 23, 2024
1 parent 9fea10d commit 4e116e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ jobs:
make realclean
make -j ${{env.NPROCS}} Eos_Model=Manifold Transport_Model=Manifold Manifold_Dim=1 Chemistry_Model=Null TINY_PROFILE=TRUE USE_CCACHE=TRUE ${{matrix.amrex_build_args}}
bash exec_ignDelay.sh manifold
python check_ignDelay.py
python check_ignDelay.py 0.0766 10
if [ $? -ne 0 ]; then exit 1; fi; \
fi;
make realclean
Expand Down
10 changes: 9 additions & 1 deletion Testing/Exec/IgnitionDelay/check_ignDelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ def readResult(filename):


if __name__=="__main__":
# Two arguments: intended correct value and uncertainty factor
if len(sys.argv) > 1:
correct_value = float(sys.argv[1])
uncertainty_factor = float(sys.argv[2])
else:
correct_value = 0.0763
uncertainty_factor = 10.0

# Read ignition delay output
tIgn,uncertainty = readResult('log')

# Compare to theoretical value
if abs(tIgn-0.0763)>15*uncertainty:
if abs(tIgn-correct_value)>uncertainty_factor*uncertainty:
sys.exit(1)
else:
sys.exit(0)

0 comments on commit 4e116e2

Please sign in to comment.