ademosh

простые

Feb 26th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.60 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 = 0.0001;
  11.     P = 1;
  12.     P = P * 0.001;
  13.     float Yr = 1,Yrct=1.5,Yrk=1,Yps=3, Ps = 500, P0 = 1, Ar = 0.00006, tm = 125  ;
  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 l = Kf * B;
  43.     cout << "l=" << l << endl;
  44.  
  45.     // 8 l0
  46.     float l0 = l + 2 * l1;
  47.     cout << "l0=" << l0 << endl;
  48.     //9 S
  49.     float S = l0*B;
  50.     cout << "S=" << S << endl;
  51.     //10 P0'
  52.     float P0t = P / (B*l / 100);
  53.     cout << "P0t=" << P0t << endl;
  54.     if (P0t < P0) cout << "Ok";
  55.     else cout << "No, fP0<P0t";
  56.     cout << "=" << endl;
  57.     //11 Yr'
  58.     float Yrsht = Yps + Yrct + Yrt + Yrk + (db / B + dl / l) * 100;
  59.     cout << "Yrsht=" << Yrsht << endl;
  60.     if (Yrsht < Yr) cout << "Ok";
  61.     else cout << "No, Yrt>Yr";
  62.     cout << endl;
  63.  
  64.  
  65.  
  66.  
  67.     system("pause");
  68. }
Add Comment
Please, Sign In to add comment