The restoring force of a simple pendulum in the angular (0) direction is F = -mg sin 0, and the corresponding acceleration is a = -Folm = -g sin 0. Dividing a by the pendulum length L yields the angular acceleration α = ag/L=-- dQ2 We know from rotational kinematics that angular acceleration is the rate of change of angular velocity, i.e. a = = S2, and the angular velocity is the dt rate of change of the angle 8, i.e. Ω = Therefore, our differential equations of motion for the simple pendulum are dQ dt de dt S2₁ = 20 + de dt = 22 @= £sin dQ dt L sin 0 Why do we use a capital greek omega (2) for the angular velocity? Because the lowercase @w is defined in the lab manual as the angular frequency of the pendulum, which is a different (constant) quantity: -sin 0 Ꮎ 8 VL Iteration is King (again)! The Euler-Cromer method of numerical integration To solve these differential equations, we use (almost) the same interactive Euler method as for the "free fall/air drag" experiment. First, let's define the initial values: We start the pendulum at time to from an angle 80 with zero angular velocity (20 = 0). For a sufficiently short time interval At, the angular acceleration can be considered constant, so we can calculate the new angular velocity at time t₁ = to + At: At = - =sin(00) At L

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
**The Restoring Force of a Simple Pendulum**

The restoring force in the angular (\(\theta\)) direction for a simple pendulum is given by \(F_{\theta} = -mg \sin \theta\). The corresponding acceleration is \(a_{\theta} = -F_{\theta}/m = -g \sin \theta\). Dividing \(a_{\theta}\) by the pendulum length \(L\) yields the angular acceleration:

\[
\alpha = a_{\theta}/L = -\frac{g}{L} \sin \theta
\]

From rotational kinematics, we know that angular acceleration is the rate of change of angular velocity, i.e., \(\alpha = \frac{d \Omega}{dt} = \dot{\Omega}\), and the angular velocity is the rate of change of the angle \(\theta\), i.e.,

\[
\Omega = \frac{d \theta}{dt} = \dot{\theta}
\]

Thus, the differential equations of motion for the simple pendulum are:

\[
\frac{d \Omega}{dt} = -\frac{g}{L} \sin \theta
\]

\[
\frac{d \theta}{dt} = \Omega
\]

*Why do we use a capital Greek omega (\(\Omega\)) for angular velocity? Because the lowercase \(\omega\) is defined in the lab manual as the angular frequency of the pendulum, which is a different (constant) quantity:*

\[
\omega = \sqrt{\frac{g}{L}}
\]

---

**Iteration is King (again)! The Euler-Cromer Method of Numerical Integration**

To solve these differential equations, we use a method similar to the interactive Euler method as for the "free fall/air drag" experiment. First, let's define the initial values: We start the pendulum at time \(t_0\) from an angle \(\theta_0\) with zero angular velocity (\(\Omega_0 = 0\)).

For a sufficiently short time interval \(\Delta t\), the angular acceleration can be considered constant, allowing us to calculate the new angular velocity at time \(t_1 = t_0 + \Delta t\):

