Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write modular codes in MATLAB using user-defined functions 2. Use FOR loops in programs. Many different quantities in aerospace engineering depend on the temperature, pressure,

Write modular codes in MATLAB using user-defined functions 2. Use FOR loops in programs.

image text in transcribed

Many different quantities in aerospace engineering depend on the temperature, pressure, and density of the atmosphere at the current altitude. The atmosphere can be modeled as a series of alternating isothermal and gradient regions. Within the isothermal region, the pressure (p) and density (p) are defined by the following equations 2. Pi - e-lgo/(RT)](h-h) P1 where R is the specific gas constant of 1716 (ft-lbf)/(slug-R), go is the acceleration due to gravity of 32.2 ft/s2, T represents the constant temperature in the isothermal layer in R, and h represents the geopotential altitude in ft. The subscript 1 indicates that the value of the parameter is from the base (i.e., the beginning) of the region. The first isothermal region in the atmosphere begins at approximately 36089 ft, where T 389.99 R, p 474.11 lbf/ft2, and p- 0.0007074 slug/ft3, and ends around 82021 ft in altitude. Write a program that will Ask the user for the geopotential altitude, and the base values for altitude, temperature, pressure, and density for the current isothermal region Calculate the pressure, density at the specified altitude. (Note: Write this task as a function.) a. b. c. Display the results to the command window One example of running this program is as follows (user input is highlighted in yellow) Enter the current altitude (ft) 47000 Enter the base altitude for the region (ft) 36089 Enter the base temperature (deg Rankine) 389.99 Enter the base pressure (lb/ft 2) 474.11 Enter the base density (slug/ft^3): 0.0007074 At a geopotential altitude of 47000.00 ft, the pressure is 280.47 lb/ft"2 and the density is 0.00042 slug/ft"3 Turn in the output to the command window, which should have the same format as above Submit your .m files on Blackboard

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions