Exemple #1
0
database_connector = DatabaseConnector()

try:
    with open("../InertialLoadingCalculator/data.pickle", 'rb') as file:
        data = pickle.load(file)
except FileNotFoundError:
    with open("./data.pickle", 'rb') as file:
        data = pickle.load(file)

y_lst = data[0]
x_moment_lst = data[3]
z_moment_lst = data[6]
step = y_lst[1] - y_lst[0]
b = database_connector.load_value("wing_span") / 2
wingbox_points = database_connector.load_wingbox_value("wingbox_corner_points")

x_moment = sp.interpolate.interp1d(y_lst,
                                   x_moment_lst,
                                   kind="cubic",
                                   fill_value="extrapolate")
z_moment = sp.interpolate.interp1d(y_lst,
                                   z_moment_lst,
                                   kind="cubic",
                                   fill_value="extrapolate")


#normal stress stringers due to bending, compression
def string_stress_normal(y):
    M_z = z_moment(y)
    M_x = x_moment(y)
    from Buckling.shear_flow_multicell import shearflow_doublecell
    from Buckling.plate_crit import plate_crit_force
    from Buckling.spar_crit import spar_crit_stress
    from Buckling.Shear_flow_1cell import main_shear_stress

database_connector = DatabaseConnector()

try:
    with open("../InertialLoadingCalculator/data.pickle", 'rb') as file:
        data = pickle.load(file)
except FileNotFoundError:
    with open("./data.pickle", 'rb') as file:
        data = pickle.load(file)

y_lst = data[0][:-60]
strength = database_connector.load_wingbox_value("ultimate_strength")
crack_strength = 231400000
shear_strength = database_connector.load_wingbox_value('shear_strength')


def margin_safety_crit(applied, crit):
    factor = crit / applied
    return factor


def margin_safety_strength(applied):
    factor = strength / applied
    return factor


def plot(mode='compression'):
Exemple #3
0
from math import *

try:
    from Database.database_functions import DatabaseConnector
    from WingData.chord_function import chord_function
except ModuleNotFoundError:
    import sys
    from os import path
    sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
    from Database.database_functions import DatabaseConnector
    from WingData.chord_function import chord_function

database_connector = DatabaseConnector()

pois = database_connector.load_wingbox_value("poisson_ratio")
E = database_connector.load_wingbox_value("youngs_modulus_pa")
t = database_connector.load_wingbox_value("spar_thickness")
points = database_connector.load_wingbox_value("wingbox_corner_points")


def spar_crit_stress(y):  #ks needs to be determined manually
    if y <= 10:
        ks = 9.8
    if 10 < y <= 20:
        ks = 9.5
    if y > 20:
        ks = 9.5
    b = (points[1][1] - points[2][1]) * chord_function(y)
    stress = (((pi**2) * ks * E) / (12 * (1 - (pois**2)))) * ((t / b)**2)
    return stress
Exemple #4
0
from math import *

try:
    from Database.database_functions import DatabaseConnector
except ModuleNotFoundError:
    import sys
    from os import path
    sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
    from Database.database_functions import DatabaseConnector

database_connector = DatabaseConnector()

pois = 
E = database_connector.load_wingbox_value("stringer_modulus")
k = 0 #Dont know yet
def plate_crit_force():
    Fcr = ((pi**2)*k*E) / (12*(1-))
from math import *
import matplotlib.pyplot as plt
import numpy as np

try:
    from Database.database_functions import DatabaseConnector
except ModuleNotFoundError:
    import sys
    from os import path
    sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
    from Database.database_functions import DatabaseConnector

database_connector = DatabaseConnector()

#I = 0.00000158483 #Moment of inertia per stringer. This still needs to be determined.
I = 1.87875E-05
E = database_connector.load_wingbox_value("youngs_modulus_pa")
K = 4  #May vary per section in the wingbox. Needs to be determined manually per section.


def crit_stress_stringer(
        y):  #L is the wingbox section length, thus rib spacing.
    if y <= 10:
        L = 0.25
    if 10 < y <= 20:
        L = 1
    if y > 20:
        L = 1.7
    sigma = (K * (pi**2) * E * I) / (L**2)
    return sigma
from math import *

try:
    from Database.database_functions import DatabaseConnector
    from WingData.chord_function import chord_function
except ModuleNotFoundError:
    import sys
    from os import path
    sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
    from Database.database_functions import DatabaseConnector
    from WingData.chord_function import chord_function

database_connector = DatabaseConnector()

pois = database_connector.load_wingbox_value("poisson_ratio")
E = database_connector.load_wingbox_value("youngs_modulus_pa")
kc = 7.3
t = database_connector.load_wingbox_value("plate_thickness")
points = database_connector.load_wingbox_value("wingbox_corner_points")
top_lim1 = database_connector.load_wingbox_value("top_stringer_lim_point_1")
top_lim2 = database_connector.load_wingbox_value("top_stringer_lim_point_2")
top_num_1 = database_connector.load_wingbox_value("top_number_of_stringers_1")
top_num_2 = database_connector.load_wingbox_value("top_number_of_stringers_2")
top_num_3 =database_connector.load_wingbox_value("top_number_of_stringers_3")
bot_lim1 = database_connector.load_wingbox_value("bottom_stringer_lim_point_1")
bot_lim2 = database_connector.load_wingbox_value("bottom_stringer_lim_point_2")
bot_num_1 = database_connector.load_wingbox_value("bottom_number_of_stringers_1")
bot_num_2 = database_connector.load_wingbox_value("bottom_number_of_stringers_2")
bot_num_3 =database_connector.load_wingbox_value("bottom_number_of_stringers_3")