File: coriolis.sh

package info (click to toggle)
gerris 20131206%2Bdfsg-19
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 13,488 kB
  • sloc: ansic: 66,593; sh: 15,922; f90: 1,513; makefile: 1,150; fortran: 696; python: 493; awk: 104; lisp: 89; xml: 27
file content (51 lines) | stat: -rw-r--r-- 948 bytes parent folder | download | duplicates (2)
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
if test x$donotrun != xtrue; then
    if gerris3D -m $1; then :
    else
	exit 1
    fi
fi

if gnuplot <<EOF ; then :
set term pos enhanced eps color solid lw 2 18
set out 'velocity.eps'

set bmargin 4
set rmargin 3.5

set xl 'Time (s)'
set yl 'Velocity Components (m/s)'

set key spacing 3

U=2
V=3
W=1
Phi=3.14159/4.
Omega=7.292e-5
A=U
B=(sin(Phi)*V-cos(Phi)*W)
C=(cos(Phi)*(cos(Phi)*V+sin(Phi)*W))
D=(sin(Phi)*(cos(Phi)*V+sin(Phi)*W))
solu(t)=(A*cos(2*Omega*t)+B*sin(2*Omega*t))
solv(t)=(-A*sin(Phi)*sin(2*Omega*t) + B*sin(Phi)*cos(2*Omega*t) + C)
solw(t)=(A*cos(Phi)*sin(2*Omega*t) - B*cos(Phi)*cos(2*Omega*t) + D)

plot solu(x) t '', solv(x) t '', solw(x) t '',\
     'u.dat' w p lc 1 ps 1.8 t 'U',\
     'v.dat' w p lc 2 ps 1.8 t 'V',\
     'w.dat' w p lc 3 ps 1.8 t 'W'

EOF
else
    exit 1
fi

if cat <<EOF | python3 ; then :
from check import *
from sys import *
if (Curve('error.dat',1,2)).max() > 1e-6:
    exit(1)
EOF
else
   exit 1
fi