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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FreeMat: vtkMultiBlockPLOT3DReader</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FreeMat
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('vtkio_vtkmultiblockplot3dreader.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">vtkMultiBlockPLOT3DReader </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Section: <a class="el" href="sec_vtkio.html">Visualization Toolkit IO Classes</a> </p>
<h1><a class="anchor" id="Usage"></a>
Usage</h1>
<p>vtkMultiBlockPLOT3DReader is a reader object that reads PLOT3D formatted files and generates structured grid(s) on output. PLOT3D is a computer graphics program designed to visualize the grids and solutions of computational fluid dynamics. Please see the "PLOT3D User's Manual" available from NASA Ames Research Center, Moffett Field CA.</p>
<p>PLOT3D files consist of a grid file (also known as XYZ file), an optional solution file (also known as a Q file), and an optional function file that contains user created data (currently unsupported). The Q file contains solution information as follows: the four parameters free stream mach number (Fsmach), angle of attack (Alpha), Reynolds number (Re), and total integration time (Time). This information is stored in an array called Properties in the FieldData of each output (tuple 0: fsmach, tuple 1: alpha, tuple 2: re, tuple 3: time). In addition, the solution file contains the flow density (scalar), flow momentum (vector), and flow energy (scalar).</p>
<p>The reader can generate additional scalars and vectors (or "functions") from this information. To use vtkMultiBlockPLOT3DReader, you must specify the particular function number for the scalar and vector you want to visualize. This implementation of the reader provides the following functions. The scalar functions are: -1 - don't read or compute any scalars 100 - density 110 - pressure 120 - temperature 130 - enthalpy 140 - internal energy 144 - kinetic energy 153 - velocity magnitude 163 - stagnation energy 170 - entropy 184 - swirl.</p>
<p>The vector functions are: -1 - don't read or compute any vectors 200 - velocity 201 - vorticity 202 - momentum 210 - pressure gradient.</p>
<p>(Other functions are described in the PLOT3D spec, but only those listed are implemented here.) Note that by default, this reader creates the density scalar (100) and momentum vector (202) as output. (These are just read in from the solution file.) Please note that the validity of computation is a function of this class's gas constants (R, Gamma) and the equations used. They may not be suitable for your computational domain.</p>
<p>Additionally, you can read other data and associate it as a vtkDataArray into the output's point attribute data. Use the method AddFunction() to list all the functions that you'd like to read. AddFunction() accepts an integer parameter that defines the function number.</p>
<p>To create an instance of class vtkMultiBlockPLOT3DReader, simply invoke its constructor as follows </p>
<pre class="fragment"> obj = vtkMultiBlockPLOT3DReader
</pre> <h1><a class="anchor" id="Methods"></a>
Methods</h1>
<p>The class vtkMultiBlockPLOT3DReader has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, <code>obj</code> is an instance of the vtkMultiBlockPLOT3DReader class. </p>
<ul>
<li>
<code>string = obj.GetClassName ()</code> </li>
<li>
<code>int = obj.IsA (string name)</code> </li>
<li>
<code>vtkMultiBlockPLOT3DReader = obj.NewInstance ()</code> </li>
<li>
<code>vtkMultiBlockPLOT3DReader = obj.SafeDownCast (vtkObject o)</code> </li>
<li>
<code>obj.SetFileName (string name)</code> - Set/Get the PLOT3D geometry filename. </li>
<li>
<code>string = obj.GetFileName ()</code> - Set/Get the PLOT3D geometry filename. </li>
<li>
<code>obj.SetXYZFileName (string )</code> - Set/Get the PLOT3D geometry filename. </li>
<li>
<code>string = obj.GetXYZFileName ()</code> - Set/Get the PLOT3D geometry filename. </li>
<li>
<code>obj.SetQFileName (string )</code> - Set/Get the PLOT3D solution filename. </li>
<li>
<code>string = obj.GetQFileName ()</code> - Set/Get the PLOT3D solution filename. </li>
<li>
<code>int = obj.GetNumberOfBlocks ()</code> - This returns the number of outputs this reader will produce. This number is equal to the number of grids in the current file. This method has to be called before getting any output if the number of outputs will be greater than 1 (the first output is always the same). Note that every time this method is invoked, the header file is opened and part of the header is read. </li>
<li>
<code>int = obj.GetNumberOfGrids ()</code> - Is the file to be read written in binary format (as opposed to ascii). </li>
<li>
<code>obj.SetBinaryFile (int )</code> - Is the file to be read written in binary format (as opposed to ascii). </li>
<li>
<code>int = obj.GetBinaryFile ()</code> - Is the file to be read written in binary format (as opposed to ascii). </li>
<li>
<code>obj.BinaryFileOn ()</code> - Is the file to be read written in binary format (as opposed to ascii). </li>
<li>
<code>obj.BinaryFileOff ()</code> - Is the file to be read written in binary format (as opposed to ascii). </li>
<li>
<code>obj.SetMultiGrid (int )</code> - Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true. </li>
<li>
<code>int = obj.GetMultiGrid ()</code> - Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true. </li>
<li>
<code>obj.MultiGridOn ()</code> - Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true. </li>
<li>
<code>obj.MultiGridOff ()</code> - Does the file to be read contain information about number of grids. In some PLOT3D files, the first value contains the number of grids (even if there is only 1). If reading such a file, set this to true. </li>
<li>
<code>obj.SetHasByteCount (int )</code> - Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't. </li>
<li>
<code>int = obj.GetHasByteCount ()</code> - Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't. </li>
<li>
<code>obj.HasByteCountOn ()</code> - Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't. </li>
<li>
<code>obj.HasByteCountOff ()</code> - Were the arrays written with leading and trailing byte counts ? Usually, files written by a fortran program will contain these byte counts whereas the ones written by C/C++ won't. </li>
<li>
<code>obj.SetIBlanking (int )</code> - Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output. </li>
<li>
<code>int = obj.GetIBlanking ()</code> - Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output. </li>
<li>
<code>obj.IBlankingOn ()</code> - Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output. </li>
<li>
<code>obj.IBlankingOff ()</code> - Is there iblanking (point visibility) information in the file. If there is iblanking arrays, these will be read and assigned to the PointVisibility array of the output. </li>
<li>
<code>obj.SetTwoDimensionalGeometry (int )</code> - If only two-dimensional data was written to the file, turn this on. </li>
<li>
<code>int = obj.GetTwoDimensionalGeometry ()</code> - If only two-dimensional data was written to the file, turn this on. </li>
<li>
<code>obj.TwoDimensionalGeometryOn ()</code> - If only two-dimensional data was written to the file, turn this on. </li>
<li>
<code>obj.TwoDimensionalGeometryOff ()</code> - If only two-dimensional data was written to the file, turn this on. </li>
<li>
<code>obj.SetForceRead (int )</code> - Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong. </li>
<li>
<code>int = obj.GetForceRead ()</code> - Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong. </li>
<li>
<code>obj.ForceReadOn ()</code> - Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong. </li>
<li>
<code>obj.ForceReadOff ()</code> - Try to read a binary file even if the file length seems to be inconsistent with the header information. Use this with caution, if the file length is not the same as calculated from the header. either the file is corrupt or the settings are wrong. </li>
<li>
<code>obj.SetByteOrderToBigEndian ()</code> - Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations). </li>
<li>
<code>obj.SetByteOrderToLittleEndian ()</code> - Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations). </li>
<li>
<code>obj.SetByteOrder (int )</code> - Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations). </li>
<li>
<code>int = obj.GetByteOrder ()</code> - Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations). </li>
<li>
<code>string = obj.GetByteOrderAsString ()</code> - Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations). </li>
<li>
<code>obj.SetR (double )</code> - Set/Get the gas constant. Default is 1.0. </li>
<li>
<code>double = obj.GetR ()</code> - Set/Get the gas constant. Default is 1.0. </li>
<li>
<code>obj.SetGamma (double )</code> - Set/Get the ratio of specific heats. Default is 1.4. </li>
<li>
<code>double = obj.GetGamma ()</code> - Set/Get the ratio of specific heats. Default is 1.4. </li>
<li>
<code>obj.SetUvinf (double )</code> - Set/Get the x-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>double = obj.GetUvinf ()</code> - Set/Get the x-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>obj.SetVvinf (double )</code> - Set/Get the y-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>double = obj.GetVvinf ()</code> - Set/Get the y-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>obj.SetWvinf (double )</code> - Set/Get the z-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>double = obj.GetWvinf ()</code> - Set/Get the z-component of the free-stream velocity. Default is 1.0. </li>
<li>
<code>obj.SetScalarFunctionNumber (int num)</code> - Specify the scalar function to extract. If ==(-1), then no scalar function is extracted. </li>
<li>
<code>int = obj.GetScalarFunctionNumber ()</code> - Specify the scalar function to extract. If ==(-1), then no scalar function is extracted. </li>
<li>
<code>obj.SetVectorFunctionNumber (int num)</code> - Specify the vector function to extract. If ==(-1), then no vector function is extracted. </li>
<li>
<code>int = obj.GetVectorFunctionNumber ()</code> - Specify the vector function to extract. If ==(-1), then no vector function is extracted. </li>
<li>
<code>obj.AddFunction (int functionNumber)</code> - Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc. </li>
<li>
<code>obj.RemoveFunction (int )</code> - Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc. </li>
<li>
<code>obj.RemoveAllFunctions ()</code> - Specify additional functions to read. These are placed into the point data as data arrays. Later on they can be used by labeling them as scalars, etc. </li>
<li>
<code>int = obj.CanReadBinaryFile (string fname)</code> - Return 1 if the reader can read the given file name. Only meaningful for binary files. </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">FreeMat Documentation</a></li><li class="navelem"><a class="el" href="sec_vtkio.html">Visualization Toolkit IO Classes</a></li>
<li class="footer">Generated on Thu Jul 25 2013 17:18:34 for FreeMat by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
</ul>
</div>
</body>
</html>
|