transition_calculator.py

Created by concretedog56

Created on December 31, 2022

466 Bytes

This script calculates templates for truncated conical transitions for rocket airframes. You input d1 and d2 as the end diameters matching the rocket airframe dimensions and you input the desired length. The function returns two radii, R1 and R2 and an angle, Theta, with which you can create a template.


import math

def transition():
  d1=float(input("enter first diameter in mm "))
  d2=float(input("enter second diameter in mm "))
  l=float(input("enter length in mm "))
  y=float(((d1-d2)/2))
  sinD=float((1/(math.sqrt(((l/y)**2)+1))))
  sinT=round(float(360*sinD),3)
  r1=round(float(d1/(2*sinD)),3)
  r2=round(float(d2/(2*sinD)),3)
  
  print("r1 is ",r1, "mm")
  print("r2 is ",r2, "mm")
  print("Theta is", sinT, "degrees")
  
  
  

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.