export_caero_mesh Module

defines:
  • export_caero_mesh(model, caero_bdf_filename=’caero.bdf’, is_aerobox_model=True)

pyNastran.bdf.mesh_utils.aero.export_caero_mesh.export_caero_mesh(bdf_filename: str | PurePath | BDF, caero_bdf_filename: str | PurePath = 'caero.bdf', is_aerobox_model: bool = True, pid_method: str = 'aesurf', rotate_panel_angle_deg: float | list[float] = 0.0, rotate_surface_labels: list[str] | None = None, write_panel_xyz: bool = True, xref: bool = True, skip_zero_check: bool = False, write_header: bool = True, write_end_data: bool = True) → None[source]

Write the CAERO cards as CQUAD4s that can be visualized

Parameters:
modelstr | Path | BDF

a valid geometry

caero_bdf_filenamestr

the file to write

is_aerobox_modelbool; default=True

True : write the aeroboxes as CQUAD4s False : write the macro elements as CQUAD4s

pid_methodstr; default=’aesurf’
‘aesurf’write the referenced AESURF as the property ID

main structure will be pid=1

‘caero’ : write the CAERO1 as the property id ‘paero’ : write the PAERO1 as the property id

rotate_panel_angle_degfloat | list[float]; default=0.0

angle(s) in degrees to rotate control surfaces about the hinge line. If a single float, every surface in rotate_surface_labels (or all AESURF surfaces when that is None) is deflected by the same amount. If a list, its length must equal len(rotate_surface_labels) and each surface is deflected by the corresponding angle.

rotate_surface_labelslist[str] | None; default=None

AESURF labels to rotate (e.g., [‘LFLAP’, ‘RFLAP’]). If None and rotate_panel_angle_deg != 0, all AESURF surfaces are rotated. Comparison is case-insensitive.

write_panel_xyzbool; default=True

write the following table… $$ CAEROID EID XLE YLE ZLE CHORD SPAN XLE+C/4 $$ 1 1 0.0000 0.2500 0.0000 0.0988 0.5000 0.0247 $$ 1 2 0.0988 0.2500 0.0000 0.0988 0.5000 0.1234

skip_zero_checkbool; default=False

if True, verifies that W2GJ, WKK, etc. are not empty an empty WKK will result in no aero load an empty W2GJ is also likely a bug

write_headerbool; default=True

add a CEND and BEGIN BULK at the top

write_end_databool; default=True

add an ENDDATA at the end

pyNastran.bdf.mesh_utils.aero.export_caero_mesh.get_area_arm_dict_panel(model: BDF, percent_location: int = 25) → dict[int, int][source]

get the aerobox (area, area*moment_arm dict)

pyNastran.bdf.mesh_utils.aero.export_caero_mesh.get_skj(model: BDF, percent_location: int = 25) → ndarray[source]
pyNastran.bdf.mesh_utils.aero.export_caero_mesh.rodriguez_rotate(xyz: ndarray, theta: float, coord: CORD1R | CORD1C | CORD1S | CORD2R | CORD2C | CORD2S, iaxis: int = 0) → ndarray[source]

Rotate points about the axis of a coordinate system using Rodrigues’ formula.

The rotation axis passes through coord.origin in the direction of coord.i/j/k (selected by iaxis). Points are translated to the origin, rotated, and translated back.

v_rotated = v * cos(θ) + (k x v) * sin(θ) + k * (k · v) * (1 - cos(θ)) Where:

v is the vector to be rotated. k is the unit vector representing the axis of rotation. θ is the angle of rotation. x denotes the cross product. · denotes the dot product.

Returns: