Write a program to model the vertical position of a car

Assignment Help Python Programming
Reference no: EM132856353

MAE 3403 Computer Methods in Analysis and Design - Oklahoma State University

Question 1. Write a program to model the vertical position of a car that is rolling along at constant speed and hits a linear ramp to a new level of y=6 inches.

a. Create an object-oriented python program to model the vertical position of the car body as a function of time using a single wheel and suspension as illustrated. Note: we have nearly solved this problem in Quarter Car Model.py of Week 6 lecture, but not in OOP and not for a linear ramp.

1086_Analysis and Design.jpg

b. Create a graphical user interface that allows the user to modify: the car speed, the wheel and car body masses, the spring constants, the damping coefficient of the shock absorber and the angle of the linear ramp to the new level. Initialize your GUI with reasonable values for the masses, spring constants, damping coefficient and ramp angle. Your GUI should display a matplotlib plot of the car body vertical position as a function of time (of sufficient length to capture all the bouncing of the car that may occur). Changes to the physical parameters through the GUI should be incorporated into the model and the plot updated with, say, the push of a calculate button.

Question 2. In the week 11 materials on canvas, you were given HW8-final.zip. In this archive is a folder named ‘Rankine-rev3-final' that contains the GUI and OOP version of our Rankine program. Re-write the Rankine program in the Model-View-Controller design pattern by writing a controller class that contains a rankine object (i.e., the model) and a view object, which is responsible for displaying the data from the model. Modify the GUI, as necessary, such that only the controller is instantiated and used in the application.

Hints for possible structure of your program:
The rankine class should only contain a constructor with the necessary class variables.

The rankineCycleController class should have these objects defined in its constructor:
self.model=rankine()
self.view=rankineCycleView()
and the functions that operate on the model:
def set(...
def calc_efficiency(...
def buildVaporDomeData(...
def buildDataForPlotting(...
and the functions that operate on the view:
def plot_cycle_XY(...
def print_summary(...
def get_summary(...
def updateView(self, displayWidgets=None)
The rankineCycleView class should have these functions:
def print_sumarry(...
def get_summary(...
def plot_cycle_XY(...
def updateView(self, displayWidgets=None)

Question 3. Write a program to read and display information from a truss design file. The design file will be provided on canvas along with this assignment. Your program should look something like the figure below, but this one was made with OpenGL graphics, whereas you should use the QGraphicsView etc. for the figure. Note: you may want to use/reuse the code from our pipe network program.

2014_Analysis and Design1.jpg

Reference no: EM132856353

Questions Cloud

What the first step in the sdlc : Which Any structure an organisation uses for organising, accessing, retrieving, storing and managing its information? What The first step in the SDLC
Calculate Christine net pay : Christine works for Marian Transport in Québec and is paid $962.35 weekly. Calculate Christine net pay
Organizing business for sake of potential rewards : Entrepreneur is a "person who assumes the risks of managing and organizing a business for the sake of potential rewards."
What is ubiquitous communication : What is ubiquitous communication, and what kinds of controversies does it raise?
Write a program to model the vertical position of a car : Write a program to model the vertical position of a car that is rolling along at constant speed and hits a linear ramp to a new level of y=6 inches
Discuss circumstances when the company is subject to report : Discuss and contrast your organization's obligations to report a breach under Alberta's Personal Information Protection Act (PIPA)
Capture high-quality images of the lake bed : In the summer of 2017, a mission to recover the nine models of the Avro Arrow was launched. It was a collaborative effort by several private companies
What does the supreme court of canada say about the role : What does the Supreme Court of Canada say about the role that an organization's computer use policy and practices may play in the assessment
What is the loan impairment loss : The PV of 1 at 10% for three periods is 0.75, and the PV of an ordinary annuity of 1 at 10% for three period is 2.49. What is the loan impairment loss for 2019

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd