summaryrefslogtreecommitdiff
path: root/aircraftstudio/evaluator/dP.py
blob: b6aaa3b6dd70ec782661c1bf25d2b7537cfa11dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def get_dx(self, component):
    return [x - self.centroid[0] for x in component.x_start]


def get_dz(self, component):
    return [x - self.centroid[1] for x in component.x_start]


def get_dP(self, xDist, zDist, V_x, V_z, area):
    I_x = self.I_['x']
    I_z = self.I_['z']
    I_xz = self.I_['xz']
    denom = float(I_x * I_z - I_xz**2)
    z = float()
    for _ in range(len(xDist)):
        z += float(-area * xDist[_] * (I_x * V_x - I_xz * V_z) / denom -
                   area * zDist[_] * (I_z * V_z - I_xz * V_x) / denom)
    return z
Copyright 2019--2024 Marius PETER