Exemplo n.º 1
0
 def draw_Q1_Qx0Qx1(self, a, b, g, da=0.001):
     s = Solver(a, b, g)
     x1 = []
     y1 = []
     x2 = []
     y2 = []
     while a < b:
         x1.append(a)
         x2.append(a)
         y1.append(s.calc_Q1())
         y2.append(s.calc_Qx0() + s.calc_Qx1())
         a += da
         s.reload(a, b, g)
     points = []
     points.append(((x1, y1), 'tmp.dat', 'Q1(a)'))
     points.append(((x2, y2), 'tmp2.dat', 'Q*0(a) + Q*1(a)'))
     self._draw(
         points=points,
         title="График зависимости Q1(a) и Q*0(a) + Q*1(a)",
     )
Exemplo n.º 2
0
from solver import Solver
from graphics import Graphics
s = Solver(0.5, 0.7, 0.9)


print(s.calc_w()*s.a)
print(s.calc_Q1())
print(s.calc_Q2())
print(s.calc_Q3())


# g = Graphics()
# g.draw_Q1_Qx0Qx1(0.01, 0.9, 0.5)