summaryrefslogtreecommitdiff
path: root/evaluator/dP.py
diff options
context:
space:
mode:
authorblendoit <blendoit@gmail.com>2019-10-20 19:33:53 -0700
committerblendoit <blendoit@gmail.com>2019-10-20 19:33:53 -0700
commit5e82dedea4c56eafc1bba4f3ec8677b15f51c03f (patch)
treed754b30ae1f7a892cd22ce092b5c1a8f5ebca847 /evaluator/dP.py
parent87f2d5da23a0bb7159d64827390b5083b80f1375 (diff)
Commence declassification of Evaluator
Pointless to have a separate object for the Evaluator when a collection of evaluator.py methods does the trick.
Diffstat (limited to 'evaluator/dP.py')
-rw-r--r--evaluator/dP.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/evaluator/dP.py b/evaluator/dP.py
new file mode 100644
index 0000000..b6aaa3b
--- /dev/null
+++ b/evaluator/dP.py
@@ -0,0 +1,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