Skip to content

Commit 2807015

Browse files
committed
CI update and BWI flag fix
CI now builds opencopter in release-native and only runs the hart II baseline case instead of all three cases. OC Fly will only output the BWI flag into a wopwop namelist if the flag is set to true. This gets around release versions of wopwop not supporting BWI yet.
1 parent c7861f1 commit 2807015

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

.github/workflows/d.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,19 @@ jobs:
6363
run: |
6464
export CONDA_PREFIX=""
6565
# Build the project, with its main file included, without unittests
66-
dub build -c library-python310-novtk -b release --compiler=$DC
66+
dub build -c library-python310-novtk -b release-native --compiler=$DC
6767
cd oc_fly/dependencies/wopwopd
68-
dub build -c library-python310 -b release --compiler=$DC
68+
dub build -c library-python310 -b release-native --compiler=$DC
6969
cd -
7070
7171
- name: 'Validate HART II'
7272
run: |
7373
# Run HART II validation case
7474
ls -alh ../
7575
cd oc_fly/example
76-
../oc_fly -input_geom hart_ii.json5 -input_param hart_ii_params.json5 --aero -fs
76+
../oc_fly -input_geom hart_ii.json5 -input_param hart_ii_params.json5 --aero -fs -flight_condition BL
7777
7878
mkdir -p ./hart_ii/BL/acoustics/full_system/octaveFilterSP/spl
79-
mkdir -p ./hart_ii/MN/acoustics/full_system/octaveFilterSP/spl
80-
mkdir -p ./hart_ii/MV/acoustics/full_system/octaveFilterSP/spl
8179
8280
../../wopwop3/build/wopwop3 cases_0_0.nam
83-
../../wopwop3/build/wopwop3 cases_0_1.nam
84-
../../wopwop3/build/wopwop3 cases_0_2.nam
81+

oc_fly/source/wopwop_input_files_generator.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ def build_blade_cntr(rotor, rotor_idx, blade, blade_idx, environment_in, wopwop_
8888
blade_cntr = ContainerIn()
8989

9090
blade_cntr.BPMNoiseFlag = include_broadband
91-
blade_cntr.BWINoiseFlag = include_bwi
91+
if include_bwi:
92+
blade_cntr.BWINoiseFlag = include_bwi
9293

9394
blade_cntr.Title = blade.frame.name + " container"
9495

@@ -240,13 +241,17 @@ def generate_wopwop_namelist(atmo, dt, V_inf, iterations, aoa, t_min, t_max, nt,
240241
environment_in.MdotrSigmaFlag = acoustics_config["mdotr_sigma_flag"] if "mdotr_sigma_flag" in acoustics_config else False
241242
environment_in.iblankSigmaFlag = acoustics_config["iblank_sigma_flag"] if "iblank_sigma_flag" in acoustics_config else False
242243
environment_in.broadbandFlag = acoustics_config["broadband_flag"] if "broadband_flag" in acoustics_config else False
243-
environment_in.BWINoiseFlag = acoustics_config["BWI_flag"] if "BWI_flag" in acoustics_config else False
244+
245+
want_bwi = ("BWI_flag" in acoustics_config) and acoustics_config["BWI_flag"]
246+
247+
if want_bwi:
248+
environment_in.BWINoiseFlag = True
244249

245250
num_rotors = len(rotor_phases)
246251
if (num_rotors>1):
247-
wopwop_aircraft.children = flatten([build_rotor_cntr(rotor, rotor_idx, environment_in, wopwop_motion, rotor_phases[rotor_idx], environment_in.broadbandFlag, environment_in.BWINoiseFlag, bwi_params) for rotor_idx, rotor in enumerate(rotors)])
252+
wopwop_aircraft.children = flatten([build_rotor_cntr(rotor, rotor_idx, environment_in, wopwop_motion, rotor_phases[rotor_idx], environment_in.broadbandFlag, want_bwi, bwi_params) for rotor_idx, rotor in enumerate(rotors)])
248253
else :
249-
wopwop_aircraft.children = flatten([build_rotor_cntr(rotor, rotor_idx2, environment_in, wopwop_motion, rotor_phases[rotor_idx], environment_in.broadbandFlag, environment_in.BWINoiseFlag, bwi_params) for rotor_idx, rotor in enumerate(rotors)])
254+
wopwop_aircraft.children = flatten([build_rotor_cntr(rotor, rotor_idx2, environment_in, wopwop_motion, rotor_phases[rotor_idx], environment_in.broadbandFlag, want_bwi, bwi_params) for rotor_idx, rotor in enumerate(rotors)])
250255

251256
R = 1
252257
num_blades = 1

0 commit comments

Comments
 (0)