summaryrefslogtreecommitdiff
path: root/triso_study_driver.sh
blob: 998c3db36f76cf7feae98eec15514785e8c216c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash

#fuels=("uo2" "uco5" "uco10" "uco20" "un")
fuels=("uo2")

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

    # 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

    # 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