Skip to content

Commit

Permalink
style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mlauer154 committed Aug 16, 2023
1 parent 3262911 commit 7cdfba2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
27 changes: 18 additions & 9 deletions pymead/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,14 +742,21 @@ def single_airfoil_viscous_analysis(self):
export_Cp=True
)
if not aero_data['converged'] or aero_data['errored_out'] or aero_data['timed_out']:
self.text_area.insertPlainText(
f"[{self.n_analyses:2.0f}] Converged = {aero_data['converged']} | Errored out = "
f"{aero_data['errored_out']} | Timed out = {aero_data['timed_out']}\n")
self.disp_message_box("XFOIL Analysis Failed", message_mode='error')
self.output_area_text(
f"<font size='4'>[{self.n_analyses:2.0f}] Converged = {aero_data['converged']} | Errored out = "
f"{aero_data['errored_out']} | Timed out = {aero_data['timed_out']}</font>", mode='html')
self.output_area_text('\n')
else:
self.text_area.insertPlainText(
f"[{self.n_analyses:2.0f}] ({xfoil_settings['airfoil']}, \u03b1 = {aero_data['alf']:.3f}, Re = {xfoil_settings['Re']:.3E}, Ma = {xfoil_settings['Ma']:.3f}): "
f"Cl = {aero_data['Cl']:7.4f} | Cd = {aero_data['Cd']:.5f} (Cdp = {aero_data['Cdp']:.5f}, Cdf = {aero_data['Cdf']:.5f}) | Cm = {aero_data['Cm']:7.4f} "
f"| L/D = {aero_data['L/D']:8.4f}\n")
self.output_area_text(
f"<font size='4'>[{str(self.n_analyses).zfill(2)}] ({xfoil_settings['airfoil']}, "
f"\u03b1 = {aero_data['alf']:.3f}, Re = {xfoil_settings['Re']:.3E}, "
f"Ma = {xfoil_settings['Ma']:.3f}): "
f"Cl = {aero_data['Cl']:+7.4f} | Cd = {aero_data['Cd']:.5f} (Cdp = {aero_data['Cdp']:.5f}, "
f"Cdf = {aero_data['Cdf']:.5f}) | Cm = {aero_data['Cm']:+7.4f} "
f"| L/D = {aero_data['L/D']:+8.4f}</font>".replace("-", "\u2212"),
mode='html')
self.output_area_text('\n')
sb = self.text_area.verticalScrollBar()
sb.setValue(sb.maximum())

Expand Down Expand Up @@ -825,8 +832,10 @@ def multi_airfoil_analysis(self, mset_settings: dict, mses_settings: dict,
else:
# self.output_area_text('\n')
self.output_area_text(
f"<font size='4'>[{self.n_analyses:2.0f}] (Re = {mses_settings['REYNIN']:.3E}, Ma = {mses_settings['MACHIN']:.3f}): "
f"Cl = {aero_data['Cl']:7.4f} | Cd = {aero_data['Cd']:.5f} | Cm = {aero_data['Cm']:7.4f}</font>", mode='html')
f"<font size='4'>[{self.n_analyses:2.0f}] (Re = {mses_settings['REYNIN']:.3E}, "
f"Ma = {mses_settings['MACHIN']:.3f}): "
f"Cl = {aero_data['Cl']:+7.4f} | Cd = {aero_data['Cd']:+.5f} | "
f"Cm = {aero_data['Cm']:+7.4f}</font>".replace("-", "\u2212"), mode='html')
self.output_area_text('\n')
sb = self.text_area.verticalScrollBar()
sb.setValue(sb.maximum())
Expand Down
8 changes: 4 additions & 4 deletions pymead/gui/gui_settings/defaults/mplot_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
"Mach": {
"label": "Output Mach Contours",
"widget_type": "QCheckBox",
"setCheckState": 2
"setCheckState": 0
},
"Streamline_Grid": {
"label": "Output Streamline Grid",
"widget_type": "QCheckBox",
"setCheckState": 2
"setCheckState": 0
},
"Grid": {
"label": "Output Grid",
"widget_type": "QCheckBox",
"setCheckState": 2
"setCheckState": 0
},
"Grid_Zoom": {
"label": "Output Zoomed-In Grid",
"widget_type": "QCheckBox",
"setCheckState": 2
"setCheckState": 0
},
"Output_Field": {
"label": "Output Flow Variable Field",
Expand Down

0 comments on commit 7cdfba2

Please sign in to comment.