1

 1 #include<cstdio>
 2 #include<cstdlib>
 3 #include<cmath>
 4 #include<iostream>
 5 using namespace std;
 6 
 7 long double a=-5.8522e+04,
 8     b=3.7519e+11,
 9     c=6.8944e-07,
10     g0=9.7803,
11     gama=1.4000,
12     k=0.00046,
13     P0=101325,
14     P00=101325.0,
15     Re=6378137.0,
16     rou0=1.2250,
17     rou00=1.1031865,
18     T0=273.0,
19     T00=303.1500,
20     mu=0.027441,
21     R=8.3140,
22     A=58857.2530,
23     B=375399623239.3531;
24 long double n0=pow(1+k*c*(a+b/Re),2.5);
25 
26 long double phi()
27 {
28     int n=10000;
29     long double st=1,ed=1+k*rou00;
30     long double delta=(ed-st)/n,ans=0;
31     for(int i=1;i<=n;i++)
32     {
33         long double X=(st-1)*pow(T00,3.5)/k/rou0/T0;
34         long double H=pow(X,0.4)+A-303.15;
35         H=B/H;
36         H-=6378137;
37         ans+=n0*Re/st/(Re+H)/
38         sqrt(1-(n0*Re/st/(Re+H))*(n0*Re/st/(Re+H)))/st*delta;
39         st+=delta;
40     }
41     return ans;
42 }
43 
44 long double eps=1e-8,tar=0.0098901991;
45 
46 long double tdiv()
47 {
48     long double l=0.0,r=1.0;
49     while(r-l>eps)
50     {
51         long double mid=(l+r)/2;
52         k=mid;
53         long double ans=phi();
54         if(ans<tar) l=mid;
55         else r=mid;
56     }
57     return l;
58 }
59 
60 int main()
61 {
62     long double ans=phi();
63     tdiv();
64     return 0;
65 }

 

posted @ 2019-05-04 00:19 konjak魔芋 阅读(...) 评论(...) 编辑 收藏