Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Рассчет.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
- //
- //cout<<<<endl;
- #include "pch.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- float R,P;
- R =8300;
- P = 15;
- P = P * 0.001;
- float Yr = 15,Yrct=1.5,Yrk=1,Yps=3, Ps = 500, P0 = 1, Ar = 0.00006, tm = 85 ;
- float db = 0.02, dl = 0.04, btech = 0.2, l1 = 0.2;
- //1 рассчет Kф
- float Kf = R / Ps;
- cout<<"Kf="<< Kf <<endl;
- //2 Bp
- float Bp = sqrt(P / (P0*Kf));
- cout<< "bp=" << Bp <<endl;
- //3 Yrt
- float Yrt = Ar * (tm - 20)*100;
- cout << "Yrt=" << Yrt << endl;
- ///4 Ykfmax
- float Ykfmax = Yr - Yps - Yrct - Yrt - Yrk;
- cout << "Ykfmax=" << Ykfmax << endl;
- //5 bточ
- float Btoch = ((db+dl/Kf) * 100) / Ykfmax;
- cout << "btoch=" << Btoch << endl;
- //6 b
- float b = 0.1;
- if ((Bp*10 > Btoch) && (Bp*10 > btech))
- b+= Bp*10;
- else if ((Btoch > Bp*10) && (Btoch > btech))
- b += Btoch;
- else b += btech;
- cout << "b=" << b << endl;
- //7 lср
- float lcp = Kf * b;
- cout << "lcp=" << lcp << endl;
- //8 a=b
- float a = b;
- cout << "a=" << a<<endl;
- //9 Nopt
- float Nopt = sqrt(Kf / 2) - 0.25;
- cout << "Nopt=" << Nopt << endl;
- //10 n
- int n= round(Nopt);
- cout << "n=" << n << endl;
- //11 L
- float L = n*(a + b);
- cout << "L=" << L << endl;
- //12 B
- float B = ((lcp - a * n) / n);
- cout << "B=" << B << endl;
- //13 check
- if (((B - b) / a) > 10) cout << "Wrong a";
- //14 S
- float S = L * B;
- cout << "S=" << S << endl;
- //15 check 2
- float Pcheck = P / (b*lcp);
- cout << "P0'=" << Pcheck << endl;
- if (Pcheck > P0) cout << "Wrong P0'";
- //16 check 3
- float Ycheck = Yps + Yrct + Yrt + Yrk + (db / b + dl / lcp) * 100;
- cout << "Yr'=" << Ycheck << endl;
- if (Ycheck > Yr) cout << "Wrong Yr'";
- system("pause");
- }
Add Comment
Please, Sign In to add comment