added gnuplot and bash scripts
This commit is contained in:
parent
b7c4630657
commit
9aa699dd67
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# set input/working/output folders
|
# set input/working/output folders
|
||||||
in=/Users/lorenzo/Desktop/files5s
|
in=/Users/daniela/Desktop/scenario_001/files5s
|
||||||
work=/Users/lorenzo/Desktop/tmp2
|
work=/Users/daniela/Desktop/scenario_001/tmpab
|
||||||
out=/Users/lorenzo/Desktop/out
|
out=/Users/daniela/Desktop/scenario_001/outab
|
||||||
|
|
||||||
# launching mirrors
|
# launching mirrors
|
||||||
mirror=( "USM" "LSM" )
|
mirror=( "USM" "LSM" )
|
||||||
@ -11,10 +11,10 @@ r0=( 699.871 705.392 )
|
|||||||
z0=( 441.441 417.821 )
|
z0=( 441.441 417.821 )
|
||||||
|
|
||||||
# steering range
|
# steering range
|
||||||
amin=25
|
amin=20
|
||||||
amax=70
|
amax=70
|
||||||
bmin=10
|
bmin=16
|
||||||
bmax=30
|
bmax=26
|
||||||
|
|
||||||
# check if working folder exists, otherwise create it
|
# check if working folder exists, otherwise create it
|
||||||
if [[ ! -e $work ]]; then
|
if [[ ! -e $work ]]; then
|
||||||
@ -65,9 +65,9 @@ for i in 0 1; do
|
|||||||
echo "# =============================" >> $f7file
|
echo "# =============================" >> $f7file
|
||||||
appendheader=0
|
appendheader=0
|
||||||
#loop on beta
|
#loop on beta
|
||||||
for (( beta=$bmin; beta<=$bmax ; beta=beta+1 )); do
|
for (( beta=$bmin; beta<=$bmax ; beta=beta+2 )); do
|
||||||
#loop on alpha
|
#loop on alpha
|
||||||
for (( alpha=$amin; alpha<=$amax ; alpha=alpha+1 )); do
|
for (( alpha=$amin; alpha<=$amax ; alpha=alpha+2 )); do
|
||||||
# replace dummy values in template for gray.data
|
# replace dummy values in template for gray.data
|
||||||
sed "s/-alfa-/$alpha/g; \
|
sed "s/-alfa-/$alpha/g; \
|
||||||
s/-beta-/$beta/g; \
|
s/-beta-/$beta/g; \
|
||||||
|
@ -11,15 +11,15 @@ unset hidden
|
|||||||
set contour base
|
set contour base
|
||||||
set isosamples 200,200
|
set isosamples 200,200
|
||||||
|
|
||||||
dir='../EL_data/'
|
dir='/Users/daniela/Desktop/scenario_001/outab/'
|
||||||
id1='sc9MA'
|
id1='LSM'
|
||||||
id2='bot12co'
|
id2='520'
|
||||||
fn='f7.'.id1.'_'.id2.'.txt'
|
fn='f7_'.id1.'_t'.id2.'.txt'
|
||||||
lab1=id1
|
lab1=id1
|
||||||
lab2=id2
|
lab2='t='.id2.'s'
|
||||||
|
|
||||||
xi=10; xa=45
|
xi=16; xa=26
|
||||||
yi=-40; ya=40
|
yi=20; ya=70
|
||||||
xl = xi + 0.1*(xa - xi); xh = xa - 0.1*(xa-xi);
|
xl = xi + 0.1*(xa - xi); xh = xa - 0.1*(xa-xi);
|
||||||
yl = yi + 0.1*(ya - yi); yh = ya - 0.1*(ya-yi);
|
yl = yi + 0.1*(ya - yi); yh = ya - 0.1*(ya-yi);
|
||||||
xtoy = (xa-xi) / (ya-yi)
|
xtoy = (xa-xi) / (ya-yi)
|
||||||
@ -33,8 +33,8 @@ SEARCH = "filecontour index b using 1:(g($1,$2))"
|
|||||||
PLOT = "filecontour index b using 1:(f($1,$2)) w l lt 1 lc rgb 'black' lw 2"
|
PLOT = "filecontour index b using 1:(f($1,$2)) w l lt 1 lc rgb 'black' lw 2"
|
||||||
LABEL = "filecontour index b using 1:2:(lab($1,$2)) with labels font 'Helvetica, 16'"
|
LABEL = "filecontour index b using 1:2:(lab($1,$2)) with labels font 'Helvetica, 16'"
|
||||||
|
|
||||||
i0=60
|
i0=25
|
||||||
di=10
|
di=2.5
|
||||||
imax=i0
|
imax=i0
|
||||||
set xrange [xi:xa]
|
set xrange [xi:xa]
|
||||||
set yrange [yi:ya] reverse
|
set yrange [yi:ya] reverse
|
||||||
@ -46,7 +46,7 @@ set cntrparam levels incremental 0,0.2,1.0
|
|||||||
|
|
||||||
filecontour = "contours.dat"
|
filecontour = "contours.dat"
|
||||||
set table filecontour
|
set table filecontour
|
||||||
splot dir.fn u (abs($2)):3:($5>=0.95?$10:1/0)
|
splot dir.fn u 1:2:($4>=0.95 ?$8:1/0)
|
||||||
unset table
|
unset table
|
||||||
|
|
||||||
set lmargin at screen 0.15
|
set lmargin at screen 0.15
|
||||||
@ -59,7 +59,7 @@ set multiplot
|
|||||||
unset border
|
unset border
|
||||||
set xtics offset 0,0.3
|
set xtics offset 0,0.3
|
||||||
#set xlabel "{/Symbol b} (º)" offset 0,0.8
|
#set xlabel "{/Symbol b} (º)" offset 0,0.8
|
||||||
set xlabel "{/Symbol |b|} (º)" offset 0,0.8
|
set xlabel "{/Symbol b} (º)" offset 0,0.8
|
||||||
set ytics offset 0,0
|
set ytics offset 0,0
|
||||||
set ylabel "{/Symbol a} (º)" offset 0,0
|
set ylabel "{/Symbol a} (º)" offset 0,0
|
||||||
set colorbox user origin 0.80,0.12 size 0.05,0.78 vertical
|
set colorbox user origin 0.80,0.12 size 0.05,0.78 vertical
|
||||||
@ -68,16 +68,14 @@ set mcbtics 2
|
|||||||
set cblabel "{/Symbol |}I_{cd}{/Symbol |} (kA/MW)" offset 0,0
|
set cblabel "{/Symbol |}I_{cd}{/Symbol |} (kA/MW)" offset 0,0
|
||||||
set clabel
|
set clabel
|
||||||
set cntrparam levels incremental -i0,di/5.,i0
|
set cntrparam levels incremental -i0,di/5.,i0
|
||||||
splot dir.fn u (abs($2)):3:($5>=0.95 && abs($4)>1 ?abs($4):1/0) w l lt 1 lc palette lw 1
|
splot dir.fn u 1:2:($4>=0.95? abs($3):1/0) w l lt 1 lc palette lw 1
|
||||||
|
|
||||||
unset xtics; unset mxtics; unset xlabel
|
unset xtics; unset mxtics; unset xlabel
|
||||||
unset ytics; unset mytics; unset ylabel
|
unset ytics; unset mytics; unset ylabel
|
||||||
unset colorbox
|
unset colorbox
|
||||||
set cntrparam levels incremental -i0,di,i0
|
set cntrparam levels incremental -i0,di,i0
|
||||||
set border
|
set border
|
||||||
splot dir.fn u (abs($2)):3:($5>=0.95 && abs($4)>1 ?abs($4):1/0) w l lt 1 lc palette lw 2
|
splot dir.fn u 1:2:($4>=0.95? abs($3):1/0) w l lt 1 lc palette lw 2
|
||||||
#set cntrparam levels incremental -i0,2*di,i0
|
|
||||||
#splot dir.fn u (abs($2)):3:($5>=0.95 && abs($4)>1 ?abs($4):1/0) w l lt 1 lc palette lw 3
|
|
||||||
|
|
||||||
filecontour = "contours.dat"
|
filecontour = "contours.dat"
|
||||||
b = 0
|
b = 0
|
||||||
@ -91,14 +89,13 @@ plot \
|
|||||||
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
||||||
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
||||||
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
||||||
@SEARCH, @PLOT, @LABEL, @ZERO, \
|
|
||||||
@SEARCH, @PLOT, @LABEL
|
@SEARCH, @PLOT, @LABEL
|
||||||
set cntrparam levels discrete 0.05,0.1,0.15,0.25,0.3,0.35,0.45,0.5,0.55,0.65,0.7,0.75,0.85,0.9,0.95
|
set cntrparam levels discrete 0.05,0.1,0.15,0.25,0.3,0.35,0.45,0.5,0.55,0.65,0.7,0.75,0.85,0.9,0.95
|
||||||
unset clabel
|
unset clabel
|
||||||
set border
|
set border
|
||||||
set label 1 lab1 left at screen 0.15,0.94
|
set label 1 lab1 left at screen 0.15,0.94
|
||||||
set label 2 lab2 right at screen 0.76,0.94
|
set label 2 lab2 right at screen 0.76,0.94
|
||||||
splot dir.fn u (abs($2)):3:($5>=0.95 && abs($4)>1 ?$10:1/0) w l lt 1 lc rgb 'black' lw 1
|
splot dir.fn u 1:2:($4>=0.95 ?$8:1/0) w l lt 1 lc rgb 'black' lw 1
|
||||||
unset label 1
|
unset label 1
|
||||||
unset label 2
|
unset label 2
|
||||||
|
|
||||||
|
@ -1,27 +1,28 @@
|
|||||||
set term aqua enhanced font "Helvetica, 20"
|
set term aqua enhanced font "Helvetica, 20"
|
||||||
id1='sc15MA'
|
dir='/Users/daniela/Desktop/scenario_001/outu/'
|
||||||
id2='mid12co'
|
id1='USM'
|
||||||
#dir=id.'/'
|
id2='18'
|
||||||
dir='../EL_data/'
|
fn='f7_'.id1.'_'.id2.'.txt'
|
||||||
fn='f7.'.id1.'_'.id2.'.txt'
|
set title id1."-".id2
|
||||||
set title id1."- mid row co"
|
|
||||||
|
|
||||||
al=0
|
#bt=20 #USM
|
||||||
|
bt=18 #LSM
|
||||||
|
|
||||||
set xrange[0:1]
|
set xrange[0:1]
|
||||||
set yrange[*:*]
|
set yrange[*:*]
|
||||||
set ytics 10
|
set ytics 5
|
||||||
set xlabel "{/Symbol r}"
|
set xlabel "{/Symbol r}"
|
||||||
set ylabel "I_{cd} (kA/MW)"
|
set ylabel "-I_{cd} (kA/MW)"
|
||||||
unset key
|
unset key
|
||||||
set style line 1 lt 1 lc rgb "red" lw 1
|
set style line 1 lt 1 lc rgb "red" lw 1
|
||||||
set style line 2 lt 2 lc rgb "red" lw 1
|
set style line 2 lt 2 lc rgb "red" lw 1
|
||||||
set style line 3 lt 1 lc rgb "blue" lw 1
|
set style line 3 lt 1 lc rgb "blue" lw 1
|
||||||
set style line 4 lt 2 lc rgb "blue" lw 1
|
set style line 4 lt 2 lc rgb "blue" lw 1
|
||||||
|
|
||||||
|
plot dir.fn u 8:($4>=0.95? (-$3):1/0) w l ls 1
|
||||||
plot dir.fn u 10:($8>0 && $5>=0.95 && (abs($4))>1 ? (abs($4)):1/0) w l ls 1, dir.fn u 10:($8<0 && $5>=0.95 && (abs($4))>1? (abs($4)):1/0) w l ls 2,\
|
#plot dir.fn u 8:($4>=0.95? (-$3):1/0) w p pt 7 lc rgb "red"
|
||||||
dir.fn u 10:($3==al && $5>=0.95 ? (abs($4)):1/0) w p pt 7 lc rgb "black"
|
#plot dir.fn u 8:($4>=0.95? (-$3):1/0) w lp ls 1,\
|
||||||
|
#dir.fn u 8:($1==bt && $4>=0.95 ?(abs($3)):1/0) w p pt 7 lc rgb "red"
|
||||||
|
|
||||||
set term postscript eps enhanced font "Helvetica, 20"
|
set term postscript eps enhanced font "Helvetica, 20"
|
||||||
set termoption dash
|
set termoption dash
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# set input/working/output folders
|
# set input/working/output folders
|
||||||
in=/Users/lorenzo/Desktop/files5s
|
in=/Users/daniela/Desktop/scenario_001/files5s
|
||||||
work=/Users/lorenzo/Desktop/tmp
|
work=/Users/daniela/Desktop/scenario_001/tmp
|
||||||
out=/Users/lorenzo/Desktop/out
|
out=/Users/daniela/Desktop/scenario_001/out
|
||||||
|
|
||||||
# launching mirrors
|
# launching mirrors
|
||||||
mirror=( "USM" "LSM" )
|
mirror=( "USM" "LSM" )
|
||||||
|
Loading…
Reference in New Issue
Block a user