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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
\begin{tikzpicture}
\pgfplotstableread[col sep=comma]{img/data/poiseuille2d_refined_order4ipol_velocity_profile_at_3.csv}\refinedCubicIpol
\pgfplotstableread[col sep=comma]{img/data/poiseuille2d_refined_order2ipol_velocity_profile_at_3.csv}\refinedLinearIpol
%\pgfplotstableread[col sep=comma]{img/data/poiseuille2d_unrefined_coarse_velocity_profile_at_3.csv}\unrefinedCoarse
\pgfplotstableread[col sep=comma]{img/data/poiseuille2d_unrefined_fine_velocity_profile_at_3.csv}\unrefinedFine
\pgfplotstableread[col sep=comma]{img/data/poiseuille2d_borderless_refine_velocity_profile_at_3.csv}\borderlessRefine
\begin{axis}[
scale only axis,
height=8cm,
width=0.4*\textwidth,
mark size=3,
legend cell align=left,
legend style={at={(1.05,-0.2)},anchor=north},
grid=both,
ylabel=\(x\)-Geschwindigkeit,
xlabel=\(y\)-Position,
xtick={0,0.25,0.5,0.75,1},
title=Geschwindigkeitsprofil,
every axis plot/.append style={thick}
]
\addplot[
only marks,
mark=x,
color=green!70!black
] table [
x=y, y=ux
] {\refinedCubicIpol};
\addlegendentry{Halbseitig verfeinertes \(n=10\) Gitter mit kubischer Interpolation};
\addplot[
only marks,
mark=+,
color=red!70!black
] table [
x=y, y=ux
] {\refinedLinearIpol};
\addlegendentry{Halbseitig verfeinertes \(n=10\) Gitter mit linearer Interpolation};
\addplot[
only marks,
mark=star,
color=gray!50!black
] table [
x=y, y=ux
] {\borderlessRefine};
\addlegendentry{Halbseitig randlos verfeinertes \(n=10\) Gitter mit kubischer Interpolation};
\addplot[
only marks,
mark=asterisk,
color=blue!50!white
] table[
x=y, y=ux
] {\unrefinedFine};
\addlegendentry{Uniform fein mit \(n=20\) aufgelöstes Gitter};
\addplot [domain=0:1, samples=100]{-4*x*(x-1)};
\addlegendentry{Analytische Lösung}
\end{axis}
\begin{axis}[
scale only axis,
height=8cm,
width=0.4*\textwidth,
mark size=3,
grid=both,
xtick={0,0.25,0.5,0.75,1},
xshift=7cm,
scaled y ticks=false,
y tick label style={/pgf/number format/sci},
ylabel=Fehler,
xlabel=\(y\)-Position,
yticklabel pos=right,
title=Fehler zur analytischen Lösung,
every axis plot/.append style={thick}
]
\addplot[
only marks,
mark=x,
color=green!70!black
] table [
x=y,
y expr=\thisrow{ux}+4*\thisrow{y}*(\thisrow{y}-1)
] {\refinedCubicIpol};
\addplot[
only marks,
mark=+,
color=red!70!black
] table [
x=y,
y expr=\thisrow{ux}+4*\thisrow{y}*(\thisrow{y}-1)
] {\refinedLinearIpol};
\addplot[
only marks,
mark=star,
color=gray!50!black
] table [
x=y,
y expr=\thisrow{ux}+4*\thisrow{y}*(\thisrow{y}-1)
] {\borderlessRefine};
\addplot[
only marks,
mark=asterisk,
color=blue!50!white
] table[
x=y,
y expr=\thisrow{ux}+4*\thisrow{y}*(\thisrow{y}-1)
] {\unrefinedFine};
\addplot [domain=0:1, samples=100]{0};
\end{axis}
\end{tikzpicture}
|