usm3d Package¶
bc_to_nastran
Module¶
iface_format
Module¶
-
class
pyNastran.converters.usm3d.iface_format.
IFace
(log=None, debug=None)[source]¶ Bases:
object
-
read_iface
(iface_filename)[source]¶ BC File… nFaces nBouc, nRegions, ???
nFaces - number of faces on the surface nBouc - ??? nRegions - number of independent surfaces that are set in the mapbc file ???? -
Cogsg File… header = {
‘dummy’: 6266912, ‘nBoundPts’: 28434, ‘nPoints’: 79734, ‘nElements’: 391680, ‘nViscPts’: 26304, ‘nViscElem’: 130560, ‘tc’: 0.0, ‘inew’: -1,
}
-
time_accurate_results
Module¶
-
pyNastran.converters.usm3d.time_accurate_results.
get_flo_files
(dirname, model_name, nstart=0, nlimit=None, include_dirname_in_path=True)[source]¶ get the flo files in ascending order
-
pyNastran.converters.usm3d.time_accurate_results.
get_flo_files_from_n
(dirname, model_name, n_list, include_dirname_in_path=True)[source]¶ get the flo files in ascending order
-
pyNastran.converters.usm3d.time_accurate_results.
get_n_list
(dirname, model_name)[source]¶ - gets files of the form:
modelname + ‘_xxx.flo’
usm3d_reader
Module¶
- Defines:
- Usm3d(log=None, debug=False)
read_cogsg(cogsg_file, stop_after_header=False)
read_usm3d(self, basename, dimension_flag, read_loads=True)
write_usm3d(basename)
read_mapbc(mapbc_filename)
read_bc(self, bc_filename, stop_after_header=False, get_lbouf=False)
read_flo(self, flo_filename, n=None, node_ids=None)
-
class
pyNastran.converters.usm3d.usm3d_reader.
Usm3d
(log=None, debug=None)[source]¶ Bases:
object
Usm3d interface class
Initializes the Usm3d 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
-
bcmap_to_bc_name
= {0: 'Supersonic Inflow', 1: 'Reflection plane', 2: 'Supersonic Outflow', 3: 'Subsonic Outer Boundaries', 4: 'Viscous Surfaces', 5: 'Inviscid aerodynamic surface', 44: 'Blunt base', 55: 'Thick Trailing Edges', 101: 'Engine-intake', 102: 'Engine-exhaust (Jet Core)', 103: 'Engine-exhaust (Fan)', 201: 'Engine-intake', 202: 'Engine-exhaust (Jet Core)', 203: 'Engine-exhaust (Fan)', 1001: 'Special inflow', 1002: 'Special Outflow (Fixed Pressure)'}¶
-
read_cogsg
(cogsg_filename, stop_after_header=False)[source]¶ Reads the *.cogsg file
- Returns
- nodes(N, 3) float ndarray
the nodes
- tet_elements???
???
-
read_flo
(flo_filename, n=None, node_ids=None)[source]¶ - ipltqn is a format code where:
ipltqn = 0 (no printout)
ipltqn = 1 (unformatted)
ipltqn = 2 (formatted) - default
- Parameters
- flo_filenamestr
the name of the file to read
- nint; default=None
the number of points to read (initializes the array) n is typically the number of points, but is not required to be this lets you read nodes 1…n, but not greater than n+1. node_ids must be set to None.
- node_idsList[int]; default=None
the specific points to read (n must be set to None).
- nvars = 5
(nodeID, rho, rhoU, rhoV, rhoW) = sline (e) = line
- nvars = 6
(nodeID, rho, rhoU, rhoV, rhoW, e) = line
- Also, Nastran-esque float formatting is sometimes used,
- so 5.0-100 exists, which is 5.0E-100. We just assume it’s 0.
- Returns
- node_id(nnodes, ) int ndarray
the node ids for the selected loads
- loadsdict[result_name]data
- result_namestr
the name of the result
- data(nnodes, ) float ndarray
the data corresponding to the result_name
-
read_mapbc
(mapbc_filename)[source]¶ 0 - Supersonic Inflow 1 - Reflection plane 2 - Supersonic Outflow 3 - Subsonic Outer Boundaries 4 - Viscous Surfaces 5 - Inviscid aerodynamic surface 44 - Blunt base 55 - Thick Trailing Edges n*100+3 - Engine-exhaust (Fan) n*100+2 - Engine-exhaust (Jet Core) n*100+1 - Engine-intake 1001 - Special inflow 1002 - Special Outflow (Fixed Pressure)
0 - Freestream - Supersonic Inflow (Bounding Box) 2 - Extrapolation - Supersonic Outflow (Bounding Box)
1 - Reflection Plane - Tangent Flow - (Symmetry Plane) 3 - Characteristic Inflow - Subsonic Inflow/Outflow/Sideflow (Bounding Box)
4 - Inviscid Surface (Physical) 5 - Viscous Surface (Physical) #==============================
#Thu Dec 19 11:46:03 2013 #bc.map Patch # BC Family #surf surfIDs Family #——————————————————– 1 44 44 0 0 Base -> Blunt base 2 4 4 0 0 Bay -> Viscous Surfaces 3 0 0 0 0 Inflow -> Supersonic Inflow 4 2 2 0 0 Outflow -> Supersonic Outflow 5 3 3 0 0 Sideflow -> Characteristic Inflow/Outflow 7 1 1 0 0 Symmetry -> Reflection plane
-
read_usm3d
(basename, unused_dimension_flag, read_loads=True)[source]¶ - Parameters
- Returns
- nodes(nnodes, 3) float ndarray
the xyz coordinates
- tris_tets???
???
- tris(ntri, 3) int ndarray
0-based node indices
- bcs(ntris, ) int ndarray
1-based patch/”property” IDs
- mapbcdict[patch_id]map_line
patch_id : int map_line : List[bc, family, surf, surf_ids]
- bcint
boundary condition number
- familyint
family number
- surfint
surface number
- surf_idsstr
???
- loadsdict[]
???
- flo_filenamestr
the latest result filename None : no *.flo file could be found static : *.flo transient : *_xxx.flo
-
pyNastran.converters.usm3d.usm3d_reader.
read_flo
(flo_filename, n=None, node_ids=None)[source]¶ reads a *.flo file
-
pyNastran.converters.usm3d.usm3d_reader.
read_usm3d
(basename, log=None, debug=None)[source]¶ reads a usm3d file