Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having trouble generating a plot. in this program, the program takes a final time (tF) value and the initial time (tI) value and

I am having trouble generating a plot. in this program, the program takes a final time (tF) value and the initial time (tI) value and subtracts them to get a (delta T) that delta T is then plugged into the terminal velocity equation (vT). The goal is to take the delta T and vT and place them into a plot. (Terminal velocity cannot exceed 2). the plot is generated however, there is no data point on that plot. Please help!!

image text in transcribedimage text in transcribed

import numpy as np import matplotlib.pyplot as plt

def problem4C():

tF = 0.008 vI = 0 g = 10 m = 10 c = 50 tI = 0 vMax = 2 i=0

#Loops for certain number of delta T's

while True: for i in range(14):

#delta T

t = tF-tI

#Terminal velocity equation

vT = vI+(g -((c/m)*vI))*(t)

#Replaces V inital with terminal velocity answer vI = vT

i = i+1 #print(vT)

#reaches 14 interations

if i == 14:

if vT > vMax: tF = tF-0.0001 continue elif vT

#Error eT = ((vMax - vT) / vMax)*100

#round error to 2 decimal places

eT = round(eT,2)

#checks to see if velocity is 99.99 percent correct if eT != 0.01:

tF = tF + 0.001

continue

elif eT == 0.01:

print("Time required to reach 99.99 percent terminal velocity:",round(tF,4), "s")

#plot t = np.array() plt.plot(t,vT) plt.show()

break

def main(): #problem4A() problem4C()

main()

import numpy as np import matplotlib.pyplot as plt def problem4c(): t = 0.008 VI = 0 g = 10 m = 10 c=50 tI = 0 VMax - 2 i=0 #Loops for certain number of delta T's while True: for i in range (14): #delta T t = t-tI #Terminal velocity equation VT = vI+(g -((c/m) *VI)) * (t) #Replaces V inital with terminal velocity answer VI = VT i = 1+1 #print (VT) #reaches 14 interations if i = 14: if vt > VMax: t = tf-0.0001 continue elif VT VMax: t = tF-0.0001 continue elif VT

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

ISBN: 0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago