pyyeti.cb.mk_net_drms¶
- pyyeti.cb.mk_net_drms(Mcb, Kcb, bset, *, bsubset=None, uset=None, ref=[0, 0, 0], sccoord=None, conv=None, reorder=False, g=386.08858267716533, tau='g', rbe3_indep_dof=None)[source]¶
Form common data recovery matrices for “net” interface responses.
The Craig-Bampton model is referred to as “spacecraft” or “s/c”. The system is referred to as “launch vehicle” or “l/v”. All arguments after bset must be named.
- Parameters:
Mcb (2d ndarray) – Craig-Bampton mass.
Kcb (2d ndarray) – Craig-Bampton stiffness.
bset (1d array_like) – Index partition vector specifying location and order of b-set (boundary) DOF in Mcb and Kcb. Uses zero offset.
bsubset (1d array_like or None; optional) – Index partition vector into bset specifying which b-set DOF to consider. Note the CG acceleration recovery matrix will only consider forces on this subset so if there are other boundary DOF that are connected to other superelements, the CG recovery transforms are probably not very useful.
uset (pandas DataFrame or None; optional) – The b-set USET table (will be trimmed to the b-set internally if necessary). A DataFrame as output by
pyyeti.nastran.op2.OP2.rdn2cop2(). Defines the Craig-Bampton interface nodes relative to the s/c basic coordinate system. Use the sccoord option to define the transformation from l/v to s/c coordinates.Warning
Using a USET table where the nodes are defined relative to l/v basic will give incorrect results (unless the s/c basic and the l/v basic are the same). That means that this USET table is not the same one that gets used in
pyyeti.nastran.bulk.wtextseout(), which is relative to l/v basic. However, it is likely (but not necessarily) the same as the one used forcbcheck().If uset is None, a single grid with id 1 will be automatically created at (0, 0, 0). The
pyyeti.nastran.n2p.addgrid()call for this is:uset = n2p.addgrid(None, 1, 'b', 0, [0, 0, 0], 0)
ref (1d array_like or integer; optional) – Defines reference location for the recovery transforms; for example, the center point of a ring of boundary grids. The location is in s/c basic (before any unit conversion). Can also be an integer grid id defined in uset.
sccoord (3x3 or 4x3 array_like or None; optional) – If 3x3, it is the transform from l/v basic to s/c. If 4x3, it is the CORD2R, CORD2C or CORD2S information specifying the coordinate system of the s/c relative to the l/v basic (reference_id must be 0):
[ cid type reference_id ] [ Ax Ay Az ] [ Bx By Bz ] [ Cx Cy Cz ]
This is further described in
pyyeti.nastran.n2p.addgrid(). The transform from l/v basic to s/c is computed from this information.If None, the transform is assumed to be identity.
Note
The coordinates of the data recovery matrices are naturally in s/c coordinates (implicitly defined via the mass and stiffness matrices). The s/c coordinate system is ultimately defined in the Nastran coupling run, not in this routine. So, the sccoord input does not affect the matrices that recover in s/c coordinates; it is only used to compute the l/v coordinate system versions from the s/c versions. Therefore, the l/v versions will be incorrect if sccoord does not agree with the Nastran coupling run.
So, why not have a lvcoord input instead? While that would likely make more sense for this routine, sccoord is used simply because that’s what would be used in the Nastran coupling run (for example, sccoord should match what’s in the Nastran .asm file). That fact makes having sccoord more synergistic and therefore less error-prone than defining a lvcoord input.
conv (None or 2-element array_like or string; optional) – If None, no unit conversion is done; otherwise, units are converted from s/c to l/v. If 2-element array_like, it is:
(length_conversion, mass_conversion)
If string, it is one of:
‘m2e’ (convert from metric to English)
‘e2m’ (convert from English to metric)
The string form assumes units of meter & kg, and inch & lbf*s^2/inch (slinch). See
cbconvert()for more information.Note
If units are converted, the data recovery rows corresponding to the s/c will still output in the original s/c units. The rows for the l/v will be in l/v units. To have the s/c rows also output in l/v units, convert units of Mcb and Kcb with
cbconvert()before calling this routine.reorder (bool; optional) – If True, reorder the DOF so the b-set are first (uses
cbreorder()).rbe3_indep_dof (integer or None; optional) – This specifies the independent DOF for the RBE3 used in forming the “ifatm” recovery matrix when there are more than 6 DOF on the boundary. If None, rbe3_indep_dof is set to 123. Note that 123456 is always used if there are only 6 DOF on the boundary.
g (scalar; optional) – Standard gravity in l/v units.
tau (string or 2-tuple of strings; optional) – Specifies the translational acceleration units in the ifatm and cgatm matrices for both the s/c and l/v. If a 2-tuple, the s/c is specified first. The string(s) can be ‘g’ or anything else, but only ‘g’ causes any kind of output unit conversion. The string(s) will be used for labeling.
Note
Except for ‘g’, only the length unit is specified. To specify output units of
m/sec^2, set tau to ‘m’.Note
Note that the cglf outputs will be in ‘g’ units regardless of tau.
Warning
As noted above, there is no conversion of units for anything other than ‘g’. For example, if the natural output units are
m/sec^2, setting tau to ‘in’ will only cause your labels to be wrong.Here are some examples:
tau
Effect on ifatm and cgatm matrices
‘g’
The matrices for both the s/c and the l/v output in g’s and both labels will have ‘(g)’
(‘g’, ‘g’)
Same
‘in’
The matrices output in the natural units of each model and labels will have ‘(in/s^2)’
(‘in’, ‘in’)
Same
(‘m’, ‘in’)
The matrices output in the natural units of each model and the s/c labels will have ‘(m/s^2)’ while the l/v labels will have ‘(in/s^2)’
(‘m’, ‘g’)
The matrices for the s/c output in the s/c natural units and the labels will have (‘m/s^2’); the matrices for the l/v output in g’s and the l/v labels will have ‘(g)’
- Returns:
A SimpleNamespace with these members
ifltma_sc, ifltma_lv (2d ndarrays) – The acceleration-dependent portion of the net interface force data recovery matrices in s/c and l/v units and coordinates, respectively. Along with ifltmd_*, recovers the net forces on the s/c.
ifltmd_sc, ifltmd_lv (2d ndarrays) – The displacement-dependent portion of the net interface force data recovery matrices. Should be zero unless bsubset is used.
ifatm_sc, ifatm_lv (2d ndarrays) – The net interface acceleration data recovery matrices in s/c and l/v coordinates, respectively. Acceleration- dependent. Units are ‘g’ or ‘length/sec^2’ (see the input tau) and ‘rad/sec^2’.
cgatm_sc, cgatm_lv (2d ndarrays) – The net CG acceleration data recovery matrices in s/c and l/v coordinates, respectively. These are based on interface forces. Acceleration-dependent. Units are ‘g’ or ‘length/sec^2’ (see the input tau) and ‘rad/sec^2’.
ifltma (2d ndarray with 12 rows) – The acceleration-dependent portion of the net interface force data recovery matrix in s/c and l/v units and coordinates (s/c first). Along with ifltmd, recovers the net forces on the s/c. See also ifltm_labels.
ifltmd (2d ndarray with 12 rows) – The displacement-dependent portion of the net interface force data recovery matrix. Should be zero unless bsubset is used.
ifatm (2d ndarray with 12 rows) – The net interface acceleration data recovery matrix in s/c and l/v coordinates (s/c first). Acceleration-dependent. Units are ‘g’ or ‘length/sec^2’ (see the input tau) and ‘rad/sec^2’. See also ifatm_labels.
cglfa (2d ndarray with 14 rows) – The acceleration-dependent portion of the net CG load factor data recovery matrix in s/c and l/v coordinates. The first 5 rows are in s/c coordinates and the next 5 rows are in l/v coordinates (but see following note!). The last 4 rows are blank, reserved for time-consistent root-sum-squaring. Recovers axial, shear, and moment-based load factors. Row order is independent of the models’ coordinates and the units are ‘g’. The signs of the moment based lateral CG load factors are set to match the lateral directions (to match the shear-based directions). See the cglf_labels output for the row descriptions.
Note
In the case where the no l/v axis lines up with the s/c axial axis (which could be a common case for secondary s/c), the following warning message is printed which explains what this routine does:
For ‘cglf’, no l/v axis lines up with “s/c axial”. S/C axial should be normal to separation plane and pass approximately through the CG. Rows 6-10 of cglfa and cglfd (corresponding to l/v coordinates) will therefore be thrown out since they don’t make sense. Those rows are replaced with the s/c rows 1-5. Also, “ lv” in cglf_labels will be replaced with “!lv” as a reminder of the change.
cglfd (2d ndarray with 14 rows) – The displacement-dependent portion of the net CG load factor data recovery matrix. Should be zero unless bsubset is used.
ifltm_labels (list) – List of strings describing the rows of the ifltma and ifltmd recovery matrices. Label order depends on models. As an example, assume s/c axial is ‘Z’ and l/v axial is ‘X’:
['I/F Lateral Frc FX sc', 'I/F Lateral Frc FY sc', 'I/F Axial Frc FZ sc', 'I/F Moment MX sc', 'I/F Moment MY sc', 'I/F Torsion MZ sc', 'I/F Axial Frc FX lv', 'I/F Lateral Frc FY lv', 'I/F Lateral Frc FZ lv', 'I/F Torsion MX lv', 'I/F Moment MY lv', 'I/F Moment MZ lv']
ifatm_labels (list) – List of strings describing the rows of the ifatm recovery matrix. Label order depends on models. As an example, assume s/c axial is ‘Z’, l/v axial is ‘X’, and that tau is
'g'(or('g', 'g')):['I/F Lateral X sc (g)', 'I/F Lateral Y sc (g)', 'I/F Axial Z sc (g)', 'I/F Torsion RX sc (r/s^2)', 'I/F Rotation RY sc (r/s^2)', 'I/F Rotation RZ sc (r/s^2)', 'I/F Axial X lv (g)', 'I/F Lateral Y lv (g)', 'I/F Lateral Z lv (g)', 'I/F Torsion RX lv (r/s^2)', 'I/F Rotation RY lv (r/s^2)', 'I/F Rotation RZ lv (r/s^2)']
cglf_labels (list) – List of strings describing the rows of the cglfa and cglfd recovery matrices. The return value is:
['S/C CG Axial sc', # 0 'S/C CG Shear Lat 1 sc', # 1 'S/C CG Shear Lat 2 sc', # 2 'S/C CG Mom. Lat 1 sc', # 3 'S/C CG Mom. Lat 2 sc', # 4 'S/C CG Axial lv', # 5 'S/C CG Shear Lat 1 lv', # 6 'S/C CG Shear Lat 2 lv', # 7 'S/C CG Mom. Lat 1 lv', # 8 'S/C CG Mom. Lat 2 lv', # 9 'S/C CG Shear Lat RSS sc', # 10, for RSS of 1, 2 'S/C CG Mom. Lat RSS sc', # 11, for RSS of 3, 4 'S/C CG Shear Lat RSS lv', # 12, for RSS of 6, 7 'S/C CG Mom. Lat RSS lv'] # 13, for RSS of 8, 9
weight_sc, weight_lv (real scalars) – Weight of the s/c in s/c and l/v units.
height_sc, height_lv (real scalars) – CG height of the s/c in s/c and l/v units. Height is relative to ref.
scaxial_sc, scaxial_lv (integers) – 0, 1, or 2 depending on which DOF is axial in s/c coordinates and in l/v coordinates, respectively.
Tsc2lv (2d ndarray) – The 6x6 transformation from s/c to l/v coordinates. This is the transpose of the transform defined by sccoord.
rb (2d ndarray) – The geometry-based rigid-body modes corresponding to the bsubset part of the uset table. Same as rb_all if bsubset is None.
rb_all (2d ndarray) – The geometry-based rigid-body modes corresponding to the the uset table. Same as rb if bsubset is None.