Ejemplo n.º 1
0
# Lattice Result Result
lres = lsys.results['Test Alpha']
display_markdown(lres)

#%%
# Plot Lift Distribution
axl = None
axl = pres.plot_strip_lift_force_distribution(ax=axl, label='pyapm Strip')
axl = lres.plot_strip_lift_force_distribution(ax=axl, label='pyvlm Strip')
axl = pres.plot_trefftz_lift_force_distribution(ax=axl, label='pyapm Trefftz')
axl = lres.plot_trefftz_lift_force_distribution(ax=axl, label='pyvlm Trefftz')

#%%
# Plot Strip Drag Distribution
axd = None
axd = pres.plot_strip_drag_force_distribution(ax=axd, label='pyapm Strip')
axd = lres.plot_strip_drag_force_distribution(ax=axd, label='pyvlm Strip')
axd = pres.plot_trefftz_drag_force_distribution(ax=axd, label='pyapm Trefftz')
axd = lres.plot_trefftz_drag_force_distribution(ax=axd, label='pyvlm Trefftz')

#%%
# Plot Wash Distribution
axw = None
axw = pres.plot_trefftz_wash_distribution(ax=axw, label='pyapm Trefftz')
axw = lres.plot_trefftz_wash_distribution(ax=axw, label='pyvlm Trefftz')

#%%
# MSH File Output
mshfilepath = '../results/' + psys.name + '.msh'
panelresult_to_msh(pres, mshfilepath)
Ejemplo n.º 2
0
psys = panelsystem_from_json(jsonfilepath)

#%%
# Display System
display_markdown(psys)

#%%
# Display Results
for case in psys.results:
    pres = psys.results[case]
    display_markdown(pres)

#%%
# Mesh File Output
ptrm = psys.results['Positive 1g Cruise']
panelresult_to_msh(ptrm, '../results/Aircraft.msh')
display_markdown(ptrm)

#%%
# Deflect Elevator
pres = ptrm.to_result('Positive 1g Cruise + Controls 25 deg')
pres.set_controls(elevator=25.0, aileron=25.0, rudder=25.0)
panelresult_to_msh(pres, '../results/Aircraft_Trim.msh')
display_markdown(pres)

#%%
# Plot Lift Distribution
axl = ptrm.plot_trefftz_lift_force_distribution()
axl = ptrm.plot_strip_lift_force_distribution(ax=axl)
axl = pres.plot_trefftz_lift_force_distribution(ax=axl)
axl = pres.plot_strip_lift_force_distribution(ax=axl)