Midterm 1 (Due 10 Oct)#
Fall 2025
Practicalities about Midterms
You can work in pairs or by yourself. If you work as a pair you can hand in one answer only if you wish. Remember to write your name(s)! You may collaborate with others (optimal group size 3-4).
How do I(we) hand in? You can hand in the paper and pencil exercises as a single scanned PDF document. Your jupyter notebook file should be converted to a PDF file, attached to the same PDF file as for the pencil and paper exercises. All files should be uploaded to Gradescope.
Cite any resources you use for your midterm, and you can, of course, meet with any instructors or ask any questions in class about the midterm. We will not work any of the exercises on the midterm in help sessions as we have with homework exercises.
Midterms are meant to be challenging and might cover topics and areas that we have not covered directly in class. They might also ask you to complete your own research or design your own model; there are plenty of resources available on the course website and you are welcome to ask any instructors for help or guidance.
Instructions for submitting to Gradescope.
Exercise 1 is marked Submit on D2L only, you must do submit this separately to D2L, not Gradescope. The work on Exercise 1 will be graded pass/fail and may be completed with a different partner than your homework group. You are submitting to D2L, so that Danny can give you feedback on your work in a timely manner to help with questions on your project and guide its development.
Reminder of AI Policy for our class
We adopt a policy that allows AI use for brainstorming, help, and editing.
AI cannot be used for direct answers or completion of assignments.
We expect documentation of AI use, but it can be informal.
Violations are discussed with Danny; the first violation requires a redo of the assignment, and repeated violations result in a failing grade.
What is informal documentation?
A summary of the use of AI and the kinds of questions asked, and what the AI replied with. Detailed prompts and replies are not needed but the extent to which AI was used to create products in the midterm is important to document. Of course, this is a minimal standard. You can include more detailed documentation such as screenshots of your interactions. The benefit of including screenshots, especially for project work, is that instructors can help you use AI tools more effectively.
Midterms in this class are also a learning opportunity. There are different ways to arrive at the solutions and you might have to learn something new to develop that solution. Using your resources and asking for help from instructors is very much encouraged, especially early on for the more open-ended exercises.
import numpy as np
from math import *
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
plt.style.use('seaborn-v0_8-colorblind')
Exercise 1, Planning your project (10 points)#
SUBMIT THIS ON D2L only
On homework 4, we asked you to review the University of Oslo’s computational essay showroom. We asked you to find a computational essay that you found interesting and to write a short paragraph about why you found it interesting. In this part of the midterm, we ask you to plan your own computational essay.
We hear from students that often the hardest part of developing a computational essay is often finding a question worth investigating. So we are trying to help you with that. You are not expected to write the computational essay for this midterm. Instead, you are expected to plan it.
For your final project, you will develop a computational essay. Your answers to this question do not commit you to completing this project on the idea you present here. You can change your mind later. This is a good exercise to get you thinking about what you might want to do, and you might find that you want to work on this plan for your final project.
For each of the questions below, you should write a paragraph or two (minimum 150 words, maximum 250 words) to answer the question. You may include equations, code, or figures in any of your answers.
(2 pts) Who is the team and how are you going to communicate regularly? What is the question(s) you want to investigate? What background information do you need to understand the question(s)? Where can you find that information?
(2 pts) What is the motivation for the question(s)? Why is it interesting to you? Why is it interesting to others?
(2 pts) What is the computational aspect of the question(s)? What will you calculate? What will you simulate? What will you visualize?
(2 pts) Outline the structure of the set up and the analysis that you think that you need in order to answer the question(s) you have. What are the key steps you would need to take? What are the key challenges you anticipate?
(2 pts) How will you know if you have answered the question(s)? What are the key results you would be looking for?
If you prefer, you can simply write up a single document that answers all these questions in a style you prefer. That document should be roughly 500-1000 words long and may include equations, code, or figures.
Exercise 2, Spin dependent forces (20 points)#
We’ve modeled objects falling, bouncing, and moving under different forms of fluid resistance. One key feature we have failed to account for are the forces that result from the lift force that occurs for objects spinning in the presence of fluid flow.
The Magnus Effect#
This is the Magnus Effect and it is a result of a broken symmetry in the fluid flow due to the spinning of the object. Fluid in the direction of the spin moves differently than the fluid that moves opposite the direction of flow. The figures below illustrate the effect:
ABOVE: A back-spinning cylinder (\(\mathbf{L}\) into of the page, fluid flow left to right) produces a Von Kármán vortex street that is directed downward. This is a signature of an upward lift.
ABOVE: A top-spinning cylinder (\(\mathbf{L}\) into the page, fluid flow right to left) will drive the fluid upward, the fluid on the bottom is accelerated in the direction of flow as it moves with the rotation. The causes a reaction force on the cylinder downward.
The Magnus Effect in Sports#
The Magnus Effect is important in nearly all sports where a ball is used. It produces trajectories that can curve in complex ways. This phenomena can be used to expert effect in tennis, volleyball, soccer, baseball, table tennis, golf, pickleball, jai lai, and so on.
Once place where the role of fluids is more complicated is bowling; the interaction with the spinning ball and the surface of the alley is a very different interaction. Here, lubrication theory helps, as the fluid underneath (the lane oil) plays a huge roll. In fact, there are many different oil lane patterns that expert bowlers learn to play on.
Mathematical Model of the Magnus Effect#
For this problem, you will add the spin dependent interaction to some model of a ball moving through air. The mathematical model of the of the force involves the cross (vector) product, so you will need to carefully set up your coordinate system.
The mathematical model of the Magnus Force for a spinning sphere is given by:
Here, \(S(v)\) is a function of speed, but for our purposes we will treat as constant for all speeds.
The other two terms are the velocity \(\mathbf{v}\) of the ball and the angular velocity \(\boldsymbol\omega\) of the ball as it spins.
Typically, the spin-drag interaction will cause the spinning of the ball to slow, this is what \(S(v)\) can capture. For extra credit, you can add that (see below).
(4 pts) Set up the situation that you intend to model; explain it and indicate the coordinate system.
Find all the necessary constants and properties that you need.
Make sure things have the correct SI units.
Make a table of these values, so we can follow your work. This will also help with your computational model.
(4 pts) For a model that includes that gravitational interaction, the turbulent drag model, and the spin dependent interaction, write out the differential equation that includes each aspect.
You should write this as both a vector differential equation, make sure you are careful about the signs and directions, and a set of scalar ODEs that have the correct signs, these are needed for the next part.
These scalar ODEs are second order, how else do we characterize them?
Do you notice something about how many ODEs you must have to model this system compared to what we’ve done with 1D and 2D drag models?
(4 pts) The ODEs that you developed in part 2, which are second order, need to be made into sets of first order ODEs. Remember that you are going to need to develop twice as many first order equations as you have second order in part 2.
Write them both as analytical equations and discrete equations that you would use in a computational model, that is, how does each time step get computed in a Euler-Cromer set up?
(4 pts) Using prior codes that have been posted (e.g., Euler integration resource and Integration Methods, or homework solutions on D2L), or written from scratch, write a computational model that integrates these equations of motion to model a trajectory.
Choose appropriate initial conditions for your model and attempt to be as close to realistic choices as possible.
Show the trajectory in 3 dimensions and make plots of the velocities and the magnitudes of the different forces acting on the ball.
(4 pts) What do you notice in your graphs about the motion of your ball?
How accurate is your work? How are you judging that?
From the graphs you’ve made, is anything surprising or explanatory for the “goodness” or “badness” of your model? What might improve it?
Extra Credit (20 pts)#
The spin dependent interaction is “coupled” to the drag force both through the cross product of the angular velocity and the linear velocity, and the tunable parameter \(S(v)\). We’ve treated it as constant so far. How should it be treated? Should \(S\) go up or down as the speed goes up or down? Is it monotonic (i.e., always increasing or always decreasing)? Research a simplified model of this coupling constant \(S(v)\) and describe what you find. Implement this approach for the same trajectory you computed in part 4. How do they compare?
Exercise 3, Particle in a one-dimensional potential (40 points)#
We consider a particle (for example an atom) of mass \(m\) moving in a one-dimensional potential,
We will assume all other forces on the particle are small in comparison, and neglect them in our model. The parameters \(V_0\) and \(d\) are known constants.
(3 pts) Sketch or plot the potential and find the equilibrium points (stable and unstable) by requiring that the first derivative of the potential is zero. Make an energy diagram (see for example Malthe-Sørenssen chapter 11.3) and mark the equilibrium points on the diagram and characterize their stability. The position of the particle is \(x\).
(2 pts) Choose two different energies that give two distinct types of motions, draw them on the energy diagram, and describe the motion in each case.
(5 pts) If the particle starts at rest at \(x=2d\), what is the velocity of the particle at the point \(x=d\)?
(5 pts) If the particle starts at \(x=d\) with velocity \(v_0\), how large must \(v_0\) be for the particle to reach the point \(x=−d\)?
(5 pts) Use the above potential to find the net force acting on the particle. Find the acceleration acting on the particle. Is this net force conservative? Calculate the curl of the force \(\boldsymbol{\nabla}\times \boldsymbol{F}\) in order to validate your conclusion.
(5 pts) Are linear momentum and angular momentum conserved? You need to show this by calculating these quantities.
(5 pts) Write a numerical algorithm to find the position and velocity of the particle at a time \(t+\Delta t\) given the position and velocity at a time \(t\). Here you can use either the standard forward Euler, or the Euler-Cromer or the Velocity Verlet algorithms. You need to justify your choice here (hint: consider energy conservation). You might find this numerical integration resource helpful.
(5 pts) Use now your program to find the position of the particle as function of time from \(t=0\) to \(t=30\) s using a mass \(m=1.0\) kg, the parameter \(V_0=1\) J and \(d=0.1\) m. Make a plot of three distinct positions with initial conditions \(x_0=d\) and \(v_0=0.5\) m/s, \(x_0=d\) and \(v_0=1.5\) m/s, and \(x_0=d\) and \(v_0=2.5\) m/s. Plot the velocity. Perform these analyses with and without the term \(x^4\) in the potential. Do you see a difference? What do you notice?
(5 pts) Describe the behavior of the particle for the three initial conditions and sketch the motion in an energy diagram. Is energy conserved in your simulations?
Exercise 4, Model your own system (30 points)#
In this problem, you will choose a one dimensional system of your own. You may choose a known potential, or you may invent your own. Your potential must:
Have at least one stable equilibrium point.
Have at least one unstable equilibrium point, or some other interesting feature (e.g., asymptotic behavior).
For some choice of total energy, it should have oscillatory motion (i.e., classical turning points).
Produce a non-linear and conservative force.
Be continuous and differentiable over the range of interest.
For this problem, you will need to perform the following tasks:
(5 pts) Write down the potential and start to demonstrate that it meets the above criteria. Make sure it is conservative and that the force is nonlinear before proceeding.
(5 pts) Sketch or plot the potential and find the equilibrium points. You need to show you can compute the equilibrium points and characterize their stability. For some choices of potential, you may need to use a numerical method to find the equilibrium points and conceptual arguments to determine their stability.
(5 pts) Pick a total energy that gives rise to oscillatory motion. Show this by sketching or plotting the energy diagram and describing the motion. Are there any other kinds of motion that can occur for other choices of total energy?
(10 pts) Write a numerical algorithm to find the position and velocity of the particle (it’s trajectories) for the choice of total energy where the motion is oscillatory. Here you must use two methods: (1) the standard forward Euler, and either (2) the Euler-Cromer or the Velocity Verlet algorithms. You will need to pick the time step \(\Delta t\) and the total time \(t_{\rm max}\) for your simulation. Compare the results of the two algorithms. Which one is better? Justify your answer. You might find this numerical integration resource helpful.
(5 pts) Use your program to plot the energy of the particle (T), the potential energy (V), and the total energy (E) as a function of time. Discuss the behavior of the energy between each choice of algorithm. Is energy conserved in your simulations?
Extra Credit (5pts), Integrating Classwork With Research#
This opportunity will allow you to earn up to 5 extra credit points on this midterm. These points can push you above 100% or help make up for missed exercises. In order to earn all points you must:
Attend an MSU research talk (recommended research oriented Clubs is provided below)
Summarize the talk using at least 150 words
Turn in the summary along with your Homework.
Approved talks: Talks given by researchers through the following clubs:
Society for Physics Students (SPS): Meets Monday Nights (alternates with Astronomy Club)
Astronomy Club: Meets Monday Nights (alternates with SPS)
Any physics and astronomy seminar of interest to you
Other professional opporunties are acceptable as well. If you have any questions please consult Danny.