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: int = 0, debug: bool = False, 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: CORD, coords: Dict[int, CORD], nid_cd: NDArrayN2int, icd_transform: Dict[int, CORD], xyz_cid0: NDArrayN3float, summation_point: Optional[NDArray3float] = None, consider_rxf: bool = True, itime: int = 0, assume_sorted: bool = False, stop_on_nan: bool = False, debug: bool = False, log: Optional[SimpleLogger] = None, idtype: str = 'int32') → 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

assume_sortedbool; default=False

sorts the nodes/elements if they’re not is sorting required?

Returns
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(nids: np.ndarray, xyz_cid0: np.ndarray, nid_cd: NDArrayN2int, icd_transform: Dict[int, NDArrayNint], eids: np.ndarray, element_centroids_cid0: NDArrayN3float, stations: NDArrayNfloat, coords: Dict[int, CORD], coord_out: CORD, iaxis_march: Optional[NDArray3float] = None, itime: int = 0, icoord: int = None, nodes_tol: Optional[float] = None, stop_on_nan: bool = False, debug: bool = False, log: Optional[SimpleLogger] = None) → Tuple[NDArray3float, NDArray3float, Dict[int, CORD], NDArrayNint, NDArrayNint][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, where a station is the value of coord_out in the idir (e.g., for station=1, cid=0, idir=0, then x=1). It is necessary that the spacing is constant. Stations should be sorted (negative to positive), but it not necessary (it makes it easier to see a monotonic change in the number of nodes/elements). Try to avoid picking exactly on symmetry planes/boundaries of elements or nodes.

coord_outCORD2R()

the output coordinate system

iaxis_march(3,) float narray; default=None -> coord_out.i

the normalized x-axis that defines the direction to march

icoordint; default=None -> coord_out+1

the starting index for the coordinate systems that will be created and placed in new_coords; useful for debugging

nodes_tolfloat; default=None -> dstation

the tolerance bending the plane to pull nodes from

Returns
force_sum / moment_sum(nstations, 3) float ndarray

the forces/moments at the station

new_coords: Dict[int, CORD2R]

the station march coords starting from icoord

nelems, nnodes: (nstations,) int ndarray

the number of elements/nodes included in the summation

Notes

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

  2. Get the nodes on the opposite side of the clip plane and the ones within nodes_tol of the plane.

  3. 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_file, 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(op2: OP2)[source]

Bases: object

property factor
property size