From 5e82dedea4c56eafc1bba4f3ec8677b15f51c03f Mon Sep 17 00:00:00 2001 From: blendoit Date: Sun, 20 Oct 2019 19:33:53 -0700 Subject: Commence declassification of Evaluator Pointless to have a separate object for the Evaluator when a collection of evaluator.py methods does the trick. --- evaluator/dP.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 evaluator/dP.py (limited to 'evaluator/dP.py') 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 -- cgit v1.2.3