ogf_gridPointForces Package

ogf_objects Module

Inheritance diagram of pyNastran.op2.tables.ogf_gridPointForces.ogf_objects
class pyNastran.op2.tables.ogf_gridPointForces.ogf_objects.ComplexGridPointForcesArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.tables.ogf_gridPointForces.ogf_objects.GridPointForces

build()[source]

sizes the vectorized attributes of the ComplexGridPointForcesArray

build_dataframe()[source]

major-axis - the axis

mode 1 2 3 freq 1.0 2.0 3.0 nodeID ElementID Item 1 2 T1

major_axis / top = [

[1, 2, 3], [1.0, 2.0, 3.0]

] minor_axis / headers = [T1, T2, T3, R1, R2, R3] name = mode

property element_name
get_headers() → List[str][source]
get_stats(short: bool = False) → List[str][source]
property is_complex
property is_real
write_f06(f06_file, header=None, page_stamp='PAGE %s', page_num: int = 1, is_mag_phase: bool = False, is_sort1: bool = True)[source]
write_op2(op2_file, op2_ascii, itable, new_result, date, is_mag_phase=False, endian='>')[source]

writes an OP2

class pyNastran.op2.tables.ogf_gridPointForces.ogf_objects.GridPointForces(data_code, is_sort1, isubcase)[source]

Bases: pyNastran.op2.result_objects.op2_objects.BaseElement

class pyNastran.op2.tables.ogf_gridPointForces.ogf_objects.RealGridPointForcesArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.tables.ogf_gridPointForces.ogf_objects.GridPointForces

G R I D P O I N T F O R C E B A L A N C E

POINT-ID ELEMENT-ID SOURCE T1 T2 T3 R1 R2 R3

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

assert_equal(table, rtol=1e-05, atol=1e-08)[source]
build() → None[source]

sizes the vectorized attributes of the RealGridPointForcesArray

build_dataframe() → None[source]

major-axis - the axis

mode 1 2 3 freq 1.0 2.0 3.0 nodeID ElementID Item 1 2 T1

major_axis / top = [

[1, 2, 3], [1.0, 2.0, 3.0]

] minor_axis / headers = [T1, T2, T3, R1, R2, R3] name = mode

property element_name
extract_freebody_loads(eids: NDArrayNint, coord_out: CORD, coords: Dict[int, CORD], nid_cd: NDArrayN2int, icd_transform: Dict[int, NDArrayNint], itime=0, debug=True, log: Optional[SimpleLogger] = None)[source]

Extracts Patran-style freebody loads. Freebody loads are the external loads.

Parameters
eids(Nelements, ) int ndarray

all the elements to consider

coord_outCORD2R()

the output coordinate system

coordsdict[int] = CORDx

all the coordinate systems key : int value : CORDx

nid_cd(Nnodes, 2) int ndarray

the (BDF.point_ids, cd) array

icd_transformdict[cd] = (Nnodesi, ) int ndarray

the mapping for nid_cd

summation_point(3, ) float ndarray

the summation point in output??? coordinate system

itimeint; default=0

the time to extract loads for

debugbool; default=False

debugging flag

loglog; default=None

a log object that gets used when debug=True

Returns
force_out(Nnodes, 3) float ndarray

the ith float components in the coord_out coordinate frame

moment_out(Nnodes, 3) float ndarray

the ith moment components about the summation point in the coord_out coordinate frame

Todo

doesn’t seem to handle cylindrical/spherical systems ..

Warning

not done ..

extract_interface_loads(nids: NDArrayNint, eids: NDArrayNint, coord_out, coords, nid_cd, icd_transform, xyz_cid0: NDArrayN3float, summation_point: Optional[NDArray3float] = None, consider_rxf: bool = True, itime: int = 0, debug: bool = False, log: Optional[SimpleLogger] = None) → Tuple[NDArray3float, NDArray3float][source]

Extracts Patran-style interface loads. Interface loads are the internal loads at a cut.

Parameters
nids(Nnodes, ) int ndarray

all the nodes to consider; must be sorted

eids(Nelements, ) int ndarray

all the elements to consider; must be sorted

coord_outCORD2R()

the output coordinate system

coordsdict[int] = CORDx

all the coordinate systems key : int value : CORDx

nid_cd(Nnodes, 2) int ndarray

the (BDF.point_ids, cd) array

icd_transformdict[cd] = (Nnodesi, ) int ndarray

the mapping for nid_cd

xyz_cid0(nnodes + nspoints + nepoints, 3) ndarray

the grid locations in coordinate system 0

summation_point0(3, ) float ndarray; default=None

