Fix things?
This commit is contained in:
parent
0c6d48283a
commit
31aeb58d56
58
main.py
58
main.py
@ -257,9 +257,7 @@ if __name__ == '__main__':
|
|||||||
pressure = this_data[0]
|
pressure = this_data[0]
|
||||||
|
|
||||||
# Extrapolate Aerofoil Tip
|
# Extrapolate Aerofoil Tip
|
||||||
p1 = (PITOT_PLACEMENT[9], pressure.iloc[9])
|
p1, p2, pN = this_data[-3]
|
||||||
p2 = (PITOT_PLACEMENT[18], pressure.iloc[18])
|
|
||||||
pN = (0.9*CHORD_LEN, p2[1] + (p1[1]-p2[1])/2)
|
|
||||||
|
|
||||||
plts = (
|
plts = (
|
||||||
{"x": PITOT_PLACEMENT[:10], "y":pressure[:10], "colour": c["color"]},
|
{"x": PITOT_PLACEMENT[:10], "y":pressure[:10], "colour": c["color"]},
|
||||||
@ -296,9 +294,7 @@ if __name__ == '__main__':
|
|||||||
pressure = this_data[0]
|
pressure = this_data[0]
|
||||||
|
|
||||||
# Extrapolate Aerofoil Tip
|
# Extrapolate Aerofoil Tip
|
||||||
p1 = (PITOT_PLACEMENT[9], pressure.iloc[9])
|
p1, p2, pN = this_data[-3]
|
||||||
p2 = (PITOT_PLACEMENT[18], pressure.iloc[18])
|
|
||||||
pN = (0.9*CHORD_LEN, p2[1] + (p1[1]-p2[1])/2)
|
|
||||||
|
|
||||||
plts = (
|
plts = (
|
||||||
{"x": PITOT_PLACEMENT[:10], "y":pressure[:10], "colour": c["color"]},
|
{"x": PITOT_PLACEMENT[:10], "y":pressure[:10], "colour": c["color"]},
|
||||||
@ -318,34 +314,34 @@ if __name__ == '__main__':
|
|||||||
makeGraph(graph, False, figSavePath="./images/pressure/__{0}.png")
|
makeGraph(graph, False, figSavePath="./images/pressure/__{0}.png")
|
||||||
|
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
aoa = [a[-2] for a in cp_pain_data][1::2]
|
aoa = [a[-2] for a in cp_pain_data][1::2]
|
||||||
forces = [a[-1] for a in cp_pain_data][1::2]
|
forces = [a[-1] for a in cp_pain_data][1::2]
|
||||||
# Force Graphs
|
# Force Graphs
|
||||||
graph = {
|
graph = {
|
||||||
"title": f"All Total, Lift & Drag Forces\nfor a Clark Y 14% Aerofoil at:\n{raw_data["rpm"]:d}rpm - {raw_data["airSpeed"]:.1f}m/s)",
|
"title": f"All Total, Lift & Drag Forces\nfor a Clark Y 14% Aerofoil at:\n{raw_data["rpm"]:d}rpm - {raw_data["airSpeed"]:.1f}m/s)",
|
||||||
"windowTitle": f"All Total, Lift and Drag Forces for a Clark Y 14 Percent Airfoil - {raw_data["rpm"]:d}rpm - {raw_data["airSpeed"]:.1f}m_s",
|
"windowTitle": f"All Total, Lift and Drag Forces for a Clark Y 14 Percent Airfoil - {raw_data["rpm"]:d}rpm - {raw_data["airSpeed"]:.1f}m_s",
|
||||||
"xLabel": "Attack Angle [$\\alpha$]",
|
"xLabel": "Attack Angle [$\\alpha$]",
|
||||||
"yLabel": "Force [N]",
|
"yLabel": "Force [N]",
|
||||||
"grid": True,
|
"grid": True,
|
||||||
"ledgLoc": 1,
|
"ledgLoc": 1,
|
||||||
"plots": [
|
"plots": [
|
||||||
{"x":aoa, "y":[f[0] for f in forces], "label":"Total Force"},
|
{"x":aoa, "y":[f[0] for f in forces], "label":"Total Force"},
|
||||||
{"x":aoa, "y":[f[1] for f in forces], "label":"Lift"},
|
{"x":aoa, "y":[f[1] for f in forces], "label":"Lift"},
|
||||||
{"x":aoa, "y":[f[2] for f in forces], "label":"Drag"},
|
{"x":aoa, "y":[f[2] for f in forces], "label":"Drag"},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
makeGraph(graph, False, figSavePath="./images/{0}.png", closeFig=True)
|
makeGraph(graph, False, figSavePath="./images/{0}.png", closeFig=True)
|
||||||
|
|
||||||
|
|
||||||
print("\n\n")
|
print("\n\n")
|
||||||
print(raw_data["rpm"])
|
print(raw_data["rpm"])
|
||||||
print("AoA Total Lift Drag ---- Upper Force Lower Force ")
|
print("AoA Total Lift Drag ---- Upper Force Lower Force ")
|
||||||
for aoa, force in [(a[-2], a[-1]) for a in cp_pain_data]:
|
for aoa, force in [(a[-2], a[-1]) for a in cp_pain_data]:
|
||||||
print(f"{aoa:d}\\textdegree & {force[0]:.3f} & {force[1]:.3f} & {force[2]:.3f} -- {force[4]:.3f} {force[5]:.3f} \\\\")
|
print(f"{aoa:d}\\textdegree & {force[0]:.3f} & {force[1]:.3f} & {force[2]:.3f} -- {force[4]:.3f} {force[5]:.3f} \\\\")
|
||||||
print("-"*50)
|
print("-"*50)
|
||||||
print("\n\n")
|
print("\n\n")
|
||||||
|
|
||||||
print("Generating Cp Graphs")
|
print("Generating Cp Graphs")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user