From 57cc11800e439d1861b2b3440170153ce058b23c Mon Sep 17 00:00:00 2001 From: SteveDoyle2 Date: Wed, 11 Dec 2024 20:58:41 -0800 Subject: [PATCH 1/2] fixing test --- pyNastran/f06/parse_flutter.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pyNastran/f06/parse_flutter.py b/pyNastran/f06/parse_flutter.py index ae063b4d3..affb2e861 100644 --- a/pyNastran/f06/parse_flutter.py +++ b/pyNastran/f06/parse_flutter.py @@ -159,17 +159,15 @@ def make_flutter_response(f06_filename: PathLike, line = f06_file.readline() iline += 1 - if methodi == 'PKNL': - assert 'VELOCITY' in line, line + if 'VELOCITY' in line: #' EIGENVALUE = -9.88553E-02 1.71977E+01 VELOCITY = 1.52383E+02 eig_value, velocity_str = line.split('VELOCITY =') eigr_str, eigi_str = eig_value.strip().split('EIGENVALUE =')[1].split() velocity = float(velocity_str) - elif methodi == 'PK': + else: eigr_str, eigi_str = line.strip().split('EIGENVALUE =')[1].split() velocity = np.nan - else: # pragma: no cover - raise RuntimeError(f'methodi={methodi}') + eigr = float(eigr_str) eigi = float(eigi_str) #print(f'eigr,eigi,velo = {eigr}, {eigi}, {velocity}') From d88238d47c22a8872c4cc1027765598683ee29f5 Mon Sep 17 00:00:00 2001 From: SteveDoyle2 Date: Wed, 11 Dec 2024 21:19:09 -0800 Subject: [PATCH 2/2] fixing tests --- pyNastran/bdf/mesh_utils/export_caero_mesh.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pyNastran/bdf/mesh_utils/export_caero_mesh.py b/pyNastran/bdf/mesh_utils/export_caero_mesh.py index c4fa9eb70..06b6b02bc 100644 --- a/pyNastran/bdf/mesh_utils/export_caero_mesh.py +++ b/pyNastran/bdf/mesh_utils/export_caero_mesh.py @@ -83,12 +83,16 @@ def export_caero_mesh(model: BDF, continue bdf_file.write('$ ' + '\n$ '.join(scaero) + '\n') - if caero.lspan_ref: - aefact_chord = str(caero.lspan_ref).rstrip().split('\n') - bdf_file.write('$ ' + '\n$ '.join(aefact_chord) + '\n') - if caero.lchord_ref: - aefact_span = str(caero.lchord_ref).rstrip().split('\n') - bdf_file.write('$ ' + '\n$ '.join(aefact_span) + '\n') + if hasattr(caero, 'lspan'): + assert caero.type in {'CAERO1', 'CAERO4', 'CAERO5'}, caero + if caero.lspan_ref: + aefact_chord = str(caero.lspan_ref).rstrip().split('\n') + bdf_file.write('$ ' + '\n$ '.join(aefact_chord) + '\n') + if hasattr(caero, 'lchord'): + assert caero.type in {'CAERO1', }, caero + if caero.lchord_ref: + aefact_span = str(caero.lchord_ref).rstrip().split('\n') + bdf_file.write('$ ' + '\n$ '.join(aefact_span) + '\n') #bdf_file.write("$ CAEROID ID XLE YLE ZLE CHORD SPAN\n") points, elements = caero.panel_points_elements() @@ -146,7 +150,7 @@ def _write_caero2_subpanel(bdf_file: TextIO, caero: CAERO2): scaero = str(caero).rstrip().split('\n') bdf_file.write('$ ' + '\n$ '.join(scaero) + '\n') if caero.lsb_ref: - aefact_lsb = str(caero.aefact_lsb).rstrip().split('\n') + aefact_lsb = str(caero.lsb_ref).rstrip().split('\n') bdf_file.write('$ ' + '\n$ '.join(aefact_lsb) + '\n') if caero.lint_ref: aefact_lint = str(caero.lint_ref).rstrip().split('\n')