Welcome to pyNastran’s documentation for v0.7!¶
The pyNastran software interfaces to Nastran’s complicated input and output files and provides a simplified interface to read/edit/write the various files. The software is compatible currently being used on Windows, Linux, and Mac.
The BDF reader/editor/writer supports about 230 cards including coordinate systems. Card objects have methods to access data such as Mass, Area, etc. The BDF writer writes a small field formatted file, but makes full use of the 8-character Nastran field. The OpenMDAO BDF parametrization syntax is also supported.
The OP2 reader supports static/transient results, which unless you analyzing frequency response data should be good enough. It also supports F06 Writing for most of the objects. Results include: displacement, velocity, acceleration, temperature, eigenvectors, eigenvalues, SPC forces, MPC forces, grid point forces, load vectors, applied loads, strain energy, as well as stress and strain.
The F06 reader/writer works for simple problems, but it’s still preliminary. At this point, you should just use the OP2 reader. It’s faster, more robust, and supports more results. The F06 reader is more used as a verification tool for the OP2 reader.
The Python OP4 reader/writer supports reading ASCII/binary sparse and dense matrices, and writing ASCII matrices..
A simple GUI has been developed that can view BDF models and display static/dynamic stress/strain/displacement/eignevectors (they must be real!) results from the OP2. Additionally, Cart3d, Usm3d, Tetgen, STL, and Panair are somewhat supported and included for use.
pyNastran Manual¶
Brief Project Overview¶
Since the 1960’s NASTRAN (NASA Structural ANalysis) has been used to solve structural/thermal/aerodynamic/dynamics/etc. problems. The file formats were originally developed by MSC for a product now called MSC Nastran. There have been many spinoff version of NASTRAN that have been created based on the 2001 source code release of MSC Nastran in 2002 after settlement with the FTC (Federal Trade Commisson). There is now NX Nastran and NEi Nastran, which are developed independently.
pyNastran is at it’s core an API (Application Programming Interface) to the legacy formats used by Nastran. These files include the BDF, F06, OP2, OP4, and PCH files. Other code has been added to pyNastran in order to drive development of the software in order to be able to solve other engineering problems. For example, Code_Aster, an open-source finite element code developed by the EDF (Electricity of France), has a Nastran to Code_Aster converter that is in development. The development has helped to define the API for the loads in order to be able to extract them in a way that makes sense. However, this is not the focus of the software.
Target Audience¶
pyNastran target audience are users of Nastran and therefore are expected to be familiar with the software. This has greatly reduced the necessity of documenting every variable exhaustively as users can easily reference existing Nastran documentation. The BDF file has roughly 700 cards availble to a user with 238 being currently supported by pyNastran. The majority of the cards, defined as separate Python classes, are not documented. However, the Quick Reference Guide (QRG) defines each input to the card. A user with the QRG should have little effort in understanding what the various objects do. However, for convenience, it’s still good to document variables.
pyNastran target audience largely uses MATLAB, a matrix based programming language, and typically has little experience with general programming. There are also users that know Python, but have never used a class or a dictionary, which makes an API seems complicated.
bdf¶
Introduction¶
This is meant as a tutorial on how to use the pyNastran pyNastran.bdf.bdf.BDF class
The head/tail/file_slice methods can be found at:
These examples can be found at:
Example 1: Read/Write¶
this example will demonstate:
- reading the BDF
- getting some basic information
- writing the BDF
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> bdf_filename = os.path.join(test_path, 'solid_bending.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename)
print information about the model
>>> print(model.get_bdf_stats())
---BDF Statistics---
SOL 101
bdf.loads[1]
FORCE: 23
bdf.loads[2]
LOAD: 1
bdf.params
PARAM : 2
bdf.nodes
GRID : 72
bdf.elements
CTETRA : 186
bdf.properties
PSOLID : 1
bdf.materials
MAT1 : 1
bdf.coords
CORD2R : ???
write the file
>>> bdf_filename_out = os.path.join(test_path, 'solid_bending_out.bdf')
>>> model.write_bdf(bdf_filename_out)
looking at the output
>>> print(file_slice(bdf_filename_out, 94, 100))
GRID 71 .500008 1.61116 3.
GRID 72 .500015 1.00001 3.
$ELEMENTS_WITH_PROPERTIES
PSOLID 1 1
CTETRA 1 1 8 13 67 33
CTETRA 2 1 8 7 62 59
write the file with large field format; double precision
>>> bdf_filename_out2 = os.path.join(test_path, 'solid_bending_out2.bdf')
>>> model.write_bdf(bdf_filename_out2, size=16, is_double=False)
>>> print(file_slice(bdf_filename_out2, 166, 175))
GRID* 71 .500008 1.61116
* 3.
GRID* 72 .500015 1.00001
* 3.
$ELEMENTS_WITH_PROPERTIES
PSOLID 1 1
CTETRA 1 1 8 13 67 33
CTETRA 2 1 8 7 62 59
CTETRA 3 1 8 45 58 66
write the file with large field format; double precision
>>> bdf_filename_out3 = os.path.join(test_path, 'solid_bending_out3.bdf')
>>> model.write_bdf(bdf_filename_out3, size=16, is_double=True)
>>> print(file_slice(bdf_filename_out3, 166, 175))
GRID* 71 5.0000800000D-011.6111600000D+00
* 3.0000000000D+00
GRID* 72 5.0001500000D-011.0000100000D+00
* 3.0000000000D+00
$ELEMENTS_WITH_PROPERTIES
PSOLID 1 1
CTETRA 1 1 8 13 67 33
CTETRA 2 1 8 7 62 59
CTETRA 3 1 8 45 58 66
Example 2: Printing Nodes¶
this example will demonstate:
- writing cards
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> bdf_filename = os.path.join(test_path, 'solid_bending.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
Method 1 - using objects¶
GRIDs
>>> for nid,node in sorted(model.nodes.items()):
>>> f.write(node.write_card(size=8, is_double=False))
GRIDSET
>>> if model.gridSet:
>>> f.write(model.gridSet.write_card(size=8, is_double=False))
SPOINTs
>>> if model.spoints:
>>> f.write(model.spoints.write_card(size=8, is_double=False))
CORDx
>>> for cid,coord in sorted(model.coords.items()):
>>> if cid != 0: # if CID=0 is the global frame, skip it
>>> f.write(coord)
Method 2 - using built-in methods¶
>>> model._write_nodes(f)
>>> model._write_coords(f)
Example 3: Printing Elements/Properties¶
Print the Element ID and associated Node and Property to an Output File
note this skips rigidElements
this example will demonstate:
- using the BDF class to write cards/properties
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> bdf_filename = os.path.join(test_path, 'solid_bending.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
Method 1 - using objects¶
>>> for eid, element in sorted(model.elements.items()):
>>> f.write(element.write_card(size=8, is_double=False))
>>> for pid, prop in sorted(model.properties.items()):
>>> f.write(prop.write_card(size=8, is_double=False))
Method 2 - using built-in method¶
>>> model._write_elements_properties(f)
Method 3 - using built-in methods¶
>>> model._write_elements(f)
>>> model._write_properties(f)
Example 4: Get Element ID & Type¶
Print the Element ID and its type(e.g. CQUAD4, CTRIA3, etc.) to a file
note this skips rigidElements
this example will demonstate:
- accessing element type information
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> bdf_filename = os.path.join(test_path, 'solid_bending.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
Method 1 - using objects¶
>>> for eid,element in sorted(model.elements.items()):
>>> msg = 'eid=%s type=%s\n' %(eid, element.type)
>>> f.write(msg)
Example 5: Get Elements by Node ID¶
this example will demonstate:
- getting the list of elements that share a certain node
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> bdf_filename = os.path.join(test_path, 'solid_bending.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
given a Node, get the Elements Attached to that Node
assume node 55
doesnt support 0d/1d elements yet
>>> nid_to_eids_map = model.get_node_id_to_element_ids_map()
>>> eids = nid_to_eids_map[55]
convert to elements instead of element IDs
>>> elements = []
>>> for eid in eids:
>>> elements.append(model.Element(eid))
>>> print("eids = %s" % eids)
>>> print("elements =\n %s" % elements)
Example 6: Get Elements by Property ID¶
this example will demonstate:
- getting a list of elements that have a certain property
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'sol_101_elements')
>>> bdf_filename = os.path.join(test_path, 'static_solid_shell_bar.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
Creating a List of Elements based on a Property ID
assume pid=1
>>> pid_to_eids_map = model.get_property_id_to_element_ids_map()
>>> eids4 = pid_to_eids_map[4] # PSHELL
>>> print("eids4 = %s" % eids4)
eids4 = [6, 7, 8, 9, 10, 11]
convert to elements instead of element IDs
>>> elements4 = []
>>> for eid in eids4:
>>> elements4.append(model.Element(eid))
just to verify
>>> elem = model.elements[eids4[0]]
>>> print(elem.pid)
PSHELL 4 1 .25 1 1
Example 7: Get Elements by Material ID¶
this example will demonstate:
- getting a list of elements that have a certain material
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'sol_101_elements')
>>> bdf_filename = os.path.join(test_path, 'static_solid_shell_bar.bdf')
instantiate the model
>>> from pyNastran.bdf.bdf import BDF
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> f = open('junk.out', 'w')
assume you want the eids for material 10
>>> pid_to_eids_map = model.get_property_id_to_element_ids_map()
>>> mid_to_pids_map = model.get_material_id_to_property_ids_map()
>>> pids1 = mid_to_pids_map[1]
>>> print('pids1 = %s' % pids1)
pids1 = [1, 2, 3, 4, 5]
>>> eids = []
>>> for pid in pids1:
>>> eids += pid_to_eids_map[pid]
convert to elements instead of element IDs
>>> elements = []
>>> for eid in eids:
>>> element = model.Element(eid)
>>> elements.append(element)
>>> print(str(element).rstrip())
CBAR 13 1 15 19 0. 1. 0.
$ Direct Text Input for Bulk Data
$ Pset: "shell" will be imported as: "pshell.1"
CHEXA 1 2 2 3 4 1 8 5
6 7
CPENTA 2 2 6 8 5 10 11 9
CPENTA 3 2 6 7 8 10 12 11
CTETRA 4 2 10 11 9 13
CTETRA 5 2 10 12 11 13
CROD 14 3 16 20
CROD 15 3 17 21
CQUAD4 6 4 4 1 14 15
CQUAD4 7 4 3 2 17 16
CTRIA3 8 4 4 3 16
CTRIA3 9 4 16 15 4
CTRIA3 10 4 1 2 17
CTRIA3 11 4 17 14 1
$
CBEAM 12 5 14 18 0. 1. 0. GGG
op2¶
Introduction¶
This is meant as a tutorial on how to use the pyNastran pyNastran.op2.op2.OP2 class
This page runs through examples relating to the vectorized OP2. The vectorized OP2 is preferred as it uses about 20% of the memory as the non-vectorized version of the OP2. It’s slower to parse as it has to do two passes, but calculations will be much faster.
Note that a static model is a SOL 101 or SOL 144. A dynamic/”transient” solution is any transient/modal/load step/frequency based solution (e.g. 103, 109, 145).
The head/tail/file_slice methods can be found at:
These examples can be found at:
Example 1: Read Write¶
This example will demonstate:
- reading the OP2
- getting some basic information
- writing the F06
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> op2_filename = os.path.join(test_path, 'solid_bending.op2')
>>> f06_filename = os.path.join(test_path, 'solid_bending_out.f06')
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
op2.displacements[1]
type=RealDisplacementArray nnodes=72
data: [t1, t2, t3, r1, r2, r3] shape=[1, 72, 6] dtype=float32
gridTypes
lsdvmns = [1]
op2.spc_forces[1]
type=RealSPCForcesArray nnodes=72
data: [t1, t2, t3, r1, r2, r3] shape=[1, 72, 6] dtype=float32
gridTypes
lsdvmns = [1]
op2.ctetra_stress[1]
type=RealSolidStressArray nelements=186 nnodes=930
nodes_per_element=5 (including centroid)
eType, cid
data: [1, nnodes, 10] where 10=[oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, von_mises]
data.shape = (1, 930, 10)
element types: CTETRA
lsdvmns = [1]
>>> model.write_f06(f06_filename)
F06:
RealDisplacementArray SUBCASE=1
RealSPCForcesArray SUBCASE=1
RealSolidStressArray SUBCASE=1 - CTETRA
>>> print(tail(f06_filename, 21))
0 186 0GRID CS 4 GP
0 CENTER X 9.658666E+02 XY -2.978357E+01 A 2.559537E+04 LX-0.02 0.20 0.98 -1.094517E+04 2.288671E+04
Y 7.329372E+03 YZ 5.895411E+02 B -7.168877E+01 LY-1.00-0.03-0.01
Z 2.454026E+04 ZX -5.050599E+03 C 7.311813E+03 LZ 0.03-0.98 0.20
0 8 X 9.658666E+02 XY -2.978357E+01 A 2.559537E+04 LX-0.02 0.20 0.98 -1.094517E+04 2.288671E+04
Y 7.329372E+03 YZ 5.895411E+02 B -7.168877E+01 LY-1.00-0.03-0.01
Z 2.454026E+04 ZX -5.050599E+03 C 7.311813E+03 LZ 0.03-0.98 0.20
0 62 X 9.658666E+02 XY -2.978357E+01 A 2.559537E+04 LX-0.02 0.20 0.98 -1.094517E+04 2.288671E+04
Y 7.329372E+03 YZ 5.895411E+02 B -7.168877E+01 LY-1.00-0.03-0.01
Z 2.454026E+04 ZX -5.050599E+03 C 7.311813E+03 LZ 0.03-0.98 0.20
0 4 X 9.658666E+02 XY -2.978357E+01 A 2.559537E+04 LX-0.02 0.20 0.98 -1.094517E+04 2.288671E+04
Y 7.329372E+03 YZ 5.895411E+02 B -7.168877E+01 LY-1.00-0.03-0.01
Z 2.454026E+04 ZX -5.050599E+03 C 7.311813E+03 LZ 0.03-0.98 0.20
0 58 X 9.658666E+02 XY -2.978357E+01 A 2.559537E+04 LX-0.02 0.20 0.98 -1.094517E+04 2.288671E+04
Y 7.329372E+03 YZ 5.895411E+02 B -7.168877E+01 LY-1.00-0.03-0.01
Z 2.454026E+04 ZX -5.050599E+03 C 7.311813E+03 LZ 0.03-0.98 0.20
1 MSC.NASTRAN JOB CREATED ON 28-JAN-12 AT 12:52:32 JANUARY 28, 2012 pyNastran v0.7.1 PAGE 3
1 * * * END OF JOB * * *
Example 2: Displacement (static)¶
This example will demonstate:
- calculating total deflection of the nodes for a static case for a vectorized OP2
- calculate von mises stress and max shear
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> op2_filename = os.path.join(test_path, 'solid_bending.op2')
>>> out_filename = os.path.join(test_path, 'solid_bending.out')
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
we’re analyzing a static problem, so itime=0
we’re also assuming subcase 1
>>> itime = 0
>>> isubcase = 1
get the displacement object
>>> disp = model.displacements[isubcase]
displacement is an array
# data = [tx, ty, tz, rx, ry, rz]
# for some itime
# all the nodes -> :
# get [tx, ty, tz] -> :3
>>> txyz = disp.data[itime, :, :3]
calculate the total deflection of the vector
>>> from numpy.linalg import norm
>>> total_xyz = norm(txyz, axis=1)
since norm’s axis parameter can be tricky, we’ll double check the length
>>> nnodes = disp.data.shape[1]
>>> assert len(total_xyz) == nnodes
we could also have found nnodes by using the attribute.
It has an underscore because the object is also used for elements.
>>> nnodes2 = disp._nnodes
>>> assert nnodes == nnodes2
>>> assert nnodes == 72
additionally we know we have 72 nodes from the shape:
op2.displacements[1]
type=RealDisplacementArray nnodes=72
data: [t1, t2, t3, r1, r2, r3] shape=[1, 72, 6] dtype=float32
gridTypes
lsdvmns = [1]
now we’ll loop over the nodes and print the total deflection
>>> msg = 'nid, gridtype, tx, ty, tz, txyz'
>>> print(msg)
>>> for (nid, grid_type), txyz, total_xyzi in zip(disp.node_gridtype, txyz, total_xyz):
>>> msg = '%s, %s, %s, %s, %s, %s' % (nid, grid_type, txyz[0], txyz[1], txyz[2], total_xyzi)
>>> print(msg)
nid, gridtype, tx, ty, tz, txyz
1, 1, 0.00764469, 4.01389e-05, 0.000111137, 0.00764561
2, 1, 0.00762899, 5.29171e-05, 0.000142154, 0.0076305
3, 1, 0.00944763, 6.38675e-05, 7.66179e-05, 0.00944816
4, 1, 0.00427092, 2.62277e-05, 7.27848e-05, 0.00427162
5, 1, 0.00152884, 1.71054e-05, -3.47525e-06, 0.00152894
...
Example 3: Eigenvector (transient)¶
This example will demonstate:
- calculate von mises stress and max shear for solid elements for a static case for a vectorized OP2
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'solid_bending')
>>> op2_filename = os.path.join(test_path, 'solid_bending.op2')
>>> out_filename = os.path.join(test_path, 'solid_bending.out')
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
op2.ctetra_stress[1]
type=RealSolidStressArray nelements=186 nnodes=930
nodes_per_element=5 (including centroid)
eType, cid
data: [1, nnodes, 10] where 10=[oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, von_mises]
data.shape = (1, 930, 10)
element types: CTETRA
lsdvmns = [1]
we’re analyzing a static problem, so itime=0
we’re also assuming subcase 1
>>> itime = 0
>>> isubcase = 1
get the stress object (there is also cpenta_stress and chexa_stress as well as ctetra_strain/cpenta_strain/chexa_strain)
>>> stress = model.ctetra_stress[isubcase]
The stress/strain data can often be von_mises/max_shear (same for fiber_distance/curvature), so check!
#data = [oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, von_mises]
>>> o1 = stress.data[itime, :, 6]
>>> o3 = stress.data[itime, :, 8]
>>> if stress.is_von_mises():
>>> max_shear = (o1 - o3) / 2.
>>> von_mises = stress.data[itime, :, 9]
>>> else:
>>> from numpy import sqrt
>>> o2 = data[itime, :, 8]
>>> von_mises = sqrt(0.5*((o1-o2)**2 + (o2-o3)**2, (o3-o1)**2))
>>> max_shear = stress.data[itime, :, 9]
>>> for (eid, node), vm, ms in zip(stress.element_node, von_mises, max_shear):
>>> print(eid, 'CEN/4' if node == 0 else node, vm, ms)
1 CEN/4 15900.2 2957.35
1 8 15900.2 2957.35
1 13 15900.2 2957.35
1 67 15900.2 2957.35
1 33 15900.2 2957.35
2 CEN/4 16272.3 6326.18
2 8 16272.3 6326.18
2 7 16272.3 6326.18
2 62 16272.3 6326.18
2 59 16272.3 6326.18
Note that because element_node is an integer array, the centroid is 0. We renamed it to CEN/4 when we wrote it
Example 4: Solid Stress (static)¶
This example will demonstate:
- calculating total deflection of the nodes for a dynamic case for a vectorized OP2
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'plate_py')
>>> op2_filename = os.path.join(test_path, 'plate_py.op2')
ut_filename = os.path.join(test_path, ‘solid_bending.out’)
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
op2.eigenvectors[1]
type=RealEigenvectorArray ntimes=10 nnodes=231
data: [t1, t2, t3, r1, r2, r3] shape=[10, 231, 6] dtype=float32
gridTypes
modes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
eigrs = [-0.00037413835525512695, -0.00022113323211669922, -0.0001882314682006836, -0.00010025501251220703, 0.0001621246337890625, 0.00
07478296756744385, 1583362560.0, 2217974016.0, 10409966592.0, 11627085824.0]
mode_cycles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>>> isubcase = 1
>>> eigenvector = model.eigenvectors[isubcase]
“time/mode/frequency are stored by id, so to get mode 5:
>>> modes = eigenvector._times # it may not be "time" so we don't use the name "time"
>>> from numpy import where
>>> imode5 = where(modes == 5)[0]
>>> txyz = eigenvector.data[imode5, :, :3]
calculate the total deflection of the vector
>>> from numpy.linalg import norm
>>> total_xyz = norm(txyz, axis=1)
get the eigenvalue
>>> print('eigr5 = %s' % eigenvector.eigrs[imode5])
eigr5 = 0.000162124633789
Example 5: Isotropic Plate Stress (static)¶
This example will demonstate:
- print the fiber distance and the max principal stress for a static case for a vectorized OP2
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'sol_101_elements')
>>> op2_filename = os.path.join(test_path, 'static_solid_shell_bar.op2')
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
op2.cquad4_stress[1]
type=RealPlateStressArray nelements=2 nnodes_per_element=5 nlayers=2 ntotal=20
data: [1, ntotal, 8] where 8=[fiber_distance, oxx, oyy, txy, angle, omax, omin, von_mises]
data.shape=(1L, 20L, 8L)
element types: CQUAD4
lsdvmns = [1]
>>> isubcase = 1
>>> itime = 0 # this is a static case
>>> stress = model.cquad4_stress[isubcase]
>>> assert stress.nnodes == 5, 'this is a bilinear quad'
write the data
#[fiber_dist, oxx, oyy, txy, angle, majorP, minorP, ovm]
>>> eids = stress.element_node[:, 0]
>>> nids = stress.element_node[:, 1]
>>> if stress.is_fiber_distance():
>>> fiber_dist = stress.data[itime, :, 0]
>>> else:
>>> raise RuntimeError('found fiber curvature; expected fiber distance')
>>> maxp = stress.data[itime, :, 5]
>>> for (eid, nid, fdi, maxpi) in zip(eids, nids, fiber_dist, maxp):
>>> print(eid, 'CEN/4' if nid == 0 else nid, fdi, maxpi)
6 CEN/4 -0.125 8022.26
6 CEN/4 0.125 12015.9
6 4 -0.125 7580.84
6 4 0.125 11872.9
6 1 -0.125 8463.42
6 1 0.125 12158.9
6 14 -0.125 8463.69
6 14 0.125 12158.9
6 15 -0.125 7581.17
6 15 0.125 11872.9
7 CEN/4 -0.125 10016.3
7 CEN/4 0.125 10019.5
7 3 -0.125 10307.1
7 3 0.125 10311.0
7 2 -0.125 9725.54
7 2 0.125 9727.9
7 17 -0.125 9725.54
7 17 0.125 9728.06
7 16 -0.125 10307.1
7 16 0.125 10311.1
note we have 2 layers (upper and lower surface) for any PSHELL-based elements
Example 6: Composite Plate Stress (static)¶
This example will demonstate:
- print the fiber distance and the max principal stress for a static case for a vectorized OP2
our model
>>> import pyNastran
>>> pkg_path = pyNastran.__path__[0]
>>> test_path = os.path.join(pkg_path, '..', 'models', 'sol_101_elements')
>>> op2_filename = os.path.join(test_path, 'static_solid_comp_bar.op2')
instantiate the model
>>> from pyNastran.op2.op2 import OP2
>>> model = OP2()
>>> model.read_op2(op2_filename, vectorized=True)
>>> print(model.get_op2_stats())
op2.ctria3_composite_stress[1]
type=RealCompositePlateStressArray nelements=4 ntotal=18
data: [1, ntotal, 9] where 9=[o11, o22, t12, t1z, t2z, angle, major, minor, max_shear]
data.shape = (1, 18, 9)
element types: CTRIA3
lsdvmns = [1]
>>> isubcase = 1
>>> itime = 0 # this is a static case
>>> stress = model.ctria3_composite_stress[isubcase]
In the previous example, we had an option for a variable number of nodes for the CQUAD4s (1/5), but only nnodes=1 for the CTRIA3s.
In this example, we have 4 layers on one element and 5 on another, but they’re all at the centroid.
#[o11, o22, t12, t1z, t2z, angle, major, minor, ovm]
>>> eids = stress.element_layer[:, 0]
>>> layers = stress.element_layer[:, 1]
>>> maxp = stress.data[itime, :, 6]
>>> if stress.is_fiber_distance():
>>> fiber_dist = stress.data[itime, :, 0]
>>> else:
>>> raise RuntimeError('found fiber curvature; expected fiber distance')
>>> maxp = stress.data[itime, :, 5]
>>> for (eid, layer, maxpi) in zip(eids, layers, maxp):
>>> print(eid, 'CEN/4', layer, maxpi)
7 CEN/4 1 89.3406
7 CEN/4 2 89.3745
7 CEN/4 3 89.4313
7 CEN/4 4 89.5115
8 CEN/4 1 -85.6691
8 CEN/4 2 -85.6121
8 CEN/4 3 -85.5193
8 CEN/4 4 -85.3937
8 CEN/4 5 -85.2394
9 CEN/4 1 86.3663
9 CEN/4 2 86.6389
9 CEN/4 3 87.0977
9 CEN/4 4 87.7489
10 CEN/4 1 -87.6962
10 CEN/4 2 -87.4949
10 CEN/4 3 -87.1543
10 CEN/4 4 -86.6662
10 CEN/4 5 -86.0192
pyNastran Package¶
This is the pyNastran.rst file for v0.7.
bdf Package¶
This is the pyNastran.bdf.rst file.
bdf Module¶
bdf_Methods Module¶
This file contains additional methods that do not directly relate to the reading/writing/accessing of BDF data. Such methods include:
- Mass
get the mass of the model
- Mass Poperties
get the mass & moment of inertia of the model
- sumMoments / sum_moments
find the net force/moment on the model
- sumForces / sum_forces
find the net force on the model
- resolve_grids
change all nodes to a specific coordinate system
- unresolve_grids
puts all nodes back to original coordinate system
- class pyNastran.bdf.bdf_Methods.BDFMethods[source]¶
Bases: pyNastran.bdf.deprecated.BDFMethodsDeprecated
- _BDFMethods__gravity_load(loadcase_id)¶
Todo
- resolve the load case
- grab all of the GRAV cards and combine them into one GRAV vector
- run mass_properties to get the mass
- multiply by the gravity vector
- _apply_mass_symmetry(sym_axis, scale, mass, cg, I)[source]¶
Scales the mass & moement of inertia based on the symmetry axes and the PARAM WTMASS card
- _mass_properties_mp(num_cpus, elements, masses, nelements, reference_point=None)[source]¶
Caclulates mass properties in the global system about the reference point.
Parameters: - self – the BDF object
- num_cpus – the number of CPUs to use; 2 < num_cpus < 20
- reference_point – an array that defines the origin of the frame. default = <0,0,0>.
Returns mass: the mass of the model
Returns cg: the cg of the model as an array.
Returns I: moment of inertia array([Ixx, Iyy, Izz, Ixy, Ixz, Iyz])
See also
self.mass_properties
- mass_properties(element_ids=None, reference_point=None, sym_axis=None, num_cpus=1, scale=None)[source]¶
Caclulates mass properties in the global system about the reference point.
Parameters: - self – the BDF object
- element_ids – an array of element ids
- reference_point – an array that defines the origin of the frame. default = <0,0,0>.
- sym_axis – the axis to which the model is symmetric. If AERO cards are used, this can be left blank allowed_values = ‘x’, ‘y’, ‘z’, ‘xy’, ‘yz’, ‘xz’, ‘xyz’
- scale – the WTMASS scaling value default=None -> PARAM, WTMASS is used float > 0.0
Returns mass: the mass of the model
Returns cg: the cg of the model as an array.
Returns I: moment of inertia array([Ixx, Iyy, Izz, Ixy, Ixz, Iyz])
I = mass * centroid * centroid
\[I_{xx} = m (dy^2 + dz^2)\]\[I_{yz} = -m * dy * dz\]where:
\[dx = x_{element} - x_{ref}\]Note
This doesn’t use the mass matrix formulation like Nastran. It assumes m*r^2 is the dominant term. If you’re trying to get the mass of a single element, it will be wrong, but for real models will be correct.
- resolve_grids(cid=0)[source]¶
Puts all nodes in a common coordinate system (mainly for cid testing)
Parameters: - self – the object pointer
- cid – the cid to resolve the nodes to (default=0)
Note
loses association with previous coordinate systems so to go back requires another fem
- sum_forces_moments(p0, loadcase_id, include_grav=False)[source]¶
Sums applied forces & moments about a reference point p0 for all load cases. Considers:
- FORCE, FORCE1, FORCE2
- MOMENT, MOMENT1, MOMENT2
- PLOAD, PLOAD2, PLOAD4
- LOAD
Parameters: - p0 (NUMPY.NDARRAY shape=(3,) or integer (node ID)) – the reference point
- loadcase_id (integer) – the LOAD=ID to analyze
- include_grav (bool) – includes gravity in the summation (not supported)
Returns Forces: the forces
Returns Moments: the moments
Warning
not full validated
Todo
It’s super slow for cid != 0. We can speed this up a lot if we calculate the normal, area, centroid based on precomputed node locations.
Pressure acts in the normal direction per model/real/loads.bdf and loads.f06
- sum_forces_moments_elements(p0, loadcase_id, eids, nids, include_grav=False)[source]¶
Sum the forces/moments based on a list of nodes and elements.
Parameters: - eids – the list of elements to include (e.g. the loads due to a PLOAD4)
- nids – the list of nodes to include (e.g. the loads due to a FORCE card)
- p0 –
the point to sum moments about type = int
sum moments about the specified grid point- type = (3, ) ndarray/list (e.g. [10., 20., 30]):
- the x, y, z location in the global frame
- Nodal Types : FORCE, FORCE1, FORCE2,
- MOMENT, MOMENT1, MOMENT2, PLOAD
Element Types: PLOAD1, PLOAD2, PLOAD4, GRAV
If you have a CQUAD4 (eid=3) with a PLOAD4 (eid=3) and a FORCE card (nid=5) acting on it, you can incldue the PLOAD4, but not the FORCE card by using:
For just pressure:
eids = [3] nids = []
For just force:
eids = [] nids = [5]
or both:
eids = [3] nids = [5]
Note
If you split the model into sections and sum the loads on each section, you may not get the same result as if you summed the loads on the total model. This is due to the fact that nodal loads on the boundary are double/triple/etc. counted depending on how many breaks you have.
Todo
not done...
bdf_replacer Module¶
caseControlDeck Module¶
CaseControlDeck parsing and extraction class
- class pyNastran.bdf.caseControlDeck.CaseControlDeck(lines, log=None)[source]¶
Bases: object
CaseControlDeck parsing and extraction class
Parameters: - self – the CaseControlDeck object
- lines – list of lines that represent the case control deck ending with BEGIN BULK
- log – a :mod: logging object
- _add_parameter_to_subcase(key, value, options, param_type, isubcase)[source]¶
Internal method
self: the CaseControlDeck object
- _parse_data_from_user(param)[source]¶
Parses a case control line
Parameters: - self – the CaseControlDeck object
- param – the variable to add
- _parse_entry(lines)[source]¶
Internal method for parsing a card of the case control deck
Parses a single case control deck card into 4 sections
- paramName - obvious
- Value - still kind of obvious
- options - rarely used data
- paramType - STRESS-type, SUBCASE-type, PARAM-type, SET-type, BEGIN_BULK-type
It’s easier with examples:
- paramType = SUBCASE-type
- SUBCASE 1 -> paramName=SUBCASE value=1 options=[]
- paramType = STRESS-type
- STRESS = ALL -> paramName=STRESS value=ALL options=[] STRAIN(PLOT) = 5 -> paramName=STRAIN value=5 options=[PLOT] TITLE = stuff -> paramName=TITLE value=stuff options=[]
- paramType = SET-type
- SET 1 = 10,20,30 -> paramName=SET value=[10,20,30] options = 1
- paramType = BEGIN_BULK-type
- BEGIN BULK -> paramName=BEGIN value=BULK options = []
- paramType = CSV-type
- PARAM,FIXEDB,-1 -> paramName=PARAM value=FIXEDB options = [-1]
The paramType is the “macro” form of the data (similar to integer, float, string). The value is generally whats on the RHS of the equals sign (assuming it’s there). Options are modifiers on the data. Form things like the PARAM card or the SET card they arent as clear, but the paramType lets the program know how to format it when writing it out.
Parameters: - self – the CaseControlDeck object
- lines – list of lines
Returns: paramName see brief
Returns: value see brief
Returns: options see brief
Returns: paramType see brief
- _read(lines)[source]¶
Reads the case control deck
Note
supports comment lines
Warning
doesnt check for 72 character width lines, but will follow that when it’s written out
- add_parameter_to_global_subcase(param)[source]¶
Takes in a single-lined string and adds it to the global Subcase.
Parameters: - self – the CaseControlDeck object
- param – the variable to add
Note
dont worry about overbounding the line
>>> bdf = BDF() >>> bdf.read_bdf(bdf_filename) >>> bdf.case_control.add_parameter_to_global_subcase('DISP=ALL') >>> print(bdf.case_control) TITLE = DUMMY LINE DISP = ALL
- add_parameter_to_local_subcase(isubcase, param)[source]¶
Takes in a single-lined string and adds it to a single Subcase.
Parameters: - self – the CaseControlDeck object
- isubcase – the subcase ID to add
- param – the variable to add
Note
dont worry about overbounding the line
>>> bdf = BDF() >>> bdf.read_bdf(bdf_filename) >>> bdf.case_control.add_parameter_to_local_subcase(1, 'DISP=ALL') >>> print(bdf.case_control) TITLE = DUMMY LINE SUBCASE 1 DISP = ALL >>>
- begin_bulk = None¶
stores a single copy of ‘BEGIN BULK’ or ‘BEGIN SUPER’
- convert_to_sol_200(model)[source]¶
Takes a case control deck and changes it from a SOL xxx to a SOL 200
Parameters: self – the CaseControlDeck object Todo
not done...
- copy_subcase(i_from_subcase, i_to_subcase, overwrite_subcase=True)[source]¶
Overwrites the parameters from one subcase to another.
Parameters: - self – the CaseControlDeck object
- i_from_subcase – the Subcase to pull the data from
- i_to_subcase – the Subcase to map the data to
- overwrite_subcase – NULLs i_to_subcase before copying i_from_subcase
- create_new_subcase(isubcase)[source]¶
Method create_new_subcase:
Parameters: isubcase (int) – the subcase ID Warning
be careful you dont add data to the global subcase after running this...is this True???
- delete_subcase(isubcase)[source]¶
Deletes a subcase.
Parameters: - self – the CaseControlDeck object
- isubcase (int) – the Subcase to delete
- finish_subcases()[source]¶
Removes any unwanted data in the subcase...specifically the SUBCASE data member. Otherwise it will print out after a key like stress.
Parameters: self – the CaseControlDeck object
- get_local_subcase_list()[source]¶
Gets the list of subcases that aren’t the global subcase ID
Parameters: self – the CaseControlDeck object
- get_op2_data()[source]¶
Gets the relevant op2 parameters required for a given subcase
Parameters: self – the CaseControlDeck object Todo
not done...
- get_subcase_list()[source]¶
Gets the list of subcases including the global subcase ID (0)
Parameters: self – the CaseControlDeck object
- get_subcase_parameter(isubcase, param_name)[source]¶
Get the [value, options] of a subcase’s parameter. For example, for STRESS(PLOT,POST)=ALL, param_name=STRESS, value=ALL, options=[‘PLOT’, ‘POST’]
Parameters: - self – the CaseControlDeck object
- isubcase – the subcase ID to check
- param_name – the parameter name to get the [value, options] for
- has_parameter(isubcase, param_name)[source]¶
Checks to see if a parameter (e.g. STRESS) is defined in a certain subcase ID.
Parameters: - self – the CaseControlDeck object
- isubcase – the subcase ID to check
- param_name – the parameter name to look for
- has_subcase(isubcase)[source]¶
Checks to see if a subcase exists.
Parameters: - self – the CaseControlDeck object
- isubcase (int) – the subcase ID
Returns val: does_subcase_exist (type = bool)
- update_solution(isubcase, sol)[source]¶
sol = STATICS, FLUTTER, MODAL, etc.
Parameters: - self – the CaseControlDeck object
- isubcase – the subcase ID to update
- sol – the solution type to change the solution to
>>> print(bdf.case_control) SUBCASE 1 DISP = ALL
>>> bdf.case_control.update_solution(1, 'FLUTTER') >>> print(bdf.case_control) SUBCASE 1 ANALYSIS FLUTTER DISP = ALL >>>
deprecated Module¶
- class pyNastran.bdf.deprecated.BaseCardDeprecated[source]¶
Bases: object
- Deprecated in:
- version 0.7
- Removed in:
- version 0.8
- class pyNastran.bdf.deprecated.CoordDeprecated[source]¶
Bases: object
- T()[source]¶
Gets the 6 x 6 transformation
\[[\lambda] = [B_{ij}]\]\[\begin{split}[T] = \left[ \begin{array}{cc} \lambda & 0 \\ 0 & \lambda \\ \end{array} \right]\end{split}\]
- class pyNastran.bdf.deprecated.DeprecatedCompositeShellProperty[source]¶
Bases: object
- To be deprecated in:
- Version 0.7
- To be removed in:
- Version 0.8
- class pyNastran.bdf.deprecated.GetMethodsDeprecated[source]¶
Bases: object
- getElementIDsWithPID(pid)[source]¶
Gets all the element IDs with a specific property ID
Parameters: pid – property ID Returns elementIDs: as a list Deprecated since version will: be removed in version 0.8
- The same functionality may be used by calling
>>> self.getElementIDsWithPIDs([pid], mode='list')
fieldWriter Module¶
Defines legacy import functions
- pyNastran.bdf.fieldWriter.print_card(fields, size=8, is_double=False)[source]¶
Prints a card in 8-character of 16-character Nastran format.
Parameters: - fields – all the fields in the BDF card (no trailing Nones)
- size – 8/16
- is_double – True/False
Returns card: string representation of the card
Note
be careful of using is_double on cards that aren’t GRID or COORDx
field_writer_8 Module¶
Defines functions for single precision 8 character field writing.
- pyNastran.bdf.field_writer_8.is_same(value1, value2)[source]¶
Checks to see if 2 values are the same
Note
this method is used by almost every card when printing
- pyNastran.bdf.field_writer_8.print_card_8(fields)[source]¶
Prints a nastran-style card with 8-character width fields.
Parameters: fields – all the fields in the BDF card (no trailing Nones) Returns card: string representation of the card in small field format Note
An internal field value of None or ‘’ will be treated as a blank field
Note
A small field format follows the 8-8-8-8-8-8-8-8 = 80 format where the first 8 is the card name or blank (continuation). The last 8-character field indicates an optional continuation, but because it’s a left-justified unneccessary field, print_card doesnt use it.
>>> fields = ['DUMMY', 1, 2, 3, None, 4, 5, 6, 7, 8.] >>> print_card_8(fields) DUMMY 1 2 3 4 5 6 7 DUMMY 1 2 3 4 5 6 7 8.
- pyNastran.bdf.field_writer_8.print_field_8(value)[source]¶
Prints a 8-character width field
Parameters: value – the value to print Returns field: an 8-character string
- pyNastran.bdf.field_writer_8.print_float_8(value)[source]¶
Prints a float in nastran 8-character width syntax using the highest precision possbile.
- pyNastran.bdf.field_writer_8.print_int_card(fields)[source]¶
Prints a nastran-style card with 8-character width fields. All fields (other than the first field) must be integers. This is used to speed up SET cards.
Parameters: fields – The list of fields to write to a nastran card. Warning
Blanks are not allowed! Floats and strings are not allowed.
fields = ['SET', 1, 2, 3, 4, 5, 6, ..., n]
- pyNastran.bdf.field_writer_8.print_int_card_blocks(fields_blocks)[source]¶
Prints a nastran-style card with 8-character width fields. All fields other than the card name must be written in “block” format. This is used to speed up SET cards.
param fields_blocks: The fields written in “block” notation. type msg: list or tuple returns msg: the field blocks as a 8-character width Nastran card type msg: str Note
Blanks are allowed in the False block.
fields_blocks = [ 'SET1', [['a', 1.0, 3], False], # these are not all integers [[1, 2, 3], True], # these are all integers ] msg = print_int_card_blocks(fields_blocks) print(msg) >>> 'SET1 a 1. 3 1 2 3
‘
- pyNastran.bdf.field_writer_8.print_scientific_8(value)[source]¶
Prints a value in 8-character scientific notation. This is a sub-method and shouldnt typically be called
- pyNastran.bdf.field_writer_8.set_blank_if_default(value, default)[source]¶
Used when setting the output data of a card to clear default values
Parameters: value – the field value the may be set to None (blank) if value=default, the default value for the field Note
this method is used by almost every card when printing
field_writer_16 Module¶
Defines functions for single precision 16 character field writing.
- pyNastran.bdf.field_writer_16.print_card_16(fields, wipe_fields=True)[source]¶
Prints a nastran-style card with 16-character width fields.
Parameters: - fields – all the fields in the BDF card (no trailing Nones)
- wipe_fields – some cards (e.g. PBEAM) have ending fields that need to be there, others cannot have them.
Note
An internal field value of None or ‘’ will be treated as a blank field
Note
A large field format follows the 8-16-16-16-16-8 = 80 format where the first 8 is the card name or blank (continuation). The last 8-character field indicates an optional continuation, but because it’s a left-justified unneccessary field, print_card doesnt use it.
>>> fields = ['DUMMY', 1, 2, 3, None, 4, 5, 6, 7, 8.] >>> print_card_16(fields) DUMMY* 1 2 3 * 4 5 6 7 * 8. *
- pyNastran.bdf.field_writer_16.print_field_16(value)[source]¶
Prints a 16-character width field
Parameters: value – the value to print Returns field: an 16-character string
- pyNastran.bdf.field_writer_16.print_float_16(value)[source]¶
Prints a float in nastran 16-character width syntax using the highest precision possbile. .. seealso:: print_float_8
field_writer_double Module¶
Defines functions for double precision 16 character field writing.
- pyNastran.bdf.field_writer_double.print_card_double(fields, wipe_fields=True)[source]¶
Prints a nastran-style card with 16-character width fields.
Parameters: - fields – all the fields in the BDF card (no trailing Nones)
- wipe_fields – some cards (e.g. PBEAM) have ending fields that need to be there, others cannot have them.
Note
An internal field value of None or ‘’ will be treated as a blank field
Note
A large field format follows the 8-16-16-16-16-8 = 80 format where the first 8 is the card name or blank (continuation). The last 8-character field indicates an optional continuation, but because it’s a left-justified unneccessary field, print_card doesnt use it.
>>> fields = ['DUMMY', 1, 2, 3, None, 4, 5, 6, 7, 8.] >>> print_card_double(fields) DUMMY* 1 2 3 * 4 5 6 7 * 8.0000000000D+00 *
subcase Module¶
Subcase creation/extraction class
- class pyNastran.bdf.subcase.Subcase(id=0)[source]¶
Bases: object
Subcase creation/extraction class
- cross_reference(model)[source]¶
Method crossReference:
Parameters: - self – the Subcase object
- model – the BDF object
Note
this is not integrated and probably never will be as it’s not really that necessary. it’s only really useful when running an analysis.
- finish_subcase()[source]¶
Removes the subcase parameter from the subcase to avoid printing it in a funny spot
Parameters: self – the Subcase object
- get_analysis_code(sol)[source]¶
- 8 - post-buckling (maybe 7 depending on NLPARM???)
- # not important
- 3/4 - differential stiffness (obsolete)
- 11 - old geometric nonlinear statics
- 12 - contran (???)
Todo
verify
- get_device_code(options, value)[source]¶
Gets the device code of a given set of options and value
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- get_format_code(options, value)[source]¶
Gets the format code that will be used by the op2 based on the options.
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
Todo
not done...only supports REAL, IMAG, PHASE, not RANDOM
- get_parameter(param_name)[source]¶
Gets the [value, options] for a subcase.
Parameters: - self – the Subcase object
- param_name – the case control parameter to check for
- get_sort_code(options, value)[source]¶
Gets the sort code of a given set of options and value
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- get_stress_code(key, options, value)[source]¶
Method get_stress_code:
Note
the individual element must take the stress_code and reduce
it to what the element can return. For example, for an isotropic CQUAD4 the fiber field doesnt mean anything.
BAR - no von mises/fiber ISOTROPIC - no fiber
Todo
how does the MATERIAL bit get turned on? I’m assuming it’s element dependent...
- get_table_code(sol, table_name, options)[source]¶
Gets the table code of a given parameter. For example, the DISPLACMENT(PLOT,POST)=ALL makes an OUGV1 table and stores the displacement. This has an OP2 table code of 1, unless you’re running a modal solution, in which case it makes an OUGV1 table of eigenvectors and has a table code of 7.
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- has_parameter(param_name)[source]¶
Checks to see if a parameter name is in the subcase.
Parameters: - self – the Subcase object
- param_name – the case control parameter to check for
- print_param(key, param)[source]¶
Prints a single entry of the a subcase from the global or local subcase list.
Parameters: self – the Subcase object
- solCodeMap = {64: 106, 1: 101, 66: 106, 68: 106, 76: 101, 144: 101, 21: 101, 24: 101, 26: 101, 99: 129, 187: 101, 61: 101}¶
utils Module¶
- pyNastran.bdf.utils.Position(xyz, cid, model, is_cid_int=True)[source]¶
Gets the point in the global XYZ coordinate system.
Parameters: - xyz (TYPE = NDARRAY. SIZE=(3,)) – the position of the GRID in an arbitrary coordinate system
- cid (int) – the coordinate ID for xyz
- model (BDF()) – the BDF model object
Returns xyz2: the position of the GRID in an arbitrary coordinate system
- pyNastran.bdf.utils.PositionWRT(xyz, cid, cid_new, model, is_cid_int=True)[source]¶
Gets the location of the GRID which started in some arbitrary system and returns it in the desired coordinate system
Parameters: - xyz (TYPE = NDARRAY. SIZE=(3,)) – the position of the GRID in an arbitrary coordinate system
- cid (int) – the coordinate ID for xyz
- cid_new (int) – the desired coordinate ID
- model (BDF()) – the BDF model object
Returns xyz_local: the position of the GRID in an arbitrary coordinate system
- pyNastran.bdf.utils.TransformLoadWRT(F, M, cid, cid_new, model, is_cid_int=True)[source]¶
Transforms a force/moment from an arbitrary coordinate system to another coordinate system.
Parameters: - Fxyz (TYPE = NDARRAY. SIZE=(3,)) – the force in an arbitrary coordinate system
- Mxyz (TYPE = NDARRAY. SIZE=(3,)) – the moment in an arbitrary coordinate system
- cid (int) – the coordinate ID for xyz
- cid_new (int) – the desired coordinate ID
- model (BDF()) – the BDF model object
- is_cid_int (bool) – is cid/cid_new an integer or a Coord object
Returns Fxyz_local: the force in an arbitrary coordinate system
Returns Mxyz_local: the force in an arbitrary coordinate system
- pyNastran.bdf.utils._clean_comment(comment, end=-1)[source]¶
Removes specific pyNastran comment lines so duplicate lines aren’t created.
Parameters: comment – the comment to possibly remove
- pyNastran.bdf.utils.clean_empty_lines(lines)[source]¶
Removes leading and trailing empty lines don’t remove internally blank lines
- pyNastran.bdf.utils.get_include_filename(card_lines, include_dir='')[source]¶
Parses an INCLUDE file split into multiple lines (as a list).
Parameters: - card_lines – the list of lines in the include card (all the lines!)
- include_dir – the include directory (default=’‘)
Returns filename: the INCLUDE filename
- pyNastran.bdf.utils.parse_executive_control_deck(executive_control_lines)[source]¶
Extracts the solution from the executive control deck
- pyNastran.bdf.utils.parse_patran_syntax(node_sets)[source]¶
Parses Patran’s syntax for compressing nodes/elements
Parameters: node_sets – the node_set to parse Returns nodes: list of integers Patran has a short syntax of the form:
String Output “1 2 3” [1, 2, 3] “5:10” [5, 6, 7, 8, 9, 10] “12:20:2” [12, 14, 16, 18, 20] >>> node_sets = "1 2 3 5:10 12:20:2" >>> data = parse_patran_syntax(node_sets) >>> data data = [1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20]
Warning
Don’t include the n/node or e/element or any other identifier, just a string of “1 2 3 5:10 12:20:2”. Use parse_patran_syntax_dict to consider the identifier.
Note
doesn’t support “1:#”
- pyNastran.bdf.utils.parse_patran_syntax_dict(node_sets)[source]¶
Parses Patran’s syntax for compressing nodes/elements
Parameters: node_sets – the node_set to parse Returns nodes: list of integers node_sets = "e 1:3 n 2:6:2 Node 10:13" data = parse_patran_syntax_dict(node_sets) data = { 'e' : [1, 2, 3], 'n' : [2, 4, 6], 'Node' : [10, 11, 12, 13], }
Note
the identifier (e.g. “e”) must be used. Use parse_patran_syntax to skip the identifier.
Note
doesn’t support “1:#”
- pyNastran.bdf.utils.print_filename(filename, relpath)[source]¶
Takes a path such as C:/work/fem.bdf and locates the file using relative paths. If it’s on another drive, the path is not modified.
Parameters: filename – a filename string Returns filename_string: a shortened representation of the filename
- pyNastran.bdf.utils.to_fields(card_lines, card_name)[source]¶
Converts a series of lines in a card into string versions of the field. Handles large, small, and CSV formatted cards.
Parameters: - lines – the lines of the BDF card object
- card_name – the card_name -> ‘GRID’
Returns fields: the string formatted fields of the card
Warning
this function is used by the reader and isn’t intended to be called by a separate process
>>> card_lines = []'GRID,1,,1.0,2.0,3.0'] >>> card_name = 'GRID' >>> fields = to_fields(lines, card_name) >>> fields ['GRID', '1', '', '1.0', '2.0', '3.0']
write_path Module¶
- pyNastran.bdf.write_path.split_path(abspath)[source]¶
Takes a path and splits it into the various components
- pyNastran.bdf.write_path.write_include(filename, is_windows=True)[source]¶
Writes a bdf INCLUDE file line given an imported filename.
Parameters: - filename – the filename to write
- is_windows – Windows has a special format for writing INCLUDE files so the format for a BDF that will run on Linux and Windows is different. We could check the platform, but since you might need to change platforms, it’s an option (default=True)
For a model that will run on Linux:
..code-blocK:: python
fname = r’/opt/NASA/test1/test2/test3/test4/formats/pynastran_v0.6/pyNastran/bdf/model.inc’ write_include(fname, is_windows=False)..code-blocK:: python
- INCLUDE /opt/NASA/test1/test2/test3/test4/formats/pynastran_v0.6/
- pyNastran/bdf/model.inc
bdfInterface Package¶
addCard Module¶
- class pyNastran.bdf.bdfInterface.addCard.AddMethods[source]¶
Bases: object
- add_creep_material(material, allowOverwrites=False)[source]¶
Note
May be removed in the future. Are CREEP cards materials? They have an MID, but reference structural materials.
assign_type Module¶
- pyNastran.bdf.bdfInterface.assign_type._get_dtype(value)[source]¶
Get the type of the input value in a form that is clear.
Parameters: value – the value to get the type of
- pyNastran.bdf.bdfInterface.assign_type.blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.components(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.components_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.double(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.double_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.double_or_string(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.double_string_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
Returns value: a double, string, or default value
Raises SyntaxError: if there is an invalid type
- pyNastran.bdf.bdfInterface.assign_type.field(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.fields(f, card, fieldname, i, j=None)[source]¶
Todo
improve fieldname
- pyNastran.bdf.bdfInterface.assign_type.integer(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.integer_double_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.integer_double_or_string(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- pyNastran.bdf.bdfInterface.assign_type.integer_double_string_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.integer_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.integer_or_double(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
Returns value: the value with the proper type
Raises SyntaxError: if there’s an invalid type
- pyNastran.bdf.bdfInterface.assign_type.integer_or_string(card, ifield, fieldname)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.integer_string_or_blank(card, ifield, fieldname, default=None)[source]¶
Parameters: - card – BDF card as a list
- ifield – field number
- fieldname – name of field
- default – the default value for the field (default=None)
- pyNastran.bdf.bdfInterface.assign_type.interpret_value(value_raw, card='')[source]¶
Converts a value from nastran format into python format.
BDF_Card Module¶
- class pyNastran.bdf.bdfInterface.BDF_Card.BDFCard(card=None, debug=False)[source]¶
Bases: object
- field(i, default=None)[source]¶
Gets the ith field on the card
Parameters: - self – the object pointer
- i (integer) – the ith field on the card (following list notation)
- default – the default value for the field
Returns value: the value on the ith field
- fields(i=0, j=None, defaults=None)[source]¶
Gets multiple fields on the card
Parameters: - self – the object pointer
- i (integer >= 0) – the ith field on the card (following list notation)
- j (integer or None (default=end of card)) – the jth field on the card (None means till the end of the card)
- defaults – the default value for the field (as a list) len(defaults)=i-j-1
Returns value: the values on the ith-jth fields
bdf_writeMesh Module¶
- This file defines:
- WriteMesh
- class pyNastran.bdf.bdfInterface.bdf_writeMesh.WriteMesh[source]¶
Bases: object
- Major methods:
- model.write_bdf(...)
- model.echo_bdf(...)
- model.auto_reject_bdf(...)
- _output_helper(out_filename, interspersed, size, is_double)[source]¶
Performs type checking on the write_bdf inputs
- _write_aero_control(outfile, size=8, is_double=False)[source]¶
Writes the aero control surface cards
- _write_case_control_deck(outfile)[source]¶
Writes the Case Control Deck.
Parameters: self – the BDF object
- _write_common(outfile, size=8, is_double=False)[source]¶
Write the common outputs so none get missed...
Parameters: self – the BDF object Returns msg: part of the bdf
- _write_constraints(outfile, size=8, is_double=False)[source]¶
Writes the constraint cards sorted by ID
- _write_coords(outfile, size=8, is_double=False)[source]¶
Writes the coordinate cards in a sorted order
- _write_dmigs(outfile, size=8, is_double=False)[source]¶
Writes the DMIG cards
Parameters: - self – the BDF object
- size – large field (16) or small field (8)
Returns msg: string representation of the DMIGs
- _write_elements(outfile, size=8, is_double=False)[source]¶
Writes the elements in a sorted order
Parameters: self – the BDF object
- _write_elements_properties(outfile, size=8, is_double=False)[source]¶
Writes the elements and properties in and interspersed order
- _write_executive_control_deck(outfile)[source]¶
Writes the executive control deck.
Parameters: self – the BDF object
- _write_header(outfile)[source]¶
Writes the executive and case control decks.
Parameters: self – the BDF object
- _write_nodes(outfile, size=8, is_double=False)[source]¶
Writes the NODE-type cards
Parameters: self – the BDF object
- _write_optimization(outfile, size=8, is_double=False)[source]¶
Writes the optimization cards sorted by ID
- _write_params(outfile, size=8, is_double=False)[source]¶
Writes the PARAM cards
Parameters: self – the BDF object
- _write_properties(outfile, size=8, is_double=False)[source]¶
Writes the properties in a sorted order
- _write_rejects(outfile, size=8, is_double=False)[source]¶
Writes the rejected (processed) cards and the rejected unprocessed cardLines
- _write_rigid_elements(outfile, size=8, is_double=False)[source]¶
Writes the rigid elements in a sorted order
- _write_thermal_materials(outfile, size=8, is_double=False)[source]¶
Writes the thermal materials in a sorted order
- auto_reject_bdf(infile_name)[source]¶
This method parses supported cards, but does not group them into nodes, elements, properties, etc.
Todo
maybe add the write method
- echo_bdf(infile_name)[source]¶
This method removes all comment lines from the bdf A write method is stil required.
Todo
maybe add the write method
- write_bdf(out_filename=None, size=8, is_double=False, interspersed=True, enddata=None)[source]¶
Writes the BDF.
Parameters: - self – the BDF object
- out_filename – the name to call the output bdf (default=None; pops a dialog)
- size – the field size (8 is recommended)
- is_double – small field (False) or large field (True); default=False
- interspersed – Writes a bdf with properties & elements interspersed like how Patran writes the bdf. This takes slightly longer than if interspersed=False, but makes it much easier to compare to a Patran-formatted bdf and is more clear. (default=True)
- enddata – Flag to enable/disable writing ENDDATA (default=None -> depends on input BDF)
crossReference Module¶
Links up the various cards in the BDF.
For example, with cross referencing...
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> nid1 = 1
>>> node1 = model.nodes[nid1]
>>> node.nid
1
>>> node.xyz
[1., 2., 3.]
>>> node.Cid()
3
>>> node.cid
CORD2S, 3, 1, 0., 0., 0., 0., 0., 1.,
1., 0., 0.
# get the position in the global frame
>>> node.Position()
[4., 5., 6.]
# get the position with respect to another frame
>>> node.PositionWRT(model, cid=2)
[4., 5., 6.]
Without cross referencing...
>>> model = BDF()
>>> model.read_bdf(bdf_filename, xref=True)
>>> nid1 = 1
>>> node1 = model.nodes[nid1]
>>> node.nid
1
>>> node.xyz
[1., 2., 3.]
>>> node.Cid()
3
>>> node.cid
3
# get the position in the global frame
>>> node.Position()
Error!
Cross-referencing allows you to easily jump across cards and also helps with calculating things like position, area, and mass. The BDF is designed around the idea of cross-referencing, so it’s recommended that you use it.
- class pyNastran.bdf.bdfInterface.crossReference.XrefMesh[source]¶
Bases: object
Links up the various cards in the BDF.
The main BDF class defines all the parameters that are used.
- _cross_reference_coordinates()[source]¶
Links up all the coordinate cards to other coordinate cards and nodes
- _cross_reference_elements()[source]¶
Links the elements to nodes, properties (and materials depending on the card).
- _cross_reference_masses()[source]¶
Links the mass to nodes, properties (and materials depending on the card).
- _cross_reference_materials()[source]¶
Links the materials to materials (e.g. MAT1, CREEP) often this is a pass statement
- cross_reference(xref=True, xref_elements=True, xref_properties=True, xref_materials=True, xref_loads=True, xref_constraints=True, xref_aero=True)[source]¶
Links up all the cards to the cards they reference
Parameters: - xref – cross references the model (default=True)
- xref_element – set cross referencing of elements (default=True)
- xref_properties – set cross referencing of properties (default=True)
- xref_materials – set cross referencing of materials (default=True)
- xref_loads – set cross referencing of loads (default=True)
- xref_constraints – set cross referencing of constraints (default=True)
- xref_aero – set cross referencing of CAERO/SPLINEs (default=True)
To only cross-reference nodes:
model = BDF() model.read_bdf(bdf_filename, xref=False) model.cross_reference(xref=True, xref_loads=False, xref_constraints=False, xref_materials=False, xref_properties=False, xref_aero=False, xref_masses=False)
Warning
be careful if you call this method
getCard Module¶
- class pyNastran.bdf.bdfInterface.getCard.GetMethods[source]¶
Bases: pyNastran.bdf.deprecated.GetMethodsDeprecated
- Nodes(nids, allowEmptyNodes=False, msg=u'')[source]¶
Returns a series of node objects given a list of node IDs
- _GetMethods__test_method()¶
- get_element_ids_dict_with_pids(pids)[source]¶
Gets all the element IDs with a specific property ID.
Parameters: - self – the BDF object
- pids – list of property ID
Returns element_ids: as a dictionary of lists by property
For example, we want all the elements with pids=[4, 5, 6], but we want them in separate groups
model = BDF() model.read_bdf(bdf_filename) pids = [4, 5, 6] eids_dict = model.get_element_ids_with_pids(pids, mode='dict')
- get_element_ids_list_with_pids(pids)[source]¶
Gets all the element IDs with a specific property ID.
Parameters: - self – the BDF object
- pids – list of property ID
Returns element_ids: as a list
For example, we want to get all the element ids with pids=[1, 2, 3]
model = BDF() model.read_bdf(bdf_filename) pids = [1, 2, 3] eids_list = model.get_element_ids_with_pids(pids, mode='list')
- get_material_id_to_property_ids_map()[source]¶
Returns a dictionary that maps a material ID to a list of properties
Returns mid_to_pids_map: the mapping >>> mid_to_pid_map = get_material_id_to_property_ids_map() >>> mid = 1 >>> pids = get_material_id_to_property_ids_map[mid] >>> pids [1, 2, 3]
Note
all properties require an mid to be counted (except for PCOMP, which has multiple mids)
- get_node_id_to_element_ids_map()[source]¶
Returns a dictionary that maps a node ID to a list of elemnents
Todo
support 0d or 1d elements
Todo
support elements with missing nodes (e.g. CQUAD8 with missing nodes)
- get_node_ids_with_elements(eids, msg=u'')[source]¶
Get the node IDs associated with a list of element IDs
Parameters: - self – the BDF object
- eids – list of element ID
- msg – a additional message to print out if an element is not found
Returns node_ids: set of node IDs
For example
>>> eids = [1, 2, 3] # list of elements with pid=1 >>> msg = ' which are required for pid=1' >>> node_ids = bdf.get_node_ids_with_elements(eids, msg=msg)
- get_property_id_to_element_ids_map()[source]¶
Returns a dictionary that maps a property ID to a list of elemnents
- get_x_associated_with_y(xdict, xkeys, ykeys, stop_on_failure=True)[source]¶
Get the range of sub-properties of a card.
Note
Assumes you’re taking a single path through the cards. You could probably explicitly code these queries faster, but this method has a lot of flexibility with very little user code.
Parameters: - self – the BDF object
- xdict – the BDF attribute that should be querried (e.g. self.elements)
- xkeys – the list of object keys that should be stepped through associated with xdict (e.g. eids=[1, 2, 3])
- ykeys – the list of response keys that should be stepped through (e.g. [‘pid’, ‘mid’, ‘mid’])
- stop_on_failure – Should an error be raised if there is an invalid key? For example, get all material used by elements, but don’t crash on CONRODs.
Returns results: The set of all values used
# Get nodes associated with eid=[1, 2, 3] nodes = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['nodes']) # Get node IDs associated with eid=[1, 2, 3] nodesIDs = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['nodes', 'nid']) # Get coord IDs associated with eid=[1, 2, 3] coordIDs = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['nodes', 'cp', 'cid']) # Get properties associated with eid=[1, 2, 3] properties = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['pid']) # Get materials associated with eid=[1, 2, 3] materials = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['pid', 'mid']) # Get material IDs associated with eid=[1, 2, 3] materialIDs = self.get_x_associated_with_y( self.elements, [1, 2, 3], ['pid', 'mid', 'mid']) # Get the values for Young's Modulus E = self.get_x_associated_with_y( self.elements, None, ['pid', 'mid', 'e'])
- pyNastran.bdf.bdfInterface.getCard._getattr(out_set, xi, xkeys, nlevels_left=0, stop_on_failure=True)[source]¶
Recursive method to help get_x_associated_with_y get the value of xkeys for the given variable xi
Parameters: - out_set (SET) – the SET of all outputs that will be filled and implicitly returned
- xi (BDF BaseCard) – the current variable being iterated over
- xkeys (LIST of STRINGS) – the variables left to iterate over
- nlevels_left (INT >= 0) – the number of levels still to iterate over
- stop_on_failure (bool) – should the code crash if a certain xkey cannot be found
cards Package¶
aero Module¶
All aero cards are defined in this file. This includes:
- AEFACT
- AELINK
- AELIST
- AEPARM
- AESTAT
- AESURF / AESURFS
- AERO / AEROS
- CSSCHD
- CAERO1 / CAERO2 / CAERO3 / CAERO4 / CAERO5
- FLFACT
- FLUTTER
- GUST
- MKAERO1 / MKAERO2
- PAERO1 / PAERO2 / PAERO3
- SPLINE1 / SPLINE2 / SPLINE4 / SPLINE5
All cards are BaseCard objects.
- class pyNastran.bdf.cards.aero.AEFACT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines real numbers for aeroelastic analysis.
AEFACT SID D1 D2 D3 D4 D5 D6 D7 D8 D9 -etc.- AEFACT 97 .3 0.7 1.0 - Di = None¶
Number (float)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AEFACT object pointer Returns fields: the fields that define the card
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'AEFACT'¶
- class pyNastran.bdf.cards.aero.AELINK(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines relationships between or among AESTAT and AESURF entries, such that:
\[u^D + \Sigma_{i=1}^n C_i u_i^I = 0.0\]AELINK ID LABLD LABL1 C1 LABL2 C2 LABL3 C3 LABL4 C4 etc. AELINK 10 INBDA OTBDA -2.0 - Cis = None¶
linking coefficient (real)
- id = None¶
an ID=0 is applicable to the global subcase, ID=1 only subcase 1
- independentLabels = None¶
defines the independent variable name (string)
- label = None¶
defines the dependent variable name (string)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AELINK object pointer Returns fields: the fields that define the card
- type = u'AELINK'¶
- class pyNastran.bdf.cards.aero.AELIST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a list of aerodynamic elements to undergo the motion prescribed with the AESURF Bulk Data entry for static aeroelasticity.
AELIST SID E1 E2 E3 E4 E5 E6 E7 E8 etc. AELIST 75 1001 THRU 1075 1101 THRU 1109 1201 1202 - These entries are referenced by the AESURF entry.
- When the THRU option is used, all intermediate grid points must exist. The word THRU may not appear in field 3 or 9 (2 or 9 for continuations).
- Intervening blank fields are not allowed.
- eids = None¶
List of aerodynamic boxes generated by CAERO1 entries to define a surface. (Integer > 0 or ‘THRU’)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AELIST object pointer Returns fields: the fields that define the card
- sid = None¶
Set identification number. (Integer > 0)
- type = u'AELIST'¶
- class pyNastran.bdf.cards.aero.AEPARM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a general aerodynamic trim variable degree-of-freedom (aerodynamic extra point). The forces associated with this controller will be derived from AEDW, AEFORCE and AEPRESS input data.
AEPARM ID LABEL UNITS AEPARM 5 THRUST LBS - _field_map = {1: u'id', 2: u'label', 3: u'units'}¶
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AEPARM object pointer Returns fields: the fields that define the card
- type = u'AEPARM'¶
- class pyNastran.bdf.cards.aero.AERO(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Aero
Gives basic aerodynamic parameters for unsteady aerodynamics.
1 2 3 4 5 6 7 AERO ACSID VELOCITY REFC RHOREF SYMXZ SYMXY AERO 3 1.3+4 1.-5 1 -1 - _field_map = {1: u'acsid', 2: u'velocity', 3: u'cRef', 4: u'rhoRef', 5: u'symXZ', 6: u'symXY'}¶
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AERO object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the AERO object pointer Returns fields: the fields that define the card
- type = u'AERO'¶
- class pyNastran.bdf.cards.aero.AEROS(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Aero
Gives basic aerodynamic parameters for unsteady aerodynamics.
1 2 3 4 5 6 7 8 AEROS ACSID RCSID REFC REFB REFS SYMXZ SYMXY AEROS 10 20 1 - _field_map = {1: u'acsid', 2: u'rcsid', 3: u'cRef', 4: u'bRef', 5: u'Sref', 6: u'symXZ', 7: u'symXY'}¶
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AEROS object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the AEROS object pointer Returns fields: the fields that define the card
- type = u'AEROS'¶
- class pyNastran.bdf.cards.aero.AESTAT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Specifies rigid body motions to be used as trim variables in static aeroelasticity.
AESTAT ID LABEL AESTAT 5001 ANGLEA - _field_map = {1: u'id', 2: u'label'}¶
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AESTAT object pointer Returns fields: the fields that define the card
- type = u'AESTAT'¶
- class pyNastran.bdf.cards.aero.AESURF(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Specifies an aerodynamic control surface as a member of the set of aerodynamic extra points. The forces associated with this controller will be derived from rigid rotation of the aerodynamic model about the hinge line(s) and from AEDW, AEFORCE and AEPRESS input data. The mass properties of the control surface can be specified using an AESURFS entry.
AESURF ID LABEL CID1 ALID1 CID2 ALID2 EFF LDW CREFC CREFS PLLIM PULIM HMLLIM HMULIM TQLLIM TQULIM - _field_map = {1: u'aesid', 2: u'label', 3: u'cid1', 4: u'alid1', 5: u'cid2', 6: u'alid2', 7: u'eff', 8: u'ldw', 9: u'crefc', 10: u'crefs', 11: u'pllim', 12: u'pulim', 13: u'hmllim', 14: u'hmulim', 15: u'tqllim', u'16': u'tqulim'}¶
- aesid = None¶
Controller identification number
- alid1 = None¶
Identification of an AELIST Bulk Data entry that identifies all aerodynamic elements that make up the control surface component. (Integer > 0)
- cid1 = None¶
Identification number of a rectangular coordinate system with a y-axis that defines the hinge line of the control surface component.
- crefc = None¶
Reference chord length for the control surface. (Real>0.0; Default=1.0)
- crefs = None¶
Reference surface area for the control surface. (Real>0.0; Default=1.0)
- eff = None¶
Control surface effectiveness. See Remark 4. (Real != 0.0; Default=1.0)
- hmllim = None¶
Lower and upper hinge moment limits for the control surface in force-length units. (Real, Default = no limit) -> 1e8
- label = None¶
Controller name.
- ldw = None¶
Linear downwash flag. See Remark 2. (Character, one of LDW or NOLDW; Default=LDW).
- pllim = None¶
Lower and upper deflection limits for the control surface in radians. (Real, Default = +/- pi/2)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AESURF object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the AESURF object pointer Returns fields: the fields that define the card
- tqllim = None¶
Set identification numbers of TABLEDi entries that provide the lower and upper deflection limits for the control surface as a function of the dynamic pressure. (Integer>0, Default = no limit)
- type = u'AESURF'¶
- class pyNastran.bdf.cards.aero.AESURFS(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Optional specification of the structural nodes associated with an aerodynamic control surface that has been defined on an AESURF entry. The mass associated with these structural nodes define the control surface moment(s) of inertia about the hinge line(s). Specifies rigid body motions to be used as trim variables in static aeroelasticity.
1 2 3 4 5 6 7 AESURFS ID LABEL LIST1 LIST2 AESURFS 6001 ELEV 6002 6003 - raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the AESURFS object pointer Returns fields: the fields that define the card
- type = u'AESURFS'¶
- class pyNastran.bdf.cards.aero.Aero(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard, pyNastran.bdf.deprecated.AeroDeprecated
Base class for AERO and AEROS cards.
- class pyNastran.bdf.cards.aero.CAERO1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard, pyNastran.bdf.deprecated.CAERO1Deprecated
Defines an aerodynamic macro element (panel) in terms of two leading edge locations and side chords. This is used for Doublet-Lattice theory for subsonic aerodynamics and the ZONA51 theory for supersonic aerodynamics.
1 2 3 4 5 6 7 8 9 CAERO1 EID PID CP NSPAN NCHORD LSPAN LCHORD IGID X1 Y1 Z1 X12 X4 Y4 Z4 X43 1 | | | | 4 | | | | 2——3
- _field_map = {16: u'x43', 1: u'sid', 2: u'pid', 3: u'cp', 4: u'nspan', 5: u'nchord', 6: u'lspan', 7: u'lchord', 8: u'igid', 12: u'x12'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the CAERO1 card
Parameters: - self – the CAERO1 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the CAERO1 card
Parameters: - self – the CAERO1 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- cp = None¶
Coordinate system for locating point 1.
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CAERO1 object pointer
- model (BDF()) – the BDF object
- eid = None¶
Element identification number
- pid = None¶
Property identification number of a PAERO2 entry.
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the CAERO1 object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CAERO1 object pointer Returns fields: the fields that define the card
- type = u'CAERO1'¶
- class pyNastran.bdf.cards.aero.CAERO2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard, pyNastran.bdf.deprecated.CAERO2Deprecated
Aerodynamic Body Connection Defines aerodynamic slender body and interference elements for Doublet-Lattice aerodynamics.
1 | | | 3 | | | | 2——4
- _field_map = {1: u'sid', 2: u'pid', 3: u'cp', 4: u'nsb', 5: u'lsb', 6: u'nint', 7: u'lint', 8: u'igid', 12: u'x12'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the CAERO2 card
Parameters: - self – the CAERO2 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the CAERO2 card
Parameters: - self – the CAERO2 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- cp = None¶
Coordinate system for locating point 1.
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CAERO2 object pointer
- model (BDF()) – the BDF object
- eid = None¶
Element identification number
- igid = None¶
Interference group identification. Aerodynamic elements with different IGIDs are uncoupled. (Integer >= 0)
- lint = None¶
ID of an AEFACT data entry containing a list of division points for interference elements; used only if NINT is zero or blank. (Integer > 0)
- lsb = None¶
ID of an AEFACT Bulk Data entry for slender body division points; used only if NSB is zero or blank. (Integer >= 0)
- nint = None¶
Number of interference elements. If NINT > 0, then NINT equal divisions are assumed; if zero or blank, specify a list of divisions in LINT. (Integer >= 0)
- nsb = None¶
Number of slender body elements. If NSB > 0, then NSB equal divisions are assumed; if zero or blank, specify a list of divisions in LSB. (Integer >= 0)
- p1 = None¶
Location of point 1 in coordinate system CP
- pid = None¶
Property identification number of a PAERO2 entry.
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the CAERO2 object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CAERO2 object pointer Returns fields: the fields that define the card
- type = u'CAERO2'¶
- x12 = None¶
Length of body in the x-direction of the aerodynamic coordinate system. (Real > 0)
- class pyNastran.bdf.cards.aero.CAERO3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- cp = None¶
Coordinate system for locating point 1.
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CAERO3 object pointer
- model (BDF()) – the BDF object
- eid = None¶
Element identification number
- pid = None¶
Property identification number of a PAERO3 entry.
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the CAERO3 object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CAERO3 object pointer Returns fields: the fields that define the card
- type = u'CAERO3'¶
- class pyNastran.bdf.cards.aero.CAERO4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- cp = None¶
Coordinate system for locating point 1.
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CAERO4 object pointer
- model (BDF()) – the BDF object
- eid = None¶
Element identification number
- pid = None¶
Property identification number of a PAERO4 entry.
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the CAERO4 object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CAERO4 object pointer Returns fields: the fields that define the card
- type = u'CAERO4'¶
- class pyNastran.bdf.cards.aero.CAERO5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- cp = None¶
Coordinate system for locating point 1.
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CAERO3 object pointer
- model (BDF()) – the BDF object
- eid = None¶
Element identification number
- pid = None¶
Property identification number of a PAERO5 entry.
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CAERO4 object pointer Returns fields: the fields that define the card
- type = u'CAERO5'¶
- class pyNastran.bdf.cards.aero.CSSCHD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a scheduled control surface deflection as a function of Mach number and angle of attack.
1 2 3 4 5 6 CSSCHD SlD AESID LALPHA LMACH LSCHD - _field_map = {1: u'sid', 2: u'aesid', 3: u'lAlpha', 4: u'lMach', 5: u'lSchd'}¶
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the CSSCHD object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the CSSCHD object pointer Returns fields: the fields that define the card
- type = u'ASSCHD'¶
- class pyNastran.bdf.cards.aero.FLFACT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
1 2 3 4 5 6 7 8 9 FLFACT SID F1 F2 F3 F4 F5 F6 F7 F8 F9 etc. 1 2 3 4 5 FLFACT 97 .3 .7 3.5 # delta quantity approach
1 2 3 4 5 6 7 FLFACT SID F1 THRU FNF NF FMID FLFACT 201 0.200 THRU 0.100 11 0.1333 - raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the FLFACT object pointer Returns fields: the fields that define the card
- type = u'FLFACT'¶
- class pyNastran.bdf.cards.aero.FLUTTER(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines data needed to perform flutter analysis.
1 2 3 4 5 6 7 8 9 FLUTTER SID METHOD DENS MACH RFREQ IMETH NVALUE/OMAX EPS FLUTTER 19 K 119 219 319 S 5 1.-4 - _field_map = {1: u'sid', 2: u'method', 3: u'density', 4: u'mach', 5: u'rfreq_vel', 6: u'imethod', 8: u'epsilon'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the FLUTTER card
Parameters: - self – the FLUTTER object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the FLUTTER card
Parameters: - self – the FLUTTER object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the FLUTTER object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the FLUTTER object pointer Returns fields: the fields that define the card
- type = u'FLUTTER'¶
- class pyNastran.bdf.cards.aero.GUST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a stationary vertical gust for use in aeroelastic response analysis.
1 2 3 4 5 6 GUST SID DLOAD WG X0 V GUST 133 61 1.0 1.+4 - _field_map = {1: u'sid', 2: u'dload', 3: u'wg', 4: u'x0', 5: u'V'}¶
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the GUST object pointer Returns fields: the fields that define the card
- type = u'GUST'¶
- class pyNastran.bdf.cards.aero.MKAERO1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Provides a table of Mach numbers (m) and reduced frequencies (k) for aerodynamic matrix calculation.
1 2 3 4 5 6 7 8 9 MKAERO1 m1 m2 m3 m4 m5 m6 m7 m8 k1 k2 k3 k4 k5 k6 k7 k8 - raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the MKAERO1 object pointer Returns fields: the fields that define the card
- type = u'MKAERO1'¶
- class pyNastran.bdf.cards.aero.MKAERO2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Provides a table of Mach numbers (m) and reduced frequencies (k) for aerodynamic matrix calculation.
1 2 3 4 5 6 7 8 9 MKAERO2 m1 k1 m2 k2 m3 k3 m4 k4 - raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the MKAERO2 object pointer Returns fields: the fields that define the card
- type = u'MKAERO2'¶
- class pyNastran.bdf.cards.aero.PAERO1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines associated bodies for the panels in the Doublet-Lattice method.
PAERO1 PID B1 B2 B3 B4 B5 B6 - _field_map = {1: u'pid'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the PAERO1 card
Parameters: - self – the PAERO1 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the PAERO1 card
Parameters: - self – the PAERO1 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the PAERO1 object pointer Returns fields: the fields that define the card
- type = u'PAERO1'¶
- class pyNastran.bdf.cards.aero.PAERO2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines the cross-sectional properties of aerodynamic bodies.
PAERO2 PID ORIENT WIDTH AR LRSB LRIB LTH1 LTH2 THI1 THN1 THI2 THN2 THI3 THN3 - AR = None¶
Aspect ratio of the interference tube (height/width). float>0.
- _field_map = {1: u'pid', 2: u'orient', 3: u'width', 4: u'AR', 5: u'lrsb', 6: u'lrib', 7: u'lth1', 8: u'lth2'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the PAERO2 card
Parameters: - self – the PAERO2 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the PAERO2 card
Parameters: - self – the PAERO2 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- lrib = None¶
Identification number of an AEFACT entry containing a list of slender body half-widths at the end points of the interference elements. If blank, the value of WIDTH will be used. (Integer > 0 or blank)
- lrsb = None¶
Identification number of an AEFACT entry containing a list of slender body half-widths at the end points of the slender body elements. If blank, the value of WIDTH will be used. (Integer > 0 or blank)
- lth1 = None¶
dentification number of AEFACT entries for defining ? arrays for interference calculations. (Integer >= 0)
- orient = None¶
Orientation flag. Type of motion allowed for bodies. Refers to the aerodynamic coordinate system of ACSID. See AERO entry. (Character = ‘Z’, ‘Y’, or ‘ZY’)
- pid = None¶
Property identification number. (Integer > 0)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the PAERO2 object pointer Returns fields: the fields that define the card
- type = u'PAERO2'¶
- width = None¶
Reference half-width of body and the width of the constant width interference tube. (Real > 0.0)
- class pyNastran.bdf.cards.aero.PAERO3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines the number of Mach boxes in the flow direction and the location of cranks and control surfaces of a Mach box lifting surface.
- _field_map = {1: u'pid', 2: u'orient', 3: u'width', 4: u'AR'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the PAERO3 card
Parameters: - self – the PAERO3 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the PAERO3 card
Parameters: - self – the PAERO3 object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- pid = None¶
Property identification number. (Integer > 0)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the PAERO3 object pointer Returns fields: the fields that define the card
- type = u'PAERO3'¶
- class pyNastran.bdf.cards.aero.PAERO5(card=None, data=None)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
PAERO5 PID NALPHA LALPHA NXIS LXIS NTAUS LTAUS CAOC1 CAOC2 CAOC3 CAOC4 CAOC5 PAERO5 7001 1 702 1 701 1 700 0.0 | 0.0 | 5.25 | 3.99375 | 0.0 | | |
- class pyNastran.bdf.cards.aero.SPLINE1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Spline
Surface Spline Methods Defines a surface spline for interpolating motion and/or forces for aeroelastic problems on aerodynamic geometries defined by regular arrays of aerodynamic points.
SPLINE1 EID CAERO BOX1 BOX2 SETG DZ METH USAGE NELEM MELEM SPLINE1 3 111 115 122 14 - _field_map = {1: u'eid', 2: u'caero', 3: u'box1', 4: u'box2', 5: u'setg', 6: u'dz', 7: u'method', 8: u'usage', 9: u'nelements', 10: u'melements'}¶
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPLINE1 object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPLINE1 object pointer Returns fields: the fields that define the card
- type = u'SPLINE1'¶
- class pyNastran.bdf.cards.aero.SPLINE2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Spline
Linear Spline Defines a surface spline for interpolating motion and/or forces for aeroelastic problems on aerodynamic geometries defined by regular arrays of aerodynamic points.
SPLINE2 EID CAERO ID1 ID2 SETG DZ DTOR CID DTHX DTHY None USAGE SPLINE2 5 8 12 24 60 1.0 3 - _field_map = {1: u'eid', 2: u'caero', 3: u'id1', 4: u'id2', 5: u'setg', 6: u'dz', 7: u'dtor', 8: u'cid', 9: u'dthx', 10: u'dthy'}¶
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPLINE2 object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPLINE2 object pointer Returns fields: the fields that define the card
- type = u'SPLINE2'¶
- class pyNastran.bdf.cards.aero.SPLINE4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Spline
Surface Spline Methods Defines a curved surface spline for interpolating motion and/or forces for aeroelastic problems on general aerodynamic geometries using either the Infinite Plate, Thin Plate or Finite Plate splining method.
SPLINE4 EID CAERO AELIST — SETG DZ METH USAGE NELEM MELEM SPLINE4 3 111 115 — 14 IPS - _field_map = {1: u'eid', 2: u'caero', 3: u'aelist', 5: u'setg', 6: u'dz', 7: u'method', 8: u'usage', 9: u'nelements', 10: u'melements'}¶
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPLINE4 object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPLINE4 object pointer Returns fields: the fields that define the card
- type = u'SPLINE4'¶
- class pyNastran.bdf.cards.aero.SPLINE5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.aero.Spline
Linear Spline Defines a 1D beam spline for interpolating motion and/or forces for aeroelastic problems on aerodynamic geometries defined by irregular arrays of aerodynamic points. The interpolating beam supports axial rotation and bending in the yz-plane.
SPLINE5 EID CAERO AELIST — SETG DZ DTOR CID DTHX DTHY — USAGE - _field_map = {1: u'eid', 2: u'caero', 3: u'aelist', 5: u'setg', 6: u'dz', 7: u'dtor', 8: u'cid', 9: u'thx', 10: u'thy', 12: u'usage'}¶
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPLINE5 object pointer
- model (BDF()) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPLINE5 object pointer Returns fields: the fields that define the card
- type = u'SPLINE5'¶
- class pyNastran.bdf.cards.aero.TRIM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- _field_map = {8: u'aeqr', 1: u'sid', 2: u'mach', 3: u'q'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the TRIM card
Parameters: - self – the TRIM object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the TRIM card
Parameters: - self – the TRIM object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- label = None¶
Flag to request a rigid trim analysis (Real > 0.0 and < 1.0; Default = 1.0. A value of 0.0 provides a rigid trim analysis, not supported
- labels = None¶
The label identifying aerodynamic trim variables defined on an AESTAT or AESURF entry.
- mach = None¶
Mach number. (Real > 0.0 and != 1.0)
- q = None¶
Dynamic pressure. (Real > 0.0)
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the TRIM object pointer Returns fields: the fields that define the card
- sid = None¶
Trim set identification number. (Integer > 0)
- type = u'TRIM'¶
- uxs = None¶
The magnitude of the aerodynamic extra point degree-of-freedom. (Real)
baseCard Module¶
- class pyNastran.bdf.cards.baseCard.BaseCard[source]¶
Bases: pyNastran.bdf.deprecated.BaseCardDeprecated
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the object pointer
- xref (bool) – has this model been cross referenced
- class pyNastran.bdf.cards.baseCard.Element(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard, pyNastran.bdf.deprecated.ElementDeprecated
- Pid()[source]¶
returns the property ID of an element :param self: the Element pointer :returns pid: the Property ID :type pid: int
- faces[source]¶
Gets the faces of the element
Returns: dictionary with face number as the keys and a list of nodes (integer pointers) as the values. Note
The order of the nodes are consistent with ANSYS numbering.
>>> print element.faces
- nodes = None¶
the list of node IDs for an element (default=None)
- nodes2face(nodes)[source]¶
returns the face number that matches the list of nodes input
Parameters: nodes – list of nodes Returns faces: the face number as an integer Warning
It’s assumed you have the nodes in the proper order.
- pid = 0¶
- class pyNastran.bdf.cards.baseCard.Material(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Base Material Class
- class pyNastran.bdf.cards.baseCard.Property(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- Mid()[source]¶
returns the material ID of an element
Parameters: self – the Property pointer Returns mid: the Material ID
- pyNastran.bdf.cards.baseCard.build_thru(packs, maxDV=None)[source]¶
Takes a pack [1,7,2] and converts it into fields used by a SET card. The values correspond to the first value, last value, and delta in the list. This means that [1,1001,2] represents 500 values. [1,1001,1] represents 1001 values and will be written as [1,THRU,1001]..
Parameters: - packs – list of packs (list of 3 values: [first, last, delta] )
- maxDV – integer defining the max allowable delta between two values (default=None; no limit)
- pyNastran.bdf.cards.baseCard.build_thru_float(packs, maxDV=None)[source]¶
Takes a pack [1,7,2] and converts it into fields used by a SET card. The values correspond to the first value, last value, and delta in the list. This means that [1,1001,2] represents 500 values. [1,1001,1] represents 1001 values and will be written as [1,THRU,1001]..
Parameters: - packs – list of packs (list of 3 values: [first, last, delta] )
- maxDV – integer defining the max allowable delta between two values (default=None; no limit)
- pyNastran.bdf.cards.baseCard.build_thru_packs(packs, maxDV=1)[source]¶
# invalid SET1,4000, 1, 3, THRU, 10, 20, THRU, 30
# valid SET1,4000, 1 SET1,4000, 3, THRU, 10 SET1,4000, 20, THRU, 30
- returns
- singles = [1] doubles = [[3, ‘THRU’, 10], [20, ‘THRU’, 30]]
- pyNastran.bdf.cards.baseCard.collapse_thru_by(fields, get_packs=False)[source]¶
Parameters: - fields – the list of fields to collapse
- get_packs – get the list of packs so “special” formatting can be done
fields packs [1, 2, 3...150] -> [1, 150, 1] [1, 3, 5...150] -> [1, 150, 2]
- pyNastran.bdf.cards.baseCard.condense(value_list)[source]¶
Builds a list of packs (list of 3 values representing the first, last, and delta values for condensing a SET card.
See also
build_thru
- pyNastran.bdf.cards.baseCard.expand_thru(fields, set_fields=True, sort_fields=False)[source]¶
Expands a list of values of the form [1,5,THRU,9,13] to be [1,5,6,7,8,9,13]
Parameters: - fields – the fields to expand
- set_fields – should the fields be converted to a set and then back to a list? This is useful for [2, ‘THRU’ 5, 1] (default=True)
- sort_fields – should the fields be sorted at the end? (default=False)
- pyNastran.bdf.cards.baseCard.expand_thru_by(fields, set_fields=True, sort_fields=False)[source]¶
Expands a list of values of the form [1,5,THRU,9,BY,2,13] to be [1,5,7,9,13]
Parameters: - fields – the fields to expand
- set_fields – should the fields be converted to a set and then back to a list? This is useful for [2, ‘THRU’ 5, 1] (default=True)
- sort_fields – should the fields be sorted at the end? (default=False)
Todo
not tested
Note
used for QBDY3 and what else ???
bdf_sets Module¶
- class pyNastran.bdf.cards.bdf_sets.ABCQSet(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Generic Class ASET, BSET, CSET, QSET cards inherit from.
Defines degrees-of-freedom in the analysis set (A-set)
ASET ID1 C1 ID2 C2 ID3 C3 ID4 C4 ASET 16 2 23 3516 1 4 - IDs = None¶
- Identifiers of grids points. (Integer > 0)
- class pyNastran.bdf.cards.bdf_sets.ABQSet1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Generic Class ASET1, BSET1, QSET1 cards inherit from.
Defines degrees-of-freedom in the analysis set (a-set).
+–=—-+—–+—–+——+——+—–+—–+—–+—–+ | ASET1 | C | ID1 | ID2 | ID3 | ID4 | ID5 | ID6 | ID7 | +——-+—–+—–+——+——+—–+—–+—–+—–+ | | ID8 | ID9 | | | | | | | +——-+—–+—–+——+——+—–+—–+—–+—–+ | ASET1 | C | ID1 | THRU | ID2 | | | | | +——-+—–+—–+——+——+—–+—–+—–+—–+
- IDs = None¶
- Identifiers of grids points. (Integer > 0)
- components = None¶
- Component number. (Integer zero or blank for scalar points or any unique combination of the Integers 1 through 6 for grid points with no embedded blanks.)
- class pyNastran.bdf.cards.bdf_sets.ASET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABCQSet
Defines degrees-of-freedom in the analysis set (A-set).
ASET ID1 C1 ID2 C2 ID3 C3 ID4 C4 ASET 16 2 23 3516 1 4 - type = u'ASET'¶
- class pyNastran.bdf.cards.bdf_sets.ASET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABQSet1
Defines degrees-of-freedom in the analysis set (a-set)
ASET1 C ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 ASET1 C ID1 THRU ID2 - type = u'ASET1'¶
- class pyNastran.bdf.cards.bdf_sets.BSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABCQSet
Defines analysis set (a-set) degrees-of-freedom to be fixed (b-set) during generalized dynamic reduction or component mode synthesis calculations.
BSET ID1 C1 ID2 C2 ID3 C3 ID4 C4 BSET 16 2 23 3516 1 4 - type = u'BSET'¶
- class pyNastran.bdf.cards.bdf_sets.BSET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABQSet1
- type = u'BSET1'¶
- class pyNastran.bdf.cards.bdf_sets.CSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABCQSet
Defines analysis set (a-set) degrees-of-freedom to be fixed (b-set) during generalized dynamic reduction or component mode synthesis calculations.
CSET ID1 C1 ID2 C2 ID3 C3 ID4 C4 CSET 16 2 23 3516 1 4 - type = u'CSET'¶
- class pyNastran.bdf.cards.bdf_sets.CSET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines analysis set (a-set) degrees-of-freedom to be fixed (b-set) during generalized dynamic reduction or component mode synthesis calculations.
CSET1 C ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 CSET1 C ID1 THRU ID2 CSET1 ,, ALL - IDs = None¶
- Identifiers of grids points. (Integer > 0)
- type = u'CSET1'¶
- class pyNastran.bdf.cards.bdf_sets.QSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABCQSet
Defines generalized degrees-of-freedom (q-set) to be used for dynamic reduction or component mode synthesis.
QSET ID1 C1 ID2 C2 ID3 C3 ID4 C4 QSET 16 2 23 3516 1 4 - type = u'QSET'¶
- class pyNastran.bdf.cards.bdf_sets.QSET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.ABQSet1
Defines generalized degrees-of-freedom (q-set) to be used for dynamic reduction or component mode synthesis.
- type = u'QSET1'¶
- class pyNastran.bdf.cards.bdf_sets.RADSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Specifies which radiation cavities are to be included for radiation enclosure analysis.
RADSET ICAVITY1 ICAVITY2 ICAVITY3 ICAVITY4 ICAVITY5 ICAVITY6 ICAVITY7 ICAVITY8 ICAVITY9 -etc.- - IDs = None¶
Grid or scalar point identification number. (0 < Integer < 1000000; G1 < G2)
- type = u'RADSET'¶
- class pyNastran.bdf.cards.bdf_sets.SEBSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines boundary degrees-of-freedom to be fixed (b-set) during generalized dynamic reduction or component mode calculations.
SEBSET SEID ID1 C1 ID2 C2 ID3 C3 SEBSET C ID1 THRU ID2 - components = None¶
- Identifiers of grids points. (Integer > 0)
- class pyNastran.bdf.cards.bdf_sets.SEBSET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines boundary degrees-of-freedom to be fixed (b-set) during generalized dynamic reduction or component mode calculations.
SEBSET1 C ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 SEBSET1 C ID1 ‘THRU’ ID2 - IDs = None¶
- Identifiers of grids points. (Integer > 0)
- class pyNastran.bdf.cards.bdf_sets.SEQSEP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.SetSuper
Used with the CSUPER entry to define the correspondence of the exterior grid points between an identical or mirror-image superelement and its primary superelement.
- IDs = None¶
Exterior grid point identification numbers for the primary superelement. (Integer > 0)
- psid = None¶
Identification number for the primary superelement. (Integer >= 0).
- ssid = None¶
Identification number for secondary superelement. (Integer >= 0).
- type = u'SEQSEP'¶
- class pyNastran.bdf.cards.bdf_sets.SEQSET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines the generalized degrees-of-freedom of the superelement to be used in generalized dynamic reduction or component mode synthesis.
SEQSET1 C ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 ID9 SEQSET1 C ID1 ‘THRU’ ID2 - IDs = None¶
- Identifiers of grids points. (Integer > 0)
- class pyNastran.bdf.cards.bdf_sets.SESET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.SetSuper
Defines interior grid points for a superelement.
- IDs = None¶
- Grid or scalar point identification number. (0 < Integer < 1000000; G1 < G2)
- type = u'SESET'¶
- class pyNastran.bdf.cards.bdf_sets.SET1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines a list of structural grid points or element identification numbers.
SET1 SID ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 -etc.- SET1 3 31 62 93 124 16 17 18 19 SET1 6 29 32 THRU 50 61 THRU 70 17 57 - IDs = None¶
- List of structural grid point or element identification numbers. (Integer > 0 or ‘THRU’; for the ‘THRU’ option, ID1 < ID2 or ‘SKIN’; in field 3)
- sid = None¶
- Unique identification number. (Integer > 0)
- type = u'SET1'¶
- class pyNastran.bdf.cards.bdf_sets.SET3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Defines a list of grids, elements or points.
SET3 SID DES ID1 ID2 ID3 ID4 ID5 ID6 ID7 ID8 etc Example +——+—–+——-+—–+—-+ | SET3 | 1 | POINT | 11 | 12 | +——+—–+——-+—–+—-+
- IDs = None¶
- Identifiers of grids points, elements, points or properties. (Integer > 0)
- desc = None¶
- Set description (Character). Valid options are ‘GRID’, ‘ELEM’, ‘POINT’ and ‘PROP’.
- sid = None¶
- Unique identification number. (Integer > 0)
- type = u'SET3'¶
- class pyNastran.bdf.cards.bdf_sets.Set(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Generic Class all SETx cards inherit from
- IDs = None¶
- list of IDs in the SETx
- sid = None¶
- Unique identification number. (Integer > 0)
- class pyNastran.bdf.cards.bdf_sets.SetSuper(card, data)[source]¶
Bases: pyNastran.bdf.cards.bdf_sets.Set
Generic Class all Superelement SETx cards inherit from.
- IDs = None¶
- list of IDs in the SESETx
- seid = None¶
- Superelement identification number. Must be a primary superelement. (Integer >= 0)
bdf_tables Module¶
All table cards are defined in this file. This includes:
- Table
- TABLED1 - Dynamic Table = f(Time, Frequency)
- TABLED2
- TABLED3
- TABLEM1 - Material table = f(Temperature)
- TABLEM2
- TABLEM3
- TABLEM4
- TABLES1 - Material table = f(Stress)
- TABLEST
- RandomTable * TABRND1
- TABRNDG
- TIC
All tables have a self.table parameter that is a TableObj
- class pyNastran.bdf.cards.bdf_tables.RandomTable(card, data)[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLE??'¶
- class pyNastran.bdf.cards.bdf_tables.TABDMP1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABDMP1'¶
- class pyNastran.bdf.cards.bdf_tables.TABLED1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLED1'¶
- class pyNastran.bdf.cards.bdf_tables.TABLED2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLED2'¶
- class pyNastran.bdf.cards.bdf_tables.TABLED3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLED3'¶
- class pyNastran.bdf.cards.bdf_tables.TABLED4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLED4'¶
- class pyNastran.bdf.cards.bdf_tables.TABLEM1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLEM1'¶
- class pyNastran.bdf.cards.bdf_tables.TABLEM2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLEM2'¶
- class pyNastran.bdf.cards.bdf_tables.TABLEM3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLEM3'¶
- class pyNastran.bdf.cards.bdf_tables.TABLEM4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLEM4'¶
- class pyNastran.bdf.cards.bdf_tables.TABLES1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLES1'¶
- class pyNastran.bdf.cards.bdf_tables.TABLEST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
- type = u'TABLEST'¶
- class pyNastran.bdf.cards.bdf_tables.TABRND1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.RandomTable
- type = u'TABRND1'¶
- class pyNastran.bdf.cards.bdf_tables.TABRNDG(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.RandomTable
Gust Power Spectral Density
Defines the power spectral density (PSD) of a gust for aeroelastic response analysis.
- LU = None¶
Scale of turbulence divided by velocity (units of time; Real)
- Type = None¶
PSD Type: 1. von Karman; 2. Dryden
- WG = None¶
Root-mean-square gust velocity. (Real)
- tid = None¶
Table identification number. (Integer >0)
- type = u'TABRNDG'¶
- class pyNastran.bdf.cards.bdf_tables.TIC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.bdf_tables.Table
Transient Initial Condition
Defines values for the initial conditions of variables used in structural transient analysis. Both displacement and velocity values may be specified at independent degrees-of-freedom. This entry may not be used for heat transfer analysis.
- type = u'TIC'¶
- class pyNastran.bdf.cards.bdf_tables.TableObj(xy, nrepeated, isData=False)[source]¶
Bases: object
Parameters: - self – the Table Object
- xy – the X/Y data with an ENDT appended
- nrepeated –
???
- isData – did this come from the OP2/BDF (True -> OP2)
- _cleanup_xy(xy, isData=False)[source]¶
Removes the ENDT field.
Parameters: - xy – the xy data as a table with alternating x, y entries
- isData – did this come from the OP2/BDF (True -> OP2)
constraints Module¶
All constraint cards are defined in this file. This includes:
- Constraint
- SUPORT
- SUPORT1
- SPC
- SPC1
- SPCAX
- SPCD
- MPC
- ConstraintADD
- SPCADD
- MPCADD
The ConstraintObject contain multiple constraints.
- class pyNastran.bdf.cards.constraints.ConstraintObject[source]¶
Bases: object
- createConstraintsForID()[source]¶
This function returns all the constraints with an given constraint ID. For example an MPCADD that references 2 MPCADDs which reference 4 MPCs should return 4 MPCs (or rather the IDs of those MPCs).
Todo
This function should also find unassociated constraints. not really done yet, idea needs to be integrated/separated from cross-referencing. no point in doing it twice
- class pyNastran.bdf.cards.constraints.MPC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.Constraint
- conid = None¶
Set identification number. (Integer > 0)
- constraints = None¶
Component number. (Any one of the Integers 1 through 6 for grid points; blank or zero for scalar points.)
- enforced = None¶
Coefficient. (Real; Default = 0.0 except A1 must be nonzero.)
- gids = None¶
Identification number of grid or scalar point. (Integer > 0)
- type = u'MPC'¶
- class pyNastran.bdf.cards.constraints.MPCADD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.ConstraintADD
Defines a multipoint constraint equation of the form \(\Sigma_j A_j u_j =0\) where \(u_j\) represents degree-of-freedom \(C_j\) at grid or scalar point \(G_j\). mPCADD 2 1 3
- type = u'MPCADD'¶
- class pyNastran.bdf.cards.constraints.SPC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.Constraint
Defines enforced displacement/temperature (static analysis) velocity/acceleration (dynamic analysis).
SPC SID G1 C1 D1 G2 C2 D2 SPC 2 32 3 -2.6 5 - type = u'SPC'¶
- class pyNastran.bdf.cards.constraints.SPC1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.Constraint
SPC1 SID C G1 G2 G3 G4 G5 G6 G7 G8 G9 -etc.- SPC1 3 246 209075 209096 209512 209513 209516 SPC1 3 2 1 3 10 9 6 5 2 8 SPC1 SID C G1 THRU G2 SPC1 313 12456 6 THRU 32 - type = u'SPC1'¶
- class pyNastran.bdf.cards.constraints.SPCADD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.ConstraintADD
Defines a single-point constraint set as a union of single-point constraint sets defined on SPC or SPC1 entries.
SPCADD 2 1 3 - organizeConstraints(model)[source]¶
Figures out magnitudes of the loads to be applied to the various nodes. This includes figuring out scale factors.
- type = u'SPCADD'¶
- class pyNastran.bdf.cards.constraints.SPCAX(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.Constraint
Defines a set of single-point constraints or enforced displacements for conical shell coordinates.
SPCAX SID RID HID C D SPCAX 2 3 4 13 6.0 - c = None¶
Component identification number. (Any unique combination of the Integers 1 through 6.)
- conid = None¶
Identification number of a single-point constraint set.
- d = None¶
Enforced displacement value
- hid = None¶
Harmonic identification number. (Integer >= 0)
- rid = None¶
Ring identification number. See RINGAX entry.
- type = u'SPCAX'¶
- class pyNastran.bdf.cards.constraints.SPCD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.SPC
Defines an enforced displacement value for static analysis and an enforced motion value (displacement, velocity or acceleration) in dynamic analysis.
SPCD SID G1 C1 D1 G2 C2 D2 SPCD 100 32 436 -2.6 5 2 .9 - type = u'SPCD'¶
- class pyNastran.bdf.cards.constraints.SUPORT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.constraints.Constraint
SUPORT ID1 C1 ID2 C2 ID3 C3 ID4 C4 SUPORT1 SID ID1 C1 ID2 C2 ID3 C3
- type = u'SUPORT'¶
contact Module¶
- BCRPARA
- BCTADD
- BCTSET
- BSURF
- BSURFS
- class pyNastran.bdf.cards.contact.BCRPARA(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
1 2 3 4 5 6 7 8 9 10 BCRPARA CRID SURF OFFSET TYPE MGP - Type = None¶
Indicates whether a contact region is a rigid surface if it is used as a target region. See Remarks 3 and 4. (Character = “RIGID” or “FLEX”, Default = “FLEX”). This is not supported for SOL 101.
- crid = None¶
CRID Contact region ID. (Integer > 0)
- mgp = None¶
Master grid point for a target contact region with TYPE=RIGID or when the rigid-target algorithm is used. The master grid point may be used to control the motion of a rigid surface. (Integer > 0,; Default = 0) This is not supported for SOL 101.
- offset = None¶
Offset distance for the contact region. See Remark 2. (Real > 0.0, Default =OFFSET value in BCTPARA entry)
- surf = None¶
SURF Indicates the contact side. See Remark 1. (Character = “TOP” or “BOT”; Default = “TOP”)
- type = u'BCRPARA'¶
- class pyNastran.bdf.cards.contact.BCTADD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
1 2 3 4 5 6 7 8 9 BCTADD CSID SI S2 S3 S4 S5 S6 S7 S8 S9 -etc- Remarks: 1. To include several contact sets defined via BCTSET entries in a model,
BCTADD must be used to combine the contact sets. CSID in BCTADD is then selected with the Case Control command BCSET.- Si must be unique and may not be the identification of this or any other BCTADD entry.
- S = None¶
Identification numbers of contact sets defined via BCTSET entries. (Integer > 0)
- csid = None¶
Contact set identification number. (Integer > 0)
- type = u'BCTADD'¶
- class pyNastran.bdf.cards.contact.BCTPARA(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
1 2 3 4 5 6 7 8 9 BCTPARA CSID Param1 Value1 Param2 Value2 Param3 Value3 Param4 Value4 Param5 Value5 -etc- - csid = None¶
Contact set ID. Parameters defined in this command apply to contact set CSID defined by a BCTSET entry. (Integer > 0)
- type = u'BCTPARA'¶
- class pyNastran.bdf.cards.contact.BCTSET(card=None, data=None, comment=u'', sol=101)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
3D Contact Set Definition (SOLs 101, 601 and 701 only) Defines contact pairs of a 3D contact set.
1 2 3 4 5 6 7 8 9 BCTSET CSID SID1 TID1 FRIC1 MIND1 MAXD1 SID2 TID2 FRIC2 MIND2 MAXD2 -etc- - csid = None¶
CSID Contact set identification number. (Integer > 0)
- frictions = None¶
FRICi Static coefficient of friction for contact pair i. (Real; Default = 0.0)
- max_distances = None¶
MAXDi Maximum search distance for contact. (Real) (Sol 101 only)
- min_distances = None¶
MINDi Minimum search distance for contact. (Real) (Sol 101 only)
- sids = None¶
SIDi Source region (contactor) identification number for contact pair i. (Integer > 0)
- tids = None¶
TIDi Target region identification number for contact pair i. (Integer > 0)
- type = u'BCTSET'¶
- class pyNastran.bdf.cards.contact.BSURF(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
3D Contact Region Definition by Shell Elements (SOLs 101, 601 and 701)
Defines a 3D contact region by shell element IDs.
1 2 3 4 5 6 7 8 9 10 BSURF ID EID1 EID2 EID3 EID4 EID5 EID6 EID7
EID8 EID9 EID10 -etc-BSURF ID EID1 THRU EID2 BY INC EID8 EID9 EID10 EID11 -etc.- EID8 THRU EID9 BY INC
BSURF 15 5 THRU 21 BY 4 27 30 32 33 35 THRU 44 67 68 70 85 92
- eids = None¶
Element identification numbers of shell elements. (Integer > 0)
- n = None¶
Number (float)
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'BSURF'¶
- class pyNastran.bdf.cards.contact.BSURFS(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a 3D contact region by the faces of the CHEXA, CPENTA or CTETRA elements.
Remarks: 1. The continuation field is optional. 2. BSURFS is a collection of one or more element faces on solid elements.
BSURFS defines a contact region which may act as a contact source (contactor) or target.- The ID must be unique with respect to all other BSURFS, BSURF, and BCPROP entries.
- eids = None¶
Element identification numbers of solid elements. (Integer > 0)
- g1s = None¶
Identification numbers of 3 corner grid points on the face (triangular or quadrilateral) of the solid element. (Integer > 0)
- id = None¶
Identification number of a contact region. See Remarks 2 and 3. (Integer > 0)
- type = u'BSURFS'¶
coordinateSystems Module¶
All coordinate cards are defined in this file. This includes:
- CORD1R
- CORD1C
- CORD1S
- CORD2R
- CORD2C
- CORD2S
- class pyNastran.bdf.cards.coordinateSystems.CORD1C(card=None, nCoord=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord1x, pyNastran.bdf.cards.coordinateSystems.CylindricalCoord
1 2 3 4 5 6 7 8 9 CORD1C CIDA G1A G2A CIDB G1B G2B G3B Intilizes the CORD1R
Parameters: - self – the CORD1C coordinate system object
- card – a BDFCard object
- nCoord – the coordinate location on the line (there are possibly 2 coordinates on 1 card)
- data – a list version of the fields (1 CORD1R only)
- Type = u'C'¶
- type = u'CORD1C'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD1R(card=None, nCoord=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord1x, pyNastran.bdf.cards.coordinateSystems.RectangularCoord
1 2 3 4 5 6 7 8 9 CORD1R CIDA G1A G2A CIDB G1B G2B G3B Intilizes the CORD1R
Parameters: - self – the CORD1R coordinate system object
- nCoord – the coordinate location on the line (there are possibly 2 coordinates on 1 card)
- card – a list version of the fields (1 CORD1R only)
- Type = u'R'¶
- type = u'CORD1R'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD1S(card=None, nCoord=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord1x, pyNastran.bdf.cards.coordinateSystems.SphericalCoord
1 2 3 4 5 6 7 8 9 CORD1S CIDA G1A G2A CIDB G1B G2B G3B Intilizes the CORD1S
Parameters: - self – the CORD1S coordinate system object
- card – a BDFCard object
- nCoord – the coordinate location on the line (there are possibly 2 coordinates on 1 card)
- data – a list version of the fields (1 CORD1S only)
- Type = u'S'¶
- type = u'CORD1S'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD2C(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord2x, pyNastran.bdf.cards.coordinateSystems.CylindricalCoord
Intilizes the CORD2C
1 2 3 4 5 6 7 8 9 CORD2C CID RID A1 A2 A3 B1 B2 B3 C1 C2 C3 Parameters: - self – the CORD2C coordinate system object
- card – a BDFCard object
- data – a list version of the fields (1 CORD2C only)
- Type = u'C'¶
- type = u'CORD2C'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD2R(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord2x, pyNastran.bdf.cards.coordinateSystems.RectangularCoord
Intilizes the CORD2R
1 2 3 4 5 6 7 8 9 CORD2R CID RID A1 A2 A3 B1 B2 B3 C1 C2 C3 Parameters: - self – the CORD2R coordinate system object
- card – a BDFCard object
- data – a list version of the fields (1 CORD2R only) default=None -> [0, 0, 0., 0., 0., 0., 0., 1., 1., 0., 0.]
- Type = u'R'¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the CORD2R object pointer
- xref (bool) – has this model been cross referenced
- type = u'CORD2R'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD2S(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Cord2x, pyNastran.bdf.cards.coordinateSystems.SphericalCoord
Intilizes the CORD2S
1 2 3 4 5 6 7 8 9 CORD2S CID RID A1 A2 A3 B1 B2 B3 C1 C2 C3 Parameters: - self – the CORD2S coordinate system object
- card – a BDFCard object
- data – a list version of the fields (1 CORD2S only)
- Type = u'S'¶
- type = u'CORD2S'¶
- class pyNastran.bdf.cards.coordinateSystems.CORD3G(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Coord
Defines a general coordinate system using three rotational angles as functions of coordinate values in the reference coordinate system. The CORD3G entry is used with the MAT9 entry to orient material principal axes for 3-D composite analysis.
CORD3G CID METHOD FORM THETAID1 THETAID2 THETAID3 CIDREF CORD3G 100 E313 EQN 110 111 112 0 Intilizes the CORD3G
Parameters: - self – the CORD3G coordinate system object
- card – a list version of the fields
- coord3g_transformToGlobal(p, debug=False)[source]¶
Parameters: - self – the coordinate system object
- p – the point to transform. TYPE=NUMPY.NDARRAY.
- debug – should debug messages be printed
Warning
not done, just setting up how you’d do this
Note
per http://en.wikipedia.org/wiki/Euler_angles “This means for example that a convention named (YXZ) is the result of performing first an intrinsic Z rotation, followed by X and Y rotations, in the moving axes (Note: the order of multiplication of matrices is the opposite of the order in which they’re applied to a vector).”
- type = u'CORD3G'¶
- class pyNastran.bdf.cards.coordinateSystems.Coord(card, data, comment)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard, pyNastran.bdf.deprecated.CoordDeprecated
Defines a general CORDxx object
Parameters: - self – the coordinate system object
- card – a BDFCard object
- data – a list analogous to the card
- isResolved = None¶
have all the transformation matricies been determined
- move_origin(xyz)[source]¶
Move the coordinate system to a new origin while maintaining the orientation
Parameters: - self – the coordinate system object
- xyz – the new origin point to move the coordinate to in the global coordinate system
- setup()[source]¶
- \[e_{13} = e_3 - e_1\]\[e_{12} = e_2 - e_1\]\[k = \]
rac{e_{12}}{lvert e_{12} vert}
\[j_{dir} = k imes e_{13}\]\[j = \]rac{j_{dir}}{lvert j_{dir} vert}
\[i = j imes k\]
- transform_node_to_global(p, debug=False)[source]¶
Transforms a point from the local coordinate system to the reference coordinate frames “global” coordinate system.
\[[p_{global}]_{1\times 3} = [p_{local}]_{1\times 3}[\beta_{ij}]_{3\times 3} + [p_{origin}]\]where \([\beta]_{ij}\) is the transformation matrix
\[\begin{split}[\beta]_{ij} = \left[ \begin{array}{ccc} g_x \cdot i & g_x \cdot j & g_x \cdot k \\ g_y \cdot i & g_y \cdot j & g_y \cdot k \\ g_z \cdot i & g_z \cdot j & g_z \cdot k \end{array} \right]\end{split}\]- \(g\) is the global directional vector (e.g. \(g_x = [1,0,0]\))
- \(ijk\) is the math:i^{th} direction in the local coordinate system
Parameters: - self – the coordinate system object
- p – the point to be transformed in the local frame. Type=1x3 NUMPY.NDARRAY
- debug – developer debug (default=False)
Returns p2: the point in the global frame. Type=1x3 NUMPY.NDARRAY
Returns beta: the rotation matrix. Type=6x6 NUMPY.NDARRAY
Warning
make sure you cross-reference before calling this
Warning
you probably shouldnt call this, call the Node methods Position and PositionWRT
- transform_node_to_local(p, debug=False)[source]¶
Transforms the global point p to the local coordinate system
Parameters: - self – the coordinate system object
- p – the point to transform
- beta – the transformation matrix to apply - created by transformToGlobal
- debug – developer debug
Note
uses the matrix as there is no linking from a global coordinate system to the local
Note
the matrix that comes in is the local to global, so we need to invert the matrix. The inverse of the tranformation matrix \([\beta]\) is the transpose of the matrix.
\[p_{global} = (p_{coord})[\beta] + p_{origin}\]\[[\beta]^{-1} = [\beta]^T\]\[p_{coord} = (p_{global} -p_{origin}) [\beta]^T\]\[p_{local} = transform(p_{coord})\]Where transform(x) depends on the rectangular, cylindrical, or spherical coordinate system
- transform_vector_to_global(p, debug=False)[source]¶
Transforms a generalized vector from the local frame to the global frame. A generalized vector is unchanged when you shift it’s point of application. So:
- Generalized Vectors (Force, Moment about the origin)
- Not Generalized Vectors (node xyz, displacement, Moment)
Parameters: - p – the vector in the local frame
- debug – debug flag (default=False; unused)
Retval p3: the vector in the global frame
Note
Shifting the load application point of a force creates a moment, but the force will be the same.
- transform_vector_to_local(p, debug=False)[source]¶
see transform_node_to_local, but set the origin to <0, 0, 0>
- type = u'COORD'¶
- class pyNastran.bdf.cards.coordinateSystems.Cord1x(card, nCoord, data, comment)[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Coord
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the CORD1x object pointer
- xref (bool) – has this model been cross referenced
- cid = None¶
the coordinate ID
- cross_reference(model)[source]¶
Links self.rid to a coordinate system.
Parameters: - self – the coordinate system object
- model – the BDF object
- g1 = None¶
a Node at the origin
- g2 = None¶
a Node on the z-axis
- g3 = None¶
a Node on the xz-plane
- nodeIDs()[source]¶
Gets the integers for the node [g1,g2,g3]
Parameters: self – the coordinate system object
- rid = 0¶
- setup()[source]¶
Finds the position of the nodes used define the coordinate system and sets the ijk vectors
Parameters: self – the coordinate system object
- class pyNastran.bdf.cards.coordinateSystems.Cord2x(card, data, comment)[source]¶
Bases: pyNastran.bdf.cards.coordinateSystems.Coord
Defines the CORD2x class
Parameters: - self – the coordinate system object
- card – a BDFCard object
- data – a list analogous to the card
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the CORD2x object pointer
- xref (bool) – has this model been cross referenced
- cid = None¶
coordinate system ID
- cross_reference(model)[source]¶
Links self.rid to a coordinate system.
Parameters: - self – the coordinate system object
- model – the BDF object
Warning
Doesn’t set rid to the coordinate system if it’s in the global. This isn’t a problem. It’s meant to speed up the code in order to resolve extra coordinate systems.
- e1 = None¶
origin in a point relative to the rid coordinate system
- e2 = None¶
z-axis in a point relative to the rid coordinate system
- e3 = None¶
a point on the xz-plane relative to the rid coordinate system
- i = None¶
the global axes
- rid = None¶
reference coordinate system ID
- class pyNastran.bdf.cards.coordinateSystems.CylindricalCoord[source]¶
Bases: object
\[r = \sqrt(x^2+y^2)\]\[\theta = tan^{-1}\left(\frac{y}{x}\right)\]\[z = z\]\[x = r cos(\theta)\]\[y = r sin(\theta)\]\[z = z\]\[p = [x,y,z] + e_1\]http://en.wikipedia.org/wiki/Cylindrical_coordinate_system
See also
- class pyNastran.bdf.cards.coordinateSystems.RectangularCoord[source]¶
Bases: object
- class pyNastran.bdf.cards.coordinateSystems.SphericalCoord[source]¶
Bases: object
\[r = \rho = \sqrt(x^2+y^2+z^2)\]\[\theta = \cos^{-1}\left(\frac{z}{r}\right)\]\[\phi = \tan^{-1}\left(\frac{y}{x}\right)\]\[x = r \sin(\theta)\cos(\phi)\]\[y = r \sin(\theta)\sin(\phi)\]\[z = r \cos(\theta)\]\[p = [x,y,z]\]See also
- pyNastran.bdf.cards.coordinateSystems._fix_xyz_shape(xyz, name=u'xyz')[source]¶
Checks the shape of a grid point location and fixes it if possible
- pyNastran.bdf.cards.coordinateSystems.define_coord_e123(model, Type, cid, origin, rid=0, xaxis=None, yaxis=None, zaxis=None, xyplane=None, yzplane=None, xzplane=None)[source]¶
Create a coordinate system based on a defined axis and point on the plane. This is the generalized version of the CORDx card.
Parameters: - model – a BDF object
- Type – ‘CORD2R’, ‘CORD2C’, ‘CORD2S’
- cid – the new coordinate system id
- origin – a (3,) ndarray defining the location of the origin in the global coordinate frame
- rid – the new reference coordinate system id (default=0)
- xaxis – a (3,) ndarray defining the x axis (default=None)
- yaxis – a (3,) ndarray defining the y axis (default=None)
- zaxis – a (3,) ndarray defining the z axis (default=None)
Note
one axis (xaxis, yaxis, zaxis) and one plane (xyplane, yzplane, xz plane) must be defined; the others must be None
Note
the axes and planes are defined in the rid coordinate system
TODO: hasn’t been tested...
- pyNastran.bdf.cards.coordinateSystems.define_coord_ijk(model, Type, cid, origin, rid=0, i=None, j=None, k=None)[source]¶
Create a coordinate system based on 2 or 3 perpendicular unit vectors
Parameters: - model – a BDF object
- Type – ‘CORD2R’, ‘CORD2C’, ‘CORD2S’
- cid – the new coordinate system id
- origin – a (3,) ndarray defining the location of the origin in the global coordinate frame
- rid – the new reference coordinate system id (default=0)
- i – the i unit vector (default=None)
- j – the j unit vector (default=None)
- k – the k unit vector (default=None)
TODO: hasn’t been tested...
- pyNastran.bdf.cards.coordinateSystems.define_spherical_cutting_plane(model, origin, rid, cids, thetas, phis)[source]¶
Creates a series of coordinate systems defined as constant origin, with a series of theta and phi angles, which are defined about the aerodynamic axis <1, 0, 0>. This is intended to be with a supersonic mach plane for calculating wave drag where:
\[\theta = \mu = \frac{1}{\sqrt(Mach^2 - 1)}\]\[\phi = [-\pi, \pi]\]Parameters: - model – a BDF object
- origin – a (3,) ndarray defining the location of the origin in the global coordinate frame
- rid – the new spherical reference coordinate system id
- cids – list of new coordinate system ids
- thetas – list of thetas (in radians)
- phis – list of phis (in radians)
Note
creates 1 CORD2S and ncid CORD2R coordinate systems
Todo
hasn’t been tested...
dmig Module¶
dynamic Module¶
All dynamic control cards are defined in this file. This includes:
- FREQ
- FREQ1
- FREQ2 (not implemented)
- FREQ3
- FREQ4
- FREQ5 (not implemented)
- NLPCI
- NLPARM
- TSTEP
- TSTEPNL
All cards are BaseCard objects.
- class pyNastran.bdf.cards.dynamic.FREQ(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a set of frequencies to be used in the solution of frequency response problems.
1 2 3 4 5 6 7 8 9 FREQ SID F1 F2 etc. - add_frequencies(freqs)[source]¶
Combines the frequencies from 1 FREQx object with another. All FREQi entries with the same frequency set identification numbers will be used. Duplicate frequencies will be ignored.
Parameters: - self – the object pointer
- freqs – the frequencies for a FREQx object
- add_frequency_object(freq)[source]¶
Parameters: - self – the object pointer
- freq – a FREQx object
See also
addFrequencies()
- type = u'FREQ'¶
- class pyNastran.bdf.cards.dynamic.FREQ1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.dynamic.FREQ
Defines a set of frequencies to be used in the solution of frequency response problems by specification of a starting frequency, frequency increment, and the number of increments desired.
1 2 3 4 5 6 7 8 9 FREQ1 SID F1 DF NDF Note
this card rewrites as a FREQ card
- type = u'FREQ1'¶
- class pyNastran.bdf.cards.dynamic.FREQ2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.dynamic.FREQ
Defines a set of frequencies to be used in the solution of frequency response problems by specification of a starting frequency, final frequency, and the number of logarithmic increments desired.
1 2 3 4 5 6 7 8 9 FREQ2 SID F1 F2 NDF Note
this card rewrites as a FREQ card
- type = u'FREQ2'¶
- class pyNastran.bdf.cards.dynamic.FREQ3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.dynamic.FREQ
- type = u'FREQ3'¶
- class pyNastran.bdf.cards.dynamic.FREQ4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.dynamic.FREQ
Defines a set of frequencies used in the solution of modal frequency response problems by specifying the amount of ‘spread’ around each natural frequency and the number of equally spaced excitation frequencies within the spread.
1 2 3 4 5 6 7 8 9 FREQ4 SID F1 F2 FSPD NFM Note
this card rewrites as a FREQ card
Todo
not done...
- type = u'FREQ4'¶
- class pyNastran.bdf.cards.dynamic.FREQ5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.dynamic.FREQ
- type = u'FREQ5'¶
- class pyNastran.bdf.cards.dynamic.NLPARM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a set of parameters for nonlinear static analysis iteration strategy.
1 2 3 4 5 6 7 8 9 NLPARM ID NINC DT KMETHOD KSTEP MAXITER CONV INTOUT ESPU EPSP EPSW MAXDIV MAXQN MAXLS FSTRESS LSTOL MAXBIS MAXR RTOLB CONV - type = u'NLPARM'¶
- class pyNastran.bdf.cards.dynamic.NLPCI(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
- type = u'NLPCI'¶
- class pyNastran.bdf.cards.dynamic.TSTEP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Transient Time Step Defines time step intervals at which a solution will be generated and output in transient analysis.
1 2 3 4 5 6 7 8 9 TSTEP N1 DT1 NO1 N2 DT2 NO2 etc. - type = u'TSTEP'¶
- class pyNastran.bdf.cards.dynamic.TSTEPNL(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines parametric controls and data for nonlinear transient structural or heat transfer analysis. TSTEPNL is intended for SOLs 129, 159, and 600. Parameters for Nonlinear Transient Analysis.
1 2 3 4 5 6 7 8 9 TSTEPNL ID NDT DT NO METHOD KSTEP MAXITER CONV ESPU EPSP EPSW MAXDIV MAXQN MAXLS FSTRESS MAXBIS ADJUST MSTEP RB MAXR UTOL RTOLB - method = None¶
Note
not listed in all QRGs
- type = u'TSTEPNL'¶
materials Module¶
All material cards are defined in this file. This includes:
- CREEP
- MAT1 (isotropic solid/shell)
- MAT2 (anisotropic)
- MAT3 (linear orthotropic)
- MAT4 (thermal)
- MAT5 (thermal)
- MAT8 (orthotropic shell)
- MAT9 (anisotropic solid)
- MAT10 (fluid element)
- MATHP (hyperelastic)
All cards are Material objects.
- class pyNastran.bdf.cards.materials.AnisotropicMaterial(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Anisotropic Material Class
- class pyNastran.bdf.cards.materials.CREEP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the CREEP object pointer Returns fields: the fields that define the card
- type = u'CREEP'¶
- class pyNastran.bdf.cards.materials.EQUIV(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
- mid = None¶
Identification number of a MAT1, MAT2, or MAT9 entry.
- type = u'EQUIV'¶
- class pyNastran.bdf.cards.materials.HyperelasticMaterial(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Hyperelastic Material Class
- class pyNastran.bdf.cards.materials.IsotropicMaterial(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Isotropic Material Class
- class pyNastran.bdf.cards.materials.MAT1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.IsotropicMaterial
Defines the material properties for linear isotropic materials.
1 2 3 4 5 6 7 8 9 MAT1 MID E G NU RHO A TREF GE ST SC SS MCSID - _field_map = {1: u'mid', 2: u'e', 3: u'g', 4: u'nu', 5: u'rho', 6: u'a', 7: u'TRef', 8: u'ge', 9: u'St', 10: u'Sc', 11: u'Ss', 12: u'Mcsid'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT1 object pointer
- xref (bool) – has this model been cross referenced
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT1 object pointer Returns fields: the fields that define the card
- type = u'MAT1'¶
- class pyNastran.bdf.cards.materials.MAT10(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Defines material properties for fluid elements in coupled fluid-structural analysis.
1 2 3 4 5 6 7 8 9 MAT10 MID BULK RHO C GE - _field_map = {1: u'mid', 2: u'bulk', 3: u'rho', 4: u'c', 5: u'ge'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT10 object pointer
- xref (bool) – has this model been cross referenced
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT10 object pointer Returns fields: the fields that define the card
- type = u'MAT10'¶
- class pyNastran.bdf.cards.materials.MAT11(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Defines the material properties for a 3D orthotropic material for isoparametric solid elements.
1 2 3 4 5 6 7 8 9 MAT11 MID E1 E2 E3 NU12 NU13 NU23 G12 G13 G23 RHO A1 A2 A3 TREF GE - _field_map = {1: u'mid', 2: u'e1', 3: u'e2', 4: u'e3', 5: u'nu12', 6: u'nu13', 7: u'nu23', 8: u'g12', 9: u'g13', 10: u'g23', 11: u'rho', 12: u'a1', 13: u'a2', 14: u'a3', 15: u'TRef', 16: u'ge'}¶
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT11 object pointer Returns fields: the fields that define the card
- type = u'MAT11'¶
- class pyNastran.bdf.cards.materials.MAT2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.AnisotropicMaterial
Defines the material properties for linear anisotropic materials for two-dimensional elements.
1 2 3 4 5 6 7 8 9 MAT2 MID G11 G12 G13 G22 G23 G33 RHO A1 A2 A3 TREF GE ST SC SS MCSID - _field_map = {1: u'mid', 2: u'G11', 3: u'G12', 4: u'G13', 5: u'G22', 6: u'G23', 7: u'G33', 8: u'rho', 9: u'a1', 10: u'a2', 11: u'a3', 12: u'TRef', 13: u'ge', 14: u'St', 15: u'Sc', 16: u'Ss', 17: u'Mcsid'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT2 object pointer
- xref (bool) – has this model been cross referenced
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT2 object pointer Returns fields: the fields that define the card
- type = u'MAT2'¶
- class pyNastran.bdf.cards.materials.MAT3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.OrthotropicMaterial
Defines the material properties for linear orthotropic materials used by the CTRIAX6 element entry.
1 2 3 4 5 6 7 8 9 MAT3 MID EX ETH EZ NUXTH NUTHZ NUZX RHO GZX AX ATH AZ TREF GE - _field_map = {1: u'mid', 2: u'ex', 3: u'eth', 4: u'ez', 5: u'nuxth', 6: u'nuthz', 7: u'nuzx', 8: u'rho', 11: u'gzx', 12: u'ax', 13: u'ath', 14: u'az', 15: u'TRef', 16: u'ge'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT1 object pointer
- xref (bool) – has this model been cross referenced
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT3 object pointer Returns fields: the fields that define the card
- type = u'MAT3'¶
- class pyNastran.bdf.cards.materials.MAT4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.ThermalMaterial
Defines the constant or temperature-dependent thermal material properties for conductivity, heat capacity, density, dynamic viscosity, heat generation, reference enthalpy, and latent heat associated with a single-phase change.
1 2 3 4 5 6 7 8 9 MAT4 MID K CP RHO MU H HGEN REFENTH TCH TDELTA QLAT - _field_map = {1: u'mid', 2: u'k', 3: u'cp', 4: u'rho', 5: u'mu', 6: u'H', 7: u'hgen', 8: u'refEnthalpy', 9: u'tch', 10: u'tdelta', 11: u'qlat'}¶
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT4 object pointer Returns fields: the fields that define the card
- type = u'MAT4'¶
- class pyNastran.bdf.cards.materials.MAT5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.ThermalMaterial
Defines the thermal material properties for anisotropic materials.
1 2 3 4 5 6 7 8 9 MAT5 MID KXX KXY KXZ KYY KYZ KZZ CP RHO HGEN - _field_map = {1: u'mid', 2: u'kxx', 3: u'kxy', 4: u'kxz', 5: u'kyy', 6: u'kyz', 7: u'kzz'}¶
- kxx = None¶
Thermal conductivity (assumed default=0.0)
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT5 object pointer Returns fields: the fields that define the card
- type = u'MAT5'¶
- class pyNastran.bdf.cards.materials.MAT8(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.OrthotropicMaterial
Defines the material property for an orthotropic material for isoparametric shell elements.
1 2 3 4 5 6 7 8 9 MAT8 MID E1 E2 NU12 G12 G1Z G2Z RHO A1 A2 TREF Xt Xc Yt Yc S GE1 F12 STRN - _field_map = {1: u'mid', 2: u'e11', 3: u'e22', 4: u'nu12', 5: u'g12', 6: u'g1z', 7: u'g2z', 8: u'rho', 9: u'a1', 10: u'a2', 11: u'TRef', 12: u'Xt', 13: u'Xc', 14: u'Yt', 15: u'Yc', 16: u'S', 17: u'ge', 18: u'F12', 19: u'strn'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT8 object pointer
- xref (bool) – has this model been cross referenced
- e11 = None¶
Todo
is this the correct default
- e22 = None¶
Todo
is this the correct default
- nu12 = None¶
Todo
is this the correct default
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT8 object pointer Returns fields: the fields that define the card
- type = u'MAT8'¶
- class pyNastran.bdf.cards.materials.MAT9(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.AnisotropicMaterial
Defines the material properties for linear, temperature-independent, anisotropic materials for solid isoparametric elements (see PSOLID entry description).
1 2 3 4 5 6 7 8 9 MAT9 MID G11 G12 G13 G14 G15 G16 G22 G23 G24 G25 G26 G33 G34 G35 G36 G44 G45 G46 G55 G56 G66 RHO A1 A2 A3 A4 A5 A6 TREF GE - _field_map = {1: u'mid'}¶
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the MAT9 object pointer
- xref (bool) – has this model been cross referenced
- mid = None¶
Material ID
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MAT9 object pointer Returns fields: the fields that define the card
- type = u'MAT9'¶
- class pyNastran.bdf.cards.materials.MATHP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.materials.HyperelasticMaterial
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the MATHP object pointer Returns fields: the fields that define the card
- type = u'MATHP'¶
- class pyNastran.bdf.cards.materials.OrthotropicMaterial(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Orthotropic Material Class
- class pyNastran.bdf.cards.materials.ThermalMaterial(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Material
Thermal Material Class
material_deps Module¶
- class pyNastran.bdf.cards.material_deps.MATS1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies stress-dependent material properties for use in applications involving nonlinear materials. This entry is used if a MAT1, MAT2 or MAT9 entry is specified with the same MID in a nonlinear solution sequence (SOLs 106 and 129).
- E(strain)[source]¶
Gets E (Young’s Modulus) for a given strain.
Parameters: - self – the object pointer
- strain – the strain (None -> linear E value)
Returns E: Young’s Modulus
- Type = None¶
Type of material nonlinearity. (‘NLELAST’ for nonlinear elastic or ‘PLASTIC’ for elastoplastic.)
- h = None¶
Work hardening slope (slope of stress versus plastic strain) in units of stress. For elastic-perfectly plastic cases, H=0.0. For more than a single slope in the plastic range, the stress-strain data must be supplied on a TABLES1 entry referenced by TID, and this field must be blank
- hr = None¶
Hardening Rule, selected by one of the following values (Integer): (1) Isotropic (Default) (2) Kinematic (3) Combined isotropic and kinematic hardening
- limit1 = None¶
Initial yield point
- limit2 = None¶
Internal friction angle, measured in degrees, for the Mohr-Coulomb and Drucker-Prager yield criteria
- mid = None¶
Identification number of a MAT1, MAT2, or MAT9 entry.
- tid = None¶
Identification number of a TABLES1 or TABLEST entry. If H is given, then this field must be blank.
- type = u'MATS1'¶
- yf = None¶
Yield function criterion, selected by one of the following values (1) Von Mises (2) Tresca (3) Mohr-Coulomb (4) Drucker-Prager
- class pyNastran.bdf.cards.material_deps.MATT1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies temperature-dependent material properties on MAT1 entry fields via TABLEMi entries.
1 2 3 4 5 6 7 8 9 MATT1 MID T(E) T(G) T(NU) T(RHO) T(A) T(GE) T(ST) T(SC) T(SS) - E(temperature)[source]¶
Gets E (Young’s Modulus) for a given temperature.
Parameters: - self – the object pointer
- temperature – the temperature (None -> linear E value)
Returns E: Young’s Modulus
- type = u'MATT1'¶
- class pyNastran.bdf.cards.material_deps.MATT2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies temperature-dependent material properties on MAT2 entry fields via TABLEMi entries.
1 2 3 4 5 6 7 8 9 MATT2 MID T(G12) T(G13) T(G13) T(G22) T(G23) T(G33) T(RHO) T(A1) T(A2) T(A3) T(GE) T(ST) T(SC) T(SS) - type = u'MATT2'¶
- class pyNastran.bdf.cards.material_deps.MATT4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies temperature-dependent material properties on MAT2 entry fields via TABLEMi entries.
1 2 3 4 5 6 7 8 9 MATT4 MID T(K) T(CP) T(H) T(mu) T(HGEN) - type = u'MATT4'¶
- class pyNastran.bdf.cards.material_deps.MATT5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies temperature-dependent material properties on MAT2 entry fields via TABLEMi entries.
1 2 3 4 5 6 7 8 9 MATT5 MID T(Kxx) T(Kxy) T(Kxz) T(Kyy) T(Kyz) T(Kzz) T(CP) T(HGEN) - type = u'MATT5'¶
- class pyNastran.bdf.cards.material_deps.MATT8(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.material_deps.MaterialDependence
Specifies temperature-dependent material properties on MAT2 entry fields via TABLEMi entries.
1 2 3 4 5 6 7 8 9 MATT8 MID T(E1) T(E2) T(Nu12) T(G12) T(G1z) T(G2z) T(RHO) T(A1) T(A2) T(Xt) T(Yc) T(Yt) T(Yc) T(S) T(GE) T(F12) - type = u'MATT8'¶
methods Module¶
All method cards are defined in this file. This includes:
- EIGB
- EIGC
- EIGR
- EIGP
- EIGRL
All cards are Method objects.
- class pyNastran.bdf.cards.methods.EIGB(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.methods.Method
Defines data needed to perform buckling analysis
- L1 = None¶
Eigenvalue range of interest. (Real, L1 < L2)
- method = None¶
Method of eigenvalue extraction. (Character: ‘INV’ for inverse power method or ‘SINV’ for enhanced inverse power method.) apparently it can also be blank...
- ndp = None¶
Desired number of positive and negative roots. (Integer>0; Default = 3*NEP)
- nep = None¶
Estimate of number of roots in positive range not used for METHOD = ‘SINV’. (Integer > 0)
- norm = None¶
Method for normalizing eigenvectors. (‘MAX’ or ‘POINT’;Default=’MAX’)
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'EIGB'¶
- class pyNastran.bdf.cards.methods.EIGC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.methods.Method
Defines data needed to perform complex eigenvalue analysis .. todo: not done
- C = None¶
Component number. Required only if NORM=’POINT’ and G is a geometric grid point. (1<Integer<6)
- E = None¶
Convergence criterion. (Real > 0.0. Default values are: 10^-4 for METHOD = “INV”, 10^-15 for METHOD = “HESS”, E is machine dependent for METHOD = “CLAN”.)
- G = None¶
Grid or scalar point identification number. Required only if NORM=’POINT’. (Integer>0)
- method = None¶
Method of complex eigenvalue extraction
- norm = None¶
Method for normalizing eigenvectors
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'EIGC'¶
- class pyNastran.bdf.cards.methods.EIGP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.methods.Method
Defines poles that are used in complex eigenvalue extraction by the Determinant method.
- alpha1 = None¶
Coordinates of point in complex plane. (Real)
- alpha2 = None¶
Coordinates of point in complex plane. (Real)
- m1 = None¶
Multiplicity of complex root at pole defined by point at ALPHAi and OMEGAi
- m2 = None¶
Multiplicity of complex root at pole defined by point at ALPHAi and OMEGAi
- omega1 = None¶
Coordinates of point in complex plane. (Real)
- omega2 = None¶
Coordinates of point in complex plane. (Real)
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'EIGP'¶
- class pyNastran.bdf.cards.methods.EIGR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.methods.Method
Defines data needed to perform real eigenvalue analysis
- C = None¶
Component number. Required only if NORM=’POINT’ and G is a geometric grid point. (1<Integer<6)
- G = None¶
Grid or scalar point identification number. Required only if NORM=’POINT’. (Integer>0)
- f1 = None¶
Frequency range of interest
- method = None¶
Method of eigenvalue extraction. (Character: ‘INV’ for inverse power method or ‘SINV’ for enhanced inverse power method.)
- ne = None¶
Estimate of number of roots in range (Required for METHOD = ‘INV’). Not used by ‘SINV’ method.
- norm = None¶
Method for normalizing eigenvectors. (‘MAX’ or ‘POINT’; Default=’MAX’)
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'EIGR'¶
- class pyNastran.bdf.cards.methods.EIGRL(card=None, data=None, sol=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.methods.Method
Defines data needed to perform real eigenvalue (vibration or buckling) analysis with the Lanczos method
- maxset = None¶
Number of vectors in block or set. Default is machine dependent
- msglvl = None¶
Diagnostic level. (0 < Integer < 4; Default = 0)
- nd = None¶
Number of roots desired
- norm = None¶
Method for normalizing eigenvectors (Character: ‘MASS’ or ‘MAX’)
- shfscl = None¶
Estimate of the first flexible mode natural frequency (Real or blank)
- sid = None¶
Set identification number. (Unique Integer > 0)
- type = u'EIGRL'¶
- v1 = None¶
For vibration analysis: frequency range of interest. For buckling analysis: eigenvalue range of interest. See Remark 4. (Real or blank, -5 10e16 <= V1 < V2 <= 5.10e16)
- class pyNastran.bdf.cards.methods.Method(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Generic class for all methods. Part of self.methods
nodes Module¶
- class pyNastran.bdf.cards.nodes.GRDSET(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node
Defines default options for fields 3, 7, 8, and 9 of all GRID entries.
1 2 3 4 5 6 7 8 9 GRDSET CP CD PS SEID Creates the GRDSET card
Parameters: - self – the GRDSET object pointer
- card (BDFCard) – a BDFCard object
- data (LIST) – a list with the GRDSET fields defined in OP2 format
- comment (string) – a comment for the card
- Cd()[source]¶
Gets the output coordinate system
Parameters: self – the GRDSET object pointer Returns cd: the output coordinate system
- Cp()[source]¶
Gets the analysis coordinate system
Parameters: self – the GRDSET object pointer Returns cp: the analysis coordinate system
- Ps()[source]¶
Gets the GRID-based SPC
Parameters: self – the GRID object pointer Returns ps: the GRID-based SPC
- SEid()[source]¶
Gets the Superelement ID
Parameters: self – the GRDSET object pointer Returns seid: the Superelement ID
- _field_map = {8: u'seid', 1: u'nid', 2: u'cp', 6: u'cd', 7: u'ps'}¶
allows the get_field method and update_field methods to be used
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the GRDSET object pointer
- xref (bool) – has this model been cross referenced
- cd = None¶
Analysis coordinate system
- cp = None¶
Output Coordinate System
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPOINT object pointer
- model (BDF) – the BDF object
- ps = None¶
Default SPC constraint on undefined nodes
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the GRDSET object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the GRDSET object pointer Returns fields: the fields that define the card
- seid = None¶
Superelement ID
- type = u'GRDSET'¶
- class pyNastran.bdf.cards.nodes.GRID(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node, pyNastran.bdf.deprecated.GridDeprecated
1 2 3 4 5 6 7 8 9 GRID NID CP X1 X2 X3 CD PS SEID Creates the GRID card
Parameters: - self – the GRID object pointer
- card (BDFCard) – a BDFCard object
- data (LIST) – a list with the GRID fields defined in OP2 format
- comment (string) – a comment for the card
- Cd()[source]¶
Gets the output coordinate system
Parameters: self – the GRID object pointer Returns cd: the output coordinate system
- Cp()[source]¶
Gets the analysis coordinate system
Parameters: self – the GRID object pointer Returns cp: the analysis coordinate system
- Ps()[source]¶
Gets the GRID-based SPC
Parameters: self – the GRID object pointer Returns ps: the GRID-based SPC
- SEid()[source]¶
Gets the Superelement ID
Parameters: self – the GRID object pointer Returns seid: the Superelement ID
- _field_map = {8: u'seid', 1: u'nid', 2: u'cp', 6: u'cd', 7: u'ps'}¶
allows the get_field method and update_field methods to be used
- _get_field_helper(n)[source]¶
Gets complicated parameters on the GRID card
Parameters: - self – the GRID object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the GRID card
Parameters: - self – the GRID object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the GRID object pointer
- xref (bool) – has this model been cross referenced
- cd = None¶
Analysis coordinate system
- cp = None¶
Grid point coordinate system
- cross_reference(model, grdset=None)[source]¶
Cross links the card
Parameters: - self – the GRID object pointer
- model (BDF()) – the BDF object
- grdset (GRDSET() or None) – a GRDSET if available (default=None)
Note
The gridset object will only update the fields that have not been set
- get_ndof()[source]¶
Gets the number of degrees of freedom for the GRID
Parameters: self – the GRID object pointer Returns six: the value 6
- get_position(debug=False)[source]¶
Gets the point in the global XYZ coordinate system.
Parameters: - self – the GRID object pointer
- debug (bool) – developer debug (default=False)
Returns xyz: the position of the GRID in the globaly coordinate system
- get_position_wrt(model, cid, debug=False)[source]¶
Gets the location of the GRID which started in some arbitrary system and returns it in the desired coordinate system
Parameters: - self – the object pointer
- model (BDF()) – the BDF model object
- cid (int) – the desired coordinate ID
- debug (bool) – developer debug (default=False)
Returns xyz: the position of the GRID in an arbitrary coordinate system
- nid = None¶
Node ID
- ps = None¶
SPC constraint
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the GRID object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the GRID object pointer Returns fields: the fields that define the card
- seid = None¶
Superelement ID
- set_position(model, xyz, cid=0)[source]¶
Updates the GRID location
Parameters: - self – the GRID object pointer
- xyz (TYPE = NDARRAY. SIZE=(3,)) – the location of the node.
- cp (int) – the analysis coordinate system. (default=0; global)
- type = u'GRID'¶
- write_card(size=8, is_double=False)[source]¶
The writer method used by BDF.write_card
Parameters: - self – the GRID object pointer
- size (int) – the size of the card (8/16)
- isdouble – should this card be written with double precision (default=False)
- xyz = None¶
node location in local frame
- class pyNastran.bdf.cards.nodes.GRIDB(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node
Creates the GRIDB card
Parameters: - self – the GRIDB object pointer
- card (BDFCard) – a BDFCard object
- data (LIST) – a list with the GRIDB fields defined in OP2 format
- comment (string) – a comment for the card
- Cd()[source]¶
Gets the output coordinate system
Parameters: self – the GRIDB object pointer Returns cd: the output coordinate system
- _field_map = {8: u'idf', 1: u'nid', 4: u'phi', 6: u'cd', 7: u'ps'}¶
allows the get_field method and update_field methods to be used
- _verify(xref)[source]¶
Verifies all methods for this object work
Parameters: - self – the GRIDB object pointer
- xref (bool) – has this model been cross referenced
- nid = None¶
node ID
- ps = None¶
local SPC constraint
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the GRIDB object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the GRIDB object pointer Returns fields: the fields that define the card
- type = u'GRIDB'¶
- class pyNastran.bdf.cards.nodes.Node(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Generic Node base class
- class pyNastran.bdf.cards.nodes.POINT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node, pyNastran.bdf.deprecated.PointDeprecated
1 2 3 4 5 6 7 8 9 POINT NID CP X1 X2 X3 Creates the POINT card
Parameters: - self – the POINT object pointer
- card (BDFCard) – a BDFCard object
- data (LIST) – a list with the POINT fields defined in OP2 format
- comment (string) – a comment for the card
- Cp()[source]¶
Gets the analysis coordinate system
Parameters: self – the POINT object pointer Returns cp: the analysis coordinate system
- _field_map = {1: u'nid', 2: u'cp'}¶
- _get_field_helper(n)[source]¶
Gets complicated parameters on the POINT card
Parameters: - self – the POINT object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the POINT card
Parameters: - self – the POINT object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- cd = None¶
Analysis coordinate system
- cp = None¶
Grid point coordinate system
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the GRID object pointer
- model (BDF()) – the BDF object
- get_position(debug=False)[source]¶
Gets the point in the global XYZ coordinate system.
Parameters: - self – the POINT object pointer
- debug – developer debug (default=False)
Returns position: the position of the POINT in the globaly coordinate system
- get_position_wrt(model, cid, debug=False)[source]¶
Gets the location of the POINT which started in some arbitrary system and returns it in the desired coordinate system
Parameters: - self – the POINT object pointer
- model (BDF()) – the BDF model object
- cid (int) – the desired coordinate ID
- debug (bool) – debug (default=False)
Returns xyz: the position of the POINT in an arbitrary coordinate system
- nid = None¶
Node ID
- ps = None¶
SPC constraint
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the GRID object pointer Returns fields: the fields that define the card
- repr_fields()[source]¶
Gets the fields in their simplified form
Parameters: self – the GRID object pointer Returns fields: the fields that define the card
- seid = None¶
Superelement ID
- set_position(model, xyz, cid=0)[source]¶
Updates the POINT location
Parameters: - self – the POINT object pointer
- xyz (TYPE = NDARRAY. SIZE=(3,)) – the location of the node.
- cp (int) – the analysis coordinate system. (default=0; global)
- type = u'POINT'¶
- write_card(size=8, is_double=False)[source]¶
The writer method used by BDF.write_card
Parameters: - self – the GRID object pointer
- size (int) – the size of the card (8/16)
- xyz = None¶
node location in local frame
- class pyNastran.bdf.cards.nodes.RINGAX(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Ring
Defines a ring for conical shell problems.
1 2 3 4 5 6 7 8 9 RINGAX MID R Z PS Creates the RINGAX card :param self:
the RINGAX object pointerParameters: - card (BDFCard) – a BDFCard object
- data (LIST) – a list with the RINGAX fields defined in OP2 format
- comment (string) – a comment for the card
- R = None¶
Radius
- _field_map = {1: u'mid', 3: u'R', 4: u'z', 7: u'ps'}¶
allows the get_field method and update_field methods to be used
- nid = None¶
Node ID
- ps = None¶
local SPC constraint
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the RINGAX object pointer Returns fields: the fields that define the card
- type = u'RINGAX'¶
- class pyNastran.bdf.cards.nodes.Ring(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Generic Ring base class
- class pyNastran.bdf.cards.nodes.SPOINT(nid, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node
Creates the SPOINT card
Parameters: - self – the SPOINT object pointer
- card (BDFCard) – a BDFCard object
- data (LIST) – a list with the SPOINT fields defined in OP2 format
- comment (string) – a comment for the card
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPOINT object pointer
- model (BDF) – the BDF object
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPOINT object pointer Returns fields: the fields that define the card
- type = u'SPOINT'¶
- class pyNastran.bdf.cards.nodes.SPOINTs(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.nodes.Node
1 2 3 4 5 6 7 8 9 SPOINT ID1 THRU ID2 SPOINT ID1 ID1 ID3 ID4 ID5 ID6 ID7 ID8 ID8 etc. Creates the SPOINTs card that contains many SPOINTs :param self:
the SPOINTs object pointerParameters: - card (BDFCard) – a BDFCard object
- data (LIST) – a list with the SPOINT fields defined in OP2 format
- comment (string) – a comment for the card
- _get_compressed_spoints()[source]¶
Gets the spoints in sorted, short form.
uncompresed: SPOINT,1,3,5 compressed: SPOINT,1,3,5
uncompresed: SPOINT,1,2,3,4,5 compressed: SPOINT,1,THRU,5
uncompresed: SPOINT,1,2,3,4,5,7 compressed: SPOINT,7
SPOINT,1,THRU,5
- addSPoints(sList)[source]¶
Adds more SPOINTs to this object
Parameters: self – the SPOINT object pointer
- createSPOINTi()[source]¶
Creates individal SPOINT objects
Parameters: self – the SPOINT object pointer
- cross_reference(model)[source]¶
Cross links the card
Parameters: - self – the SPOINT object pointer
- model (BDF) – the BDF object
- get_ndof()[source]¶
Returns the number of degrees of freedom for the SPOINTs class
Parameters: self – the SPOINT object pointer Returns ndofs: the number of degrees of freedom
- raw_fields()[source]¶
Gets the fields in their unmodified form
Parameters: self – the SPOINT object pointer Returns fields: the fields that define the card
- type = u'SPOINT'¶
optimization Module¶
- class pyNastran.bdf.cards.optimization.DCONSTR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
- type = u'DCONSTR'¶
- class pyNastran.bdf.cards.optimization.DDVAL(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
- type = u'DDVAL'¶
- class pyNastran.bdf.cards.optimization.DESVAR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
- type = u'DESVAR'¶
- class pyNastran.bdf.cards.optimization.DLINK(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
Multiple Design Variable Linking Relates one design variable to one or more other design variables.:
DLINK ID DDVID C0 CMULT IDV1 C1 IDV2 C2 IDV3 C3 -etc.-
- type = u'DLINK'¶
- class pyNastran.bdf.cards.optimization.DOPTPRM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
Design Optimization Parameters Overrides default values of parameters used in design optimization
DOPTPRM PARAM1 VAL1 PARAM2 VAL2 PARAM3 VAL3 PARAM4 VAL4 PARAM5 VAL5 -etc.-
- defaults = {u'DPMAX': 0.5, u'ETA1': 0.01, u'ETA2': 0.25, u'ETA3': 0.7, u'P2RSET': None, u'DPMIN': 0.01, u'OPTCOD': 0, u'APRCOD': 2, u'DRATIO': 0.1, u'CTMIN': 0.003, u'DESMAX': 5, u'FSDALP': 0.9, u'TDMIN': None, u'DXMAX': 1.0, u'DLXESL': 0.5, u'CT': -0.03, u'METHOD': 0, u'IGMAX': 0, u'GMAX': 0.005, u'CONVPR': 0.001, u'OBJMOD': 0, u'GSCAL': 0.001, u'NASPRO': 0, u'UPDFAC1': 2.0, u'UPDFAC2': 0.5, u'TREGION': 0, u'FSDMAX': 0, u'P2CM': None, u'P2CC': None, u'STPSCL': 1.0, u'PLVIOL': 0, u'P1': 0, u'DISBEG': 0, u'CONVDV': 0.001, u'P2CR': None, u'P2CP': None, u'DISCOD': 1, u'AUTOSE': 0, u'DSMXESL': 20, u'TCHECK': -1, u'P2CBL': None, u'CONV2': 1e-20, u'CONV1': 0.001, u'ISCAL': 0, u'P2': 1, u'DELB': 0.0001, u'DXMIN': 0.05, u'DELP': 0.2, u'DELX': 0.5, u'PTOL': 1e+35, u'IPRINT': 0, u'PENAL': 0.0, u'P2CALL': None, u'P2CDDV': None}¶
- type = u'DOPTPRM'¶
- class pyNastran.bdf.cards.optimization.DRESP1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
DRESP1 1S1 CSTRAIN PCOMP 1 1 10000
- type = u'DRESP1'¶
- class pyNastran.bdf.cards.optimization.DRESP2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
Design Sensitivity Equation Response Quantities Defines equation responses that are used in the design, either as constraints or as an objective.
- c3 = None¶
Todo
or blank?
- type = u'DRESP2'¶
- class pyNastran.bdf.cards.optimization.DSCREEN(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
- nstr = None¶
Maximum number of constraints to be retained per region per load case. (Integer > 0; Default = 20)
- rType = None¶
Response type for which the screening criteria apply. (Character)
- trs = None¶
Truncation threshold. (Real; Default = -0.5)
- type = u'DSCREEN'¶
- class pyNastran.bdf.cards.optimization.DVMREL1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
Design Variable to Material Relation Defines the relation between a material property and design variables.:
DVMREL1 ID TYPE MID MPNAME MPMIN MPMAX C0 DVID1 COEF1 DVID2 COEF2 DVID3 COEF3 -etc.-
- mpMin = None¶
Todo
bad default
- type = u'DVMREL1'¶
- class pyNastran.bdf.cards.optimization.DVPREL1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
- DVPREL1 200000 PCOMP 2000 T2
- 200000 1.0
- pMin = None¶
Minimum value allowed for this property. .. todo:: bad default (see DVMREL1)
- type = u'DVPREL1'¶
- class pyNastran.bdf.cards.optimization.DVPREL2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.optimization.OptConstraint
DVPREL2 ID TYPE PID PNAME/FID PMIN PMAX EQID DESVAR DVID1 DVID2 DVID3 DVID4 DVID5 DVID6 DVID7 DVID8 -etc.- DTABLE LABL1 LABL2 LABL3 LABL4 LABL5 LABL6 LABL7 LABL8 -etc.- - Type = None¶
Name of a property entry, such as PBAR, PBEAM, etc
- eqID = None¶
Todo
or blank?
- oid = None¶
Unique identification number
- pMax = None¶
Maximum value allowed for this property. (Real; Default = 1.0E20)
- pMin = None¶
Minimum value allowed for this property. If FID references a stress recovery location field, then the default value for PMIN is -1.0+35. PMIN must be explicitly set to a negative number for properties that may be less than zero (for example, field ZO on the PCOMP entry). (Real; Default = 1.E-15) .. todo:: bad default (see DVMREL1)
- pNameFid = None¶
Property name, such as ‘T’, ‘A’, or field position of the property entry, or word position in the element property table of the analysis model. Property names that begin with an integer such as 12I/T**3 may only be referred to by field position. (Character or Integer 0)
- pid = None¶
Property entry identification number
- type = u'DVPREL2'¶
params Module¶
- class pyNastran.bdf.cards.params.PARAM(card, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Creates a PARAM card.
Parameters: - self – the object
- card – BDFCard object
- data – list of PARAM entries not including ‘PARAM’; intended to be used by OP2 Reader (default=None)
- comment – optional string (default=’‘)
- _field_map = {1: u'key'}¶
- type = u'PARAM'¶
- update_values(value1=None, value2=None)[source]¶
Updates value1 and value2. Performs type checking based on the PARAM type after setting any default value(s).
Parameters: - self – the PARAM object
- value1 – the main value (default=None)
- value2 – optional value (default=None)
If you want to access the data directly, use: >>> param = bdf.params[‘POST’] >>> param.values[0] = -1 # value1 >>> param.values[1] = 3 # value2 >>>
Note
Most PARAM cards only have one value. Some have two.
utils Module¶
- pyNastran.bdf.cards.utils.build_table_lines(fields, nStart=1, nEnd=0)[source]¶
Builds a table of the form:
DESVAR DVID1 DVID2 DVID3 DVID4 DVID5 DVID6 DVID7 DVID8 -etc.- UM VAL1 VAL2 -etc.- and then pads the rest of the fields with None’s
Parameters: - fields (list of values) – the fields to enter, including DESVAR
- nStart – the number of blank fields at the start of the line (default=1)
- nStart – int
- nEnd – the number of blank fields at the end of the line (default=0)
- nEnd – int
Note
will be used for DVPREL2, RBE1, RBE3
Warning
only works for small field format???
- pyNastran.bdf.cards.utils.wipe_empty_fields(card)[source]¶
Removes an trailing Nones from the card. Also converts empty strings to None.
Parameters: card – the fields on the card as a list Returns shortCard: the card with no trailing blank fields
- class pyNastran.bdf.cards.elements.bars.CBAR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bars.LineElement
CBAR EID PID GA GB X1 X2 X3 OFFT PA PB W1A W2A W3A W1B W2B W3B or
CBAR EID PID GA GB G0 OFFT PA PB W1A W2A W3A W1B W2B W3B CBAR 2 39 7 6 105 GGG 513 0.0+0 0.0+0 -9. 0.0+0 0.0+0 -9. - _field_map = {1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb', 8: u'offt', 9: u'pa', 10: u'pb'}¶
- asterType = u'CBAR'¶
- offt = None¶
Todo
offt can be an integer; translate to char
- type = u'CBAR'¶
- class pyNastran.bdf.cards.elements.bars.CBEAM3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bars.CBAR
Defines a three-node beam element
- type = u'CBEAM3'¶
- class pyNastran.bdf.cards.elements.bars.CBEND(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bars.LineElement
- _field_map = {8: u'geom', 1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb'}¶
- type = u'CBEND'¶
- class pyNastran.bdf.cards.elements.bars.LineElement(card, data)[source]¶
All bush elements are defined in this file. This includes:
- CBUSH
- CBUSH1D
- CBUSH2D
All bush elements are BushElement and Element objects.
- class pyNastran.bdf.cards.elements.bush.CBUSH(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bush.BushElement
- _field_map = {1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb', 8: u'cid', 9: u's', 10: u'ocid'}¶
- cid = None¶
Element coordinate system identification. A 0 means the basic coordinate system. If CID is blank, then the element coordinate system is determined from GO or Xi. (default=blank=element-based)
- ocid = None¶
Coordinate system identification of spring-damper offset. See Remark 9. (Integer > -1; Default = -1, which means the offset point lies on the line between GA and GB
- s = None¶
Location of spring damper (0 <= s <= 1.0)
- si = None¶
Components of spring-damper offset in the OCID coordinate system if OCID > 0.
- type = u'CBUSH'¶
- class pyNastran.bdf.cards.elements.bush.CBUSH1D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bush.BushElement
- _field_map = {1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb', 5: u'cid'}¶
- type = u'CBUSH1D'¶
- class pyNastran.bdf.cards.elements.bush.CBUSH2D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.bush.BushElement
2-D Linear-Nonlinear Connection Defines the connectivity of a two-dimensional Linear-Nonlinear element.
- _field_map = {1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb', 5: u'cid', 6: u'plane', 7: u'sptid'}¶
- type = u'CBUSH2D'¶
All damper elements are defined in this file. This includes:
- CDAMP1
- CDAMP2
- CDAMP3
- CDAMP4
- CDAMP5
- CVISC
All damper elements are DamperElement and Element objects.
- class pyNastran.bdf.cards.elements.damper.CDAMP1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'pid', u'c1': 4, u'c2': 6}¶
- c1 = None¶
component number
- type = u'CDAMP1'¶
- class pyNastran.bdf.cards.elements.damper.CDAMP2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'b', u'c1': 4, u'c2': 6}¶
- b = None¶
Value of the scalar damper (Real)
- c1 = None¶
component number
- type = u'CDAMP2'¶
- class pyNastran.bdf.cards.elements.damper.CDAMP3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'pid'}¶
- type = u'CDAMP3'¶
- class pyNastran.bdf.cards.elements.damper.CDAMP4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'b'}¶
- b = None¶
Value of the scalar damper (Real)
- type = u'CDAMP4'¶
- class pyNastran.bdf.cards.elements.damper.CDAMP5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'pid'}¶
- pid = None¶
Property ID
- type = u'CDAMP5'¶
- class pyNastran.bdf.cards.elements.damper.CVISC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.damper.LineDamper
- _field_map = {1: u'eid', 2: u'pid'}¶
- type = u'CVISC'¶
All ungrouped elements are defined in this file. This includes:
- CFAST
- CGAP
- CRAC2D
- CRAC3D
All ungrouped elements are Element objects.
- class pyNastran.bdf.cards.elements.elements.CFAST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Element
- _field_map = {1: u'eid', 2: u'pid', 3: u'Type', 4: u'ida', 5: u'idb', 6: u'gs', 7: u'ga', 8: u'gb', 9: u'xs', 10: u'ys', 11: u'zs'}¶
- type = u'CFAST'¶
- class pyNastran.bdf.cards.elements.elements.CGAP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Element
# .. todo:: not done...
- _field_map = {1: u'eid', 2: u'pid', 3: u'ga', 4: u'gb'}¶
- type = u'CGAP'¶
- class pyNastran.bdf.cards.elements.elements.CRAC2D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.elements.CrackElement
- _field_map = {1: u'eid', 2: u'pid'}¶
- type = u'CRAC2D'¶
- class pyNastran.bdf.cards.elements.elements.CRAC3D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.elements.CrackElement
- _field_map = {1: u'eid', 2: u'pid'}¶
- type = u'CRAC3D'¶
All mass elements are defined in this file. This includes:
- CMASS1
- CMASS2
- CMASS3
- CMASS4
- CONM1
- CONM2
All mass elements are PointMassElement and Element objects.
- class pyNastran.bdf.cards.elements.mass.CMASS1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Defines a scalar mass element.
CMASS1 EID PID G1 C1 G2 C2 - Centroid()[source]¶
Centroid is assumed to be c=(g1+g2)/2. If g2 is blank, then the centroid is the location of g1.
- _field_map = {1: u'eid', 2: u'pid', 3: u'g1', 4: u'c1', 5: u'g2', 6: u'c2'}¶
- type = u'CMASS1'¶
- class pyNastran.bdf.cards.elements.mass.CMASS2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Defines a scalar mass element without reference to a property entry.
CMASS2 M PID G1 C1 G2 C2 - Centroid()[source]¶
Centroid is assumed to be c=(g1+g2)/2. If g2 is blank, then the centroid is the location of g1.
- _field_map = {1: u'eid', 2: u'pid', 3: u'g1', 4: u'c1', 5: u'g2', 6: u'c2'}¶
- type = u'CMASS2'¶
- class pyNastran.bdf.cards.elements.mass.CMASS3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Defines a scalar mass element that is connected only to scalar points.
CMASS3 EID PID S1 S2 - _field_map = {1: u'eid', 2: u'pid', 3: u's1', 4: u's2'}¶
- type = u'CMASS3'¶
- class pyNastran.bdf.cards.elements.mass.CMASS4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Defines a scalar mass element that is connected only to scalar points, without reference to a property entry
CMASS4 EID M G1 S2 - _field_map = {1: u'eid', 2: u'mass', 3: u's1', 4: u's2'}¶
- type = u'CMASS4'¶
- class pyNastran.bdf.cards.elements.mass.CONM1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Concentrated Mass Element Connection, General Form Defines a 6 x 6 symmetric mass matrix at a geometric grid point
CONM1 EID G CID M11 M21 M22 M31 M32 M33 M41 M42 M43 M44 M51 M52 M53 M54 M55 M61 M62 M63 M64 M65 M66 [M] = [M11 M21 M31 M41 M51 M61] [ M22 M32 M42 M52 M62] [ M33 M43 M53 M63] [ M44 M54 M64] [ Sym M55 M65] [ M66]
- _field_map = {1: u'eid', 2: u'nid', 3: u'cid'}¶
- type = u'CONM1'¶
- class pyNastran.bdf.cards.elements.mass.CONM2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.mass.PointMassElement
Parameters: - self – the CONM2 object
- eid – element ID
- nid – node ID
- cid – coordinate frame of the offset (-1=absolute coordinates)
- X – offset vector relative to nid
- I – mass moment of inertia matrix about the CG
CONM2 EID NID CID MASS X1 X2 X3 I11 I21 I22 I31 I32 I33 CONM2 501274 11064 132.274 - Centroid()[source]¶
This method seems way more complicated than it needs to be thanks to all these little caveats that don’t seem to be supported.
- I = None¶
Mass moments of inertia measured at the mass center of gravity in
- Inertia()[source]¶
Returns the 3x3 inertia matrix .. warning:: doesnt handle offsets or coordinate systems
- X = None¶
Offset distances from the grid point to the center of gravity of coordinate system. (Real)
- _field_map = {1: u'eid', 2: u'nid', 3: u'cid', 4: u'mass'}¶
- cid = None¶
Coordinate system identification number. For CID of -1; see X1, X2, X3 below. (Integer > -1; Default = 0)
- eid = None¶
Element identification number. (0 < Integer < 100,000,000)
- mass = None¶
Mass value. (Real)
- nid = None¶
Grid point identification number. (Integer > 0)
- type = u'CONM2'¶
All rigid elements are defined in this file. This includes:
- RBAR
- RBAR1
- RBE1
- RBE2
- RBE3
All rigid elements are RigidElement and Element objects.
- class pyNastran.bdf.cards.elements.rigid.RBAR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.rigid.RigidElement
RBAR EID GA GB CNA CNB CMA CMB ALPHA RBAR 5 1 2 123456 6.5-6 - type = u'RBAR'¶
- class pyNastran.bdf.cards.elements.rigid.RBAR1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.rigid.RigidElement
RBAR1 EID GA GB CB ALPHA RBAR1 5 1 2 123 6.5-6 - type = u'RBAR1'¶
- class pyNastran.bdf.cards.elements.rigid.RBE1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.rigid.RigidElement
- type = u'RBE1'¶
- class pyNastran.bdf.cards.elements.rigid.RBE2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.rigid.RigidElement
1 2 3 4 5 6 7 8 9 RBE2 EID GN CM GM1 GM2 GM3 GM4 GM5 GM6 GM7 GM8 etc. ALPHA - _field_map = {1: u'eid', 2: u'gn', 3: u'cm'}¶
- _update_field_helper(n, value)[source]¶
Updates complicated parameters on the GRID card
Parameters: - self – the GRID object pointer
- n (int) – the field number to update
- value – the value for the appropriate field
- alpha = None¶
Grid point identification numbers at which dependent degrees-of-freedom are assigned. (Integer > 0)
- cm = None¶
Component numbers of the dependent degrees-of-freedom in the global coordinate system at grid points GMi. (Integers 1 through 6 with no embedded blanks.)
- convert_to_MPC(mpc_id)[source]¶
- \[-A_i u_i + A_j u_j = 0\]
where \(u_i\) are the base DOFs (max=6)
MPC sid g1 c1 a1 g2 c2 a2 RBE2 eid gn cm g1 g2 g3 g4
- eid = None¶
Element identification number
- gn = None¶
Identification number of grid point to which all six independent degrees-of-freedom for the element are assigned. (Integer > 0)
- type = u'RBE2'¶
- class pyNastran.bdf.cards.elements.rigid.RBE3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.rigid.RigidElement
Todo
not done, needs testing badly
eid refgrid refc WtCG_groups = [wt,ci,Gij] Gmi Cmi alpha
- alpha = None¶
thermal expansion coefficient
- type = u'RBE3'¶
All spring elements are defined in this file. This includes:
- CELAS1
- CELAS2
- CELAS3
- CELAS4
All spring elements are SpringElement and Element objects.
- class pyNastran.bdf.cards.elements.springs.CELAS1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.springs.SpringElement
- _field_map = {1: u'eid', 2: u'pid', 4: u'c1', 6: u'c2'}¶
- asterType = u'CELAS1'¶
- c1 = None¶
component number
- pid = None¶
property ID
- type = u'CELAS1'¶
- class pyNastran.bdf.cards.elements.springs.CELAS2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.springs.SpringElement
- _field_map = {1: u'eid', 2: u'k', 4: u'c1', 6: u'c2'}¶
- asterType = u'CELAS2'¶
- c1 = None¶
component number
- ge = None¶
damping coefficient
- k = None¶
stiffness of the scalar spring
- s = None¶
stress coefficient
- type = u'CELAS2'¶
- class pyNastran.bdf.cards.elements.springs.CELAS3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.springs.SpringElement
- _field_map = {1: u'eid', 2: u'pid', 4: u's1', 6: u's2'}¶
- asterType = u'CELAS3'¶
- pid = None¶
property ID
- s1 = None¶
Scalar point identification numbers
- type = u'CELAS3'¶
- class pyNastran.bdf.cards.elements.springs.CELAS4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.elements.springs.SpringElement
- _field_map = {1: u'eid', 2: u'k', 4: u's1', 6: u's2'}¶
- asterType = u'CELAS4'¶
- k = None¶
stiffness of the scalar spring
- s1 = None¶
Scalar point identification numbers
- type = u'CELAS4'¶
All static loads are defined in this file. This includes:
- LSEQ
- DAREA
- SLOAD
- RFORCE
- RANDPS
- class pyNastran.bdf.cards.loads.loads.DAREA(card=None, nOffset=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines scale (area) factors for static and dynamic loads. In dynamic analysis, DAREA is used in conjunction with ACSRCE, RLOADi and TLOADi entries.
DAREA SID P1 C1 A1 P2 C2 A2 DAREA 3 6 2 8.2 15 1 10.1 - type = u'DAREA'¶
- class pyNastran.bdf.cards.loads.loads.LSEQ(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines a sequence of static load sets
Todo
how does this work...
- type = u'LSEQ'¶
- class pyNastran.bdf.cards.loads.loads.Load(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
defines the DefaultLoad class
- type = u'DefLoad'¶
- class pyNastran.bdf.cards.loads.loads.LoadCombination(card, data)[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- loadIDs = None¶
individual loadIDs (corresponds to scaleFactors)
- scale = None¶
overall scale factor
- scaleFactors = None¶
individual scale factors (corresponds to loadIDs)
- sid = None¶
load ID
- class pyNastran.bdf.cards.loads.loads.RANDPS(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.RandomLoad
Power Spectral Density Specification
Defines load set power spectral density factors for use in random analysis having the frequency dependent form:
\[S_{jk}(F) = (X+iY)G(F)\]- j = None¶
Subcase identification number of the excited load set. (Integer > 0)
- k = None¶
Subcase identification number of the applied load set. (Integer >= 0; K >= J)
- sid = None¶
Random analysis set identification number. (Integer > 0) Defined by RANDOM in the Case Control Deck.
- tid = None¶
Identification number of a TABRNDi entry that defines G(F).
- type = u'RANDPS'¶
- x = None¶
Components of the complex number. (Real)
- class pyNastran.bdf.cards.loads.loads.RFORCE(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- type = u'RFORCE'¶
- class pyNastran.bdf.cards.loads.loads.SLOAD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
Static Scalar Load
Defines concentrated static loads on scalar or grid points.
Note
Can be used in statics OR dynamics.
If Si refers to a grid point, the load is applied to component T1 of the displacement coordinate system (see the CD field on the GRID entry).
- sid = None¶
load ID
- type = u'SLOAD'¶
All static loads are defined in this file. This includes:
- LOAD
- GRAV
- ACCEL
- ACCEL1
- FORCE1
- FORCE2
- MOMENT
- PLOAD
- PLOAD2
- PLOAD3
- PLOAD4
- PLOADX1
- class pyNastran.bdf.cards.loads.staticLoads.ACCEL(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Acceleration Load
Defines static acceleration loads, which may vary over a region of the structural model. The load variation is based upon the tabular input defined on this Bulk Data entry.
1 2 3 4 5 6 7 8 9 ACCEL SID CID N1 N2 N3 DIR LOC1 VAL1 LOC2 VAL2 Continues in Groups of 2 - N = None¶
Components of the acceleration vector measured in coordinate system CID. (Real; at least one Ni != 0)
- cid = None¶
Coordinate system identification number. (Integer>0: Default=0)
- dir = None¶
Acceleration vector scale factor. (Real)
- sid = None¶
Load set identification number (Integer>0)
- type = u'ACCEL'¶
- class pyNastran.bdf.cards.loads.staticLoads.ACCEL1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Acceleration Load
Defines static acceleration loads at individual GRID points.
- N = None¶
Components of the acceleration vector measured in coordinate system CID. (Real; at least one Ni != 0)
- cid = None¶
Coordinate system identification number. (Integer>0: Default=0)
- nodes = None¶
nodes to apply the acceleration to
- scale = None¶
Acceleration vector scale factor. (Real)
- sid = None¶
Load set identification number (Integer>0)
- type = u'ACCEL1'¶
- class pyNastran.bdf.cards.loads.staticLoads.FORCE(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Force
FORCE 3 1 100. 0. 0. 1.
- type = u'FORCE'¶
- class pyNastran.bdf.cards.loads.staticLoads.FORCE1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Force
Defines a static concentrated force at a grid point by specification of a magnitude and two grid points that determine the direction.
- type = u'FORCE1'¶
- class pyNastran.bdf.cards.loads.staticLoads.FORCE2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Force
Defines a static concentrated force at a grid point by specification of a magnitude and four grid points that determine the direction.
FORCE2 SID G F G1 G2 G3 G4
- type = u'FORCE2'¶
- class pyNastran.bdf.cards.loads.staticLoads.Force(card, data)[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
Generic class for all Forces
- type = u'Force'¶
- class pyNastran.bdf.cards.loads.staticLoads.GRAV(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.BaseCard
Defines acceleration vectors for gravity or other acceleration loading.:
+------+-----+-----+------+-----+-----+------+-----+
GRAV | SID | CID | A | N1 | N2 | N3 | MB |GRAV 1 3 32.2 0.0 0.0 -1.0 - N = None¶
Acceleration vector components measured in coordinate system CID
- cid = None¶
Coordinate system identification number.
- mb = None¶
Indicates whether the CID coordinate system is defined in the main Bulk Data Section (MB = -1) or the partitioned superelement Bulk Data Section (MB = 0). Coordinate systems referenced in the main Bulk Data Section are considered stationary with respect to the assembly basic coordinate system. See Remark 10. (Integer; Default = 0)
- scale = None¶
scale factor
- sid = None¶
Set identification number
- type = u'GRAV'¶
- class pyNastran.bdf.cards.loads.staticLoads.LOAD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.LoadCombination
- getReducedLoads()[source]¶
Get all load objects in a simplified form, which means all scale factors are already applied and only base objects (no LOAD cards) will be returned.
Todo
lots more object types to support
- organizeLoads(model)[source]¶
Figures out magnitudes of the loads to be applied to the various nodes. This includes figuring out scale factors.
- type = u'LOAD'¶
- class pyNastran.bdf.cards.loads.staticLoads.MOMENT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Moment
Defines a static concentrated moment at a grid point by specifying a scale factor and a vector that determines the direction.:
MOMENT SID G CID M N1 N2 N3 MOMENT 2 5 6 2.9 0.0 1.0 0.0
- type = u'MOMENT'¶
- class pyNastran.bdf.cards.loads.staticLoads.MOMENT1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Moment
Defines a static concentrated moment at a grid point by specifying a magnitude and two grid points that determine the direction.:
MOMENT1 SID G M G1 G2
- type = u'MOMENT1'¶
- class pyNastran.bdf.cards.loads.staticLoads.MOMENT2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.staticLoads.Moment
Defines a static concentrated moment at a grid point by specification of a magnitude and four grid points that determine the direction.:
MOMENT2 SID G M G1 G2 G3 G4
- type = u'MOMENT2'¶
- class pyNastran.bdf.cards.loads.staticLoads.Moment(card, data)[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
Generic class for all Moments
- type = u'Moment'¶
- class pyNastran.bdf.cards.loads.staticLoads.PLOAD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- type = u'PLOAD'¶
- class pyNastran.bdf.cards.loads.staticLoads.PLOAD1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- getReducedLoads()[source]¶
Get all load objects in a simplified form, which means all scale factors are already applied and only base objects (no LOAD cards) will be returned.
Todo
lots more object types to support
- organizeLoads(model)[source]¶
Figures out magnitudes of the loads to be applied to the various nodes. This includes figuring out scale factors.
- type = u'PLOAD1'¶
- validScales = [u'LE', u'FR', u'LEPR', u'FRPR']¶
- validTypes = [u'FX', u'FY', u'FZ', u'FXE', u'FYE', u'FZE', u'MX', u'MY', u'MZ', u'MXE', u'MYE', u'MZE']¶
- class pyNastran.bdf.cards.loads.staticLoads.PLOAD2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- type = u'PLOAD2'¶
- class pyNastran.bdf.cards.loads.staticLoads.PLOAD4(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- cid = None¶
Coordinate system identification number. See Remark 2. (Integer >= 0;Default=0)
- eids = None¶
used for CPENTA, CHEXA
- g1 = None¶
used for solid element only
- g34 = None¶
g3/g4 - different depending on CHEXA/CPENTA or CTETRA
- transformLoad()[source]¶
Warning
sorl=SURF is supported (not LINE)
Warning
ldir=NORM is supported (not X,Y,Z)
- type = u'PLOAD4'¶
- class pyNastran.bdf.cards.loads.staticLoads.PLOADX1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.loads.loads.Load
- type = u'PLOADX1'¶
All bush properties are defined in this file. This includes:
- PBUSH
- PBUSH1D
- PBUSH2D (not implemented)
- PBUSHT (not implemented)
All bush properties are BushingProperty and Property objects.
- class pyNastran.bdf.cards.properties.bush.BushingProperty(card, data)[source]¶
Bases: pyNastran.bdf.cards.baseCard.Property
- type = u'BushingProperty'¶
- class pyNastran.bdf.cards.properties.bush.PBUSH(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.bush.BushingProperty
- _field_map = {1: u'pid'}¶
- pid = None¶
Property ID
- type = u'PBUSH'¶
- class pyNastran.bdf.cards.properties.bush.PBUSH1D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.bush.BushingProperty
- pid = None¶
Property ID
- type = u'PBUSH1D'¶
- class pyNastran.bdf.cards.properties.bush.PBUSH2D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.bush.BushingProperty
- type = u'PBUSH2D'¶
All damper properties are defined in this file. This includes:
- PDAMP
- PDAMP5 (not implemented)
- PDAMPT
- PVISC
All damper properties are DamperProperty and Property objects.
- class pyNastran.bdf.cards.properties.damper.PDAMP(card=None, nPDAMP=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.damper.DamperProperty
- _field_map = {1: u'pid', 2: u'b'}¶
- b = None¶
Force per unit velocity (Real)
- pid = None¶
Property ID
- type = u'PDAMP'¶
- class pyNastran.bdf.cards.properties.damper.PDAMP5(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.damper.DamperProperty
Defines the damping multiplier and references the material properties for damping. CDAMP5 is intended for heat transfer analysis only.
- _field_map = {1: u'pid', 2: u'mid', 3: u'b'}¶
- b = None¶
Damping multiplier. (Real > 0.0) B is the mass that multiplies the heat capacity CP on the MAT4 or MAT5 entry.
- mid = None¶
Material ID
- pid = None¶
Property ID
- type = u'PDAMP5'¶
- class pyNastran.bdf.cards.properties.damper.PDAMPT(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.damper.DamperProperty
- _field_map = {1: u'pid', 2: u'tbid'}¶
- pid = None¶
Property ID
- tbid = None¶
Identification number of a TABLEDi entry that defines the damping force per-unit velocity versus frequency relationship
- type = u'PDAMPT'¶
- class pyNastran.bdf.cards.properties.damper.PVISC(card=None, nPVISC=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.damper.DamperProperty
- _field_map = {1: u'pid', 2: u'ce', 3: u'cr'}¶
- type = u'PVISC'¶
All mass properties are defined in this file. This includes:
- NSM
- PMASS
All mass properties are PointProperty and Property objects.
- class pyNastran.bdf.cards.properties.mass.NSM(card=None, nOffset=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.mass.PointProperty
Defines a set of non structural mass.
- _field_map = {1: u'sid', 2: u'Type', 3: u'id', 4: u'value'}¶
- type = u'NSM'¶
- validProperties = [u'PSHELL', u'PCOMP', u'PBAR', u'PBARL', u'PBEAM', u'PBEAML', u'PBCOMP', u'PROD', u'CONROD', u'PBEND', u'PSHEAR', u'PTUBE', u'PCONEAX', u'PRAC2D']¶
Set points to either Property entries or Element entries. Properties are:
- class pyNastran.bdf.cards.properties.mass.PMASS(card=None, nOffset=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.mass.PointProperty
- _field_map = {1: u'pid', 2: u'mass'}¶
- pid = None¶
Property ID
- type = u'PMASS'¶
- All ungrouped properties are defined in this file. This includes:
- PFAST
- PGAP
- PLSOLID (SolidProperty)
- PSOLID (SolidProperty)
- PRAC2D (CrackProperty)
- PRAC3D (CrackProperty)
- PCONEAX (not done)
- class pyNastran.bdf.cards.properties.properties.PCONEAX(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Property
- _field_map = {1: u'pid', 2: u'mid1', 3: u't1', 4: u'mid2', 5: u'i', 6: u'mid3', 7: u't2', 8: u'nsm', 9: u'z1', 10: u'z2'}¶
- mid1 = None¶
Material ID
- pid = None¶
Property ID
- type = u'PCONEAX'¶
- class pyNastran.bdf.cards.properties.properties.PFAST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Property
- _field_map = {1: u'pid', 2: u'd', 3: u'mcid', 4: u'mflag', 5: u'kt1', 6: u'kt2', 7: u'kt3', 8: u'kr1', 9: u'kr2', 10: u'kr3', 11: u'mass', 12: u'ge'}¶
- d = None¶
diameter of the fastener
- ge = None¶
Structural damping
- kr1 = None¶
Rotational stiffness values in directions 1-3
- kt1 = None¶
stiffness values in directions 1-3
- mass = None¶
Lumped mass of fastener
- mcid = None¶
Specifies the element stiffness coordinate system
- mflag = None¶
0-absolute 1-relative
- pid = None¶
Property ID
- type = u'PFAST'¶
- class pyNastran.bdf.cards.properties.properties.PGAP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.baseCard.Property
Defines the properties of the gap element (CGAP entry).
- _field_map = {1: u'pid', 2: u'u0', 3: u'f0', 4: u'ka', 5: u'kb', 6: u'kt', 7: u'mu1', 8: u'mu2', 9: u'tmax', 10: u'mar', 11: u'trmin'}¶
- f0 = None¶
preload
- ka = None¶
axial stiffness of closed gap
- kb = None¶
axial stiffness of open gap
- kt = None¶
transverse stiffness of closed gap
- mu1 = None¶
static friction coeff
- mu2 = None¶
kinetic friction coeff
- pid = None¶
Property ID
- type = u'PGAP'¶
- u0 = None¶
initial gap opening
- class pyNastran.bdf.cards.properties.properties.PLSOLID(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.properties.SolidProperty
Defines a fully nonlinear (i.e., large strain and large rotation) hyperelastic solid element. PLSOLID PID MID STR PLSOLID 20 21
- _field_map = {1: u'pid', 2: u'mid', 3: u'str'}¶
- mid = None¶
Material ID
- pid = None¶
Property ID
- str = None¶
Location of stress and strain output
- type = u'PLSOLID'¶
- class pyNastran.bdf.cards.properties.properties.PRAC2D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.properties.CrackProperty
CRAC2D Element Property Defines the properties and stress evaluation techniques to be used with the CRAC2D structural element.
- _field_map = {1: u'pid', 2: u'mid', 3: u'thick', 4: u'iPlane', 5: u'nsm', 6: u'gamma', 7: u'phi'}¶
- gamma = None¶
Exponent used in the displacement field. See Remark 4. (Real; Default = 0.5)
- iPlane = None¶
Plane strain or plane stress option. Use 0 for plane strain; 1 for plane stress. (Integer = 0 or 1)
- mid = None¶
Material ID
- nsm = None¶
Non-structural mass per unit area.(Real >= 0.0; Default = 0)
- phi = None¶
Angle (in degrees) relative to the element x-axis along which stress intensity factors are to be calculated. See Remark 4. (Real; Default = 180.0)
- pid = None¶
Property ID
- type = u'PRAC2D'¶
- class pyNastran.bdf.cards.properties.properties.PRAC3D(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.properties.CrackProperty
CRAC3D Element Property Defines the properties of the CRAC3D structural element.
- _field_map = {1: u'pid', 2: u'mid', 3: u'gamma', 4: u'phi'}¶
- gamma = None¶
Exponent used in the displacement field. See Remark 4. (Real; Default = 0.5)
- mid = None¶
Material ID
- phi = None¶
Angle (in degrees) relative to the element x-axis along which stress intensity factors are to be calculated. See Remark 4. (Real; Default = 180.0)
- pid = None¶
Property ID
- type = u'PRAC3D'¶
- class pyNastran.bdf.cards.properties.properties.PSOLID(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.properties.SolidProperty
PSOLID PID MID CORDM IN STRESS ISOP FCTN PSOLID 1 1 0 PSOLID 2 100 6 TWO GRID REDUCED
- _field_map = {1: u'pid', 2: u'mid', 3: u'cordm', 4: u'integ', 5: u'stress', 6: u'isop', 7: u'fctn'}¶
- mid = None¶
Material ID
- pid = None¶
Property ID
- type = u'PSOLID'¶
All shell properties are defined in this file. This includes:
- PCOMP
- PCOMPG
- PLPLANE
- PSHEAR
- PSHELL
All shell properties are ShellProperty and Property objects.
- class pyNastran.bdf.cards.properties.shell.CompositeShellProperty(card, data)[source]¶
Bases: pyNastran.bdf.cards.properties.shell.ShellProperty, pyNastran.bdf.deprecated.DeprecatedCompositeShellProperty
- Material(iply)[source]¶
Gets the material of the \(i^{th}\) ply (not the ID unless it is not cross-referenced).
Parameters: - self – the PCOMP/PCOMPG object
- iply – the ply ID (starts from 0)
- Mid(iply)[source]¶
Gets the Material ID of the \(i^{th}\) ply.
Parameters: - self – the PCOMP/PCOMPG object
- iply – the ply ID (starts from 0)
- Mids()[source]¶
Gets the material IDs of all the plies
Parameters: self – the PCOMP/PCOMPG object Returns mids: the material IDs
- _adjust_ply_id(iply)[source]¶
Gets the ply ID that’s stored in self.plies.
When a ply is not symmetric, this function returns the input iply. When a ply is symmetrical and the iply value is greater than the number of plies, we return the mirrored ply. For the case of a symmetrical ply, the element will always have an even number of layers.
Parameters: - self – the PCOMP object
- iply – the ply ID
Raises: IndexError if iply is invalid
Case 1 (nplies=6, len(plies)=3, lam='SYM'): ply 2 ply 1 ply 0 ------- sym ply 0 / 3 ply 1 / 4 ply 2 / 5 Ask for ply 3, return ply 0 Ask for ply 4, return ply 1 Ask for ply 5, return ply 2 Case 2 (nplies=5, len(plies)=5, lam='NO'): ply 5 ply 4 ply 3 ply 1 ply 0 Ask for ply 3, return ply 1 Ask for ply 4, return ply 2
- cross_reference(model)[source]¶
Links the Material IDs to the materials.
Parameters: - self – the PCOMP/PCOMPG object
- model – a BDF object
- get_density(iply)[source]¶
Gets the density of the \(i^{th}\) ply
Parameters: - self – the PCOMP/PCOMPG object
- iply – the ply ID (starts from 0)
- get_mass_per_area(iply=u'all', method=u'nplies')[source]¶
Gets the Mass/Area for the property.
\[\frac{m}{A} = \sum(\rho t) + nsm\]or
\[\frac{m}{A} - nsm = \sum(\rho t)\]and
\[\frac{m_i}{A} = rho_i t_i + nsm_i\]where \(nsm_i\) is the non-structural mass of the \(i^{th}\) ply
Parameters: - self – the PCOMP object
- iply – the string ‘all’ (default) or the mass per area of the \(i^{th}\) ply
- method –
the method to compute MassPerArea
- Case 1 (iply = all)
method has no effect because the total nsm is defined
- Case 2 (iply != all)
method ‘nplies’ smear the nsm based on \(n_{plies}\) (default)
\(nsm_i = nsm / n_{plies}\) # smear based on nplies
- Case 3 (iply != all)
method ‘rho*t’ smear the nsm based on the mass distribution
\[nsm_i = \rho_i t_i \frac{nsm}{\sum(\rho_i t_i)}\]\[nsm_i = \rho_i t_i \frac{nsm}{\frac{m}{A} - nsm}\] - Case 4 (iply != all)
method ‘t’ smear the nsm based on the thickness distribution
\[nsm_i = t_i \frac{nsm}{\sum(t_i)}\]
- Case 1 (iply = all)
Note
final mass calculation will be done later
- get_mass_per_area_rho(rhos, iply=u'all', method=u'nplies')[source]¶
Gets the Mass/Area for the property.
\[\frac{m}{A} = \sum(\rho t) + nsm\]or
\[\frac{m}{A} - nsm = \sum(\rho t)\]and
\[\frac{m_i}{A} = rho_i t_i + nsm_i\]where \(nsm_i\) is the non-structural mass of the \(i^{th}\) ply
Parameters: - self – the PCOMP object
- iply – the string ‘all’ (default) or the mass per area of the \(i^{th}\) ply
- method –
the method to compute MassPerArea
- Case 1 (iply = all)
method has no effect because the total nsm is defined
- Case 2 (iply != all)
method ‘nplies’ smear the nsm based on \(n_{plies}\) (default)
\(nsm_i = nsm / n_{plies}\) # smear based on nplies
- Case 3 (iply != all)
method ‘rho*t’ smear the nsm based on the mass distribution
\[nsm_i = \rho_i t_i \frac{nsm}{\sum(\rho_i t_i)}\]\[nsm_i = \rho_i t_i \frac{nsm}{\frac{m}{A} - nsm}\] - Case 4 (iply != all)
method ‘t’ smear the nsm based on the thickness distribution
\[nsm_i = t_i \frac{nsm}{\sum(t_i)}\]
- Case 1 (iply = all)
Note
final mass calculation will be done later
- get_nonstructural_mass()[source]¶
Gets the non-structural mass \(i^{th}\) ply
Parameters: self – the PCOMP/PCOMPG object
- get_nplies()[source]¶
Gets the number of plies including the core.
if Lam=SYM: returns nPlies*2 (even) else: returns nPlies
- get_sout(iply)[source]¶
Gets the the flag identifying stress/strain outpur of the \(i^{th}\) ply (not the ID). default=’NO’.
Parameters: - self – the PCOMP/PCOMPG object
- iply – the ply ID (starts from 0)
- get_theta(iply)[source]¶
Gets the ply angle of the \(i^{th}\) ply (not the ID)
Parameters: - self – the PCOMP/PCOMPG object
- iply – the ply ID (starts from 0)
- get_thickness(iply=u'all')[source]¶
Gets the thickness of the \(i^{th}\) ply.
Parameters: - self – the PCOMP object
- iply – the string ‘all’ (default) or the mass per area of the \(i^{th}\) ply
- class pyNastran.bdf.cards.properties.shell.PCOMP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.shell.CompositeShellProperty
PCOMP 701512 0.0+0 1.549-2 0.0+0 0.0+0 SYM 300704 3.7-2 0.0+0 YES 300704 3.7-2 45. YES 300704 3.7-2 -45. YES 300704 3.7-2 90. YES 300705 .5 0.0+0 YES
- TRef = None¶
Reference Temperature (default=0.0)
- _field_map = {1: u'pid', 2: u'z0', 3: u'nsm', 4: u'sb', 5: u'ft', 6: u'TRef', 7: u'ge', 8: u'lam'}¶
- ft = None¶
Failure Theory
[‘HILL’, ‘HOFF’, ‘TSAI’, ‘STRN’, None]
- lam = None¶
symmetric flag - default = No Symmetry (NO)
- nsm = None¶
Non-Structural Mass per unit Area
- pid = None¶
Property ID
- plies = None¶
list of plies
- type = u'PCOMP'¶
- class pyNastran.bdf.cards.properties.shell.PCOMPG(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.shell.CompositeShellProperty
- _field_map = {1: u'pid', 2: u'z0', 3: u'nsm', 4: u'sb', 5: u'ft', 6: u'TRef', 7: u'ge', 8: u'lam'}¶
- type = u'PCOMPG'¶
- class pyNastran.bdf.cards.properties.shell.PLPLANE(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.shell.ShellProperty
- _field_map = {1: u'pid', 2: u'mid', 6: u'cid', 7: u'str'}¶
- pid = None¶
Property ID
- type = u'PLPLANE'¶
- class pyNastran.bdf.cards.properties.shell.PSHEAR(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.shell.ShellProperty
Defines the properties of a shear panel (CSHEAR entry). PSHEAR PID MID T NSM F1 F2
- _field_map = {1: u'pid', 2: u'mid', 3: u't', 4: u'nsm', 5: u'f1', 6: u'f2'}¶
- mid = None¶
Material ID
- pid = None¶
Property ID
- type = u'PSHEAR'¶
- class pyNastran.bdf.cards.properties.shell.PSHELL(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.shell.ShellProperty
PSHELL PID MID1 T MID2 12I/T**3 MID3 TS/T NSM Z1 Z2 MID4 PSHELL 41111 1 1.0000 1 1 0.02081 - _field_map = {1: u'pid', 2: u'mid1', 3: u't', 4: u'mid2', 5: u'twelveIt3', 6: u'mid3', 7: u'tst', 8: u'nsm', 9: u'z1', 10: u'z2'}¶
- mid2 = None¶
Material identification number for bending -1 for plane strin
- nsm = None¶
Non-structural Mass
- pid = None¶
Property ID
- t = None¶
thickness
- twelveIt3 = None¶
Scales the moment of interia of the element based on the moment of interia for a plate
..math:: I = frac{12I}{t^3} I_{plate}
- type = u'PSHELL'¶
- write_code_aster()[source]¶
- http://www.caelinux.org/wiki/index.php/Contrib:KeesWouters/shell/static
- http://www.caelinux.org/wiki/index.php/Contrib:KeesWouters/platedynamics
The angle_rep is a direction angle, use either angle(a,b) or vecteur(x,y,z) coque_ncou is the number of gauss nodes along the thickness, for linear analysis one node is sufficient.
All spring properties are defined in this file. This includes:
- PELAS
- PELAST
All spring properties are SpringProperty and Property objects.
- class pyNastran.bdf.cards.properties.springs.PELAS(card=None, nPELAS=0, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.springs.SpringProperty
Specifies the stiffness, damping coefficient, and stress coefficient of a scalar elastic (spring) element (CELAS1 or CELAS3 entry).
- _field_map = {1: u'pid', 2: u'k', 3: u'ge', 4: u's'}¶
- ge = None¶
Damping coefficient, . See Remarks 5. and 6. (Real) To obtain the damping coefficient GE, multiply the critical damping ratio c/c0 by 2.0.
- k = None¶
Ki Elastic property value. (Real)
- pid = None¶
Property identification number. (Integer > 0)
- s = None¶
Stress coefficient. (Real)
- type = u'PELAS'¶
- class pyNastran.bdf.cards.properties.springs.PELAST(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.properties.springs.SpringProperty
Frequency Dependent Elastic Property Defines the frequency dependent properties for a PELAS Bulk Data entry.
The PELAST entry is ignored in all solution sequences except frequency response (108) or nonlinear analyses (129).
- Tgeid()[source]¶
Returns the table ID for nondimensional structural damping coefficient vs. frequency (c/c0 vs freq)
- _field_map = {1: u'pid', 2: u'tkid', 3: u'tgeid', 4: u'tknid'}¶
- pid = None¶
Property identification number. (Integer > 0)
- tgeid = None¶
Identification number of a TABLEDi entry that defines the nondimensional structural damping coefficient vs. frequency relationship. (Integer > 0; Default = 0)
- tkid = None¶
Identification number of a TABLEDi entry that defines the force per unit displacement vs. frequency relationship. (Integer > 0; Default = 0)
- tknid = None¶
Identification number of a TABELDi entry that defines the nonlinear force vs. displacement relationship. (Integer > 0; Default = 0)
- type = u'PELAST'¶
- class pyNastran.bdf.cards.thermal.loads.QBDY1(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoad
Defines a uniform heat flux into CHBDYj elements.
- eids = None¶
Todo
use expand_thru_by ???
- qFlux = None¶
Heat flux into element (FLOAT)
- sid = None¶
Load set identification number. (Integer > 0)
- type = u'QBDY1'¶
- class pyNastran.bdf.cards.thermal.loads.QBDY2(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoad
Defines a uniform heat flux load for a boundary surface.
- eid = None¶
Identification number of an CHBDYj element. (Integer > 0)
- qFlux = None¶
Heat flux at the i-th grid point on the referenced CHBDYj element. (Real or blank)
- sid = None¶
Load set identification number. (Integer > 0)
- type = u'QBDY2'¶
- class pyNastran.bdf.cards.thermal.loads.QBDY3(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoad
Defines a uniform heat flux load for a boundary surface.
- Q0 = None¶
Heat flux into element
- cntrlnd = None¶
Control point for thermal flux load. (Integer > 0; Default = 0)
- eids = None¶
CHBDYj element identification numbers
- sid = None¶
Load set identification number. (Integer > 0)
- type = u'QBDY3'¶
- class pyNastran.bdf.cards.thermal.loads.QHBDY(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoad
Defines a uniform heat flux into a set of grid points.
- Q0 = None¶
Magnitude of thermal flux into face. Q0 is positive for heat into the surface. (Real)
- af = None¶
Area factor depends on type. (Real > 0.0 or blank)
- grids = None¶
Grid point identification of connected grid points. (Integer > 0 or blank)
- sid = None¶
Load set identification number. (Integer > 0)
- type = u'QHBDY'¶
- class pyNastran.bdf.cards.thermal.loads.TEMP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoad
Defines temperature at grid points for determination of thermal loading, temperature-dependent material properties, or stress recovery.
TEMP SID G1 T1 G2 T2 G3 T3 TEMP 3 94 316.2 49 219.8 - sid = None¶
Load set identification number. (Integer > 0)
- temperatures = None¶
dictionary of temperatures where the key is the grid ID (Gi) and the value is the temperature (Ti)
- type = u'TEMP'¶
- class pyNastran.bdf.cards.thermal.loads.TEMPD(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.loads.ThermalLoadDefault
Defines a temperature value for all grid points of the structural model that have not been given a temperature on a TEMP entry
- temperatures = None¶
dictionary of temperatures where the key is the set ID (SIDi) and the value is the temperature (Ti)
- type = u'TEMPD'¶
- class pyNastran.bdf.cards.thermal.thermal.CHBDYE(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalElement
Defines a boundary condition surface element with reference to a heat conduction element.
- eid = None¶
Surface element ID number for a side of an element. (0 < Integer < 100,000,000)
- eid2 = None¶
A heat conduction element identification
- hexMap = {1: [4, 3, 2, 1], 2: [1, 2, 6, 5], 3: [2, 3, 7, 6], 4: [3, 4, 8, 7], 5: [4, 1, 5, 8], 6: [5, 6, 7, 8]}¶
- iViewBack = None¶
A VIEW entry identification number for the back face
- iViewFront = None¶
A VIEW entry identification number for the front face
- pentMap = {1: [3, 2, 1], 2: [1, 2, 5, 4], 3: [2, 3, 6, 5], 4: [3, 1, 4, 6], 5: [4, 5, 6]}¶
- radMidBack = None¶
RADM identification number for back face of surface element (Integer > 0)
- radMidFront = None¶
RADM identification number for front face of surface element (Integer > 0)
- side = None¶
A consistent element side identification number (1 < Integer < 6)
- sideMaps = {u'CQUAD4': [1, 2, 3, 4], u'CHEXA': {1: [4, 3, 2, 1], 2: [1, 2, 6, 5], 3: [2, 3, 7, 6], 4: [3, 4, 8, 7], 5: [4, 1, 5, 8], 6: [5, 6, 7, 8]}, u'CTETRA': {1: [1, 3, 2], 2: [1, 2, 4], 3: [2, 3, 4], 4: [3, 1, 4]}, u'CTRIA3': [1, 2, 3], u'CPENTA': {1: [3, 2, 1], 2: [1, 2, 5, 4], 3: [2, 3, 6, 5], 4: [3, 1, 4, 6], 5: [4, 5, 6]}}¶
- tetMap = {1: [1, 3, 2], 2: [1, 2, 4], 3: [2, 3, 4], 4: [3, 1, 4]}¶
- type = u'CHBDYE'¶
- class pyNastran.bdf.cards.thermal.thermal.CHBDYG(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalElement
Defines a boundary condition surface element without reference to a property entry.
- Type = None¶
Surface type
- eid = None¶
Surface element ID
- grids = None¶
Grid point IDs of grids bounding the surface (Integer > 0)
- iViewBack = None¶
A VIEW entry identification number for the back face
- iViewFront = None¶
A VIEW entry identification number for the front face
- radMidBack = None¶
RADM identification number for back face of surface element (Integer > 0)
- radMidFront = None¶
RADM identification number for front face of surface element (Integer > 0)
- type = u'CHBDYG'¶
- class pyNastran.bdf.cards.thermal.thermal.CHBDYP(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalElement
Defines a boundary condition surface element with reference to a PHBDY entry
- ce = None¶
Coordinate system for defining orientation vector. (Integer > 0; Default = 0
- e1 = None¶
Components of the orientation vector in coordinate system CE. The origin of the orientation vector is grid point G1. (Real or blank)
- eid = None¶
Surface element ID
- g0 = None¶
Orientation grid point. (Integer > 0; Default = 0)
- g1 = None¶
Grid point identification numbers of grids bounding the surface. (Integer > 0)
- gmid = None¶
Grid point identification number of a midside node if it is used with the line type surface element.
- iViewBack = None¶
A VIEW entry identification number for the back face.
- iViewFront = None¶
A VIEW entry identification number for the front face.
- pid = None¶
PHBDY property entry identification numbers. (Integer > 0)
- radMidBack = None¶
RADM identification number for back face of surface element. (Integer > 0)
- radMidFront = None¶
RADM identification number for front face of surface element. (Integer > 0)
- type = u'CHBDYP'¶
- class pyNastran.bdf.cards.thermal.thermal.CONV(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalBC
Specifies a free convection boundary condition for heat transfer analysis through connection to a surface element (CHBDYi entry).
- TA2 = None¶
Ambient points used for convection 0’s are allowed for TA2 and higher. (Integer > 0 for TA1 and Integer > 0 for TA2 through TA8; Default for TA2 through TA8 is TA1.)
- cntrlnd = None¶
Control point for free convection boundary condition.
- eid = None¶
CHBDYG, CHBDYE, or CHBDYP surface element identification number. (Integer > 0)
- flmnd = None¶
Point for film convection fluid property temperature
- pconID = None¶
Convection property identification number of a PCONV entry
- type = u'CONV'¶
- class pyNastran.bdf.cards.thermal.thermal.CONVM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalBC
Specifies a forced convection boundary condition for heat transfer analysis through connection to a surface element (CHBDYi entry).
- type = u'CONV'¶
- class pyNastran.bdf.cards.thermal.thermal.PCONV(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalProperty
Specifies the free convection boundary condition properties of a boundary condition surface element used for heat transfer analysis.
- ce = None¶
Coordinate system for defining orientation vector. (Integer > 0;Default = 0
- chlen = None¶
Characteristic length
- e1 = None¶
Components of the orientation vector in coordinate system CE. The origin of the orientation vector is grid point G1. (Real or blank)
- expf = None¶
Free convection exponent as implemented within the context of the particular form that is chosen
- form = None¶
Type of formula used for free convection. (Integer 0, 1, 10, 11, 20, or 21)
- ftype = None¶
Formula type for various configurations of free convection
- gidin = None¶
Grid ID of the referenced inlet point
- mid = None¶
Material property identification number. (Integer > 0)
- pconid = None¶
Convection property identification number. (Integer > 0)
- tid = None¶
Identification number of a TABLEHT entry that specifies the two variable tabular function of the free convection heat transfer coefficient
- type = u'PCONV'¶
- class pyNastran.bdf.cards.thermal.thermal.PCONVM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalProperty
Specifies the free convection boundary condition properties of a boundary condition surface element used for heat transfer analysis.
- coef = None¶
Constant coefficient used for forced convection
- exppi = None¶
Prandtl number convection exponent for heat transfer into the workingfluid. (Real > 0.0; Default = 0.0)
- exppo = None¶
Prandtl number convection exponent for heat transfer into the working fluid. (Real > 0.0; Default = 0.0)
- expr = None¶
Reynolds number convection exponent. (Real > 0.0; Default = 0.0)
- flag = None¶
Flag for mass flow convection. (Integer = 0 or 1; Default = 0)
- form = None¶
Type of formula used for free convection. (Integer 0, 1, 10, 11, 20, or 21)
- mid = None¶
Material property identification number. (Integer > 0)
- pconid = None¶
Convection property identification number. (Integer > 0)
- type = u'PCONVM'¶
- class pyNastran.bdf.cards.thermal.thermal.PHBDY(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalProperty
A property entry referenced by CHBDYP entries to give auxiliary geometric information for boundary condition surface elements
- af = None¶
Area factor of the surface used only for CHBDYP element TYPE = ‘POINT’, TYPE = ‘LINE’, TYPE = ‘TUBE’, or TYPE = ‘ELCYL’. For TYPE = ‘TUBE’, AF is the constant thickness of the hollow tube. (Real > 0.0 or blank)
- d1 = None¶
Diameters associated with the surface. Used with CHBDYP element TYPE=’ELCYL’,’TUBE’,’FTUBE’
- pid = None¶
Property identification number. (Unique Integer among all PHBDY entries). (Integer > 0)
- type = u'PHBDY'¶
- class pyNastran.bdf.cards.thermal.thermal.RADBC(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalBC
Specifies an CHBDYi element face for application of radiation boundary conditions
- cntrlnd = None¶
Control point for thermal flux load. (Integer > 0; Default = 0)
- eids = None¶
CHBDYi element identification number
- famb = None¶
Radiation view factor between the face and the ambient point. (Real > 0.0)
- nodamb = None¶
NODAMB Ambient point for radiation exchange. (Integer > 0)
- type = u'RADBC'¶
- class pyNastran.bdf.cards.thermal.thermal.RADM(card=None, data=None, comment=u'')[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalBC
Defines the radiation properties of a boundary element for heat transfer analysis
- radmid = None¶
Material identification number
- type = u'RADM'¶
- class pyNastran.bdf.cards.thermal.thermal.ThermalElement(card, data)[source]¶
Bases: pyNastran.bdf.cards.thermal.thermal.ThermalCard
- pid = 0¶
test Package¶
all_tests Module¶
bdf_test Module¶
bdf_unit_tests Module¶
compare_card_content Module¶
get_uniq_fields Module¶
run_nastran_double_precision Module¶
test_bdf Module¶
test_case_control_deck Module¶
test_field_writer Module¶
test_openmdao Module¶
- class pyNastran.bdf.test.unit.test_assign_type.ExtendedTestCase(methodName='runTest')[source]¶
Bases: unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class pyNastran.bdf.test.unit.test_assign_type.Test(methodName='runTest')[source]¶
Bases: pyNastran.bdf.test.unit.test_assign_type.ExtendedTestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
f06 Package¶
This is the pyNastran.f06.rst file.
f06 Module¶
- class pyNastran.f06.f06.F06(debug=False, log=None)[source]¶
Bases: pyNastran.f06.tables.oes.OES, pyNastran.f06.tables.oef.OEF, pyNastran.f06.tables.oug.OUG, pyNastran.f06.tables.oqg.OQG, pyNastran.f06.tables.lama.LAMA, pyNastran.f06.tables.max_min.MAX_MIN, pyNastran.f06.f06Writer.F06Writer
Initializes the F06 object
Parameters: - makeGeom – reads the BDF tables (default=False)
- debug – prints data about how the F06 was parsed (default=False)
- log – a logging object to write debug messages to
See also
import logging
- Title = None¶
the TITLE in the Case Control Deck
- _element_strain_energies()[source]¶
EIGENVALUE = -3.741384E-04 CYCLES = 3.078479E-03 E L E M E N T S T R A I N E N E R G I E S ELEMENT-TYPE = QUAD4 * TOTAL ENERGY OF ALL ELEMENTS IN PROBLEM = -1.188367E-05 MODE 1 * TOTAL ENERGY OF ALL ELEMENTS IN SET -1 = -1.188367E-05 ELEMENT-ID STRAIN-ENERGY PERCENT OF TOTAL STRAIN-ENERGY-DENSITY 1 -5.410134E-08 -0.0929 -4.328107E-05 2 -3.301516E-09 -0.0057 -2.641213E-06
- _get_grid_point_singularities()[source]¶
G R I D P O I N T S I N G U L A R I T Y T A B L E POINT TYPE FAILED STIFFNESS OLD USET NEW USET ID DIRECTION RATIO EXCLUSIVE UNION EXCLUSIVE UNION 1 G 4 0.00E+00 B F SB S * 1 G 5 0.00E+00 B F SB S *
- _read_f06_subcase_header(n=-2)[source]¶
-4 -> 1 JANUARY 5, 2014 MSC.NASTRAN 11/25/11 PAGE 14 -3 -> DEFAULT -2 -> xxx subcase 1
- _read_f06_table(Format, debug=False)[source]¶
Reads displacement, spc/mpc forces
Parameters: - self – the object pointer
- Format – list of types [int,str,float,float,float] that maps to sline
See also
self.parseLine
- _start_log(log=None, debug=False)[source]¶
Sets up a dummy logger if one is not provided
Self: the object pointer Log: a python logging object Debug: adds debug messages (True/False)
- parseLine(sline, formats)[source]¶
Parameters: - self – the object pointer
- sline – list of strings (split line)
- formats – list of types [int,str,float,float,float] that maps to sline
f06Writer Module¶
- class pyNastran.f06.f06Writer.F06Writer[source]¶
Bases: pyNastran.op2.op2_f06_common.OP2_F06_Common
- write_f06(f06_outname, is_mag_phase=False, delete_objects=True, end_flag=False)[source]¶
Writes an F06 file based on the data we have stored in the object
Parameters: - self – the F06 object
- f06_outname – the name of the F06 file to write
- is_mag_phase – should complex data be written using Magnitude/Phase instead of Real/Imaginary (default=False; Real/Imag) Real objects don’t use this parameter.
- delete_objects – should objects be deleted after they’re written to reduce memory (default=True)
- end_flag – should a dummy Nastran “END” table be made (default=False)
f06_classes Module¶
f06_formatting Module¶
- pyNastran.f06.f06_formatting.get_key0(adict)[source]¶
Gets the “first” key in a dictionary
The entry is kind of irrelevant.
errors Module¶
tables Package¶
grid_point_weight Module¶
defines the GridPointWeight class
- class pyNastran.f06.tables.grid_point_weight.GridPointWeight[source]¶
Bases: object
- read_grid_point_weight(lines)[source]¶
- 0- REFERENCE POINT = 0 1- M O 2- * 2.338885E+05 2.400601E-13 -7.020470E-15 -1.909968E-11 2.851745E+06 -5.229834E+07 * 3- * 2.400601E-13 2.338885E+05 -2.520547E-13 -2.851745E+06 2.151812E-10 2.098475E+08 * 4- * -7.020470E-15 -2.520547E-13 2.338885E+05 5.229834E+07 -2.098475E+08 -1.960403E-10 * 5- * -1.909968E-11 -2.851745E+06 5.229834E+07 2.574524E+10 -5.566238E+10 -4.054256E+09 * 6- * 2.851745E+06 2.151812E-10 -2.098475E+08 -5.566238E+10 2.097574E+11 -2.060162E+09 * 7- * -5.229834E+07 2.098475E+08 -1.960403E-10 -4.054256E+09 -2.060162E+09 2.336812E+11 * 8- S 9- * 1.000000E+00 0.000000E+00 0.000000E+00 *
10- * 0.000000E+00 1.000000E+00 0.000000E+00 * 11- * 0.000000E+00 0.000000E+00 1.000000E+00 * 12- DIRECTION 13- MASS AXIS SYSTEM (S) MASS X-C.G. Y-C.G. Z-C.G. 14- X 2.338885E+05 -8.166148E-17 2.236038E+02 1.219276E+01 15- Y 2.338885E+05 8.972118E+02 9.200164E-16 1.219276E+01 16- Z 2.338885E+05 8.972118E+02 2.236038E+02 -8.381786E-16 17- I(S) 18- * 1.401636E+10 8.739690E+09 1.495636E+09 *
8.739690E+09 2.144496E+10 1.422501E+09 *
- 1.495636E+09 1.422501E+09 3.370946E+10 *
I(Q)
3.389001E+10 *
8.073297E+09 *
2.720748E+10 *
Q- -3.599259E-02 -8.305739E-01 5.557441E-01 *
- -8.850329E-02 -5.512702E-01 -8.296194E-01 *
- 9.954254E-01 -7.904533E-02 -5.366689E-02 *
Note
pyNastran’s BDF mass_properties method uses the following (not totally correct as there technically isn’t one xcg):
DIRECTION- MASS AXIS SYSTEM (S) MASS X-C.G. Y-C.G. Z-C.G.
- X mass 0.000000E+00 ycg zcg Y mass xcg 0.000000E+00 zcg Z nass xcg ycg 0.000000E+00
The inertias are close to I(S), but not exact as the method doesn’t use the mass matrix, but is close for sufficiently complex models. The terms are:
- Ixx Ixy Ixz *
- Iyx Iyy Iyz *
- Izz Izy Izz *
or inertia = [Ixx, Iyy, Izz, Ixy, Ixz, Iyz]
lama Module¶
- class pyNastran.f06.tables.lama.LAMA[source]¶
Bases: object
max_min Module¶
oef Module¶
- class pyNastran.f06.tables.oef.OEF[source]¶
Bases: object
- _forces_in_cquad4s_bilinear()[source]¶
F O R C E S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT - MEMBRANE FORCES - - BENDING MOMENTS - - TRANSVERSE SHEAR FORCES - ID GRID-ID FX FY FXY MX MY MXY QX QY 1 CEN/4 0.0 0.0 0.0 -7.371223E+01 -4.023861E+02 -2.679984E+01 1.315875E+01 -7.356985E+01 1 0.0 0.0 0.0 -1.043592E+02 -3.888291E+02 -2.698050E+01 1.315875E+01 -7.356985E+01 2 0.0 0.0 0.0 -1.036512E+02 -4.152917E+02 -2.731157E+01 1.315875E+01 -7.356985E+01 8 0.0 0.0 0.0 -4.306526E+01 -4.159432E+02 -2.661917E+01 1.315875E+01 -7.356985E+01 7 0.0 0.0 0.0 -4.377329E+01 -3.894806E+02 -2.628810E+01 1.315875E+01 -7.356985E+01
element_type = 33 b/c not bilinear
oes Module¶
- class pyNastran.f06.tables.oes.OES[source]¶
Bases: object
- _get_rod_header(element_name, element_type, is_strain)[source]¶
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 5 (Stress)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- s_code = 0 (Stress)
- num_wide = 8 (???)
- _get_solid_header(element_name, element_type, n, is_strain=True)[source]¶
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 5 (Stress/Strain)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- s_code = 0 (Stress/Strain)
- num_wide = 8 (???)
- _get_tri_header(is_strain)[source]¶
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 5 (Stress)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- s_code = 0 (Stress)
- num_wide = 8 (???)
- _read_bar_stress()[source]¶
ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T ID. SB1 SB2 SB3 SB4 STRESS SB-MAX SB-MIN M.S.-C 12 0.0 0.0 0.0 0.0 1.020730E+04 1.020730E+04 1.020730E+04 0.0 0.0 0.0 0.0 1.020730E+04 1.020730E+04
- _read_rod_stress()[source]¶
S T R E S S E S I N R O D E L E M E N T S ( C R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRESS MARGIN STRESS MARGIN ID. STRESS MARGIN STRESS MARGIN 14 2.514247E+04 1.758725E+02 15 2.443757E+04 2.924619E+01
- _read_spring_stress()[source]¶
S T R A I N S I N S C A L A R S P R I N G S ( C E L A S 2 ) ELEMENT STRAIN ELEMENT STRAIN ELEMENT STRAIN ELEMENT STRAIN ID. ID. ID. ID. 20001 0.0 20002 0.0 20003 0.0 20004 0.0 20005 0.0 20006 0.0
- _read_tri_stress(eType)[source]¶
ELEMENT FIBER STRESSES IN ELEMENT COORD SYSTEM PRINCIPAL STRESSES (ZERO SHEAR) ID. DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES 8 -1.250000E-01 -1.303003E+02 1.042750E+04 -1.456123E+02 -89.2100 1.042951E+04 -1.323082E+02 1.049629E+04 1.250000E-01 -5.049646E+02 1.005266E+04 -2.132942E+02 -88.8431 1.005697E+04 -5.092719E+02 1.032103E+04
- _strain_in_composite_cquad4_elements()[source]¶
S T R E S S E S I N L A Y E R E D C O M P O S I T E E L E M E N T S ( Q U A D 4 ) ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR 181 1 3.18013E+04 5.33449E+05 1.01480E+03 -7.06668E+01 1.90232E+04 89.88 5.33451E+05 3.17993E+04 2.50826E+05 181 2 1.41820E+05 1.40805E+05 1.25412E+05 -1.06000E+02 2.85348E+04 44.88 2.66726E+05 1.58996E+04 1.25413E+05
element_type = 33 b/c not bilinear
- _stress_in_cbar_elements()[source]¶
S T R E S S E S I N B A R E L E M E N T S ( C B A R ) ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T ID. SB1 SB2 SB3 SB4 STRESS SB-MAX SB-MIN M.S.-C 12 0.0 0.0 0.0 0.0 1.020730E+04 1.020730E+04 1.020730E+04 0.0 0.0 0.0 0.0 1.020730E+04 1.020730E+04
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 5 (Stress)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- s_code = 0 (Stress)
- num_wide = 8 (???)
- _stress_in_composite_cquad4_elements()[source]¶
S T R E S S E S I N L A Y E R E D C O M P O S I T E E L E M E N T S ( Q U A D 4 ) ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR 181 1 3.18013E+04 5.33449E+05 1.01480E+03 -7.06668E+01 1.90232E+04 89.88 5.33451E+05 3.17993E+04 2.50826E+05 181 2 1.41820E+05 1.40805E+05 1.25412E+05 -1.06000E+02 2.85348E+04 44.88 2.66726E+05 1.58996E+04 1.25413E+05
element_type = 33 b/c not bilinear
- _stress_in_ctria3_elements()[source]¶
S T R E S S E S I N T R I A N G U L A R E L E M E N T S ( T R I A 3 ) ELEMENT FIBER STRESSES IN ELEMENT COORD SYSTEM PRINCIPAL STRESSES (ZERO SHEAR) ID. DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES 8 -1.250000E-01 -1.303003E+02 1.042750E+04 -1.456123E+02 -89.2100 1.042951E+04 -1.323082E+02 1.049629E+04 1.250000E-01 -5.049646E+02 1.005266E+04 -2.132942E+02 -88.8431 1.005697E+04 -5.092719E+02 1.032103E+04
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 5 (Stress)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- s_code = 0 (Stress)
- num_wide = 8 (???)
- _stress_in_rod_elements(element_name, element_type, result_type)[source]¶
S T R E S S E S I N R O D E L E M E N T S ( C R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRESS MARGIN STRESS MARGIN ID. STRESS MARGIN STRESS MARGIN 14 2.514247E+04 1.758725E+02 15 2.443757E+04 2.924619E+01
- _stress_strain_cquad4_bilinear_helper(element_type, element_num, is_strain=None)[source]¶
S T R E S S E S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT FIBER STRESSES IN ELEMENT COORD SYSTEM PRINCIPAL STRESSES (ZERO SHEAR) ID GRID-ID DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES 6 CEN/4 -1.250000E-01 -4.278394E+02 8.021165E+03 -1.550089E+02 -88.9493 8.024007E+03 -4.306823E+02 8.247786E+03 1.250000E-01 5.406062E+02 1.201854E+04 -4.174177E+01 -89.7916 1.201869E+04 5.404544E+02 1.175778E+04 4 -1.250000E-01 -8.871141E+02 7.576036E+03 -1.550089E+02 -88.9511 7.578874E+03 -8.899523E+02 8.060780E+03 1.250000E-01 -8.924081E+01 1.187899E+04 -4.174177E+01 -89.8002 1.187913E+04 -8.938638E+01 1.192408E+04
- pyNastran.f06.tables.oes.make_stress_bits(is_fiber_distance=False, is_max_shear=True, is_strain=True, is_rod_or_solid=False)[source]¶
Therefore, stress_code can be one of the following values: +——+———+———————————————-+ |Value | On bits | Description | +——+———+———————————————-+ | 0 | 0 0 0 0 | Stress maximum shear or octahedral | | 1 | 0 0 0 1 | Stress von Mises | | 10 | 1 0 1 0 | Strain Curvature maximum shear or octahedral | | 11 | 1 0 1 1 | Strain Curvature von Mises | | 14 | 1 1 1 0 | Strain Fibre maimum shear or octahedral | | 15 | 1 1 1 1 | Strain Fibre von Mises | +——+———+———————————————-+
oload_resultant Module¶
- class pyNastran.f06.tables.oload_resultant.OLOAD_Resultant[source]¶
Bases: object
- write_f06(f, page_stamp, page_num)[source]¶
- 0 OLOAD RESULTANT
- SUBCASE/ LOAD DAREA ID TYPE T1 T2 T3 R1 R2 R3
- 0 1 FX 2.300000E+04 —- —- —- 3.320987E+04 -2.280395E+04
- FY —- 0.000000E+00 —- 0.000000E+00 —- 0.000000E+00 FZ —- —- 0.000000E+00 0.000000E+00 0.000000E+00 —- MX —- —- —- 0.000000E+00 —- —- MY —- —- —- —- 0.000000E+00 —- MZ —- —- —- —- —- 0.000000E+00
TOTALS 2.300000E+04 0.000000E+00 0.000000E+00 0.000000E+00 3.320987E+04 -2.280395E+04
#1 MSC.NASTRAN JOB CREATED ON 28-JAN-12 AT 12:52:32 OCTOBER 22, 2014 MSC.NASTRAN 6/17/05 PAGE 8
oqg Module¶
oug Module¶
- class pyNastran.f06.tables.oug.OUG[source]¶
Bases: object
- _complex_displacement_vector()[source]¶
BACKWARD WHIRL SUBCASE 2 POINT-ID = 101 C O M P L E X D I S P L A C E M E N T V E C T O R (MAGNITUDE/PHASE) FREQUENCY TYPE T1 T2 T3 R1 R2 R3 2.000000E+01 G 3.242295E-16 1.630439E-01 1.630439E-01 1.691497E-17 1.362718E-01 1.362718E-01 196.0668 90.0000 180.0000 63.4349 180.0000 270.0000
- table_code = 1 (Displacement)
- format_code = 3 (Magnitude/Phase)
- sort_bits = [0,1,1] (Sort1,Real/Imaginary,RandomResponse)
- analysis_code = 5 (Frequency)
- sort_code = 2 (Random Response)
- _displacement_vector()[source]¶
- ::
- D I S P L A C E M E N T V E C T O R
- POINT ID. TYPE T1 T2 T3 R1 R2 R3
- 1 G 9.663032E-05 0.0 -2.199001E-04 0.0 -9.121119E-05 0.0 2 G 0.0 0.0 0.0 0.0 0.0 0.0 3 G 0.0 0.0 0.0 0.0 0.0 0.0
- analysis_code = 1 (Statics)
- device_code = 1 (Print)
- table_code = 1 (Displacement)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- num_wide = 8 (???)
- _real_eigenvectors(marker)[source]¶
Reads real eigenvector table accounting for blank entries
Parameters: self – the object pointer - ::
- SUBCASE 1
- EIGENVALUE = 6.158494E+07
- CYCLES = 1.248985E+03 R E A L E I G E N V E C T O R N O . 1
- POINT ID. TYPE T1 T2 T3 R1 R2 R3
- 1 G 2.547245E-17 -6.388945E-16 2.292728E+00 -1.076928E-15 2.579163E-17 0.0
2002 G -6.382321E-17 -1.556607E-15 3.242408E+00 -6.530917E-16 1.747180E-17 0.0 2003 G -6.382321E-17 -1.556607E-15 3.242408E+00 2004 S -6.382321E-17 -1.556607E-15 3.242408E+00
- analysis_code = 2 (Normal modes)
- table_code = 7 (Eigenvector)
- device_code = 1 (Print)
- sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0]
- format_code = 1 (Real)
- #s_code = 0 (Stress)
- num_wide = 8 (???)
- _real_f06_table_data(allow_blanks=False)[source]¶
Reads real displacement/velocity/spc forces/mpc forces Handles GRIDs and SPOINTs.
Parameters: - self – the object pointer
- allow_blanks – Accounting for blank entries (e.g. on eigenvector) default=False
Returns data: the parsed data
Todo
support L, H, and R points
- _temperature_vector()[source]¶
LOAD STEP = 1.00000E+00 T E M P E R A T U R E V E C T O R POINT ID. TYPE ID VALUE ID+1 VALUE ID+2 VALUE ID+3 VALUE ID+4 VALUE ID+5 VALUE 1 S 1.300000E+03 1.300000E+03 1.300000E+03 1.300000E+03 1.300000E+03 1.300000E+03 7 S 1.300000E+03 1.300000E+03 1.300000E+03 1.300000E+03 analysis_code = 1 (Statics) device_code = 1 (Print) table_code = 1 (Displacement/Temperature) sort_code = 0 (Sort2,Real,Sorted Results) => sort_bits = [0,0,0] format_code = 1 (Real) s_code = 0 (Stress) num_wide = 8 (???)
test Package¶
all_tests Module¶
f06_test Module¶
f06_unit_tests Module¶
test_f06 Module¶
test_f06_formatting Module¶
op2 Package¶
This is the pyNastran.op2.rst file.
op2 Module¶
Main OP2 class
- class pyNastran.op2.op2.OP2(debug=True, log=None, debug_file=None)[source]¶
Bases: pyNastran.op2.op2_scalar.OP2_Scalar
Initializes the OP2 object
Parameters: - debug – enables the debug log and sets the debug in the logger (default=False)
- log – a logging object to write debug messages to (.. seealso:: import logging)
- debug_file – sets the filename that will be written to (default=None -> no debug)
- combine_results(combine=True)[source]¶
we want the data to be in the same format and grouped by subcase, so we take
stress = { (1, 'SUPERELEMENT 0') : result1, (1, 'SUPERELEMENT 10') : result2, (1, 'SUPERELEMENT 20') : result3, (2, 'SUPERELEMENT 0') : result4, }
and convert it to:
stress = { 1 : result1 + result2 + results3, 2 : result4, }
- read_op2(op2_filename=None, vectorized=True, combine=True)[source]¶
Starts the OP2 file reading :param op2_filename: the op2_filename (default=None -> popup) :param vectorized: should the vectorized objects be used (default=True) :param combine: should objects be isubcase based (True) or
(isubcase, subtitle) based (False) The second will be used for superelements regardless of the option (default=True)
- set_as_vectorized(ask=False)[source]¶
Enables vectorization
The code will degenerate to dictionary based results when a result does not support vectorization.
Vectorization is always True here. :param ask: Do you want to see a GUI of result types.
Case # Vectorization Ask Read Modes 1 True True 1, 2 2 True False 1, 2 3 False True 1, 2 4 False False 0 - Vectorization - A storage structure that allows for faster read/access
speeds and better memory usage, but comes with a more difficult to use data structure.
It limits the node IDs to all be integers (e.g. element centroid). Composite plate elements (even for just CTRIA3s) with an inconsistent number of layers will have a more difficult data structure. Models with solid elements of mixed type will also be more complicated (or potentially split up).
- Scanning - a quick check used to figure out how many results to process
- that takes almost no time
Reading - process the op2 data Build - call the __init__ on a results object (e.g. DisplacementObject) Start Over - Go to the start of the op2 file Ask - launch a GUI dialog to let the user click which results to load
- The default OP2 dictionary based-approach with no asking GUI
- The first read of a result to get the shape of the data (and result types if vectorization=True or result types if vectorization=False)
- The second read of a result to get the results
- Scan the block to get the size, build the object (read_mode=1), ask the user, start over, fill the objects (read_mode=2). Degenerate to read_mode=0 when read_mode=2 cannot be used based upon the value of ask.
- Same as case #1, but don’t ask the user. Scan the block to get the size, build the object (read_mode=1), start over, fill the objects (read_mode=2).
- Scan the block to get the object types (read_mode=1), ask the user, build the object & fill it (read_mode=2)
- Read the block to get the size, build the object & fill it (read_mode=0)
op2_scalar Module¶
Defines the OP2 class.
- class pyNastran.op2.op2_scalar.OP2_Scalar(debug=False, log=None, debug_file=None)[source]¶
Bases: pyNastran.op2.tables.lama_eigenvalues.lama.LAMA, pyNastran.op2.tables.oee_energy.onr.ONR, pyNastran.op2.tables.opg_appliedLoads.ogpf.OGPF, pyNastran.op2.tables.oef_forces.oef.OEF, pyNastran.op2.tables.oes_stressStrain.oes.OES, pyNastran.op2.tables.ogs.OGS, pyNastran.op2.tables.opg_appliedLoads.opg.OPG, pyNastran.op2.tables.oqg_constraintForces.oqg.OQG, pyNastran.op2.tables.oug.oug.OUG, pyNastran.op2.tables.ogpwg.OGPWG, pyNastran.op2.fortran_format.FortranFormat
Defines an interface for the Nastran OP2 file.
Initializes the OP2_Scalar object
Parameters: - debug – enables the debug log and sets the debug in the logger (default=False)
- log – a logging object to write debug messages to (.. seealso:: import logging)
- debug_file – sets the filename that will be written to (default=None -> no debug)
- _print_month(month, day, year, zero, one)[source]¶
Creates the self.date attribute from the 2-digit year.
Parameters: - month – the month (integer <= 12)
- day – the day (integer <= 31)
- year – the day (integer <= 99)
- zero – a dummy integer (???)
- one – a dummy integer (???)
- _read_dit()[source]¶
Reads the DIT table (poorly). The DIT table stores information about table cards (e.g. TABLED1, TABLEM1).
- _read_kelm()[source]¶
Todo
this table follows a totally different pattern...
The KELM table stores information about the K matrix???
- _read_pcompts()[source]¶
Reads the PCOMPTS table (poorly). The PCOMPTS table stores information about the PCOMP cards???
- _read_tables(table_name)[source]¶
Reads all the geometry/result tables. The OP2 header is not read by this function.
Parameters: table_name – the first table’s name
- _skip_pcompts()[source]¶
Reads the PCOMPTS table (poorly). The PCOMPTS table stores information about the PCOMP cards???
- _skip_table_helper()[source]¶
Skips the majority of geometry/result tables as they follow a very standard format. Other tables don’t follow this format.
- finish()[source]¶
Clears out the data members contained within the self.words variable. This prevents mixups when working on the next table, but otherwise has no effect.
- read_op2(op2_filename=None)[source]¶
Starts the OP2 file reading
Parameters: op2_filename – the op2 file op2_filename Description None a dialog is popped up string the path is used
- read_table_name(rewind=False, stop_on_failure=True)[source]¶
Reads the next OP2 table name (e.g. OUG1, OES1X1)
fortran_format Module¶
- class pyNastran.op2.fortran_format.FortranFormat[source]¶
Bases: object
Parameters: self – the OP2 object pointer - _get_record_length()[source]¶
The record length helps us figure out data block size, which is used to quickly size the arrays. We just need a bit of meta data and can jump around quickly.
- _read_subtable_results(table4_parser, record_len)[source]¶
# if reading the data # 0 - non-vectorized # 1 - 1st pass to size the array (vectorized) # 2 - 2nd pass to read the data (vectorized)
- _stream_record(debug=True)[source]¶
Creates a “for” loop that keeps giving us records until we’re done.
Parameters: self – the OP2 object pointer
- get_nmarkers(n, rewind=True)[source]¶
Gets n markers, so if n=2, it will get 2 markers.
Parameters: - self – the OP2 object pointer
- n – number of markers to get
- rewind – should the file be returned to the starting point
Retval markers: list of [1, 2, 3, ...] markers
- goto(n)[source]¶
Jumps to position n in the file
Parameters: - self – the OP2 object pointer
- n – the position to goto
- isAllSubcases = None¶
stores if the user entered [] for iSubcases
- is_valid_subcase()[source]¶
Lets the code check whether or not to read a subcase
Parameters: self – the OP2 object pointer Retval is_valid: should this subcase defined by self.isubcase be read?
- passer(data)[source]¶
dummy function used for unsupported tables :param self: the OP2 object pointer
- read_block()[source]¶
- Reads a block following a pattern of:
- [nbytes, data, nbytes]
Retval data: the data in binary
- read_markers(markers)[source]¶
Gets specified markers, where a marker has the form of [4, value, 4]. The “marker” corresponds to the value, so 3 markers takes up 9 integers. These are used to indicate position in the file as well as the number of bytes to read.
Parameters: - self – the OP2 object pointer
- markers – markers to get; markers = [-10, 1]
- skip_block()[source]¶
- Skips a block following a pattern of:
- [nbytes, data, nbytes]
Parameters: self – the OP2 object pointer Retval data: since data can never be None, a None value indicates something bad happened.
op2_helper Module¶
- pyNastran.op2.op2_helper.polar_to_real_imag(mag, phase)[source]¶
Converts magnitude-phase to real-imaginary so all complex results are consistent
Parameters: - mag – magnitude c^2
- phase – phase angle phi (degrees; theta)
Returns realValue: the real component a of a+bi
Returns imagValue: the imaginary component b of a+bi
op2_common Module¶
- class pyNastran.op2.op2_common.OP2Common[source]¶
Bases: pyNastran.op2.op2Codes.Op2Codes, pyNastran.f06.f06Writer.F06Writer
- ID = None¶
the corresponding piece to isubcase used only for SORT2 (not supported)
- _parse_sort_code()[source]¶
sort_code sort_bits 0 [0, 0, 0] 1 [0, 0, 1] 2 [0, 1, 0] 3 [0, 1, 1] ... ... 7 [1, 1, 1] - ::
sort_code = 0 -> sort_bits = [0,0,0] sort_code = 1 -> sort_bits = [0,0,1] sort_code = 2 -> sort_bits = [0,1,0] sort_code = 3 -> sort_bits = [0,1,1] etc. sort_code = 7 -> sort_bits = [1,1,1]
sort_bits[0] = 0 -> is_sort1=True isSort2=False sort_bits[1] = 0 -> isReal=True isReal/Imaginary=False sort_bits[2] = 0 -> isSorted=True isRandom=False
- _read_table(data, result_name, storage_obj, real_obj, complex_obj, real_vector, complex_vector, node_elem, random_code=None, is_cid=False)[source]¶
- _table_specs()[source]¶
Value Sort Type Data Format Random ? 0 SORT1 Real No 1 SORT1 Complex No 2 SORT2 Real No 3 SORT2 Complex No 4 SORT1 Real Yes 5 SORT2 Real Yes
- add_data_parameter(data, var_name, Type, field_num, applyNonlinearFactor=True, fixDeviceCode=False, add_to_dict=True)[source]¶
- binary_debug = None¶
op2 debug file or None (for self.debug=False)
- create_transient_object(storageObj, classObj, is_cid=False, debug=False)[source]¶
Creates a transient object (or None if the subcase should be skippied).
Parameters: - storageName – the name of the dictionary to store the object in (e.g. ‘displacements’)
- classObj – the class object to instantiate
- debug – developer debug
Note
dt can also be load_step depending on the class
- data_code = None¶
the storage dictionary that is passed to OP2 objects (e.g. DisplacementObject) the key-value pairs are extracted and used to generate dynamic self variables for the OP2 objects
- debug = None¶
should the op2 debugging file be written
- expected_times = None¶
the list/set/tuple of times/modes/frequencies that should be read currently unused
- is_vectorized = None¶
bool
- isubcase = None¶
current subcase ID non-transient (SOL101) cases have isubcase set to None transient (or frequency/modal) cases have isubcase set to a int/float value
- read_mode = None¶
flag for vectorization 0 - no vectorization 1 - first pass 2 - second pass
- result_names = None¶
the results
- subcases = None¶
set of all the subcases that have been found
- table_name = None¶
The current table_name (e.g. OES1) None indicates no table_name has been read
- words = None¶
the list of “words” on a subtable 3
op2_f06_common Module¶
vector_utils Module¶
- pyNastran.op2.vector_utils.abs_max_min_global(values)[source]¶
This is useful for figuring out absolute max or min principal stresses across single/multiple elements and finding a global max/min value.
Parameters: values (common NDARRAY/list/tuple shapes: 1. [nprincipal_stresses] 2. [nelements, nprincipal_stresses]) – an ND-array of values Returns abs_max_mins: an array of the max or min principal stress - nvalues >= 1
>>> element1 = [0.0, -1.0, 2.0] # 2.0 >>> element2 = [0.0, -3.0, 2.0] # -3.0 >>> values = abs_max_min_global([element1, element2]) >>> values -3.0
>>> element1 = [0.0, -1.0, 2.0] # 2.0 >>> values = abs_max_min_global([element1]) >>> values 2.0
Note
[3.0, 2.0, -3.0] will return 3.0, and [-3.0, 2.0, 3.0] will return 3.0
- pyNastran.op2.vector_utils.abs_max_min_vector(values)[source]¶
This is useful for figuring out principal stresses across multiple elements.
Parameters: values (NDARRAY shape=[nelements, nprincipal_stresses]) – an array of values, where the rows are interated over and the columns are going to be compressed Returns abs_max_mins: an array of the max or min principal stress - ::
>>> element1 = [0.0, 1.0, 2.0] # 2.0 >>> element2 = [0.0, -1.0, 2.0] # 2.0 >>> element3 = [0.0, -3.0, 2.0] # -3.0 >>> values = [element1 element2, element3] >>> values0 = abs_max_min_vectorized(values) >>> values0 [2.0, 2.0, -3.0]
Note
[3.0, 2.0, -3.0] will return 3.0, and [-3.0, 2.0, 3.0] will return 3.0
resultObjects Package¶
op2_Objects Module¶
- class pyNastran.op2.resultObjects.op2_Objects.ScalarObject(data_code, isubcase, apply_data_code=True)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.BaseScalarObject
- append_data_member(var_name, value_name)[source]¶
this appends a data member to a variable that may or may not exist
- print_data_members()[source]¶
Prints out the “unique” vals of the case. Uses a provided list of data_code[‘dataNames’] to set the values for each subcase. Then populates a list of self.name+’s‘ (by using setattr) with the current value. For example, if the variable name is ‘mode’, we make self.modes. Then to extract the values, we build a list of of the variables that were set like this and then loop over them to print their values.
This way there is no dependency on one result type having [‘mode’] and another result type having [‘mode’,’eigr’,’eigi’].
tableObject Module¶
- class pyNastran.op2.resultObjects.tableObject.ComplexTableArray(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.resultObjects.tableObject.ComplexTableObject(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.resultObjects.tableObject.RealTableArray(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.resultObjects.tableObject.RealTableObject(data_code, is_sort1, isubcase, dt)[source]¶
tables Package¶
ogpwg Module¶
- class pyNastran.op2.tables.lama_eigenvalues.lama_objects.BucklingEigenvalues(title)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.BaseScalarObject
- class pyNastran.op2.tables.lama_eigenvalues.lama_objects.ComplexEigenvalues(title)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.BaseScalarObject
- class pyNastran.op2.tables.lama_eigenvalues.lama_objects.RealEigenvalues(title)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.BaseScalarObject
- class pyNastran.op2.tables.oee_energy.oee_objects.RealStrainEnergy(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.ScalarObject
E L E M E N T S T R A I N E N E R G I E S ELEMENT-TYPE = QUAD4 * TOTAL ENERGY OF ALL ELEMENTS IN PROBLEM = 9.817708E+08 SUBCASE 1 * TOTAL ENERGY OF ALL ELEMENTS IN SET 1 = 4.192036E+08 ELEMENT-ID STRAIN-ENERGY PERCENT OF TOTAL STRAIN-ENERGY-DENSITY 12 2.291087E+07 2.3336 2.291087E+02 13 1.582968E+07 1.6124 1.055312E+02 14 6.576075E+07 6.6982 3.288037E+02
- class pyNastran.op2.tables.oef_forces.oef.OEF[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexBendForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexCBarForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexCBeamForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexCBushForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexCShearForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexDamperForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexForce_VU(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexForce_VU_2D(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexPentaPressureForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexPlate2Force(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexPlateForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexRodForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_complexForceObjects.ComplexSpringForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealBendForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCBar100Force(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCBarForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCBeamForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCBushForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCGapForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCShearForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealConeAxForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealConrodForce(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oef_forces.oef_forceObjects.RealRodForce
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealCtubeForce(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oef_forces.oef_forceObjects.RealRodForce
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealDamperForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealForce_VU(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealForce_VU_2D(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealPentaPressureForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealPlateBilinearForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealPlateForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealPlateForceArray(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealRodForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealRodForceArray(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_forceObjects.RealSpringForce(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_Objects.NonlinearFlux(data_code, isubcase, load_step)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_1D(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_2D_3D(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_CHBDYx(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_CONV(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_VU(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oef_forces.oef_thermalObjects.HeatFlux_VUBEAM(data_code, is_sort1, isubcase, dt)[source]¶
Contains the OES class that is used to read stress/strain data
- class pyNastran.op2.tables.oes_stressStrain.oes.OES[source]¶
Bases: pyNastran.op2.op2_common.OP2Common
Defines the OES class that is used to read stress/strain data
- _create_oes_object2(nelements, result_name, result_vector_name, slot, slot_vector, obj, obj_vector)[source]¶
Creates the self.obj parameter based on if this is vectorized or not. :param self: the object pointer :param nelements: the number of elements to preallocate for vectorization :type nelements: integer :param result_name: unused :type result_name: string :param result_vector_name: unused :type result_vector_name: string :param slot: the self dictionary that will be filled with a
non-vectorized resultParameters: - slot_vector – the self dictionary that will be filled with a vectorized result
- obj – a pointer to the non-vectorized class
- obj_vector – a pointer to the vectorized class
Returns auto_return: a flag indicating a return n should be called
Returns result_name: string of result_name or result_vector_name
Since that’s confusing, let’s say we have real CTETRA stress data. We’re going to fill self.solidStress with the class RealSolidStress. If it were vectorized, we’d fill self.ctetra_stress. with RealSolidStressArray. So we call:
- if self._is_vectorized(RealSolidStressArray, self.ctetra_stress):
- if result_vector_name not in self._saved_results:
- return len(data)
- else:
- if result_name not in self._saved_results:
- return len(data)
- auto_return = self._create_oes_object2(self, nelements,
- ‘solidStress’, ‘ctetra_stress’, self.solidStress, self.ctetra_stress, RealSolidStress, RealSolidStressArray)
- if auto_return:
- return nelements * ntotal
- _parse_stress_code()[source]¶
s_code = 0 -> stress_bits = [0,0,0,0,0] s_code = 1 -> stress_bits = [0,0,0,0,1] s_code = 2 -> stress_bits = [0,0,0,1,0] s_code = 3 -> stress_bits = [0,0,0,1,1] etc. s_code = 32 -> stress_bits = [1,1,1,1,1]
stress_bits[0] = 0 -> isMaxShear=True isVonMises=False stress_bits[0] = 1 -> isMaxShear=False isVonMises=True
stress_bits[1] = 0 -> isStress=True isStrain=False stress_bits[2] = 0 -> isFiberCurvature=True isFiberDistance=False stress_bits[3] = 0 -> duplicate of Bit[1] (stress/strain) stress_bits[4] = 0 -> material coordinate system flag
- class pyNastran.op2.tables.oes_stressStrain.oes_nonlinear.HyperelasticQuad(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.oes_nonlinear.NonlinearQuad(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.oes_nonlinear.NonlinearRod(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- write_f06(header, page_stamp, page_num=1, f=None, is_mag_phase=False)[source]¶
ELEMENT-ID = 102 N O N L I N E A R S T R E S S E S I N R O D E L E M E N T S ( C R O D ) TIME AXIAL STRESS EQUIVALENT TOTAL STRAIN EFF. STRAIN EFF. CREEP LIN. TORSIONAL STRESS PLASTIC/NLELAST STRAIN STRESS 2.000E-02 1.941367E+01 1.941367E+01 1.941367E-04 0.0 0.0 0.0 3.000E-02 1.941367E+01 1.941367E+01 1.941367E-04 0.0 0.0 0.0
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_bars.ComplexBarStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- # s_code=10
- S T R A I N S I N B A R E L E M E N T S ( C B A R )
- ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T
- ID. SB1 SB2 SB3 SB4 STRAIN SB-MAX SB-MIN M.S.-C
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_bars.ComplexBarStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- # s_code=0
- C O M P L E X S T R E S S E S I N B A R E L E M E N T S ( C B A R )
- (MAGNITUDE/PHASE)
- ELEMENT LOCATION LOCATION LOCATION LOCATION AVERAGE
ID. 1 2 3 4 AXIAL STRESS
- 1 ENDA 9.331276E+04 9.331276E+04 9.331276E+04 9.331276E+04 0.0
- 180.0000 0.0 0.0 180.0000 0.0
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_bush.ComplexBushStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- # s_code=10
- S T R A I N S I N B A R E L E M E N T S ( C B A R )
- ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T
- ID. SB1 SB2 SB3 SB4 STRAIN SB-MAX SB-MIN M.S.-C
- _ComplexBushStrain__write_f06_transient(header, page_stamp, page_num=1, f=None, is_mag_phase=False)¶
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_bush.ComplexBushStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- # s_code=0
- C O M P L E X S T R E S S E S I N B A R E L E M E N T S ( C B A R )
- (MAGNITUDE/PHASE)
- ELEMENT LOCATION LOCATION LOCATION LOCATION AVERAGE
ID. 1 2 3 4 AXIAL STRESS
- 1 ENDA 9.331276E+04 9.331276E+04 9.331276E+04 9.331276E+04 0.0
- 180.0000 0.0 0.0 180.0000 0.0
- _ComplexBushStress__write_f06_transient(header, page_stamp, page_num=1, f=None, is_mag_phase=False)¶
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_bush1d.ComplexBush1DStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- # s_code=0
- C O M P L E X S T R E S S E S I N B A R E L E M E N T S ( C B A R )
- (MAGNITUDE/PHASE)
- ELEMENT LOCATION LOCATION LOCATION LOCATION AVERAGE
ID. 1 2 3 4 AXIAL STRESS
- 1 ENDA 9.331276E+04 9.331276E+04 9.331276E+04 9.331276E+04 0.0
- 180.0000 0.0 0.0 180.0000 0.0
- _ComplexBush1DStress__write_f06_transient(header, page_stamp, page_num=1, f=None, is_mag_phase=False)¶
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# ??? - is this just 11 ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID. CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=11 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID GRID-ID CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=15 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) ELEMENT FIBER STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID. DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=10 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) MAX ID GRID-ID CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR SHEAR
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
C O M P L E X S T R E S S E S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 8 ) (REAL/IMAGINARY) ELEMENT FIBRE - STRESSES IN ELEMENT COORDINATE SYSTEM - ID GRID-ID DISTANCE NORMAL-X NORMAL-Y SHEAR-XY
- 0 100 CEN/8 -2.500000E-02 0.0 / 0.0 0.0 / 0.0 0.0 / 0.0
- 2.500000E-02 0.0 / 0.0 0.0 / 0.0 0.0 / 0.0
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.complex.oes_plates.ComplexPlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_rods.ComplexRodDamper(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_rods.ComplexRodStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_rods.ComplexRodStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_shear.ComplexShearStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_shear.ComplexShearStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# format_code=1 sort_code=0 stressCode=0 S T R E S S E S I N S H E A R P A N E L S ( C S H E A R ) ELEMENT MAX AVG SAFETY ELEMENT MAX AVG SAFETY ID. SHEAR SHEAR MARGIN ID. SHEAR SHEAR MARGIN 328 1.721350E+03 1.570314E+03 7.2E+01
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.complex.oes_solids.ComplexSolidArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_springs.ComplexCelasStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.complex.oes_springs.ComplexCelasStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
S T R E S S E S I N S C A L A R S P R I N G S ( C E L A S 2 ) TIME STRESS TIME STRESS TIME STRESS TIME STRESS 0.0 0.0 5.000000E-02 0.0 1.000000E-01 0.0 1.500000E-01 0.0 2.000000E-01 0.0 2.500000E-01 0.0 3.000000E-01 0.0 3.500000E-01 0.0
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- add_new_eid(eType, dt, eid, s1a, s2a, s3a, s4a, axial, smaxa, smina, MSt, s1b, s2b, s3b, s4b, smaxb, sminb, MSc)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# s_code=10 S T R A I N S I N B A R E L E M E N T S ( C B A R ) ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T ID. SB1 SB2 SB3 SB4 STRAIN SB-MAX SB-MIN M.S.-C
- add_new_eid(eType, dt, eid, e1a, e2a, e3a, e4a, axial, emaxa, emina, MSt, e1b, e2b, e3b, e4b, emaxb, eminb, MSc)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# s_code=0 S T R E S S E S I N B A R E L E M E N T S ( C B A R ) ELEMENT SA1 SA2 SA3 SA4 AXIAL SA-MAX SA-MIN M.S.-T ID. SB1 SB2 SB3 SB4 STRESS SB-MAX SB-MIN M.S.-C
- add_new_eid(eType, dt, eid, s1a, s2a, s3a, s4a, axial, smaxa, smina, MSt, s1b, s2b, s3b, s4b, smaxb, sminb, MSc)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_bars.RealBarArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
[1,0,0] S T R E S S E S I N B E A M E L E M E N T S ( C B E A M ) STAT DIST/ ELEMENT-ID GRID LENGTH SXC SXD SXE SXF S-MAX S-MIN M.S.-T M.S.-C 1 1 0.000 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04 2 1.000 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04 -3.125000E+04
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealBeamArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealNonlinearBeamArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealNonlinearBeamStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_beams.RealNonlinearBeamArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bush.RealBushStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- _RealBushStrain__write_f06_transient(header, page_stamp, page_num=1, f=None, is_mag_phase=False)¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bush.RealBushStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_bush1d.RealBush1DStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- # s_code=0
- C O M P L E X S T R E S S E S I N B A R E L E M E N T S ( C B A R )
- (MAGNITUDE/PHASE)
- ELEMENT LOCATION LOCATION LOCATION LOCATION AVERAGE
ID. 1 2 3 4 AXIAL STRESS
- 1 ENDA 9.331276E+04 9.331276E+04 9.331276E+04 9.331276E+04 0.0
- 180.0000 0.0 0.0 180.0000 0.0
- class pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
??? ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR
- add_f06_data(data, transient, eType)[source]¶
S T R E S S E S I N L A Y E R E D C O M P O S I T E E L E M E N T S ( Q U A D 4 ) ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR 151 1 -1.02406E+04 4.18348E+05 4.14359E+02 -8.62021E+00 1.86352E+04 89.94 4.18348E+05 -1.02410E+04 2.14295E+05
- add_new_eid(eType, dt, eid, layer, e11, e22, e12, e1z, e2z, angle, majorP, minorP, evm)[source]¶
all points are located at the centroid
- class pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# s_code = 0 S T R E S S E S I N L A Y E R E D C O M P O S I T E E L E M E N T S ( Q U A D 4 ) ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR
- add_f06_data(data, transient, eType)[source]¶
S T R E S S E S I N L A Y E R E D C O M P O S I T E E L E M E N T S ( Q U A D 4 ) ELEMENT PLY STRESSES IN FIBER AND MATRIX DIRECTIONS INTER-LAMINAR STRESSES PRINCIPAL STRESSES (ZERO SHEAR) MAX ID ID NORMAL-1 NORMAL-2 SHEAR-12 SHEAR XZ-MAT SHEAR YZ-MAT ANGLE MAJOR MINOR SHEAR 151 1 -1.02406E+04 4.18348E+05 4.14359E+02 -8.62021E+00 1.86352E+04 89.94 4.18348E+05 -1.02410E+04 2.14295E+05
- add_new_eid(eType, dt, eid, layer, o11, o22, t12, t1z, t2z, angle, majorP, minorP, ovm)[source]¶
all points are located at the centroid
- class pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_compositePlates.RealCompositePlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_gap.NonlinearGapStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object(data_code, isubcase, apply_data_code=True)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object_Deprecated, pyNastran.op2.resultObjects.op2_Objects.ScalarObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object_Deprecated[source]¶
Bases: object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject(data_code, isubcase)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject_Deprecated, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject_Deprecated[source]¶
Bases: object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject(data_code, isubcase)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject_Deprecated, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- add_new_eid(etype, dt, eid, node_id, fiber_dist, oxx, oyy, txy, angle, majorP, minorP, ovm)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# ??? - is this just 11 ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID. CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=11 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID GRID-ID CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=15 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) ELEMENT FIBER STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) ID. DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES # s_code=10 S T R A I N S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT STRAIN STRAINS IN ELEMENT COORD SYSTEM PRINCIPAL STRAINS (ZERO SHEAR) MAX ID GRID-ID CURVATURE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR SHEAR
- class pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
ELEMENT FIBER STRESSES IN ELEMENT COORD SYSTEM PRINCIPAL STRESSES (ZERO SHEAR) ID. DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR VON MISES 6 CEN/4 -1.250000E-01 -4.278394E+02 8.021165E+03 -1.550089E+02 -88.9493 8.024007E+03 -4.306823E+02 4.227345E+03 1.250000E-01 5.406062E+02 1.201854E+04 -4.174177E+01 -89.7916 1.201869E+04 5.404544E+02 5.739119E+03 S T R E S S E S I N Q U A D R I L A T E R A L E L E M E N T S ( Q U A D 4 ) OPTION = BILIN ELEMENT FIBER STRESSES IN ELEMENT COORD SYSTEM PRINCIPAL STRESSES (ZERO SHEAR) MAX ID GRID-ID DISTANCE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR SHEAR 6 CEN/4 -1.250000E-01 -4.278394E+02 8.021165E+03 -1.550089E+02 -88.9493 8.024007E+03 -4.306823E+02 4.227345E+03 1.250000E-01 5.406062E+02 1.201854E+04 -4.174177E+01 -89.7916 1.201869E+04 5.404544E+02 5.739119E+03
- add_new_eid(etype, dt, eid, node_id, fiber_dist, oxx, oyy, txy, angle, majorP, minorP, ovm)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_plates.RealPlateArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.ConrodStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStrain
- eType = u'CONROD'¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.ConrodStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStress
- eType = u'CONROD'¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.CtubeStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStrain
- eType = u'CTUBE'¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.CtubeStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStress
- eType = u'CTUBE'¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealBushStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# s_code=1 S T R A I N S I N R O D E L E M E N T S ( C R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRAIN MARGIN STRAIN MARGIN # s_code=10 S T R A I N S I N R O D E L E M E N T S ( C O N R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRAIN MARGIN STRAIN MARGIN ID. STRAIN MARGIN STRAIN MARGIN 1001 1.000000E+00 1.0E+00 1.250000E+00 3.0E+00 1007 1.000000E+00 1.0E+00 1.250000E+00 3.0E+00
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# format_code=1 stressCode=0 S T R E S S E S I N R O D E L E M E N T S ( C R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRESS MARGIN STRESS MARGIN ID. STRESS MARGIN STRESS MARGIN 1 5.000000E+03 0.0 2 0.0 0.0 # format_code=1 stressCode=0 S T R E S S E S I N R O D E L E M E N T S ( C R O D ) ELEMENT AXIAL SAFETY TORSIONAL SAFETY ELEMENT AXIAL SAFETY TORSIONAL SAFETY ID. STRESS MARGIN STRESS MARGIN ID. STRESS MARGIN STRESS MARGIN
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RealRodArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_rods.RodDamper(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- class pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# format_code=1 sort_code=0 stressCode=0 S T R E S S E S I N S H E A R P A N E L S ( C S H E A R ) ELEMENT MAX AVG SAFETY ELEMENT MAX AVG SAFETY ID. SHEAR SHEAR MARGIN ID. SHEAR SHEAR MARGIN 328 1.721350E+03 1.570314E+03 7.2E+01
- class pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_shear.RealShearArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.OES_Object
- add_eid_sort1(eType, cid, dt, eid, node_id, oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, aCos, bCos, cCos, pressure, ovm)[source]¶
- class pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# code=[1,0,11] S T R A I N S I N H E X A H E D R O N S O L I D E L E M E N T S ( H E X A ) CORNER ------CENTER AND CORNER POINT STRESSES--------- DIR. COSINES MEAN ELEMENT-ID GRID-ID NORMAL SHEAR PRINCIPAL -A- -B- -C- PRESSURE VON MISES 1 0GRID CS 8 GP CENTER X 4.499200E+02 XY -5.544791E+02 A 1.000000E+04 LX 0.00 0.69-0.72 -3.619779E+03 9.618462E+03 Y 4.094179E+02 YZ 5.456968E-12 B -1.251798E+02 LY 0.00 0.72 0.69 Z 1.000000E+04 ZX -4.547474E-13 C 9.845177E+02 LZ 1.00 0.00 0.00 # code=[1,0,10] S T R A I N S I N T E T R A H E D R O N S O L I D E L E M E N T S ( C T E T R A ) CORNER ------CENTER AND CORNER POINT STRAINS--------- DIR. COSINES MEAN OCTAHEDRAL ELEMENT-ID GRID-ID NORMAL SHEAR PRINCIPAL -A- -B- -C- PRESSURE SHEAR 4 0GRID CS 4 GP CENTER X -2.288232E-04 XY 1.240506E-04 A 9.631978E-04 LX-0.10-0.71-0.70 -1.601805E-04 5.692614E-04 Y -2.289814E-04 YZ -2.369997E-04 B -2.909276E-04 LY-0.10 0.71-0.70 Z 9.383460E-04 ZX -2.369997E-04 C -1.917288E-04 LZ 0.99 0.00-0.15
- add_eid(eType, cid, dt, eid, node_id, exx, eyy, ezz, exy, eyz, exz, e1, e2, e3, aCos, bCos, cCos, pressure, evm)[source]¶
- add_eid_sort1(eType, cid, dt, eid, node_id, exx, eyy, ezz, exy, eyz, exz, e1, e2, e3, aCos, bCos, cCos, pressure, evm)[source]¶
- add_node(dt, eid, inode, node_id, exx, eyy, ezz, exy, eyz, exz, e1, e2, e3, aCos, bCos, cCos, pressure, evm)[source]¶
- add_node_sort1(dt, eid, inode, node_id, exx, eyy, ezz, exy, eyz, exz, e1, e2, e3, aCos, bCos, cCos, pressure, evm)[source]¶
- pressure(e1, e2, e3)[source]¶
returns the hydrostatic pressure (e1+e2+e3)/-3. http://en.wikipedia.org/wiki/Stress_%28mechanics%29
- processF06Data()[source]¶
S T R E S S E S I N P E N T A H E D R O N S O L I D E L E M E N T S ( P E N T A ) CORNER ------CENTER AND CORNER POINT STRESSES--------- DIR. COSINES MEAN ELEMENT-ID GRID-ID NORMAL SHEAR PRINCIPAL -A- -B- -C- PRESSURE VON MISES 2 0GRID CS 6 GP CENTER X -1.829319E+03 XY 7.883865E+01 A 1.033182E+04 LX-0.12 0.71 0.70 -2.115135E+03 1.232595E+04 Y -1.825509E+03 YZ -1.415218E+03 B -2.080181E+03 LY-0.12 0.69-0.71 Z 1.000023E+04 ZX -1.415218E+03 C -1.906232E+03 LZ 0.99 0.16 0.00
- class pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidStrainArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# s_code=0 N O N L I N E A R S T R E S S E S I N T E T R A H E D R O N S O L I D E L E M E N T S ( T E T R A ) ELEMENT GRID/ POINT STRESSES/ TOTAL STRAINS EQUIVALENT EFF. STRAIN EFF. CREEP ID GAUSS ID X Y Z XY YZ ZX STRESS PLAS/NLELAS STRAIN 3 GRID CENTER 6.6667E+02 2.6667E+03 2.6667E+03 -1.3333E+03 2.6667E+03 -1.3333E+03 6.0000E+03 1.5000E-04 0.0 1.6667E-05 6.6667E-05 6.6667E-05 -6.6667E-05 1.3333E-04 -6.6667E-05
# s_code=1 S T R E S S E S I N H E X A H E D R O N S O L I D E L E M E N T S ( H E X A ) CORNER ------CENTER AND CORNER POINT STRESSES--------- DIR. COSINES MEAN ELEMENT-ID GRID-ID NORMAL SHEAR PRINCIPAL -A- -B- -C- PRESSURE VON MISES 1 0GRID CS 8 GP CENTER X 4.499200E+02 XY -5.544791E+02 A 1.000000E+04 LX 0.00 0.69-0.72 -3.619779E+03 9.618462E+03 Y 4.094179E+02 YZ 5.456968E-12 B -1.251798E+02 LY 0.00 0.72 0.69 Z 1.000000E+04 ZX -4.547474E-13 C 9.845177E+02 LZ 1.00 0.00 0.00
- add_eid(eType, cid, dt, eid, node_id, oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, aCos, bCos, cCos, pressure, ovm)[source]¶
- add_eid_sort1(eType, cid, dt, eid, node_id, oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, aCos, bCos, cCos, pressure, ovm)[source]¶
- add_node(dt, eid, inode, node_id, oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, aCos, bCos, cCos, pressure, ovm)[source]¶
- add_node_sort1(dt, eid, inode, node_id, oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, aCos, bCos, cCos, pressure, ovm)[source]¶
- pressure(o1, o2, o3)[source]¶
returns the hydrostatic pressure (o1+o2+o3)/-3. http://en.wikipedia.org/wiki/Stress_%28mechanics%29
- processF06Data()[source]¶
S T R E S S E S I N P E N T A H E D R O N S O L I D E L E M E N T S ( P E N T A ) CORNER ------CENTER AND CORNER POINT STRESSES--------- DIR. COSINES MEAN ELEMENT-ID GRID-ID NORMAL SHEAR PRINCIPAL -A- -B- -C- PRESSURE VON MISES 2 0GRID CS 6 GP CENTER X -1.829319E+03 XY 7.883865E+01 A 1.033182E+04 LX-0.12 0.71 0.70 -2.115135E+03 1.232595E+04 Y -1.825509E+03 YZ -1.415218E+03 B -2.080181E+03 LY-0.12 0.69-0.71 Z 1.000023E+04 ZX -1.415218E+03 C -1.906232E+03 LZ 0.99 0.16 0.00
- class pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidStressArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_solids.RealSolidArray, pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_springs.NonlinearSpringStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_springs.RealCelasStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
- class pyNastran.op2.tables.oes_stressStrain.real.oes_springs.RealCelasStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
S T R E S S E S I N S C A L A R S P R I N G S ( C E L A S 2 ) TIME STRESS TIME STRESS TIME STRESS TIME STRESS 0.0 0.0 5.000000E-02 0.0 1.000000E-01 0.0 1.500000E-01 0.0 2.000000E-01 0.0 2.500000E-01 0.0 3.000000E-01 0.0 3.500000E-01 0.0
- class pyNastran.op2.tables.oes_stressStrain.real.oes_triax.RealTriaxStrain(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StrainObject
# format_code=1 sort_code=0 stressCode=0 S T R A I N S I N T R I A X 6 E L E M E N T S ELEMENT GRID ID STRAINS IN MATERIAL COORD SYSTEM MAX MAG MAX VON MISES ID RADIAL AZIMUTHAL AXIAL SHEAR PRINCIPAL SHEAR 5351 0 -9.726205E+02 -1.678908E+03 -1.452340E+03 -1.325111E+02 -1.678908E+03 3.702285E+02 6.654553E+02 4389 -9.867789E+02 -1.624276E+03 -1.388424E+03 -9.212539E+01 -1.624276E+03 3.288099E+02 5.806334E+02
- class pyNastran.op2.tables.oes_stressStrain.real.oes_triax.RealTriaxStress(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.oes_stressStrain.real.oes_objects.StressObject
# format_code=1 sort_code=0 stressCode=0 S T R E S S E S I N T R I A X 6 E L E M E N T S ELEMENT GRID ID STRESSES IN MATERIAL COORD SYSTEM MAX MAG MAX VON MISES ID RADIAL AZIMUTHAL AXIAL SHEAR PRINCIPAL SHEAR 5351 0 -9.726205E+02 -1.678908E+03 -1.452340E+03 -1.325111E+02 -1.678908E+03 3.702285E+02 6.654553E+02 4389 -9.867789E+02 -1.624276E+03 -1.388424E+03 -9.212539E+01 -1.624276E+03 3.288099E+02 5.806334E+02
- class pyNastran.op2.tables.ogf_gridPointForces.ogf_Objects.ComplexGridPointForces(data_code, is_sort1, isubcase, freq=None)[source]¶
- class pyNastran.op2.tables.ogf_gridPointForces.ogs_surfaceStresses.GridPointStresses(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.ogf_gridPointForces.ogs_surfaceStresses.GridPointStressesArray(data_code, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.ScalarObject
msg = header + [‘ S T R E S S E S A T G R I D P O I N T S - - S U R F A C E 5- ‘,
- ‘0 SURFACE X-AXIS X NORMAL(Z-AXIS) Z REFERENCE COORDINATE SYSTEM FOR SURFACE DEFINITION CID 0
- ‘,
- ‘ GRID ELEMENT STRESSES IN SURFACE SYSTEM PRINCIPAL STRESSES MAX
- ‘,
- ‘ ID ID FIBRE NORMAL-X NORMAL-Y SHEAR-XY ANGLE MAJOR MINOR SHEAR VON MISES
- ‘]
- #‘0 13683 3736 TRIAX6 4.996584E+00 0.0 1.203093E+02 0.0 0.0 0.0’ #’ 13683 3737 TRIAX6 -4.996584E+00 0.0 -1.203093E+02 0.0 0.0 0.0’ #’ 13683 TOTALS 6.366463E-12 0.0 -1.364242E-12 0.0 0.0 0.0’
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.ComplexLoadVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.ComplexLoadVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealLoadVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealLoadVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealThermalLoadVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealThermalVector
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealThermalVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealThermalVelocityVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.opg_appliedLoads.opg_loadVector.RealThermalVector
- class pyNastran.op2.tables.opg_appliedLoads.opg_Objects.AppliedLoadsVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.opg_appliedLoads.opg_Objects.ComplexAppliedLoadsVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.opg_appliedLoads.opg_Objects.AppliedLoadsVectorArray
- class pyNastran.op2.tables.opg_appliedLoads.opg_Objects.RealAppliedLoads(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.opg_appliedLoads.opg_Objects.RealAppliedLoadsVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.tables.opg_appliedLoads.opg_Objects.AppliedLoadsVectorArray
- class pyNastran.op2.tables.opg_appliedLoads.opnl_forceVector.ComplexForceVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.opg_appliedLoads.opnl_forceVector.ComplexForceVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.opg_appliedLoads.opnl_forceVector.RealForceVector(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.opg_appliedLoads.opnl_forceVector.RealForceVectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oqg_constraintForces.oqg_mpcForces.ComplexMPCForces(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_mpcForces.ComplexMPCForcesArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oqg_constraintForces.oqg_mpcForces.RealMPCForces(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_mpcForces.RealMPCForcesArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oqg_constraintForces.oqg_spcForces.ComplexSPCForces(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_spcForces.ComplexSPCForcesArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oqg_constraintForces.oqg_spcForces.RealSPCForces(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_spcForces.RealSPCForcesArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oqg_constraintForces.oqg_thermalGradientAndFlux.ComplexTemperatureGradientAndFlux(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_thermalGradientAndFlux.RealTemperatureGradientAndFlux(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oqg_constraintForces.oqg_thermalGradientAndFlux.RealTemperatureGradientAndFluxArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- This file defines the OUG Table, which contains:
- Real/Complex Displacement
- Real/Complex Acceleration
- Real/Complex Velocity
- Real/Complex Eigenvectors
- Real Temperature
- class pyNastran.op2.tables.oug.oug_accelerations.ComplexAcceleration(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oug.oug_accelerations.ComplexAccelerationArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oug.oug_accelerations.RealAcceleration(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oug.oug_accelerations.RealAccelerationArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oug.oug_displacements.ComplexDisplacement(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oug.oug_displacements.ComplexDisplacementArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oug.oug_displacements.RealDisplacement(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oug.oug_displacements.RealDisplacementArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oug.oug_eigenvectors.ComplexEigenvector(data_code, is_sort1, isubcase, iMode)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oug.oug_eigenvectors.ComplexEigenvectorArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oug.oug_eigenvectors.Eigenvector(data_code, is_sort1, isubcase, imode)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
EIGENVALUE = 6.158494E+07 CYCLES = 1.248985E+03 R E A L E I G E N V E C T O R N O . 1 POINT ID. TYPE T1 T2 T3 R1 R2 R3 1 G 2.547245E-17 -6.388945E-16 2.292728E+00 -1.076928E-15 2.579163E-17 0.0 2002 G -6.382321E-17 -1.556607E-15 3.242408E+00 -6.530917E-16 1.747180E-17 0.0 2003 G 0.0 0.0 0.0 0.0 0.0 0.0
- read_f06_data(data_code, data)[source]¶
it is now assumed that all data coming in is correct, so...
- so...
[node_id, grid_type, t1, t2, t3, r1, r2, r3] [100, ‘G’, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0] # valid
[101, ‘S’, 1.0, 2.0] # invalid [101, ‘S’, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0] # valid [102, ‘S’, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0] # valid
is no longer valid
- update_mode(data_code, imode)[source]¶
this method is called if the object already exits and a new time step is found
- write_f06(header, page_stamp, page_num=1, f=None, is_mag_phase=False)[source]¶
EIGENVALUE = 6.158494E+07 CYCLES = 1.248985E+03 R E A L E I G E N V E C T O R N O . 1 POINT ID. TYPE T1 T2 T3 R1 R2 R3 1 G 2.547245E-17 -6.388945E-16 2.292728E+00 -1.076928E-15 2.579163E-17 0.0 2002 G -6.382321E-17 -1.556607E-15 3.242408E+00 -6.530917E-16 1.747180E-17 0.0 2003 G 0.0 0.0 0.0 0.0 0.0 0.0
- class pyNastran.op2.tables.oug.oug_eigenvectors.RealEigenvector(data_code, isubcase, iMode)[source]¶
Bases: pyNastran.op2.resultObjects.op2_Objects.ScalarObject
R E A L E I G E N V E C T O R N O . 1 POINT ID. TYPE T1 T2 T3 R1 R2 R3 1 G 0.0 0.0 0.0 0.0 1.260264E-01 0.0 7 G 9.999849E-01 0.0 6.728968E-03 0.0 8.021386E-03 0.0
- write_f06(header, page_stamp, page_num=1, f=None, is_mag_phase=False)[source]¶
EIGENVALUE = 6.158494E+07 R E A L E I G E N V E C T O R N O . 1 POINT ID. TYPE T1 T2 T3 R1 R2 R3 1 G 2.547245E-17 -6.388945E-16 2.292728E+00 -1.076928E-15 2.579163E-17 0.0 2002 G -6.382321E-17 -1.556607E-15 3.242408E+00 -6.530917E-16 1.747180E-17 0.0 2003 G 0.0 0.0 0.0 0.0 0.0 0.0
- class pyNastran.op2.tables.oug.oug_eigenvectors.RealEigenvectorArray(data_code, is_sort1, isubcase, dt, f06_flag=False)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- read_f06_data(data_code, lines)[source]¶
it is assumed that all data coming in is correct, so...
[node_id, grid_type, t1, t2, t3, r1, r2, r3] [100, ‘G’, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0] # valid
[101, ‘S’, 1.0, 2.0] # invalid [101, ‘S’, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0] # valid [102, ‘S’, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0] # valid
- class pyNastran.op2.tables.oug.oug_temperatures.RealTemperature(data_code, is_sort1, isubcase, dt)[source]¶
- class pyNastran.op2.tables.oug.oug_temperatures.RealTemperatureArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
- class pyNastran.op2.tables.oug.oug_velocities.ComplexVelocity(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableObject
- class pyNastran.op2.tables.oug.oug_velocities.ComplexVelocityArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.ComplexTableArray
- class pyNastran.op2.tables.oug.oug_velocities.RealVelocity(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableObject
- class pyNastran.op2.tables.oug.oug_velocities.RealVelocityArray(data_code, is_sort1, isubcase, dt)[source]¶
Bases: pyNastran.op2.resultObjects.tableObject.RealTableArray
test Package¶
all_tests Module¶
op2_test Module¶
op2_unit_tests Module¶
test_op2 Module¶
- pyNastran.op2.test.test_op2.parse_table_names_from_F06(f06Name)[source]¶
gets the op2 names from the f06
__init__ Module¶
__init__ Module¶
utils Package¶
This is the pyNastran.utils.rst file.
gui_choices Module¶
gui_io Module¶
- pyNastran.utils.gui_io.load_file_dialog(Title, wx_wildcard, qt_wildcard, dirname='')[source]¶
creates a load file dialog in wx or PyQt4/PySide
log Module¶
- class pyNastran.utils.log.SimpleLogger(level='debug', log_func=<function stderr_logging at 0x7fec9cb76f50>)[source]¶
Bases: object
Simple logger object. In future might be changed to use Python logging module. Two levels are supported: ‘debug’ and ‘info’. Info level discards debug messages, ‘debug’ level displays all messages.
Note
Logging module is currently not supported because I don’t know how to repoint the log file if the program is called a second time. Poor logging can result in:
- double logging to a single file
- all longging going to one file
This is really only an issue when calling logging multiple times, such as in an optimization loop or testing.
Parameters: - level – level of logging: ‘info’ or ‘debug’
- log_func – funtion that will be used to print log. It should take one argument: string that is produces by a logger. Default: print messages to stderr using @see stderr_logging function.
- msg_typ(typ, msg)[source]¶
Log message of a given type :param typ: type of a message (e.g. INFO) :param msg: message to be logged
- pyNastran.utils.log.get_logger(log=None, level='debug')[source]¶
This function is useful as it will instantiate a simpleLogger object if log=None. :param log: a logger object or None :param level: level of logging: ‘info’ or ‘debug’
- pyNastran.utils.log.get_logger2(log=None, debug=True)[source]¶
This function is useful as it will instantiate a SimpleLogger object if log=None. :param log: a python logging module object;
if log is set, debug is ignored and uses the settings the logging object hasParameters: debug – 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 Returns log: log or a SimpleLogger
mathematics Module¶
dev Module¶
- pyNastran.utils.dev.get_files_of_type(dirname, extension='.txt', maxSize=100.0)[source]¶
Gets the list of all the files with a given extension in the specified directory
Parameters: - dirname – the directory name
- extension – list of filetypes to get (default=’.txt’)
- maxSize – size in MB for max file size
Returns: list of all the files with a given extension in the specified directory
- pyNastran.utils.dev.list_print(lst, float_fmt='%-4.2f')[source]¶
Prints a list, numpy array, or numpy matrix in an abbreviated format. Supported element types: None, string, numbers. Useful for debugging.
Parameters: lst – list, numpy array or numpy matrix Returns: the clean string representation of the object
__init__ Module¶
- pyNastran.utils.__init__.__object_attr(obj, mode, attr_type)[source]¶
list object attributes of a given type
- pyNastran.utils.__init__.is_binary_file(filename)[source]¶
Return true if the given filename is binary.
Raises: IOError if the file cannot be opened. Returns: True if filename is a binary file (contains null byte) and False otherwise. Based on the idea (.. seealso:: http://bytes.com/topic/python/answers/21222-determine-file-type-binary-text) that file is binary if it contains null.
Warning
this may not work for unicode.
- pyNastran.utils.__init__.object_attributes(obj, mode='public')[source]¶
List the names of attributes of a class as strings. Returns public attributes as default.
Parameters: - obj – the object for checking
- mode – defines what kind of attributes will be listed * “public” - names that do not begin with underscore * “private” - names that begin with single underscore * “both” - private and public * “all” - all attributes that are defined for the object
Returns: sorted list of the names of attributes of a given type or None if the mode is wrong
- pyNastran.utils.__init__.object_methods(obj, mode='public')[source]¶
List the names of methods of a class as strings. Returns public methods as default.
Parameters: - obj – the object for checking
- mode – defines what kind of methods will be listed * “public” - names that do not begin with underscore * “private” - names that begin with single underscore * “both” - private and public * “all” - all methods that are defined for the object
Returns: sorted list of the names of methods of a given type or None if the mode is wrong
- pyNastran.utils.__init__.print_bad_path(path)[source]¶
Prints information about the existence (access possibility) of the parts of the given path. Useful for debugging when the path to a given file is wrong.
Parameters: path – path to check Returns: string with informations whether access to parts of the path is possible
- pyNastran.utils.__init__.write_object_attributes(name, obj, nspaces=0, nbase=0, isClass=True, debug=False)[source]¶
Writes a series of nested objects
test Package¶
test_utils Module¶
- class pyNastran.utils.test.test_utils.B(b)[source]¶
Bases: pyNastran.utils.test.test_utils.A
- c = 7¶
converters Package¶
cart3d Module¶
LaWGS Module¶
nastran Module¶
panair Module¶
shabp Module¶
stl Module¶
tetgen Module¶
usm3d Module¶
nastran Package¶
cart3dIO Module¶
cart3d_reader Module¶
- class pyNastran.converters.cart3d.cart3d_reader.Cart3DReader(log=None, debug=False)[source]¶
Bases: object
- get_normals(nodes, elements, shift_nodes=True)[source]¶
Gets the centroidal normals
Parameters: - self – The reader object
- nodes – the ndarray of nodes
- elements – the ndarray of triangles
- shift_nodes – boolean to shift element IDs such that the node IDs start at 0 instead of 1 True : nodes start at 1 False : nodes start at 0
Retval cnormals: the ndarray of normalized centroidal normal vectors
- get_normals_at_nodes(nodes, elements, cnormals, shift_nodes=True)[source]¶
Gets the nodal normals
Parameters: - self – The reader object
- nodes – the ndarray of nodes
- elements – the ndarray of triangles
- cnormals – the ndarray of normalized centroidal normal vectors
- shift_nodes – boolean to shift element IDs such that the node IDs start at 0 instead of 1 True : nodes start at 1 False : nodes start at 0
Retval nnormals: the ndarray of normalized nodal normal vectors
- isOutwardNormals = True¶
- isStructured = False¶
- make_half_model(nodes, elements, regions, loads=None, axis='y', remap_nodes=True)[source]¶
Makes a half model from a full model
... note:: Cp is really loads[‘Cp’] and was meant for loads analysis only
- make_mirror_model(nodes, elements, regions, loads, axis='y', tol=1e-06)[source]¶
Makes a full cart3d model about the given axis.
Parameters: - nodes – the nodes; (nnodes, 3) ndarray
- elements – the elmements; (nelements, 3) ndarray
- regions – the regions; (nelements) ndarray
- loads – not supported; dictionary of (nnodes) ndarray
- axis – a string of “x”, “y”, “z”, “-x”, “-y”, “-z”
- tol – the tolerance for the centerline points (default=0.000001)
- modelType = 'cart3d'¶
- read_elements_ascii(bypass=False)[source]¶
An element is defined by n1,n2,n3 and the ID is the location in elements.
- read_results_ascii(i, infile, result_names=None)[source]¶
Reads the Cp results. Results are read on a nodal basis from the following table:
Cp rho,rhoU,rhoV,rhoW,rhoE- With the following definitions:
- Cp = (p - 1/gamma) / (0.5*M_inf*M_inf) rhoVel^2 = rhoU^2+rhoV^2+rhoW^2 M^2 = rhoVel^2/rho^2
- Thus:
- p = (gamma-1)*(e- (rhoU**2+rhoV**2+rhoW**2)/(2.*rho)) p_dimensional = qInf * Cp + pInf
# ??? rho,rhoU,rhoV,rhoW,rhoE
Parameters: result_names – the results to read; default=None -> All result_names = [‘Cp’, ‘rho’, ‘rhoU’, ‘rhoV’, ‘rhoW’, ‘rhoE’,
‘Mach’, ‘U’, ‘V’, ‘W’, ‘E’]
- pyNastran.converters.cart3d.cart3d_reader._get_list(sline)[source]¶
Takes a list of strings and converts them to floats.
- pyNastran.converters.cart3d.cart3d_reader.comp2tri(self, in_filenames, out_filename, is_binary=False, float_fmt='%6.7f')[source]¶
Combines multiple Cart3d files (binary or ascii) into a single file.
Parameters: - in_filenames – list of filenames
- out_filename – output filename
- is_binary – is the output filename binary (default=False)
- float_fmt – the format string to use for ascii writing (default=’%6.7f’)
Note
assumes loads is None
cart3d_to_stl Module¶
cart3d_to_nastran Module¶
- pyNastran.converters.cart3d.cart3d_to_nastran.cart3d_to_nastran_filename(cart3d_filename, bdf_filename, log=None, debug=False)[source]¶
Converts a Cart3D file to STL format.
Parameters: - cart3d_filename – path to the input Cart3D file
- bdf_filename – path to the output BDF file
- log – a logger object (or None)
- debug – True/False (used if log is not defined)
test_cart3d Module¶
nastran Package¶
wgsIO Module¶
wgsReader Module¶
- class pyNastran.converters.LaWGS.wgsReader.LaWGS(filename='tmx1242.wgs')[source]¶
Bases: object
- modelType = 'LaWGS'¶
- class pyNastran.converters.LaWGS.wgsReader.LaWGS_Panel(key, header, group)[source]¶
Bases: object
Parameters: - rotate – rotates the patch
- translate – translates the patch
- scale – scales the patch
nastran Package¶
agps Module¶
panairGrid Module¶
- class pyNastran.converters.panair.panairGrid.PanairGrid(log=None, debug=True)[source]¶
Bases: object
- _read_circular_section(section)[source]¶
@code $circular sections - nacelle with composite panels =kn 2. =kt 1. =nopt netname 0. cowlu =nm 20. =xs(1) ri(1) xs(2) ri(2) xs(*) ri(*)
2.0000 2.3000 1.5756 2.3000 1.1486 2.3000 0.7460 2.3030 0.4069 2.3286 0.1624 2.3790 0.0214 2.4542 -0.0200 2.5485 0.0388 2.6522 0.2056 2.7554 0.4869 2.8522 0.8883 2.9413 1.4250 3.0178 2.1188 3.0656 2.9586 3.0658 3.8551 3.0175 4.6715 2.9439 5.3492 2.8700 6.0000 2.7842 6.4687 2.7442=nn 5. =th(1) th(2) th(3) th(4) th(5) -90. -45. 0. 45. 90. @endcode
- _read_points(section)[source]¶
@code $points - wing-body with composite panels =kn cpnorm 4. 2. =kt 1. =nm nn netname 11. 3. winga =x(1,1) y(1,1) z(1,1) x(,) y(,) z(,)
69.4737 9.2105 0.0000 63.7818 9.5807 0.7831@endcode
- _read_printout(section)[source]¶
@code isings igeomp isingp icontp ibconp iedgep ipraic nexdgn ioutpr ifmcpr icostp @endcode
- _read_reference_quantities(section)[source]¶
$references for accumulated forces and moments =xref yref zref nref 46. 0. 0. =sref bref cref dref 2400. 60. 40. 90.
- _read_symmetry(section)[source]¶
@code $symmetry - xz plane of symmetry =misymm mjsymm 1. 0. @endcode
- @warning
- doesnt consider antisymmetryic
- _read_trailing_wakes(section)[source]¶
@code $trailing wakes from body =kn cpnorm 2. =kt matcw 18. 1. =inat insd xwake twake netname bodyl 3. 100. .0 bodylwk bodyu 3. 100. .0 bodyuwk @endcode
- modelType = 'panair'¶
panairGridPatch Module¶
- class pyNastran.converters.panair.panairGridPatch.PanairPatch(iNetwork, netName, kt, cpNorm, x, y, z, log)[source]¶
Bases: object
- get_edge(edgeNumber)[source]¶
gets all the points associated with a given edge
edge1 0 1 2 -> i (row) edge4 3 4 5 6 7 8 edge2 9 10 11 | edge3 j
- class pyNastran.converters.panair.panairGridPatch.PanairWakePatch(iNetwork, netName, options, x, y, z, log)[source]¶
Bases: pyNastran.converters.panair.panairGridPatch.PanairPatch
panairIO Module¶
nastran Package¶
shabp_io Module¶
shabp_results Module¶
nastran Package¶
tetgen_io Module¶
tetgen_reader Module¶
- class pyNastran.converters.tetgen.tetgen_reader.TetgenReader(log=None, debug=False)[source]¶
Bases: object
http://www.wias-berlin.de/preprint/1762/wias_preprints_1762.pdf
nastran Package¶
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 ???? -
#——————————– 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
6Poin1 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
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
usm3d_io Module¶
usm3d_reader Module¶
- class pyNastran.converters.usm3d.usm3d_reader.Usm3dReader(log=None, debug=None)[source]¶
Bases: object
- 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_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