\[
\Omega_1 = \Omega_0 + \frac{d \Omega}{dt} \Delta t = \Omega_0 - \frac{g}{L
Transcribed Image Text:**The Restoring Force of a Simple Pendulum** The restoring force in the angular (\(\theta\)) direction for a simple pendulum is given by \(F_{\theta} = -mg \sin \theta\). The corresponding acceleration is \(a_{\theta} = -F_{\theta}/m = -g \sin \theta\). Dividing \(a_{\theta}\) by the pendulum length \(L\) yields the angular acceleration: \[ \alpha = a_{\theta}/L = -\frac{g}{L} \sin \theta \] From rotational kinematics, we know that angular acceleration is the rate of change of angular velocity, i.e., \(\alpha = \frac{d \Omega}{dt} = \dot{\Omega}\), and the angular velocity is the rate of change of the angle \(\theta\), i.e., \[ \Omega = \frac{d \theta}{dt} = \dot{\theta} \] Thus, the differential equations of motion for the simple pendulum are: \[ \frac{d \Omega}{dt} = -\frac{g}{L} \sin \theta \] \[ \frac{d \theta}{dt} = \Omega \] *Why do we use a capital Greek omega (\(\Omega\)) for angular velocity? Because the lowercase \(\omega\) is defined in the lab manual as the angular frequency of the pendulum, which is a different (constant) quantity:* \[ \omega = \sqrt{\frac{g}{L}} \] --- **Iteration is King (again)! The Euler-Cromer Method of Numerical Integration** To solve these differential equations, we use a method similar to the interactive Euler method as for the "free fall/air drag" experiment. First, let's define the initial values: We start the pendulum at time \(t_0\) from an angle \(\theta_0\) with zero angular velocity (\(\Omega_0 = 0\)). For a sufficiently short time interval \(\Delta t\), the angular acceleration can be considered constant, allowing us to calculate the new angular velocity at time \(t_1 = t_0 + \Delta t\): \[ \Omega_1 = \Omega_0 + \frac{d \Omega}{dt} \Delta t = \Omega_0 - \frac{g}{L
**Exercise 1: Complete the Euler-Cromer Loop Code Below**

Write the code for calculating \( t_i \), \( \Omega_i \), and \( \theta_i \) based on the equations above. As before, we use a `for` loop for the repetitive (iterative) calculations. Remember that only indented lines become part of the loop, and all those lines must have the same indentation.

- The `sin` function comes from the `numpy` library, so call it as `np.sin()`.
- For the time step, use the variable `dt` defined earlier.
- The \( i \)-th elements of time, angle, and angular velocity can be accessed as `t[i]`, `theta[i]`, and `Omega[i]`, respectively. For element number \( i - 1 \), replace \( i \) with \( i-1 \).

```python
# Initial conditions. Vector numbering in Python starts at 0.
time[0] = 0          # initial time
theta[0] = np.deg2rad(5.0)  # initial angle, converted to radians.
Omega[0] = 0         # initial angular velocity (pendulum starts at rest)

# Main loop: Euler algorithm and evaluation of exact solutions for v and y
#
# Your code should look like this (without the # signs, of course):

# for i in range(1, t_steps):
#     time[i] = ....
#     Omega[i] = ....
#     theta[i] = ....

# YOUR CODE HERE
raise NotImplementedError()
```

**Explanation:**
This code snippet outlines the initial setup and structure for implementing the Euler-Cromer method to simulate a physical system, such as a pendulum. The initial conditions are provided, and users are instructed to fill in the iterative loop for calculating the time, angular velocity, and angular position at each step.
Transcribed Image Text:**Exercise 1: Complete the Euler-Cromer Loop Code Below** Write the code for calculating \( t_i \), \( \Omega_i \), and \( \theta_i \) based on the equations above. As before, we use a `for` loop for the repetitive (iterative) calculations. Remember that only indented lines become part of the loop, and all those lines must have the same indentation. - The `sin` function comes from the `numpy` library, so call it as `np.sin()`. - For the time step, use the variable `dt` defined earlier. - The \( i \)-th elements of time, angle, and angular velocity can be accessed as `t[i]`, `theta[i]`, and `Omega[i]`, respectively. For element number \( i - 1 \), replace \( i \) with \( i-1 \). ```python # Initial conditions. Vector numbering in Python starts at 0. time[0] = 0 # initial time theta[0] = np.deg2rad(5.0) # initial angle, converted to radians. Omega[0] = 0 # initial angular velocity (pendulum starts at rest) # Main loop: Euler algorithm and evaluation of exact solutions for v and y # # Your code should look like this (without the # signs, of course): # for i in range(1, t_steps): # time[i] = .... # Omega[i] = .... # theta[i] = .... # YOUR CODE HERE raise NotImplementedError() ``` **Explanation:** This code snippet outlines the initial setup and structure for implementing the Euler-Cromer method to simulate a physical system, such as a pendulum. The initial conditions are provided, and users are instructed to fill in the iterative loop for calculating the time, angular velocity, and angular position at each step.
Expert Solution
steps

Step by step

Solved in 3 steps with 8 images

Blurred answer
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,