Question

In: Computer Science

Directions Create a class that computes the lift and drag of a rectangular planform wing. Lift...

Directions Create a class that computes the lift and drag of a rectangular planform wing. Lift can be calculated with the following equation: lift = Cl * A * 0.5 * rho * V2 Cl is the lift coefficient; it is dimensionless A is the area of the wing in m2 rho is the air density, in kg/m3 , for the altitude the wing is flying V is the velocity in m/s Drag can be calculated with the following equation: Drag = Cd * A * 0.5 * rho * V2 Cd is the drag coefficient; it is dimensionless The other variables are the same as the lift equation. Notes: Cl and Cd vary with the wing angle of attack. rho varies with altitude. A rectangular planform wing is 85% efficient when compared to the optimal elliptical wing.

Solutions

Expert Solution

import java.io.*;
import java.util.*;

public class LiftDrag {
   
      public static void calculateLift(){
          Scanner sc = new Scanner(System.in);
          System.out.print("Enter lift coefficient:");
          double ci = Double.parseDouble(sc.nextLine());
         
          System.out.print("Enter area:");
          double ar = Double.parseDouble(sc.nextLine());

          System.out.print("Enter air density:");
          double rho = Double.parseDouble(sc.nextLine());

          System.out.print("Enter velocity:");
          double v = Double.parseDouble(sc.nextLine());

          double lift = ci * ar * 0.5 * rho * v * v;
          System.out.println("Lift:" + lift);
      }
      public static void calculateDrag(){
          Scanner sc = new Scanner(System.in);
          System.out.print("Enter lift coefficient:");
          double cd = Double.parseDouble(sc.nextLine());
         
          System.out.print("Enter area:");
          double ar = Double.parseDouble(sc.nextLine());

          System.out.print("Enter air density:");
          double rho = Double.parseDouble(sc.nextLine());

          System.out.print("Enter velocity:");
          double v = Double.parseDouble(sc.nextLine());

          double drag = cd * ar * 0.5 * rho * v * v;
          System.out.println("Drag:" + drag);
      }
      public static void main(String[] args){
          calculateLift();
          calculateDrag();
      }
}


Related Solutions

What pressure distribution? How does it relate to drag and lift coefficients?
What pressure distribution? How does it relate to drag and lift coefficients?
1. Aerodynamics : (a) how to find zero lift line of a wing and airfoil?
[Aerospace Engineering] 1. Aerodynamics : (a) how to find zero lift line of a wing and airfoil? (b) how do we relate this with climb angle(gamma), pitch angle(theta), angle of incidence, and Angle of Attack(Alpha) (c) why during climb Theta is not considered as Angle of attack since the aircraft moves with respect to x-axis? or is that with respect to thrust direction? (d) then can we classify Angle of Attack to be similar with Angle of Incidence if the...
Directions: Create a Bluej project called Exam1 that implements the Headphone class and the HeadphoneInventory class...
Directions: Create a Bluej project called Exam1 that implements the Headphone class and the HeadphoneInventory class described below. Each class is worth 50 points. When you are finished, zip the project folder and submit it. The Headphone class represents a headphone. It stores the headphone’s manufacturer: manufacturer, name: name, quantity: quantity, number of times restocked: timesRestocked. Write the Headphone class according to the following requirements. Add the four fields to the Headphone class. Create a constructor that takes two parameters....
An airplane has an effective wing surface area of 19.0 m2 that is generating the lift...
An airplane has an effective wing surface area of 19.0 m2 that is generating the lift force. In level flight the air speed over the top of the wings is 55.0 m/s, while the air speed beneath the wings is 35.0 m/s. What is the weight of the plane?
An airplane has an effective wing surface area of 22.6 m2 that is generating the lift...
An airplane has an effective wing surface area of 22.6 m2 that is generating the lift force. In level flight the air speed over the top of the wings is 75.0 m/s, while the air speed beneath the wings is 60.0 m/s. What is the weight of the plane? This is the whole question, no other information was provided.
Follow the UML diagram and directions on the attached file to create a RectangularPrism class and...
Follow the UML diagram and directions on the attached file to create a RectangularPrism class and a RectangularPrismDemo class. --------------------------------------------------------------------------------------------------------------------------------------- RectangularPrism            - length: double       - width: double       - height: double + RectangularPrism() + RectangularPrism(l:double,w:double, h:double) + setLength(l:double):void + setWidth(w:double):void + setHeight(h:double):void +getLength():double +getWidth():double +getHeight():double +getVolume():double +getSurfaceArea():double +toString():String --------------------------------------------------------------------------------------------------------------------- Create a RectangularPrism class in its own file based on the UML Create a separate RectangularPrismDemo Class file to demonstrate your class by doing the following: Create two prisms,...
write a paragraph explaining how camber and angle of attack affect the pressure, lift and drag...
write a paragraph explaining how camber and angle of attack affect the pressure, lift and drag properties of the airfoil.
Bernoulli's principle can be used to explain the lift force on an airplane wing. How must...
Bernoulli's principle can be used to explain the lift force on an airplane wing. How must an airplane's wing be designed to ensure that Bernoulli's principle is applicable? Bernoulli's principle can be used to explain the lift force on an airplane wing. How must an airplane's wing be designed to ensure that Bernoulli's principle is applicable? A. Airplane wings must be designed to ensure that air molecules move more rapidly past the bottom surface of the wing, creating a region...
A rectangular wing with a NACA 65-210 airfoil section and a chord of 6 in is...
A rectangular wing with a NACA 65-210 airfoil section and a chord of 6 in is mounted in the Auburn University 2 ft × 2 ft wind tunnel, completely spanning the test-section. The tunnel is operating with test section velocity, pressure, temperature, and velocity of 1 atm, 520°R, and 75 ft/s, respectively. (a) Calculate the lift, drag, and moment about the quarter-chord when the angle of attack is 5°. (b) What angle of attack would be required to generate a...
directions: use c++ Create a  ContactInfo class that contains the following member variables: name age phoneNumber The...
directions: use c++ Create a  ContactInfo class that contains the following member variables: name age phoneNumber The ContactInfo class should have a default constructor that sets name = "", phoneNumber = "", and age = 0. The ContactInfo class should have a constructor that accepts the name and phone number as parameters and sets name = <value of parameter name>, aAge = 0, and phoneNumber = <value of parameter phone number>. The ContactInfo class should have accessor and mutator functions for...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT