From 703bcff3596433a937d344a60f228be2bf8dce40 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Fri, 17 Oct 2025 17:16:37 -0600 Subject: Added interactive plots in mod2/open_methods --- tutorials/module_3/2_2_Open_Methods.md | 8 ++ tutorials/module_3/example problem outline.md | 108 -------------------------- 2 files changed, 8 insertions(+), 108 deletions(-) delete mode 100644 tutorials/module_3/example problem outline.md diff --git a/tutorials/module_3/2_2_Open_Methods.md b/tutorials/module_3/2_2_Open_Methods.md index 7502a86..af7d550 100644 --- a/tutorials/module_3/2_2_Open_Methods.md +++ b/tutorials/module_3/2_2_Open_Methods.md @@ -24,6 +24,12 @@ Since $x_0$ is our current guess and $x_0$ is our next guess, we can write these $$ \boxed{x_{i+1} = x_i - \frac{f(x_i)}{f'(x_i)}} \tag{3.1} $$ + +### Interactive Plot +Test the function $f(x)=tan^{-1}(x)$ or $f(x)=$atand$(x)$ +[Interactive graphical render of newton-raphson method](https://www.geogebra.org/m/DGFGBJyU) + +[![Interactive plot](geogebra-newton-raphson.html)]() ### Problem 1 From experimental data we extrapolated a function f. Write a python function called *newtonraphson* which as the following input parameters - `f` - function @@ -183,3 +189,5 @@ x= = 1.5 sol, total_iter, root = newton_raphson(g, g_prime, x0) ``` +Extra: +![Newton-Raphson in Optimization](https://www.youtube.com/watch?v=W7S94pq5Xuo) \ No newline at end of file diff --git a/tutorials/module_3/example problem outline.md b/tutorials/module_3/example problem outline.md deleted file mode 100644 index 42a0554..0000000 --- a/tutorials/module_3/example problem outline.md +++ /dev/null @@ -1,108 +0,0 @@ - -### **Module 2: Algorithm Developments for Mechanical Engineering** - -* **Numerical Methods** - 1. Beam deflection solved with `numpy.linalg.solve` (Statics/Structures) - 2. Cooling of a hot plate with `scipy.integrate.odeint` (Thermal sciences) - -* **Version Control** - 1. Git workflow on a bike frame design project (Solid mechanics / FEA data) - 2. Collaborative control system simulation (PID tuning in Python) - -* **Problem Solving Strategies** - 1. Break down multi-step dynamics problem: projectile with drag (Dynamics/Fluids) - 2. Decompose Rankine cycle analysis into modular Python functions (Thermo/Power cycles) - -* **Code Documentation** - 1. Document a function that computes stress concentration factor (Solid mechanics) - 2. Document a PID control simulation for DC motor speed (Mechatronics/Controls) - -* **Code Libraries & Resources** - 1. Use `matplotlib` + `numpy` for plotting vibration response of a 2-DOF spring-mass system (Dynamics) - 2. Use `CoolProp` for real gas property lookup (Thermo/Fluids) - -* **AI-Assisted Programming** - 1. Have AI draft code for a 1D heat conduction simulation, then debug/validate (Heat Transfer) - 2. Generate starter code for stress-strain curve fitting, then refine it (Solid Mechanics) - -* **Verification & Validation** - 1. Compare hand solution vs. Python solution of a static truss (Statics/Structures) - 2. Validate simulated temperature profile in a fin against analytical solution (Heat Transfer) - -* **Error** - 1. Show truncation error in numerical derivative of displacement data (Dynamics experiment) - 2. Compare Simpson’s rule vs trapezoidal integration for work done in P–V diagram (Thermo) - -### **Module 3: Applications of Computational Mathematics in Mechanical Engineering** - -#### **Linear Equations** - -* **Lecture: Linear Equations** - 1. Solve a 3-bar truss reaction forces system (Statics/Structures) - 2. Solve nodal voltages in a resistive electrical network (Mechatronics) - -* **Lecture: Linear Algebra** - 1. Stress transformation with rotation matrices (Solid Mechanics) - 2. Velocity transformation in 2D robotic arm kinematics (Mechatronics/Robotics) - -* **Lecture: LU Decomposition** - 1. Discretized fin heat conduction (Heat Transfer) - 2. 1D beam bending using finite difference discretization (Simple FEA) - -#### **Non-Linear Equations** - -* **Lecture: Bracketing Methods** - 1. Equilibrium temperature with radiation + convection balance (Heat Transfer) - 2. Solve spring-mass system with nonlinear stiffness (Solid Mechanics) - -* **Lecture: Open Methods** - 1. Mach number from nozzle area ratio (Aerospace/Compressible Flow) - 2. Natural frequency from transcendental vibration equation (Dynamics) - -* **Lecture: Systems of Nonlinear Equations I** - 1. Chemical equilibrium composition (Thermo) - 2. Solve coupled force/displacement in nonlinear truss (Structures) - -* **Lecture: Systems of Nonlinear Equations II** - 1. Lift & drag coefficients from nonlinear aerodynamic model (Aerospace) - 2. Nonlinear motor torque & current equations (Mechatronics/Controls) - -#### **Numerical Differentiation & Integration** -* **Lecture: Differentiation** - 1. Estimate velocity/acceleration from piston displacement data (Dynamics) - 2. Approximate strain rate from stress–strain curve (Solid Mechanics) - -* **Lecture: Integration** - 1. Work from P–V data (Thermo) - 2. Area under vibration response curve for damping energy loss (Dynamics/Controls) - -#### **ODEs** - -* **Lecture: Explicit Methods** - 1. Cooling of hot sphere (Newton’s law of cooling) (Heat Transfer) - 2. Pendulum motion (small vs. large angle) (Dynamics) - -* **Lecture: Implicit Methods** - 1. Transient 1D heat conduction (Heat Transfer) - 2. Mass-spring-damper under step input (Dynamics/Controls) - -* **Lecture: Systems of ODEs** - 1. Coupled tanks draining problem (Fluids) - 2. 2-DOF vibration system (Solid Mechanics/Dynamics) - -#### **PDEs** -* **Lecture: Elliptic PDEs (Finite Difference)** - 1. 2D steady-state conduction in a plate (Heat Transfer) - 2. Deflection of a membrane under load (Structures/FEA) - -* **Lecture: Parabolic/Hyperbolic PDEs (Finite Difference)** - 1. 1D transient conduction (Heat Transfer) - 2. Vibrating string or beam (Dynamics/Aerospace structures) - - -* Statics/Structures → Truss, beams, stresses -* Dynamics → Vibrations, pendulum, projectile, damping -* Solid Mechanics → Stress/strain, nonlinear springs -* Thermo/Fluids/Heat → Cooling, P–V, conduction, radiation -* FEA → simple discretized beams/fins/plates -* Mechatronics/Controls → motor dynamics, robotic arms, PID \ No newline at end of file -- cgit v1.2.3