OnlineNursingOwl
← All nursing posts

Physics · Studypool

Physics Question

Overview

a. Plot the instantaneous streamlines at t = 2 s (you can submit the jupyter notebook for this part of the question). Take the integration constant as C=0.5 for part a.

b. Plot the x-coordinate of the pathline during the time period from t = 0 s to t = 2s.

For part b, assume that a particle is at x=1 and y=2 at time=0.

c. Calculate the x and y coordinate of a particle at t=2 seconds, that passed through the tip of the smoke generator (which is located at x=3, y=1 ) at 0.5 seconds.

code example

import numpy as np

import matplotlib.pyplot as plt

# Meshgrid

x, y = np.meshgrid(np.linspace(-5, 5, 10),np.linspace(-5, 5, 10))

t=2 #2 seconds

u=(x/(1+t))

v=y

plt.figure(figsize=(10, 10))

plt.streamplot(x,y,x,Stream_y, density=1.4, linewidth=None, color='#A23BEC')

plt.title('Velocity field at t=2s')

# Show plot with grid

plt.grid()

plt.show()