File: burgers_diffusion_exact.plot

package info (click to toggle)
rheolef 7.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 88,200 kB
  • sloc: cpp: 110,259; sh: 16,733; makefile: 5,406; python: 1,391; yacc: 218; javascript: 203; xml: 191; awk: 61; sed: 5
file content (29 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (3)
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
set terminal cairolatex pdf color standalone
set output "burgers_diffusion_exact.tex"

set size square
set colors classic
set sample 1000
#set key left bottom
#set key at graph 0.1,0.1
set xrange [-1:1]
set yrange [-0.1:2.5]
set xtics (-1,0,1)
set ytics (0,1,2)
set arrow from -1,0 to 1,0 nohead lc 0 lw 1
set xlabel '[c]{$x$}'
set  label '[l]{$u(t,x)$}' at graph 0.02,0.95

eps = 1e-1
x0=-0.5
u(t,x) = 1 - tanh((x-x0-t)/(2*eps))

plot \
 u(0,x) \
   t '[r]{$t=0$}' \
   w l ls 1 lc 0 lw 1, \
 u(1,x) \
   t '[r]{$t=1$}'\
   w l lc rgb "#990000" lw 2

#pause -1