diff options
| -rwxr-xr-x | extract_ranges.sh | 14 | ||||
| -rwxr-xr-x | hp_height_study_driver.sh | 6 |
2 files changed, 17 insertions, 3 deletions
diff --git a/extract_ranges.sh b/extract_ranges.sh new file mode 100755 index 0000000..2c51300 --- /dev/null +++ b/extract_ranges.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "#" $(date) > results/range_table + +pool_heights=$(cat results/keff_table | awk '{print $1}' | uniq) +#pool_heights="41" + +for ph in $pool_heights; do + # Find min and max + output=$(cat results/keff_table | awk -v var=$ph '$1 == var {print $3}') + min_k=$(echo "$output" | sort -g | head -n 1) + max_k=$(echo "$output" | sort -g | tail -n 1) + echo $ph $min_k $max_k >> results/range_table +done diff --git a/hp_height_study_driver.sh b/hp_height_study_driver.sh index 06a094d..ee4d4d9 100755 --- a/hp_height_study_driver.sh +++ b/hp_height_study_driver.sh @@ -2,11 +2,11 @@ mkdir -p results/outputs touch results/keff_table -echo "\#" $(date) > results/keff_table +echo "#" $(date) > results/keff_table if [[ $1 == "lcl" ]]; then - prog=openmc-inst01.py krusty.py + prog=(openmc-inst01.py krusty.py -l) else prog=./krusty.py fi @@ -18,7 +18,7 @@ for pool_height in $(seq 1 45); do echo -e "$green Starting runs for $pool_height cm pool height... $reset" for sat_height in $(seq $pool_height 45); do output_file=results/outputs/p$pool_height\_s$sat_height.out - $prog -p $pool_height -s $sat_height > $output_file + "${prog[@]}" -p $pool_height -s $sat_height > $output_file keff=$(cat $output_file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1) pm=$(cat $output_file | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2) md5=$(cat $output_file | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g") |
