summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Moore <connor.moore@psi.ch>2026-07-20 16:36:53 +0200
committerConnor Moore <connor.moore@psi.ch>2026-07-20 16:36:53 +0200
commitd26aa28be559beb9136b17d2a563881f86c4664e (patch)
tree1c55666e404afd73a31d98e6542e4a666eece709
parent1359a51915d10cab04f307f98ff89fba338397a6 (diff)
Updated driver file and added gnuplot script
-rw-r--r--plot.gnu27
-rwxr-xr-xtriso_study_driver.sh84
2 files changed, 73 insertions, 38 deletions
diff --git a/plot.gnu b/plot.gnu
new file mode 100644
index 0000000..2c7765a
--- /dev/null
+++ b/plot.gnu
@@ -0,0 +1,27 @@
+set term qt persist
+
+exp_keff=real(system("cat results/explicit.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '+' -f 1 | sed 's/ //g'"))
+exp_pm=real(system("cat results/explicit.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '-' -f 2 | sed 's/ //g'"))
+exp_ppm=exp_keff+exp_pm
+exp_mpm=exp_keff-exp_pm
+
+vwh_keff=real(system("cat results/vwh.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '+' -f 1 | sed 's/ //g'"))
+vwh_pm=real(system("cat results/vwh.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '-' -f 2 | sed 's/ //g'"))
+vwh_ppm=vwh_keff+vwh_pm
+vwh_mpm=vwh_keff-vwh_pm
+
+set arrow from graph 0, first exp_keff to graph 1, first exp_keff nohead front lc rgb "red" dt 2
+set arrow from graph 0, first vwh_keff to graph 1, first vwh_keff nohead front lc rgb "blue" dt 2
+
+set object 1 rectangle from graph 0, first exp_mpm to graph 1, first exp_ppm back fc rgb "red" fillstyle pattern 4 noborder
+set object 2 rectangle from graph 0, first vwh_mpm to graph 1, first vwh_ppm back fc rgb "blue" fillstyle pattern 4 noborder
+
+set yrange [1.45:1.7]
+set format y "%.5f"
+set style fill pattern 4 noborder
+
+plot "results/rpt_table" using 1:2:3 with yerrorlines dt 2 title "RPT K_{eff}", \
+ "results/rrpt_table" using 1:2:3 with yerrorlines dt 2 title "RRPT K_{eff}", \
+ keyentry with lines title "Explicit K_{eff}" lc rgb "red" dt 2, \
+ keyentry with lines title "VWH K_{eff}" lc rgb "blue" dt 2
+
diff --git a/triso_study_driver.sh b/triso_study_driver.sh
index 7b7e7a1..e7b72e7 100755
--- a/triso_study_driver.sh
+++ b/triso_study_driver.sh
@@ -1,44 +1,52 @@
#!/bin/bash
-prog=(./pin.py -e -f un)
-
-mkdir -p results/ results/rpt results/rrpt
-touch results/rpt_table results/rrpt_table
-echo "\#" $(date) > results/rpt_table
-echo "\#" $(date) > results/rrpt_table
-
-# 1. Basic calculation without homogenization
-echo -n "Running explicit TRISO calculation... "
-"${prog[@]}" -t none > results/explicit.out
-keff=$(cat results/explicit.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
-pm=$(cat results/explicit.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
-echo found $keff +/- $pm
-
-# 2. VWH calculation
-echo -n "Running VWH homogenization calculation... "
-"${prog[@]}" -t vwh > results/vwh.out
-keff=$(cat results/vwh.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
-pm=$(cat results/vwh.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
-echo found $keff +/- $pm
-
-# 3. RPT
-for rad in $(seq 0.30 0.05 0.75); do
- echo -n "Running RPT with $rad cm... "
- "${prog[@]}" -t rpt -r $rad > results/rpt/$rad.out
- keff=$(cat results/rpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
- pm=$(cat results/rpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
- md5=$(cat results/rpt/$rad.out | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g")
+fuels=("uo2" "uco10" "uco20" "un")
+
+for mat in $fuels; do
+
+ echo Beginning runs for $mat fuel
+
+ prog=(./pin.py -e)
+
+ mkdir -p results/ results/rpt results/rrpt
+ touch results/rpt_table results/rrpt_table
+ echo "\#" $(date) > results/rpt_table
+ echo "\#" $(date) > results/rrpt_table
+
+ # 1. Basic calculation without homogenization
+ echo -n "Running explicit TRISO calculation... "
+ "${prog[@]}" -t none -f $mat > results/explicit.out
+ keff=$(cat results/explicit.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
+ pm=$(cat results/explicit.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
echo found $keff +/- $pm
- echo $rad $keff $pm $(hostname) $md5 \($(date)\) >> results/rpt_table
-done
-# 4. RRPT
-for rad in $(seq 0.1 0.05 0.95); do
- echo -n "Running RRPT with $rad cm... "
- "${prog[@]}" -t rrpt -r $rad > results/rrpt/$rad.out
- keff=$(cat results/rrpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
- pm=$(cat results/rrpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
- md5=$(cat results/rrpt/$rad.out | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g")
+ # 2. VWH calculation
+ echo -n "Running VWH homogenization calculation... "
+ "${prog[@]}" -t vwh -f $mat > results/vwh.out
+ keff=$(cat results/vwh.out| grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
+ pm=$(cat results/vwh.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
echo found $keff +/- $pm
- echo $rad $keff $pm $(hostname) $md5 \($(date)\) >> results/rrpt_table
+
+ # 3. RPT
+ for rad in $(seq 0.25 0.05 0.75); do
+ echo -n "Running RPT with $rad cm... "
+ "${prog[@]}" -t rpt -r $rad -f $mat > results/rpt/$rad.out
+ keff=$(cat results/rpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
+ pm=$(cat results/rpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
+ md5=$(cat results/rpt/$rad.out | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g")
+ echo found $keff +/- $pm
+ echo $rad $keff $pm $(hostname) $md5 \($(date)\) >> results/rpt_table
+ done
+
+ # 4. RRPT
+ for rad in $(seq 0.1 0.05 0.95); do
+ echo -n "Running RRPT with $rad cm... "
+ "${prog[@]}" -t rrpt -r $rad -f $mat > results/rrpt/$rad.out
+ keff=$(cat results/rrpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "+" -f 1)
+ pm=$(cat results/rrpt/$rad.out | grep "Combined k-effective" | cut -d "=" -f 2 | cut -d "-" -f 2)
+ md5=$(cat results/rrpt/$rad.out | grep "MD5:" | cut -d ":" -f 2 | sed "s/ //g")
+ echo found $keff +/- $pm
+ echo $rad $keff $pm $(hostname) $md5 \($(date)\) >> results/rrpt_table
+ done
+ mv results/ results_$mat/
done