ademosh

хитрая

Feb 26th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. // Рассчет.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
  2. //
  3. //cout<<<<endl;
  4. #include "pch.h"
  5. #include <iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. float R,P;
  10. R =8300;
  11. P = 15;
  12. P = P * 0.001;
  13. float Yr = 15,Yrct=1.5,Yrk=1,Yps=3, Ps = 500, P0 = 1, Ar = 0.00006, tm = 85 ;
  14. float db = 0.02, dl = 0.04, btech = 0.2, l1 = 0.2;
  15. //1 рассчет Kф
  16. float Kf = R / Ps;
  17.  
  18. cout<<"Kf="<< Kf <<endl;
  19. //2 Bp
  20. float Bp = sqrt(P / (P0*Kf));
  21. cout<< "bp=" << Bp <<endl;
  22. //3 Yrt
  23. float Yrt = Ar * (tm - 20)*100;
  24. cout << "Yrt=" << Yrt << endl;
  25. ///4 Ykfmax
  26. float Ykfmax = Yr - Yps - Yrct - Yrt - Yrk;
  27. cout << "Ykfmax=" << Ykfmax << endl;
  28. //5 bточ
  29. float Btoch = ((db+dl/Kf) * 100) / Ykfmax;
  30. cout << "btoch=" << Btoch << endl;
  31.  
  32. //6 b
  33. float b = 0.1;
  34. if ((Bp*10 > Btoch) && (Bp*10 > btech))
  35. b+= Bp*10;
  36. else if ((Btoch > Bp*10) && (Btoch > btech))
  37. b += Btoch;
  38. else b += btech;
  39. cout << "b=" << b << endl;
  40.  
  41. //7 lср
  42. float lcp = Kf * b;
  43. cout << "lcp=" << lcp << endl;
  44. //8 a=b
  45. float a = b;
  46. cout << "a=" << a<<endl;
  47. //9 Nopt
  48. float Nopt = sqrt(Kf / 2) - 0.25;
  49. cout << "Nopt=" << Nopt << endl;
  50. //10 n
  51. int n= round(Nopt);
  52. cout << "n=" << n << endl;
  53. //11 L
  54. float L = n*(a + b);
  55. cout << "L=" << L << endl;
  56. //12 B
  57. float B = ((lcp - a * n) / n);
  58. cout << "B=" << B << endl;
  59. //13 check
  60. if (((B - b) / a) > 10) cout << "Wrong a";
  61. //14 S
  62. float S = L * B;
  63. cout << "S=" << S << endl;
  64. //15 check 2
  65. float Pcheck = P / (b*lcp);
  66. cout << "P0'=" << Pcheck << endl;
  67. if (Pcheck > P0) cout << "Wrong P0'";
  68. //16 check 3
  69. float Ycheck = Yps + Yrct + Yrt + Yrk + (db / b + dl / lcp) * 100;
  70. cout << "Yr'=" << Ycheck << endl;
  71. if (Ycheck > Yr) cout << "Wrong Yr'";
  72. system("pause");
  73. }
Add Comment
Please, Sign In to add comment