diff --git a/_build/quizzes/quiz3-BVPs.html b/_build/quizzes/quiz3-BVPs.html index 15e6062..ff88378 100644 --- a/_build/quizzes/quiz3-BVPs.html +++ b/_build/quizzes/quiz3-BVPs.html @@ -9,7 +9,7 @@ next_page: url: /contributing.html suffix: .md -search: z t r y delta equation frac begin end ri align infty left right n lambda m solution text ti x b guess sin method tn k h problem annular fin dr boundary eigenvalue prime pi finite difference temperature radius dt where given neq quad ldots forward euler outer described heat transfer step size figure center ode location differences recursion c condition into solve replace eigenfunction principal gather cos bcs therefore associated shooting value target sample quiz problems bvps distribution inner d rm radial distance centerline independent variable constant depends coefficient thermal conductivity thickness annulus assuming choose spatial img src +search: z t r y delta equation frac begin end ri align solution text infty left right x n lambda m ti b guess sin method tn k h problem annular fin dr boundary eigenvalue prime pi finite difference temperature radius dt where given neq quad ldots forward euler leftarrow outer described heat transfer step size figure center ode location differences recursion c condition into solve replace eigenfunction principal gather cos bcs therefore associated shooting value target sample quiz problems bvps distribution inner d rm radial distance centerline independent variable constant depends coefficient thermal conductivity thickness annulus assuming choose spatial img comment: "***PROGRAMMATICALLY GENERATED, DO NOT EDIT. SEE ORIGINAL FILES IN /content***" --- @@ -41,7 +41,7 @@
a.) Replace the derivatives in the given ODE with finite differences, and replace any locations with the $i$ location: \begin{equation} -r_i \frac{T_{i-1} - 2T_i + T_{i+1}}{\Delta r^2} + \frac{T_{i+1} - T_{i-1}}{\Delta r} - r_i m^2 (T_i - T_{\infty}) = 0 +r_i \frac{T_{i-1} - 2T_i + T_{i+1}}{\Delta r^2} + \frac{T_{i+1} - T_{i-1}}{2\Delta r} - r_i m^2 (T_i - T_{\infty}) = 0 \end{equation} or \begin{equation} @@ -90,20 +90,20 @@
F z_1' &= y' = z_2 \\ z_2' &= y'' = 4 z_1 \end{align} -with BCs $z_1 (0) = 0$ and $z_2 (0) = 3$, we do not know $y'(0) = z_2(0) = ?$
+with BCs $z_1 (x=0) = z_{1,1} = 0$ and $z_1(x=1) = z_{1,3} = 3$, we do not know $y'(0) = z_2(x=0) = z_{2,1} = ?$Try some guess #1: $y' (0) = 0 = z_2 (0)$, with the forward Euler method: \begin{align} -z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 0 \\ -z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 0 \\ -z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 0 +z_{1,2} = z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 0 \\ +z_{2,2} = z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 0 \\ +z_{1,3} = z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 0 \leftarrow \text{solution 1} \\ +z_{2,3} = z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 0 \end{align} so for solution 1: $y(1) = 0 \neq 3$.
For guess #2: $y' (0) = 2 = z_2 (0)$, with the forward Euler method: \begin{align} z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 1.0 \\ z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 2.0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 2.0 \\ +z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 2.0 \leftarrow \text{solution 2} \\ z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 4.0 \end{align} so for solution 1: $y(1) = 2 \neq 3$.
@@ -116,7 +116,7 @@F \begin{align} z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 1.5 \\ z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 3.0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 3.0 \\ +z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 3.0 \leftarrow \text{solution 3} \\ z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 6.0 \end{align} so for solution 3: $y(1) = 3$ which is the target.
diff --git a/content/quizzes/quiz3-BVPs.md b/content/quizzes/quiz3-BVPs.md index b31c012..f1504a9 100644 --- a/content/quizzes/quiz3-BVPs.md +++ b/content/quizzes/quiz3-BVPs.md @@ -31,7 +31,7 @@ Write the boundary condition at $r = r_2$ in recursion form (i.e., the equation a.) Replace the derivatives in the given ODE with finite differences, and replace any locations with the $i$ location: \begin{equation} -r_i \frac{T_{i-1} - 2T_i + T_{i+1}}{\Delta r^2} + \frac{T_{i+1} - T_{i-1}}{\Delta r} - r_i m^2 (T_i - T_{\infty}) = 0 +r_i \frac{T_{i-1} - 2T_i + T_{i+1}}{\Delta r^2} + \frac{T_{i+1} - T_{i-1}}{2\Delta r} - r_i m^2 (T_i - T_{\infty}) = 0 \end{equation} or \begin{equation} @@ -103,14 +103,14 @@ First decompose into two 1st-order ODEs: z_1' &= y' = z_2 \\ z_2' &= y'' = 4 z_1 \end{align} -with BCs $z_1 (0) = 0$ and $z_2 (0) = 3$, we do not know $y'(0) = z_2(0) = ?$ +with BCs $z_1 (x=0) = z_{1,1} = 0$ and $z_1(x=1) = z_{1,3} = 3$, we do not know $y'(0) = z_2(x=0) = z_{2,1} = ?$ Try some guess \#1: $y' (0) = 0 = z_2 (0)$, with the forward Euler method: \begin{align} -z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 0 \\ -z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 0 \\ -z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 0 +z_{1,2} = z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 0 \\ +z_{2,2} = z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 0 \\ +z_{1,3} = z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 0 \leftarrow \text{solution 1} \\ +z_{2,3} = z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 0 \end{align} so for solution 1: $y(1) = 0 \neq 3$. @@ -118,7 +118,7 @@ For guess \#2: $y' (0) = 2 = z_2 (0)$, with the forward Euler method: \begin{align} z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 1.0 \\ z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 2.0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 2.0 \\ +z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 2.0 \leftarrow \text{solution 2} \\ z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 4.0 \end{align} so for solution 1: $y(1) = 2 \neq 3$. @@ -132,7 +132,7 @@ then, use this guess: \begin{align} z_1 (0.5) &= z_1 (0) + z_2(0) 0.5 = 1.5 \\ z_2 (0.5) &= z_2 (0) + \left( 4z_1(0) \right) 0.5 = 3.0 \\ -z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 3.0 \\ +z_1 (1.0) &= z_1 (0.5) + z_2(0.5) 0.5 = 3.0 \leftarrow \text{solution 3} \\ z_2 (1.0) &= z_2 (0.5) + \left( 4z_1(0.5) \right) 0.5 = 6.0 \end{align} so for solution 3: $y(1) = 3$ which is the target.