Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi guys , can anyone help me writing a C++ code like for this. thanks Drag Force

ID: 3844277 • Letter: H

Question

Hi guys , can anyone help me writing a C++ code like for this. thanks

Drag Force Report Program round Bac Drag is extremely important in the design of aircraft and is a characteristic that can be determined in a wind tunnel. Drag is the force generated as an object, such as an airplane, moves through a fluid. Of course, in the case of a wind tunnel, air moves past a stationary model, but the equations are the same. Drag is a complicated force that depends on many factors. One factor is skin friction, which is a function of the surface properties of the aircraft, the properties of the moving fluid (air in this case), and the flow patterns caused by the shape of the aircraft. Lift Drag Thrust Weight Drag can be calculated with the drag equation drag Ca (p VRA)/2 where Ca drag coefficient, which is determined experimentally, usually in a windtunnel, p air density, V velocity of the aircraft, A reference area (the surface area over which the air flows). Although the drag coefficient is not a constant, it can be taken to be constant at low speeds (less than 200 mph). Suppose the following data were measured in a wind tunnel: Drag 20,000 N 1x10-6 kg/m3 V 100 mph (you'll need to convert this to meters per second) 1 m

Explanation / Answer

Hi, the problem can be approached using functional programming

Initially to find Drag coefficient using intial data using and covert to convert to meters per second

float convert(float V)
{
   float V_ms;
   //Conversion Factor 1 mph =0.44704 m/s
   V_ms=V*0.44704;
   return V_ms;

}

Intial value finder

float calIntial(float drag,float V,float A,float rho)
{
   float C_d;
   float V_ms=convert(V);
   //from formula
   C_d=((drag)*2)/(rho*V_ms*V_ms*A);
   return C_d;
}

The other function is for calculation of drag coefficient :

float calDrag(float C_d,float V,float A,float rho)
{
   float drag;
   float V_ms=convert(V);
   //from formula
   drag=C_d*rho*V_ms*V_ms*A*0.5;
   return drag;
}

Lastly you need the printing function :

void printTable(float C_d,float V,float A, float rho)
{
   int i;
   cout<<"MPS MPS NEWTONS"<<endl;
   for (i=0;i<22;i++)
       cout<<"-";  
   cout<<endl;
   for (i=0;i<=200;i=i+20)
   {
       cout<<setw(3)<<i;
       cout<<setw(10)<<setprecision(5)<<convert(i);
       cout<<setw(11)<<calDrag(C_d,i,A,rho);
       cout<<endl;
   }

}

You could read documentation of setw in iomanip library for more info on the same.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote