Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ Q 7 Virtual Experiment ] Fun the right values in the code below so you can confirm eq . 8 Eq 8 : (

[Q7Virtual Experiment]
Fun the right values in the code below so you can confirm eq.8
Eq 8: (\omega squared)=\omega subscript 0 superscript 2-(\gamma squared /4)
CODE:
import numpy as np
import matplotlib.pyplot as plt
def forced_oscillation(t, amplitude, frequency, damping_factor, force_amplitude, force_frequency):
natural_frequency = np.sqrt(1- damping_factor**2)
response = amplitude * np.sin(2* np.pi * frequency * t - np.arctan(damping_factor / natural_frequency))
force = force_amplitude * np.sin(2* np.pi * force_frequency * t)
return response + force
# Parameters
amplitude =1.0
frequency =1.0 # Natural frequency in Hertz
damping_factor =0.1
force_amplitude =0.5
force_frequency =1.5
# Time values
t = np.linspace(0,10,1000)
# Calculate forced oscillation
oscillation = forced_oscillation(t, amplitude, frequency, damping_factor, force_amplitude, force_frequency)
# Plot the results
plt.plot(t, oscillation, label='Forced Oscillation')
plt.plot(t, force_amplitude * np.sin(2* np.pi * force_frequency * t), linestyle='--', label='Applied Force')
plt.xlabel('Time')
plt.ylabel('Amplitude')
plt.title('Forced Oscillation Example')
plt.legend()
plt.grid(True)
plt.show()

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago