forked from johannesgerer/jburkardt-m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
twod_to_vtk.html
244 lines (209 loc) · 6.31 KB
/
twod_to_vtk.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<html>
<head>
<title>
TWOD_TO_VTK - Write 2D Finite Element Data to VTK File
</title>
</head>
<body bgcolor="#eeeeee" link="#cc0000" alink="#ff3300" vlink="#000055">
<h1 align = "center">
TWOD_TO_VTK <br> Write 2D Finite Element Data to VTK File
</h1>
<hr>
<p>
<b>TWOD_TO_VTK</b>
is a MATLAB program which
takes a certain set of 2D finite element data
and writes it to a VTK "legacy" unstructured grid file for
postprocessing by PARAVIEW.
</p>
<p>
The finite element data is assumed to be given in terms of:
<ul>
<li>
the xy coordinates of a set of nodes;
</li>
<li>
the (1-based) indices of nodes that form triangular elements;
</li>
<li>
the values of U, V, and P at each node (velocity components
and pressure).
</li>
</ul>
</p>
<p>
Since the VTK format expects 3D data, this program appends a 0 value
to coordinate and vector data, where appropriate. It also changes
the triangular element definitions so that the node indices are 0-based.
</p>
<p>
The "legacy" VTK format is simply an older version of the VTK
graphics file format which has been widely used for some time
and hence is still popular despite the fact that a more modern
VTK format is now also available.
</p>
<p>
Information about PARAVIEW is available at
<a href = "http://www.paraview.org/">
http://www.paraview.org/ </a>.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>TWOD_TO_VTK</b> is available in
<a href = "../../m_src/twod_to_vtk/twod_to_vtk.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../m_src/ns3d_fem/ns3d_fem.html">
NS3D_FEM</a>,
a MATLAB program which
sets up and solves a finite element formulation of the steady
incompressible 3D Navier Stokes equations on a user-defined geometry.
The program can output graphics files for TECPLOT, VU or the VTK format
used by PARAVIEW.
</p>
<p>
<a href = "../../examples/paraview/paraview.html">
PARAVIEW</a>,
examples which
illustrate the use of the paraview graphics program.
</p>
<p>
<a href = "../../m_src/threed_to_vtk/threed_to_vtk.html">
THREED_TO_VTK</a>,
a MATLAB program which
accepts computational data from a 3D finite element fluid flow program
and writes it to a VTK "legacy" file for postprocessing by PARAVIEW.
</p>
<p>
<a href = "../../m_src/twod/twod.html">
TWOD</a>,
a MATLAB library which
contains functions useful for 2D finite element calculations.
</p>
<p>
<a href = "../../m_src/twod_to_vtu/twod_to_vtu.html">
TWOD_TO_VTU</a>,
a MATLAB program which
accepts computational data from a 2D finite element fluid flow program
and writes it to a VTK unstructured grid file for postprocessing by PARAVIEW.
</p>
<p>
<a href = "../../data/vtk/vtk.html">
VTK</a>,
a data directory which
contains examples of "legacy" (old style) VTK files,
a file format used by the Visual Toolkit, and which can be displayed
by the PARAVIEW program;
</p>
<p>
<a href = "../../f_src/vtk_io/vtk_io.html">
VTK_IO</a>,
a FORTRAN90 library which
reads and writes files in the VTK format.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Will Schroeder, Ken Martin, Bill Lorensen,<br>
The Visualization Toolkit,
An Object-Oriented Approach to 3D Graphics,<br>
Prentice Hall, 1998,<br>
ISBN: 0139546944,<br>
LC: QA76.64.S36.
</li>
<li>
Amy Henderson Squillacote,<br>
The ParaView Guide,<br>
Kitware Inc, 2007,<br>
ISBN13: 978-1-930934-21-4.
</li>
<li>
Will Schroeder, Ken Martin, Lisa Avila, Charles Law,<br>
The Visualization Toolkit User's Guide,<br>
Kitware Inc, May 2000,<br>
ISBN13: 978-1930934030.
</li>
<li>
<a href = "http://public.kitware.com/VTK/">
http://public.kitware.com/VTK/</a>
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "timestamp.m">timestamp.m</a>,
prints the YMDHMS date as a timestamp.
</li>
<li>
<a href = "twod_to_vtk.m">two_to_vtk.m</a>,
writes out a 2D finite element solution.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "twod_to_vtk_test.m">twod_to_vtk_test.m</a>,
a MATLAB function which runs a test of TWOD_TO_VTK.
</li>
</ul>
</p>
<p>
<b>CHANNEL</b> is finite element data associated with a
4 by 11 grid of points in a 3x10 rectangular channel, the
triangular elements formed from those nodes, and the velocity
and pressure of an associated Poiseuille flow solution.
<ul>
<li>
<a href = "channel_nodes.txt">channel_nodes.txt</a>,
the coordinates of the nodes;
</li>
<li>
<a href = "channel_elements.txt">channel_elements.txt</a>,
the element definitions;
</li>
<li>
<a href = "channel_values.txt">channel_values.txt</a>,
the values of U, V and P at each node.
</li>
<li>
<a href = "channel.vtk">channel.vtk</a>,
the legacy VTK file created from this data by the
TWOD_TO_VTK_TEST function.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last modified on 20 December 2010.
</i>
<!-- John Burkardt -->
</body>
</html>