Recent content by user4417

  1. U

    Graduate Heat equation given constant surface heat flux

    Thanks a lot for walking through this whole thing with me, I applaud your patience and keenness in helping people out with physics problems. I figured out what my problem was. I was using alpha as Cp * ro / k, when it is k / Cp / ro. I used backward Euler for both Neuman boundaries (and backward...
  2. U

    Graduate Heat equation given constant surface heat flux

    I don't understand why 2 lambdas needed instead of one. I mean it's all based on the same formulae as other rows, which use single lambda for n and n+1 (after n-1). In any case, results finally stabilized with this solution I don't understand. It seems incredible though, e.g. this is what I get...
  3. U

    Graduate Heat equation given constant surface heat flux

    Is it not \begin{pmatrix} 1+2λ & -λ & 0 & 0 & ... & 0\\ \end{pmatrix} ? Also, could you please check this part of my code, please? int t_steps=600; double dt = 0.1; double dx = 0.01; int m=10; double L=dx*m; int q1=16500; int q2=0...
  4. U

    Graduate Heat equation given constant surface heat flux

    A question. How will my top row of the matrix to be inversed will look like, (1+λ, -λ, 0, 0, ...), or the usual (1+2*λ, -λ, 0, 0, ...)? When I substitute U_{j-1}=U_j + Δ\ x \ \frac{Qleft}{k} into -λ \ U_1^n + (1 + 2 \ λ) U_0^n - λ \ U_{-1}^n = U_0^{n-1}, I get -λ \ U_1^n + (1 + λ) U_0^n + λ...
  5. U

    Graduate Heat equation given constant surface heat flux

    Lol. Thanks for corrections. My brain's a bit rusty after so many years after school. Sorry!
  6. U

    Graduate Heat equation given constant surface heat flux

    Oh, ok, thanks a lot. I'll have to redo the whole thing. Will ask if have further problems.
  7. U

    Graduate Heat equation given constant surface heat flux

    U_x(t_n,x_0) = \frac{U_1^n-U_{-1}^n}{2 \times delta \ x} = Qleft, \ therefore\\ U_{-1}^n=U_1^n - 2 \times delta \ x \times Qleft \ (1)\\ Substitute \ (1) \ into \ Forward \ Euler \ for \ j = 0, i.e. \ into \ U_0^{n+1} = U_{-1} + (1-2 \times lambda) \ U_0^n + lambda \times U_1^n, \ and \ voila.
  8. U

    Graduate Heat equation given constant surface heat flux

    Plus in relation to discretizing the boundary condition itself, I was using derivative based on central difference, not backward Euler. Not sure how big of an effect it could have had or whether it matters. Used \frac{y_{j+1} - y_{j-1}}{ 2 \ delta \ x}. Should I have used \frac{y_{j} -...
  9. U

    Graduate Heat equation given constant surface heat flux

    You are right, I substituted the discrete Neumann equation for Tx, i.e. the T_{-1}^n = T_1^n - 2 \ delta \ x \times \frac{Qleft}{k}, into a wrong (explicit) scheme, instead of backward Euler (nevermind the missing k, as most formulas are given for U, heat, not temperature, so I got confused)...
  10. U

    Graduate Heat equation given constant surface heat flux

    I used T^{n+1}_0 = T_1^n - 2 \times delta \ x \times Q left + (1-2 \times lambda)\times T_0^n + lambda \times T_1^n, \\ where \ Qleft \ is \ constant \ boundary \ flux \ at \ left \ boundary\\ \\ T^{n+1}_m = Tright \ (constant \ temperature \ at \ right \ boundary)
  11. U

    Graduate Heat equation given constant surface heat flux

    That said, I think my algorithm is screwed up, need to recheck it, as if I have 30 time steps, dx = 5E-4m, dt = 0.3s and m=2000, I get surface temperature of 2000 after simulation time elapses.
  12. U

    Graduate Heat equation given constant surface heat flux

    Yes, thanks, Chet. I made my right boundary for ptfe at 1m, when it's only 3mm, and it happens that after one minute of friction (backward euler) the temperature shoots through the roof, being +/- 600 degrees celsius almost half a meter in (which is about twice the ptfe melting temperature.)...
  13. U

    Graduate Heat equation given constant surface heat flux

    That's fine. I'll try to explain my notation (had to pick it up from the Internet, from various sources, as I forgot all my school material). A is the tridiagonal matrix, b is matrix of values at time = n, and x is matrix of values at time = n + 1. So the question is, for matrix b with m+2...
  14. U

    Graduate Heat equation given constant surface heat flux

    A question: how to write matrix b in Ax=b, if the right boundary is at infinity. Would I just write say { (T1,n) - 2*dx*Qin , (T0,n), (T1,n), (T2,n), ... (Tm+1,n) } ? I.e. just add the ghost point at the end, but do not call it Tright, neither dicretize a Neumann at this point. Correct?
  15. U

    Graduate Heat equation given constant surface heat flux

    Thanks but I actually deleted that part of my post which was asking for help with a situation whereby changes in delta x gave big changes in Tm,n+1. I must have just played with thickness of the plate, making it narrow, which would mean temperature stabilization would be quicker, because I stuck...