ugrid Package
aflr2
Module
digraph inheritancea82b7e08e4 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.aflr.aflr2.aflr2.AFLR2" [URL="#pyNastran.converters.aflr.aflr2.aflr2.AFLR2",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="defines methods for reading interfacing with AFLR2"];
}
- defines:
read_bedge(bedge_filename, beta_reverse=179.7, log=None, debug=False)
AFLR2(log=None, debug=False) - read_bedge(self, bedge_filename, beta_reverse=179.7) - write_nastran(self, bdf_filename) - write_fixed_points(self, fixed_points_filename) - merge_bedge(self, bedge, bedge_filename)
export_to_bedge(bedge_filename, nodes, grid_bcs, curves, subcurves, axis=1, log=None)
- class pyNastran.converters.aflr.aflr2.aflr2.AFLR2(log=None, debug: str | bool | None = False)[source]
Bases:
object
defines methods for reading interfacing with AFLR2
Initializes the AFLR2 object
- Parameters:
- debugbool/None; default=True
- used to set the logger if no logger is passed in
True: logs debug/info/error messages False: logs info/error messages None: logs error messages
- loglogging module object / None
if log is set, debug is ignored and uses the settings the logging object has
- pyNastran.converters.aflr.aflr2.aflr2.export_to_bedge(bedge_filename, nodes, grid_bcs, curves, subcurves, axis=1, log=None)[source]
Creates a bedge file
- Parameters:
- bedge_filenamestr
the *.bedge file
- nodes???
???
- grid_bcs???
??? source is model.grid_bc, not model.grid_bcs
- curves???
???
- subcurves???
???
- axisint; default=1
the axis to remove (nodes in Nx3)
- logLogger(); default=None
a required logging object
surf_reader
Module
digraph inheritance0c05775e3d {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.aflr.surf.surf_reader.SurfReader" [URL="#pyNastran.converters.aflr.surf.surf_reader.SurfReader",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"];
"pyNastran.converters.aflr.surf.surf_reader.TagReader" [URL="#pyNastran.converters.aflr.surf.surf_reader.TagReader",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"];
}
- class pyNastran.converters.aflr.surf.surf_reader.SurfReader(log=None, debug=False)[source]
Bases:
object
Initializes the SurfReader object
- Parameters:
- debugbool/None; default=True
- used to set the logger if no logger is passed in
True: logs debug/info/error messages False: logs info/error messages None: logs error messages
- loglogging module object / None
if log is set, debug is ignored and uses the settings the logging object has
- read_surf(surf_filename)[source]
# AFLR3,14.18.115,28.206.154,WIN/doc/ug_io/3d_input_output_grids.html
Grid BC
Description
-6
internal embedded/transparent surface that will be converted to internal/interior/volume faces with BL volume grid
-5
embedded/transparent surface with BL volume grid
-1
standard surface with BL volume grid; wall
0
standard surface
1
standard surface; farfield
2
standard surface that intersects the BL region; boundary layer
3
embedded/transparent surface or source surface that will be converted to source nodes; source
4
embedded/transparent surface that intersects the BL region
5
embedded/transparent surface
6
internal embedded/transparent surface that will be converted to internal/interior/volume faces
7
fixed surface that intersects and directly connects to the BL region; transparent
- class pyNastran.converters.aflr.surf.surf_reader.TagReader(log=None, debug=False)[source]
Bases:
object
- pyNastran.converters.aflr.surf.surf_reader.combine_surfs(surf_filenames, surf_out_filename=None)[source]
Combines multiple SURFs into a single file
- Parameters:
- surf_filenameslist[str]
list of surf filenames
- surf_out_filenamestr; default=None -> no writing
string of stl output filename
- Returns:
- surfSurfReader
the surf object
ugrid2d_reader
Module
digraph inheritance9ea67ac6b1 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.aflr.ugrid.ugrid2d_reader.UGRID2D_Reader" [URL="#id0",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="Interface to the AFLR UGrid2D format."];
}
- Defines the following classes:
UGRID2D_Reader
- class pyNastran.converters.aflr.ugrid.ugrid2d_reader.UGRID2D_Reader(log=None, debug=None)[source]
Bases:
object
Interface to the AFLR UGrid2D format.
- read_ugrid(ugrid_filename)[source]
Reads a ugrid2d file of the form:
#(nnodes, ntrias, nquads), ntets, npyram5, npenta6, nhexas8s '5 1 1 0 0 0 0
- ‘
# nodes ‘0. 0. 0.
- ‘
‘1. 0. 0.
- ‘
‘1. 1. 0.
- ‘
‘0. 1. 0.
- ‘
‘0. 2. 0.
- ‘
# tris ‘3 4 5
- ‘
# quads ‘1 2 3 4
‘
Note
comment lines should not be included and exist for reference
ugrid2d_to_nastran
Module
ugrid3d_to_nastran
Module
- pyNastran.converters.aflr.ugrid.ugrid3d_to_nastran.ugrid3d_to_nastran(ugrid_filename, bdf_filename, include_shells=True, include_solids=True, convert_pyram_to_penta=False, encoding=None, size=16, is_double=False, log=None)[source]
Converts a UGRID to a BDF.
- Parameters:
- ugrid_filenamestr
the input UGRID filename
- bdf_filenamestr
the output BDF filename
- include_shellsbool; default=True
should the shells be written
- include_solidsbool; default=True
should the solids be written
- convert_pyram_to_pentabool; default=False
False : NX Nastran True : MSC Nastran
- sizeint; {8, 16}; default=16
the bdf write precision
- is_doublebool; default=False
the field precision to write
- loglogger; default=None
a logger object
- Returns:
- ugrid_modelUGRID()
the ugrid model
ugrid3d_to_openfoam
Module
- pyNastran.converters.aflr.ugrid.ugrid3d_to_openfoam._write_boundary(ugrid, boundary_filename, tag_filename)[source]
writes an OpenFOAM boundary file
- pyNastran.converters.aflr.ugrid.ugrid3d_to_openfoam._write_faces(ugrid, faces_filename)[source]
writes an OpenFOAM faces file
ugrid3d_to_tecplot
Module
- pyNastran.converters.aflr.ugrid.ugrid3d_to_tecplot.get_ugrid_model(ugrid_filename: str, log=None, debug: bool = False) UGRID [source]
helper method for loading UGRID models
- Parameters:
- ugrid_filenamevaries
str : the input UGRID filename UGRID : the UGRID object
- Returns:
- ugrid_modelUGRID()
the UGRID object
- pyNastran.converters.aflr.ugrid.ugrid3d_to_tecplot.ugrid3d_to_tecplot_filename(ugrid_filename: str, tecplot_filename: str, log=None, debug: bool = False) Tecplot [source]
Converts a UGRID to a Tecplot ASCII file.
- Parameters:
- ugrid_filenamevaries
str : the input UGRID filename UGRID : the UGRID object
- tecplot_filenamestr
the output Tecplot filename
- loglogger; default=None
a logger object
- debugbool; default=False
developer debug
- Returns:
- tecplot_modelTecplot()
the Tecplot object
- pyNastran.converters.aflr.ugrid.ugrid3d_to_tecplot.ugrid_to_tecplot(ugrid_filename: str, tecplot_filename: str | None = None, log=None, debug: bool = False) tuple[Tecplot, Zone] [source]
Converts a UGRID to a Tecplot ASCII file.
- Parameters:
- ugrid_filenamevaries
str : the input UGRID filename UGRID : the UGRID object
- tecplot_filenamestr
the output Tecplot filename
- loglogger; default=None
a logger object
- debugbool; default=False
developer debug
- Returns:
- tecplot_modelTecplot()
the Tecplot object
ugrid2d_reader
Module
digraph inheritance9ea67ac6b1 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.aflr.ugrid.ugrid2d_reader.UGRID2D_Reader" [URL="#id0",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="Interface to the AFLR UGrid2D format."];
}
- Defines the following classes:
UGRID2D_Reader
- class pyNastran.converters.aflr.ugrid.ugrid2d_reader.UGRID2D_Reader(log=None, debug=None)[source]
Bases:
object
Interface to the AFLR UGrid2D format.
- read_ugrid(ugrid_filename)[source]
Reads a ugrid2d file of the form:
#(nnodes, ntrias, nquads), ntets, npyram5, npenta6, nhexas8s '5 1 1 0 0 0 0
- ‘
# nodes ‘0. 0. 0.
- ‘
‘1. 0. 0.
- ‘
‘1. 1. 0.
- ‘
‘0. 1. 0.
- ‘
‘0. 2. 0.
- ‘
# tris ‘3 4 5
- ‘
# quads ‘1 2 3 4
‘
Note
comment lines should not be included and exist for reference
ugrid_reader
Module
digraph inheritanceb23aabd6c5 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.converters.aflr.ugrid.ugrid_reader.UGRID" [URL="#pyNastran.converters.aflr.ugrid.ugrid_reader.UGRID",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="Interface to the AFLR UGrid format."];
}
- Defines the following classes:
UGRID
- class pyNastran.converters.aflr.ugrid.ugrid_reader.UGRID(log=None, debug: bool = False, read_shells: bool = True, read_solids: bool = True)[source]
Bases:
object
Interface to the AFLR UGrid format.
- read_ugrid(ugrid_filename: str | PurePath | None, check: bool = True)[source]
$ $ NASTRAN INPUT DECK GENERATED BY UG_IO $ BEGIN BULK $UG_IO_ Data $Number_of_BL_Vol_Tets 2426 $UG_IO_ Data $Number_of_Bnd_Nodes 34350 $UG_IO_ Data $Number_of_Nodes 399036 $UG_IO_ Data $Number_of_Surf_Quads 20665 $UG_IO_ Data $Number_of_Surf_Trias 27870 $UG_IO_ Data $Number_of_Vol_Hexs 163670 $UG_IO_ Data $Number_of_Vol_Pents_5 27875 $UG_IO_ Data $Number_of_Vol_Pents_6 67892 $UG_IO_ Data $Number_of_Vol_Tets 1036480
- write_bdf(bdf_filename: str | PurePath, include_shells: bool = True, include_solids: bool = True, convert_pyram_to_penta: bool = True, write_grids: bool = True, encoding=None, size: int = 16, is_double: bool = False, check: bool = True) None [source]
writes a Nastran BDF
- Parameters:
- sizeint; {8, 16}; default=16
the bdf write precision
- is_doublebool; default=False
the field precision to write
- pyNastran.converters.aflr.ugrid.ugrid_reader._write_bdf_solids(bdf_file, log, eid: int, pid: int, tets, penta5s, penta6s, hexas, convert_pyram_to_penta: bool = True)[source]
writes the Nastran BDF solid elements
- pyNastran.converters.aflr.ugrid.ugrid_reader.determine_dytpe_nfloat_endian_from_ugrid_filename(ugrid_filename: str | PurePath | None = None)[source]
figures out what the format of the binary data is based on the filename
- pyNastran.converters.aflr.ugrid.ugrid_reader.read_ugrid(ugrid_filename: str | PurePath | None = None, encoding=None, log=None, debug: bool = True, read_shells: bool = True, read_solids: bool = True, check: bool = True)[source]
Creates the UGRID object
- Parameters:
- ugrid_filenamestr (default=None -> popup)
the ugrid filename
- debugbool/None
- used to set the logger if no logger is passed in
True: logs debug/info/error messages False: logs info/error messages None: logs error messages
- loglogging module object / None
if log is set, debug is ignored and uses the settings the logging object has
- encodingstr; default=None
is this used?
- Returns:
- modelUGRID()
an UGRID object