Write a c program that will read the required values from


Rocket motors are tested by restraining them on the ground, firing them with a known amount of propellant, and measuring the thrust over time. A typical curve is shown below.

The total impulse is the integral of the thrust over the operating duration of the motor. This can be approximated by

It = ?t(F1+F2+F3+...)

where: It = total impulse in lb-sec
?t = time increment in seconds
F1, F2, F3, ... = thrust at timesteps 1, 2, 3, ... in lb

The specific impulse is the total impulse divided by the weight of the propellant burned in the test.

Isp = It/m

where: Isp = specific impulse in seconds
m = mass of propellant burned in pounds

The average thrust is found by dividing the total impulse by the thrust time.

Favg = It/t

where: Favg = average thrust in lb
t = total test time in seconds

 

An input data file called testdata contains time and thrust data for a rocket test where the mass of propellant burned was 1.74 lb. The first record line of the input file is the control number, which defines the number of data points to be read into the program. Each succeeding record line has two columns. The first column is the elapsed test time in seconds, and the second column is the thrust in pounds. The input file is comma delimited.

ASSIGNMENT:

Write a C program that will read the required values from the input file into two one-dimensional arrays. Using the thrust, time, and increment between timesteps (hint: you can get this from the time array - think about using one specific data value), compute the total thrust, total impulse, specific impulse, and average thrust.

Print the total impulse, specific impulse, and average thrust to the computer screen and to an output file called results.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a c program that will read the required values from
Reference No:- TGS02917987

Expected delivery within 24 Hours