Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in python to calculate and plot the position and the velocity of a linear piston connected to a crank through a connecting

image text in transcribed

Write a program in python to calculate and plot the position and the velocity of a linear piston connected to a crank through a connecting rod as a function of crank angle. The crank shaft is rotating at a constant angular velocity. The equation for the piston position and velocity is respectively given by 12-r2 sin2 where r is the crank radius, l is rod length, is the crank angle with the piston axis, and o is the crank angular velocity Assume 1-15 cm, and -100 rads and for r-3 cm and 5 cm, plot the position and velocity from 0-0 to 360 with lo step size. Note that should be in radian if you are using math library for calculating sin()and cos(0). Plot both in one figure with 2 subplots. Your plot should look like the following: HSubplot for position Subplot for velocity Qdd plot labels and legends for different r values, and axes labels for each subplot. You need to search in the plot document for subplot options. Challenge: Modify your program to also find the maximum velocity of the piston and report the max velocity and corresponding crank angle to the uscrPerform this search using a loop and your velocity data array. You should not use the built-in function for finding the maximum Write a program in python to calculate and plot the position and the velocity of a linear piston connected to a crank through a connecting rod as a function of crank angle. The crank shaft is rotating at a constant angular velocity. The equation for the piston position and velocity is respectively given by 12-r2 sin2 where r is the crank radius, l is rod length, is the crank angle with the piston axis, and o is the crank angular velocity Assume 1-15 cm, and -100 rads and for r-3 cm and 5 cm, plot the position and velocity from 0-0 to 360 with lo step size. Note that should be in radian if you are using math library for calculating sin()and cos(0). Plot both in one figure with 2 subplots. Your plot should look like the following: HSubplot for position Subplot for velocity Qdd plot labels and legends for different r values, and axes labels for each subplot. You need to search in the plot document for subplot options. Challenge: Modify your program to also find the maximum velocity of the piston and report the max velocity and corresponding crank angle to the uscrPerform this search using a loop and your velocity data array. You should not use the built-in function for finding the maximum

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_2

Step: 3

blur-text-image_3

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

Can I rule out confounding factors? (163)

Answered: 1 week ago

Question

To solve p + 3q = 5z + tan( y - 3x)

Answered: 1 week ago