None : no load summation array : the summation point in the global frame

consider_rxfbool; default=True

considers the r x F term

itimeint; default=0

the time to extract loads for

debugbool; default=False

debugging flag

loggerlogger; default=None

a logger object that gets used when debug=True

Returns
force_out(Nnodes, 3) float ndarray

the ith float components in the coord_out coordinate frame

moment_out(Nnodes, 3) float ndarray

the ith moment components about the summation point in the coord_out coordinate frame

force_out_sum(3, ) float ndarray

the sum of forces in the coord_out coordinate frame

moment_out_sum(3, ) float ndarray

the sum of moments about the summation point in the coord_out coordinate frame

Todo

doesn’t seem to handle cylindrical/spherical systems ..

Todo

Add support for: 2D output style:

  • This would allow for shell problems to have loads applied in the plane of the shells

  • This would require normals

1D output style:
  • Make loads in the direction of the element

This process can’t be done for 0D or 3D elements

finalize() → bool[source]

required so the OP2 writer works…

find_centroid_of_load(f, m)[source]

Mx = ry*Fz - rz*Fy My = rz*Fx - rx*Fz Mz = rx*Fy - ry*Fx

{M} = [F]{r} [F] = [

[ 0, -Fy, Fz], [-Fz, 0, Fx], [ Fy, -Fx, 0],

] {r} = [F]^-1 {M}

When the determinant of [F] is nonzero (2D):

Life is easy

When the determinant of [F] is zero: When Fx != Fy != Fz and they don’t equal 0 there are 3 solutions:

where M=[0, 0, 0]

det([F]) = 0:

[F]{x} = [lambda]{x}

where one of the eigenvalues is 0? (the trivial case) and

However, [F] is singular, so let rx=0: Mx = ry*Fz - rz*Fy My = rz*Fx Mz = -ry*Fx let Fx=0, so ry, rz != 0, but My=Mz=0 -> ry = rz*Fy/Fz let rz = 1 -> ry = Fy/Fz <0, Fy/Fz, 1>

get_headers() → List[str][source]
get_stats(short: bool = False) → List[str][source]
property is_complex
property is_real
shear_moment_diagram(xyz_cid0, eids, nids, icd_transform, element_centroids_cid0, coords, nid_cd, stations, coord_out, idir=0, itime=0, debug=False, log=None)[source]

Computes a series of forces/moments at various stations along a structure.

Parameters
xyz_cid0(Nnodes, 3) float ndarray

all the nodes in the model xyz position in the global frame

eids(Nelements, ) int ndarray

an array of element ids to consider

nids(Nnodes, ) int ndarray

an array of node ids corresponding to xyz_cid0

icd_transformdict[cd] = (Nnodesi, ) int ndarray

the mapping for nid_cd

element_centroids_cid0(Nelements, 3) float ndarray

an array of element centroids corresponding to eids

coordsdict[int] = CORDx

all the coordinate systems key : int value : CORDx

nid_cd(Nnodes, 2) int ndarray

the (BDF.point_ids, cd) array

stations(nstations, ) float ndarray

the station to sum forces/moments about be careful of picking exactly on symmetry planes/boundaries of elements or nodes this list should be sorted (negative to positive)

coord_outCORD2R()

the output coordinate system

idirint; default=0

the axis of the coordinate system to consider as the axial direction

Notes

  1. Clip elements based on centroid. Elements that are less than the ith station are kept.

2. Get the nodes for those elements. 3a. Extract the freebody loads and sum them about the

summation point (todo).

3b. Extract the interface loads and sum them about the

summation point.

Examples

Imagine a swept aircraft wing. Define a coordinate system in the primary direction of the sweep. Note that station 0 doesn’t have to be perfectly at the root of the wing.

Create stations from this point.

Todo

Not Tested…Does 3b work? Can 3a give the right answer?

write_csv(csv_file, is_mag_phase=False)[source]
write_f06(f06_file, header=None, page_stamp='PAGE %s', page_num: int = 1, is_mag_phase: bool = False, is_sort1: bool = True)[source]
write_f06_time(f06_file, itime=0, i=None, header=None, page_num=1, page_stamp='')[source]
write_op2(op2, op2_ascii, itable, new_result, date, is_mag_phase=False, endian='>')[source]

writes an OP2

ogpf Module

Inheritance diagram of pyNastran.op2.tables.ogf_gridPointForces.ogpf
Defines the Real/Complex Forces created by:

GPFORCE = ALL

class pyNastran.op2.tables.ogf_gridPointForces.ogpf.OGPF[source]

Bases: pyNastran.op2.op2_interface.op2_common.OP2Common