Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Important information about the downloaded program The code you will download runs but only updates the position of the less massive particle. The more massive

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Important information about the downloaded program The code you will download runs but only updates the position of the less massive particle. The more massive particle stays fixed (as it should) and the less massive particle will move in a straight line. You should read through the provided code carefully (including the comments) to ensure you know which particle is supposed to move and which should stay fixed. Your objective For this question, you will add code that computes the force acting on the less massive of the two particles and updates its momentum. Once complete, your program should carry out the necessary force calculations and momentum update to model the motion the less massive particle. Necessary information for the momentum update One of the particles is much lighter than the other and the particles are far from all other objects. The force acting on the lighter particle is directed along the line connecting the two particles. Its magnitude is given by Fmus = kr , where is the separation between the particles, is a positive constant, and Important details about this programming Note in Python, you take x to the power n by using notation x**n. Do not use x^n, which is something else in Python. Also, note this is the magnitude of a force. You need an r_hat to make it a vector In the shell program that is provided, you need to delete the line trail.append(pos=greenparticle.pos) It slows the loop too much and the program sometimes does not finish in a short enough time Before answering the questions below, write the lines of code to compute the force acting on the less massive particle and update its momentum. Description 1. + -/25 points My Notes For this question, you will add code that computes force acting on the less massive of the two particles and updates its momentum. Make sure you have read and understand all the instructions given above before attempting this question. You should download this program and run it: mystery_force.py (Right-click, select "Save Link As...") Before answering the questions below, write the lines of code to compute the force acting on the less massive particle and update its momentum. Read the instructions given above and the comments carefully to determine which particle is the less massive particle. Test Case - Make sure that your program produces these results before trying the Graded Question. Constants Interaction for Test Case: attractive Interaction coefficient, k: 0.29 N*m^-3 Interaction strength, n: 3 Mass of less massive particle: 0.0026 kg Time step (deltat) 5e-6 s Initial Conditions Initial position of the more massive particle (remains still): m Initial velocity of the more massive particle (remains still): m/s Initial position of the less massive particle (will interact): m Initial velocity of the less massive particle will interact): m/s Keep the more massive particle fixed. Make sure that your model is printing the less massive particle's final position and final velocity after the program is done running. Model the motion until 2.300 s have passed. Final position of the less massive particle: m Final velocity of the less massive particle: m/s Graded Question - Make sure that your code works for the Test Case before solving this question. (2) After downloading this program, set the initial conditions of your computer model to the following: Constants Interaction for Graded Question: attractive Interaction coefficient, k: 0.42 N*m^-3 Interaction strength, n: 3 Mass of less massive particle: 0.0048 kg Time step (deltat): 5e-6 s Initial Conditions Initial position of the more massive particle (remains still): m Initial velocity of the more massive particle (remains still): m/s Initial position of the less massive particle (will interact): m Initial velocity of the less massive particle (will interact): m/s Keep the more massive particle fixed. Model the motion until 2.800 s have passed. Double check all your initial conditions and constants before submitting your answers. (a) Final position of the less massive particle: ,0> m (b) Final velocity of the less massive particle: ,0> m/s Important information about the downloaded program The code you will download runs but only updates the position of the less massive particle. The more massive particle stays fixed (as it should) and the less massive particle will move in a straight line. You should read through the provided code carefully (including the comments) to ensure you know which particle is supposed to move and which should stay fixed. Your objective For this question, you will add code that computes the force acting on the less massive of the two particles and updates its momentum. Once complete, your program should carry out the necessary force calculations and momentum update to model the motion the less massive particle. Necessary information for the momentum update One of the particles is much lighter than the other and the particles are far from all other objects. The force acting on the lighter particle is directed along the line connecting the two particles. Its magnitude is given by Fmus = kr , where is the separation between the particles, is a positive constant, and Important details about this programming Note in Python, you take x to the power n by using notation x**n. Do not use x^n, which is something else in Python. Also, note this is the magnitude of a force. You need an r_hat to make it a vector In the shell program that is provided, you need to delete the line trail.append(pos=greenparticle.pos) It slows the loop too much and the program sometimes does not finish in a short enough time Before answering the questions below, write the lines of code to compute the force acting on the less massive particle and update its momentum. Description 1. + -/25 points My Notes For this question, you will add code that computes force acting on the less massive of the two particles and updates its momentum. Make sure you have read and understand all the instructions given above before attempting this question. You should download this program and run it: mystery_force.py (Right-click, select "Save Link As...") Before answering the questions below, write the lines of code to compute the force acting on the less massive particle and update its momentum. Read the instructions given above and the comments carefully to determine which particle is the less massive particle. Test Case - Make sure that your program produces these results before trying the Graded Question. Constants Interaction for Test Case: attractive Interaction coefficient, k: 0.29 N*m^-3 Interaction strength, n: 3 Mass of less massive particle: 0.0026 kg Time step (deltat) 5e-6 s Initial Conditions Initial position of the more massive particle (remains still): m Initial velocity of the more massive particle (remains still): m/s Initial position of the less massive particle (will interact): m Initial velocity of the less massive particle will interact): m/s Keep the more massive particle fixed. Make sure that your model is printing the less massive particle's final position and final velocity after the program is done running. Model the motion until 2.300 s have passed. Final position of the less massive particle: m Final velocity of the less massive particle: m/s Graded Question - Make sure that your code works for the Test Case before solving this question. (2) After downloading this program, set the initial conditions of your computer model to the following: Constants Interaction for Graded Question: attractive Interaction coefficient, k: 0.42 N*m^-3 Interaction strength, n: 3 Mass of less massive particle: 0.0048 kg Time step (deltat): 5e-6 s Initial Conditions Initial position of the more massive particle (remains still): m Initial velocity of the more massive particle (remains still): m/s Initial position of the less massive particle (will interact): m Initial velocity of the less massive particle (will interact): m/s Keep the more massive particle fixed. Model the motion until 2.800 s have passed. Double check all your initial conditions and constants before submitting your answers. (a) Final position of the less massive particle: ,0> m (b) Final velocity of the less massive particle: ,0> m/s

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