tecplot Package
tecplot
Module
digraph inheritancee4767c36b2 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.tecplot.tecplot.Tecplot" [URL="#pyNastran.converters.tecplot.tecplot.Tecplot",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Parses a binary/ASCII Tecplot 360 file."];
"pyNastran.converters.tecplot.tecplot_binary.TecplotBinary" -> "pyNastran.converters.tecplot.tecplot.Tecplot" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.converters.tecplot.tecplot_binary.Base" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"];
"pyNastran.converters.tecplot.tecplot_binary.TecplotBinary" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"];
"pyNastran.converters.tecplot.tecplot_binary.Base" -> "pyNastran.converters.tecplot.tecplot_binary.TecplotBinary" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
- class pyNastran.converters.tecplot.tecplot.Tecplot(log=None, debug: bool = False)[source]
Bases:
TecplotBinary
Parses a binary/ASCII Tecplot 360 file. Writes a binary/ASCII Tecplot 10 file.
- Supports:
title
single zone only?
binary unstructured: - nodal results - single element type;
- ZONETYPE = [FETRIANGLE, FEQUADRILATERAL,
FETETRAHEDRON, FEBRICK]
DATAPACKING = [BLOCK] writing
3D
full support for writing
ASCII unstructured: - nodal results - single element type;
- ZONETYPE = [FETRIANGLE, FEQUADRILATERAL,
FETETRAHEDRON, FEBRICK]
DATAPACKING = [POINT, BLOCK] writing
2D/3D
full support for writing
ASCII structured: - nodal results - F=POINT - 2d/3d (POINT, I/J/K) - full support for writing - no reshaping of xyz to make slicing easier!
- Doesn’t support:
text
geometry
transient writing
centroidal results
non-sequential node ids
data lists (100*0.0)
- extract_y_slice(y0: float, tol: float = 0.01, slice_filename: str | None = None)[source]
doesn’t work…
- property nnodes: int
- property nzones
gets the number of zones
- read_table(tecplot_file: TextIO, unused_iblock: int, headers_dict: dict[str, Any], line: str) tuple[ndarray, Any] [source]
reads a space-separated tabular data block
- read_tecplot(tecplot_filename: PurePath | str, filetype: str = 'guess', zones_to_exclude: list[int] | None = None, zones_to_include: list[int] | None = None) None [source]
Reads an ASCII/binary Tecplot file.
The binary file reader must have ONLY CHEXAs and be Tecplot 360 with rho, u, v, w, and p. The ASCII file reader has only been tested with Tecplot 10, but will probably work on Tecplot360. It should work with any set of variables.
- Parameters:
- zones_to_excludelist[int]; default=None -> []
0-based list of zones to exlcude
- zones_to_includelist[int]; default=None -> []
0-based list of zones to include (exclusive)
- read_tecplot_ascii(tecplot_filename: PurePath | str | StringIO, nnodes=None, nelements=None, zones_to_exclude: list[int] | None = None, zones_to_include: list[int] | None = None)[source]
Reads a Tecplot ASCII file.
- Supports:
CTRIA3
CQUAD4
CTETRA
CHEXA
Note
assumes single typed results
Warning
BLOCK option doesn’t work if line length isn’t the same…
- slice_xyz(xslice: float | None, yslice: float | None, zslice: float | None) None [source]
TODO: doesn’t remove unused nodes/renumber elements
- write_tecplot(tecplot_filename: PurePath | str, res_types: list[str] | None = None, adjust_nids: bool = True) None [source]
Only handles single type writing
- Parameters:
- tecplot_filenamestr
the path to the output file
- res_typesstr; list[str, str, …]; default=None -> all
the results that will be written (must be consistent with self.variables)
- adjust_nidsbool; default=True
element_ids are 0-based in binary and must be switched to 1-based in ASCII
- pyNastran.converters.tecplot.tecplot.read_tecplot(tecplot_filename: PurePath | str, use_cols=None, dtype=None, filetype: str = 'guess', zones_to_exclude: list[int] | None = None, zones_to_include: list[int] | None = None, log: SimpleLogger | None = None, debug: bool = False) Tecplot [source]
loads a tecplot file
- Parameters:
- zones_to_excludelist[int]; default=None -> []
0-based list of zones to exlcude
- zones_to_includelist[int]; default=None -> []
0-based list of zones to include (exclusive)
tecplot_to_cart3d
Module
- Defines:
tecplot_to_cart3d_filename(tecplot_filename, cart3d_filename, debug=True)
tecplot_to_cart3d(tecplot_filename, cart3d_filename=None, debug=True)
- pyNastran.converters.tecplot.tecplot_to_cart3d.cmd_line_tecplot_to_cart3d()[source]
runs the test problem
- pyNastran.converters.tecplot.tecplot_to_cart3d.get_zone_tris(tri_elements: ndarray, quad_elements: ndarray) ndarray [source]
gets the tris and associated xyz points
- pyNastran.converters.tecplot.tecplot_to_cart3d.tecplot_to_cart3d(tecplot_filename: str | Tecplot, cart3d_filename: str | None = None, remove_degenerate_tris: bool = True, log=None, debug: bool = True) Cart3D [source]
Converts a Tecplot file to Cart3d.
- Parameters:
- remove_degenerate_trisbool; default=False
removes degenerate triangles (triangles with an area of 0.0)
tecplot_to_nastran
Module
- Defines:
tecplot_to_nastran(tecplot_filename, bdf_filename, debug=True)
tecplot_to_nastran(tecplot_filename, bdf_filename, debug=True)
- pyNastran.converters.tecplot.tecplot_to_nastran.nastran_table_to_tecplot(bdf_model: BDF, case: TableArray, variables: list[str]) Tecplot [source]
assumes only triangles
- pyNastran.converters.tecplot.tecplot_to_nastran.nastran_tables_to_tecplot_filenames(tecplot_filename_base: str, bdf_model: BDF, case: TableArray, variables: list[str] | None = None, ivars: list[int] | None = None) None [source]
case is intended as an op2 object like DisplacementArray