Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid escape sequence in math docstring #138

Merged
merged 3 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
).run()

plt.plot(op_point.mach(), aero["CD"], zorder=1.9, label="Model without Wave Drag")
p.show_plot("Transonic Fuselage Drag", "Mach [-]", "Drag Area $C_D \cdot A$ [m$^2$]")
p.show_plot("Transonic Fuselage Drag", "Mach [-]", r"Drag Area $C_D \cdot A$ [m$^2$]")

print("%.4g" % aero["CD"][-1])
2 changes: 1 addition & 1 deletion aerosandbox/library/aerodynamics/unsteady.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,6 @@ def linear_ramp_pitch(reduced_time: float) -> float:
plt.plot(reduced_time, added_mass_lift, label="Added Mass Lift", lw=2)
plt.legend()
plt.xlabel("Reduced time")
plt.ylabel("$C_\ell$")
plt.ylabel(r"$C_\ell$")
plt.title("Guassian Pitch Maneuver Through Top-Hat Gust")
plt.show()
2 changes: 1 addition & 1 deletion aerosandbox/library/gust_pitch_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def calculate_transients(self):
ax1.legend(loc="lower left")
ax2.legend(loc="lower right")
ax1.set_xlabel("Reduced time")
ax1.set_ylabel("$C_\ell$")
ax1.set_ylabel(r"$C_\ell$")
ax2.set_ylabel("Angle of attack, degrees")
plt.title("Optimal Pitch Maneuver Through Top-Hat Gust")
plt.show()
2 changes: 1 addition & 1 deletion aerosandbox/library/power_turboshaft.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def thermal_efficiency_turboshaft(
p.show_plot(
"Turboshaft: Thermal Efficiency at Partial Power",
"Throttle Setting [-]",
"Thermal Efficiency Knockdown relative to Design Point [-] $\eta / \eta_\mathrm{max}$",
r"Thermal Efficiency Knockdown relative to Design Point [-] $\eta / \eta_\mathrm{max}$",
)

##### Do Weight/OPR Efficiency Plot #####
Expand Down
4 changes: 2 additions & 2 deletions aerosandbox/modeling/splines/hermite.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ def cosine_hermite_patch(
dfdx_b: float,
extrapolation: str = "continue",
) -> Union[float, np.ndarray]:
"""
r"""
Computes a Hermite patch (i.e., values + derivatives at endpoints) that uses a cosine function to blend between
linear segments.
The end result is conceptually similar to a cubic Hermite patch, but computation is faster and the patch is
C^\infty-continuous.
$C^\infty$-continuous.
Args:
x: Scalar or array of values at which to evaluate the patch.
Expand Down
2 changes: 1 addition & 1 deletion aerosandbox/structures/tube_spar_bending.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def draw(self, show=True):
# "Local Slope [deg]": np.arctan2d(self.du, 1),
"Local Load [N/m]": self.distributed_force,
"Axial Stress [MPa]": self.stress_axial / 1e6,
"Bending $EI$ [N $\cdot$ m$^2$]": self.elastic_modulus * self.I,
r"Bending $EI$ [N $\cdot$ m$^2$]": self.elastic_modulus * self.I,
"Tube Diameter [m]": self.diameter,
"Wall Thickness [m]": self.wall_thickness,
}
Expand Down