nastran Package

iface_format Module

Inheritance diagram of pyNastran.converters.usm3d.iface_format

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 ???? -

#——————————– New2:

BC File...
56864 944 7 2

nFaces nBouc nRegions ???

Cogsg File...
{‘dummy’: 6266912, ‘nBoundPts’: 28434, ‘nPoints’: 79734, ‘nElements’: 391680, ‘nViscPts’: 26304, ‘nViscElem’: 130560, ‘tc’: 0.0, ‘inew’: -1, }

IFace File... A=16235848 B=811792 C=56864 A = [2, 2, 2, 1051, 1931] B = [2, 2, 2, 2, 113, 449] C = nfaces = [2, 2, 2, 2, 2, 1777]

Flo File... nPoints = nlines = 79734

Box:

BC File... 6810 284 6 2 nFaces nBouc nRegions ???

Cogsg File...
{‘dummy’: 1006496, ‘nBoundPts’: 3407, ‘nPoints’: 12283, ‘nElements’: 62904, ‘nViscPts’: 10907, ‘nViscElem’: 51564, ‘tc’: 0.0, ‘inew’: -1,}

Front File... npoit nelet npoif nface nboun nfacs nbouc nfaci npoiv nelev 12283 62904 0 0 3407 6810 284 6236 10907 51564

6

Poin1 File... 3407 10907

1 1 2 2 3 3 4 4 10907 lines

IFace File...

A=2584268 B=129213 C=6810 # A = [2, 2, 646067] # B = [3, 3, 7, 7, 293] # C = [2, 3, 5, 227] A = ??? B = C = nfaces

read_m2(m2_filename)[source]
read_poin1(poin1_filename)[source]
pyNastran.converters.usm3d.iface_format.factors(nraw)[source]

function for getting the primes factors of a number.

This is supposed to help with figuring out the file format. I’m sure there’s a better method, but it doesn’t matter too much.

time_accurate_results Module

pyNastran.converters.usm3d.time_accurate_results._loads_func(data)[source]
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]
pyNastran.converters.usm3d.time_accurate_results.main()[source]
pyNastran.converters.usm3d.time_accurate_results.run_time_acc(dirname, model_name, node_ids, nstart=0, nlimit=None, num_cpus=8)[source]

node ids start at index=0

pyNastran.converters.usm3d.time_accurate_results.write_loads(csv_filename, loads, node_id)[source]

usm3d_io Module

usm3d_reader Module

Inheritance diagram of pyNastran.converters.usm3d.usm3d_reader

pyNastran.converters.usm3d.usm3d_reader.Float(sline, n)[source]
class pyNastran.converters.usm3d.usm3d_reader.Usm3dReader(log=None, debug=None)[source]

Bases: object

_read_cogsg_volume(f)[source]
bcmap_to_bc_name = {0: 'Supersonic Inflow', 1: 'Reflection plane', 2: 'Supersonic Outflow', 3: 'Subsonic Outer Boundaries', 4: 'Viscous Surfaces', 5: 'Inviscid aerodynamic surface', 102: 'Engine-exhaust (Jet Core)', 103: 'Engine-exhaust (Fan)', 201: 'Engine-intake', 202: 'Engine-exhaust (Jet Core)', 203: 'Engine-exhaust (Fan)', 44: 'Blunt base', 1001: 'Special inflow', 55: 'Thick Trailing Edges', 1002: 'Special Outflow (Fixed Pressure)', 101: 'Engine-intake'}
read_bc(bc_file, stop_after_header=False, get_lbouf=False)[source]
read_cogsg(cogsg_file, stop_after_header=False)[source]
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_filename – the name of the file to read
  • n – 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_ids – 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, stupid Nastran-esque float formatting is sometimes used, so 5.0-100 exists, which is 5.0E-100. We just assume it’s 0.

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, dimension_flag, read_loads=True)[source]
write_usm3d(basename)[source]
pyNastran.converters.usm3d.usm3d_reader.main()[source]
pyNastran.converters.usm3d.usm3d_reader.write_cogsg_volume(model, cogsg_file)[source]
pyNastran.converters.usm3d.usm3d_reader.write_face(model)[source]
pyNastran.converters.usm3d.usm3d_reader.write_front(model)[source]
pyNastran.converters.usm3d.usm3d_reader.write_usm3d_volume(model, basename)[source]