Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

PLEASE READ THE WHOLE QUESTION! I've been stuck on this python problem for a while for my Mechanical Engineering class at Uni and really need

PLEASE READ THE WHOLE QUESTION! I've been stuck on this python problem for a while for my Mechanical Engineering class at Uni and really need it done/know how or at least see how it is done and formatted!

Write a Python program that, inside a loop, does several things:

  1. a) Asks the user for values of mass in kg, damping in N/(m/s), and stiffness in N/m and appends the user's

    values to the ends of list variables that were initially set to empty.

  2. b) Prints out the natural frequency in Hz and the damping ratio.

  3. c) Asks the user if they want to continue

Then, when the user is done entering values, leave the loop. Print out a neat table with the user's values, the values for natural frequency and damping ratio, and the type system response, as given above. The table should start with header and unit rows, as shown in the example run below. Numerical values should be formatted wide enough to make neat columns and show 4 digits to the right of the decimal.

image text in transcribed

I need the end result to be in an organized format the same (or similar) to this table:

image text in transcribed

Background: In analysis of 2nd-order mechanical system dynamics, we often consider how the positive, real parameters for mass m and stiffness k and nonnegative, real parameter damping c affect the system's response x Or, dividing through by m, we can put things in terms of two parameters dt2 dt where the two parameters are Wn is the natural frequency of the system, typically in 1/sec or radians/sec units, though it is often useful to show natural frequency in Hz (which is cycles/second), as given by fn -wn/2rn is the damping ratio of the system (unitless) 2Vkm and we can find nonnegative, real values for wn and It turns out that important changes to the system response take place, depending on the value of Thus Value of System Response undamped underdamped critically damped overdamped 1) Write a Python program that, inside a loop, does several things: a) Asks the user for values of mass in kg, damping in N/(m/s), and stiffness in N/m and appends the user's values to the ends of list variables that were initially set to empty b) Prints out the natural frequency in Hz and the damping ratio c) Asks the user ifthey want to continue Then, when the user is done entering values, leave the loop. Print out a neat table with the user's values, the values for natural frequency and damping ratio, and the type system response, as given above. The table should start with header and unit rows, as shown in the example run below. Numerical values should be formatted wide enough to make neat columns and show 4 digits to the right of the decimal Mass Stiffness N/m Damping Omega_n Zeta N/ (m/s) Response Type Hz Underdamped Overdamped 3.0000 2.0000 4.0000 4. 0000 12.0000 4.0000 4.0000 8.0000 2. 0000 0.3183 0 . 1667 9.0000 0.2251 1.5910 8.0000 .1592 1.0000 Critically Damped 0.0000 0.2251 0.0000 Undamped

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions