def solve_1(): solution1 = Solution() ans1 = solution1.calculate_1(3331.2, 2136.8, 151.95) return ans1
import numpy as np from CALCULATE_ALL import Solution import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] # 正常显示汉字的操作 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号的操作 solution1 = Solution() # t1 p2不变,改变p1 nt_1mpa = solution1.calculate_1(3370.80, 2347.19, 151.95) nt_2mpa = solution1.calculate_1(3357.83, 2244.16, 151.95) nt_4mpa = solution1.calculate_1(3331.22, 2136.79, 151.95) nt_6mpa = solution1.calculate_1(3303.45, 2070.01, 151.95) nt_8mpa = solution1.calculate_1(3274.30, 2019.51, 151.95) nt_10mpa = solution1.calculate_1(3243.63, 1977.62, 151.95) print(nt_1mpa) print(nt_2mpa) print(nt_4mpa) print(nt_6mpa) print(nt_8mpa) print(nt_10mpa) nt_1mpa = eval(str(nt_1mpa)[:-1]) nt_2mpa = eval(str(nt_2mpa)[:-1]) nt_4mpa = eval(str(nt_4mpa)[:-1]) nt_6mpa = eval(str(nt_6mpa)[:-1]) nt_8mpa = eval(str(nt_8mpa)[:-1]) nt_10mpa = eval(str(nt_10mpa)[:-1]) T = [1, 2, 4, 6, 8, 10] nt_list = [nt_1mpa, nt_2mpa, nt_4mpa, nt_6mpa, nt_8mpa, nt_10mpa] plt.plot(T, nt_list, marker='o')
def solve_2_1(): solution2 = Solution() nt_lang, nt, x2, nt_real = solution2.calculate_2(3349.6, 2183.6, 151.95, 3344.6, 2965.5, 2566.2, 1998.0) return nt_lang, nt, x2, nt_real
def solve_2_2(): solution2 = Solution() nt_lang, nt, x2, nt_real = solution2.calculate_2(3349.6, 2421.7, 151.95, 3376.0, 2639.9, 2566.2, 1998.0) return nt_lang, nt, x2, nt_real
def solve_3(): solution3 = Solution() ans3 = solution3.calculate_3(3317.5, 2100, 152, 2748.6, 640) return ans3