Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

New Jersey Institute of Technology ODE & LE Python Worksheet

New Jersey Institute of Technology ODE & LE Python Worksheet

New Jersey Institute of Technology ODE & LE Python Worksheet

Description

1. Find one example from your ChemE courses where you had to solve an ODE (initial value problem). 

2. Find one example from your ChemE courses where you had to solve an ODE (boundary value problem).
3. Find one example from your ChemE courses where you had to solve an system of linear equations (not differential, linear algebraic equations) 

Write this problems in detail, so that a clear connection between the math and the ChemE context is seen. Solve either IVP or BVP analytically (you better chose the problem which has a closed form solution) and using the corresponding SciPy functions. Plot the comparison for the solutions.

Unformatted Attachment Preview

#!/usr/bin/env python3
# -*- coding: utf-8 -*”””
Created on Tue Dec 6 17:06:58 2022
@author: ggor
“””
import numpy as np
from scipy.integrate import solve_bvp
import matplotlib.pyplot as plt
def T_cf(x):
sq = np.sqrt(0.05)
return 200 + 20.4671*np.exp(sq*x) + 79.5329*np.exp(-sq*x)
def fun(x, y):
return np.vstack((y[1], 0.05*(y[0]-200)))
def bc(ya, yb):
return np.array([ya[0]-300, yb[0]-400])
x = np.linspace(0, 10, 11)
y = np.zeros((2, x.size))
res = solve_bvp(fun, bc, x, y)
x_plot = np.linspace(0, 10, 101)
y_cf = T_cf(x_plot)
y_plot = res.sol(x_plot)[0]
fig = plt.figure()
ax = fig.add_subplot()
plt.plot(x_plot, y_cf, linestyle=’–‘, linewidth=4, alpha=0.5,
color=’r’,
label=’Closed form’)
plt.plot(x_plot, y_plot, linestyle=’ ‘, color=’b’, marker=’.’,
label=’Numerical’)
plt.legend()
plt.show()
#!/usr/bin/env python3
# -*- coding: utf-8 -*”””
Created on Tue Dec 6 16:31:22 2022
@author: ggor
“””
import numpy as np
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt
# y is 2-dimensional
def dydt(t, y):
dy = np.zeros_like(y)
dy[0] = 1.2*y[0] – 0.6*y[0]*y[1]
dy[1] = -0.8*y[1] + 0.3*y[0]*y[1]
return dy
t1 = 0
tf = 20
y0 = [2., 1.] # np.array([2., 1.])
tspan = np.linspace(t1, tf, num=100)
result = solve_ivp(dydt, (t1, tf), y0, t_eval=tspan)
t = result.t
y = result.y
fig = plt.figure()
ax = fig.add_subplot()
ax.plot(t, y[0,:], color=’r’, marker=’.’, linestyle=’-‘,
label=r’$y_1$’)
ax.plot(t, y[1,:], color=’b’, marker=’.’, linestyle=’–‘,
label=r’$y_2$’)
ax.legend()
ax.set_xlabel(r’$t$’)
ax.set_ylabel(r’$y_1, y_2$’)
plt.show()

Purchase answer to see full
attachment
Explanation & Answer:

Worksheet

User generated content is uploaded by users for the purposes of learning and should be used following our honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20