Heat equation in cylindrical coordinates at origin












0












$begingroup$


I'm trying to solve a heat equation in cylindrical coordinates



$$dfrac{partial u}{partial t} = a left(dfrac{partial^2 u}{partial r^2} + dfrac{1}{r} dfrac{partial u}{partial r} + dfrac{1}{r^2} dfrac{partial^2 u}{partial phi^2} + dfrac{partial^2 u}{partial z^2} right),~~~~~~~~~~~~~~ (r, phi, z) in Omega.$$
with Neumann boundary conditions
$$ left.dfrac{partial u}{partial n} right|_{partial Omega} = f(u, r, phi, z),$$
and initial conditions
$$u(0, r, phi, z) = g(r, phi, z).$$
The region $Omega$ is just a cylinder
$$Omega ={ (r, phi, z) : 0leq r leq R, ~~ 0 leq phi < 2pi, ~~ 0 leq z leq Z}.$$
Functions $f$ and $g$ are known and $f$ is a non-linear function with respect to $u$. Due to its non-linearity I cannot solve the problem analytically and trying to use a finite-difference method:
$$begin{array}{lcl}
t_tau = Delta t cdot tau, & tau=0,cdots, T, &\
r_i = Delta r cdot i, & i=0,cdots, I, & (r_I = R),\
phi_j = Delta phi cdot j, & i=0,cdots, J, & (phi_J = 2pi - Delta phi),\
z_k = Delta z cdot k, & k=0,cdots, K, & (z_K = Z),
end{array}$$

And
$$u^tau_{i,j,k} = u(t_tau, r_i, phi_j, z_k).$$
So
$$dfrac{u^{tau+1}_{i,j,k} - u^{tau}_{i,j,k}}{Delta t} = aleft( dfrac{u^tau_{i+1,j,k} - 2 u^tau_{i,j,k} + u^tau_{i-1,j,k}}{Delta r^2} + dfrac{1}{Delta r cdot i} dfrac{u^tau_{i+1,j,k} - u^tau_{i-1,j,k}}{2 Delta r} + dfrac{1}{(Delta r cdot i)^2} dfrac{u^tau_{i,j+1,k} - 2 u^tau_{i,j,k} + u^tau_{i,j-1,k}}{Delta phi^2} + dfrac{u^tau_{i,j,k+1} - 2 u^tau_{i,j,k} + u^tau_{i,j,k-1}}{Delta z^2}right).$$



Next, I use boundary conditions and periodicity of the solution to find $u^tau_{I+1, j, k}$, $~~u^tau_{-1, j, k}, ~~$ etc. For example:
$$ dfrac{u^tau_{I+1,j,k} - u^tau_{I-1,j,k}}{2 Delta r} = f(u^tau_{I,j,k}, Delta r cdot I, Delta phi cdot j, Delta z cdot k).$$



However, I have a hard time with Laplacian at $r=0$, i.e., writing the difference equations for $u^tau_{0, j, k}$.



I know that if the problem was symmetric with respect to $phi$, then
$$dfrac{partial^2 u}{partial phi^2} equiv 0.$$
Moreover,
$$left. dfrac{partial u}{partial r}right|_{r=0} = 0,$$
and, therefore,
$$left. dfrac{1}{r} dfrac{partial u}{partial r}right|_{r=0} = dfrac{partial^2 u}{partial r^2}.$$
So, the heat equation at $r=0$ would transform into
$$dfrac{partial u}{partial t} = a left(2dfrac{partial^2 u}{partial r^2} + dfrac{partial^2 u}{partial z^2} right),$$
which would allow me to just use a separate equations for $u^tau_{0, j, k}$.



What should be the heat equation at $r=0$ in my more general case?










share|cite|improve this question











$endgroup$












  • $begingroup$
    How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
    $endgroup$
    – eyeballfrog
    Jan 8 at 0:45
















0












$begingroup$


I'm trying to solve a heat equation in cylindrical coordinates



$$dfrac{partial u}{partial t} = a left(dfrac{partial^2 u}{partial r^2} + dfrac{1}{r} dfrac{partial u}{partial r} + dfrac{1}{r^2} dfrac{partial^2 u}{partial phi^2} + dfrac{partial^2 u}{partial z^2} right),~~~~~~~~~~~~~~ (r, phi, z) in Omega.$$
with Neumann boundary conditions
$$ left.dfrac{partial u}{partial n} right|_{partial Omega} = f(u, r, phi, z),$$
and initial conditions
$$u(0, r, phi, z) = g(r, phi, z).$$
The region $Omega$ is just a cylinder
$$Omega ={ (r, phi, z) : 0leq r leq R, ~~ 0 leq phi < 2pi, ~~ 0 leq z leq Z}.$$
Functions $f$ and $g$ are known and $f$ is a non-linear function with respect to $u$. Due to its non-linearity I cannot solve the problem analytically and trying to use a finite-difference method:
$$begin{array}{lcl}
t_tau = Delta t cdot tau, & tau=0,cdots, T, &\
r_i = Delta r cdot i, & i=0,cdots, I, & (r_I = R),\
phi_j = Delta phi cdot j, & i=0,cdots, J, & (phi_J = 2pi - Delta phi),\
z_k = Delta z cdot k, & k=0,cdots, K, & (z_K = Z),
end{array}$$

And
$$u^tau_{i,j,k} = u(t_tau, r_i, phi_j, z_k).$$
So
$$dfrac{u^{tau+1}_{i,j,k} - u^{tau}_{i,j,k}}{Delta t} = aleft( dfrac{u^tau_{i+1,j,k} - 2 u^tau_{i,j,k} + u^tau_{i-1,j,k}}{Delta r^2} + dfrac{1}{Delta r cdot i} dfrac{u^tau_{i+1,j,k} - u^tau_{i-1,j,k}}{2 Delta r} + dfrac{1}{(Delta r cdot i)^2} dfrac{u^tau_{i,j+1,k} - 2 u^tau_{i,j,k} + u^tau_{i,j-1,k}}{Delta phi^2} + dfrac{u^tau_{i,j,k+1} - 2 u^tau_{i,j,k} + u^tau_{i,j,k-1}}{Delta z^2}right).$$



Next, I use boundary conditions and periodicity of the solution to find $u^tau_{I+1, j, k}$, $~~u^tau_{-1, j, k}, ~~$ etc. For example:
$$ dfrac{u^tau_{I+1,j,k} - u^tau_{I-1,j,k}}{2 Delta r} = f(u^tau_{I,j,k}, Delta r cdot I, Delta phi cdot j, Delta z cdot k).$$



However, I have a hard time with Laplacian at $r=0$, i.e., writing the difference equations for $u^tau_{0, j, k}$.



I know that if the problem was symmetric with respect to $phi$, then
$$dfrac{partial^2 u}{partial phi^2} equiv 0.$$
Moreover,
$$left. dfrac{partial u}{partial r}right|_{r=0} = 0,$$
and, therefore,
$$left. dfrac{1}{r} dfrac{partial u}{partial r}right|_{r=0} = dfrac{partial^2 u}{partial r^2}.$$
So, the heat equation at $r=0$ would transform into
$$dfrac{partial u}{partial t} = a left(2dfrac{partial^2 u}{partial r^2} + dfrac{partial^2 u}{partial z^2} right),$$
which would allow me to just use a separate equations for $u^tau_{0, j, k}$.



What should be the heat equation at $r=0$ in my more general case?










share|cite|improve this question











$endgroup$












  • $begingroup$
    How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
    $endgroup$
    – eyeballfrog
    Jan 8 at 0:45














0












0








0





$begingroup$


I'm trying to solve a heat equation in cylindrical coordinates



$$dfrac{partial u}{partial t} = a left(dfrac{partial^2 u}{partial r^2} + dfrac{1}{r} dfrac{partial u}{partial r} + dfrac{1}{r^2} dfrac{partial^2 u}{partial phi^2} + dfrac{partial^2 u}{partial z^2} right),~~~~~~~~~~~~~~ (r, phi, z) in Omega.$$
with Neumann boundary conditions
$$ left.dfrac{partial u}{partial n} right|_{partial Omega} = f(u, r, phi, z),$$
and initial conditions
$$u(0, r, phi, z) = g(r, phi, z).$$
The region $Omega$ is just a cylinder
$$Omega ={ (r, phi, z) : 0leq r leq R, ~~ 0 leq phi < 2pi, ~~ 0 leq z leq Z}.$$
Functions $f$ and $g$ are known and $f$ is a non-linear function with respect to $u$. Due to its non-linearity I cannot solve the problem analytically and trying to use a finite-difference method:
$$begin{array}{lcl}
t_tau = Delta t cdot tau, & tau=0,cdots, T, &\
r_i = Delta r cdot i, & i=0,cdots, I, & (r_I = R),\
phi_j = Delta phi cdot j, & i=0,cdots, J, & (phi_J = 2pi - Delta phi),\
z_k = Delta z cdot k, & k=0,cdots, K, & (z_K = Z),
end{array}$$

And
$$u^tau_{i,j,k} = u(t_tau, r_i, phi_j, z_k).$$
So
$$dfrac{u^{tau+1}_{i,j,k} - u^{tau}_{i,j,k}}{Delta t} = aleft( dfrac{u^tau_{i+1,j,k} - 2 u^tau_{i,j,k} + u^tau_{i-1,j,k}}{Delta r^2} + dfrac{1}{Delta r cdot i} dfrac{u^tau_{i+1,j,k} - u^tau_{i-1,j,k}}{2 Delta r} + dfrac{1}{(Delta r cdot i)^2} dfrac{u^tau_{i,j+1,k} - 2 u^tau_{i,j,k} + u^tau_{i,j-1,k}}{Delta phi^2} + dfrac{u^tau_{i,j,k+1} - 2 u^tau_{i,j,k} + u^tau_{i,j,k-1}}{Delta z^2}right).$$



Next, I use boundary conditions and periodicity of the solution to find $u^tau_{I+1, j, k}$, $~~u^tau_{-1, j, k}, ~~$ etc. For example:
$$ dfrac{u^tau_{I+1,j,k} - u^tau_{I-1,j,k}}{2 Delta r} = f(u^tau_{I,j,k}, Delta r cdot I, Delta phi cdot j, Delta z cdot k).$$



However, I have a hard time with Laplacian at $r=0$, i.e., writing the difference equations for $u^tau_{0, j, k}$.



I know that if the problem was symmetric with respect to $phi$, then
$$dfrac{partial^2 u}{partial phi^2} equiv 0.$$
Moreover,
$$left. dfrac{partial u}{partial r}right|_{r=0} = 0,$$
and, therefore,
$$left. dfrac{1}{r} dfrac{partial u}{partial r}right|_{r=0} = dfrac{partial^2 u}{partial r^2}.$$
So, the heat equation at $r=0$ would transform into
$$dfrac{partial u}{partial t} = a left(2dfrac{partial^2 u}{partial r^2} + dfrac{partial^2 u}{partial z^2} right),$$
which would allow me to just use a separate equations for $u^tau_{0, j, k}$.



What should be the heat equation at $r=0$ in my more general case?










share|cite|improve this question











$endgroup$




I'm trying to solve a heat equation in cylindrical coordinates



$$dfrac{partial u}{partial t} = a left(dfrac{partial^2 u}{partial r^2} + dfrac{1}{r} dfrac{partial u}{partial r} + dfrac{1}{r^2} dfrac{partial^2 u}{partial phi^2} + dfrac{partial^2 u}{partial z^2} right),~~~~~~~~~~~~~~ (r, phi, z) in Omega.$$
with Neumann boundary conditions
$$ left.dfrac{partial u}{partial n} right|_{partial Omega} = f(u, r, phi, z),$$
and initial conditions
$$u(0, r, phi, z) = g(r, phi, z).$$
The region $Omega$ is just a cylinder
$$Omega ={ (r, phi, z) : 0leq r leq R, ~~ 0 leq phi < 2pi, ~~ 0 leq z leq Z}.$$
Functions $f$ and $g$ are known and $f$ is a non-linear function with respect to $u$. Due to its non-linearity I cannot solve the problem analytically and trying to use a finite-difference method:
$$begin{array}{lcl}
t_tau = Delta t cdot tau, & tau=0,cdots, T, &\
r_i = Delta r cdot i, & i=0,cdots, I, & (r_I = R),\
phi_j = Delta phi cdot j, & i=0,cdots, J, & (phi_J = 2pi - Delta phi),\
z_k = Delta z cdot k, & k=0,cdots, K, & (z_K = Z),
end{array}$$

And
$$u^tau_{i,j,k} = u(t_tau, r_i, phi_j, z_k).$$
So
$$dfrac{u^{tau+1}_{i,j,k} - u^{tau}_{i,j,k}}{Delta t} = aleft( dfrac{u^tau_{i+1,j,k} - 2 u^tau_{i,j,k} + u^tau_{i-1,j,k}}{Delta r^2} + dfrac{1}{Delta r cdot i} dfrac{u^tau_{i+1,j,k} - u^tau_{i-1,j,k}}{2 Delta r} + dfrac{1}{(Delta r cdot i)^2} dfrac{u^tau_{i,j+1,k} - 2 u^tau_{i,j,k} + u^tau_{i,j-1,k}}{Delta phi^2} + dfrac{u^tau_{i,j,k+1} - 2 u^tau_{i,j,k} + u^tau_{i,j,k-1}}{Delta z^2}right).$$



Next, I use boundary conditions and periodicity of the solution to find $u^tau_{I+1, j, k}$, $~~u^tau_{-1, j, k}, ~~$ etc. For example:
$$ dfrac{u^tau_{I+1,j,k} - u^tau_{I-1,j,k}}{2 Delta r} = f(u^tau_{I,j,k}, Delta r cdot I, Delta phi cdot j, Delta z cdot k).$$



However, I have a hard time with Laplacian at $r=0$, i.e., writing the difference equations for $u^tau_{0, j, k}$.



I know that if the problem was symmetric with respect to $phi$, then
$$dfrac{partial^2 u}{partial phi^2} equiv 0.$$
Moreover,
$$left. dfrac{partial u}{partial r}right|_{r=0} = 0,$$
and, therefore,
$$left. dfrac{1}{r} dfrac{partial u}{partial r}right|_{r=0} = dfrac{partial^2 u}{partial r^2}.$$
So, the heat equation at $r=0$ would transform into
$$dfrac{partial u}{partial t} = a left(2dfrac{partial^2 u}{partial r^2} + dfrac{partial^2 u}{partial z^2} right),$$
which would allow me to just use a separate equations for $u^tau_{0, j, k}$.



What should be the heat equation at $r=0$ in my more general case?







heat-equation laplacian cylindrical-coordinates






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 8 at 17:09







John

















asked Jan 8 at 0:22









JohnJohn

113




113












  • $begingroup$
    How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
    $endgroup$
    – eyeballfrog
    Jan 8 at 0:45


















  • $begingroup$
    How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
    $endgroup$
    – eyeballfrog
    Jan 8 at 0:45
















$begingroup$
How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
$endgroup$
– eyeballfrog
Jan 8 at 0:45




$begingroup$
How viable is expanding $u = sum_{-infty}^infty u_n(r,z) exp(inphi)$ and then cutting off the sum at $n = pm J/2$?
$endgroup$
– eyeballfrog
Jan 8 at 0:45










1 Answer
1






active

oldest

votes


















1












$begingroup$

I think I came up with the answer myself. I'll leave it here if anyone meets the similar problem.



Suppose $f(x, y, z)$ is a sufficiently smooth function defined in Cartesian coordinates and $g(r, phi, z) = f(r cosphi, rsinphi, z)$ is the same function in cylindrical coordinates. We have
$$left. nabla^2 f right|_{begin{array}{l}x=rcosphi\y=rsinphi\z=zend{array}} = nabla^2 g.$$
Using second-order central difference approximation for the second derivatives:
$$left. nabla^2 f right|_{begin{array}{l}x=0\y=0end{array}} approx dfrac{f(Delta x, 0, z) - 2f(0, 0, z) + f(-Delta x, 0, z)}{(Delta x)^2} + dfrac{f(0, Delta y, z) - 2f(0, 0, z) + f(0, -Delta y, z)}{(Delta y)^2} + dfrac{f(0, 0, z+Delta z) - 2f(0, 0, z) + f(0, 0, z-Delta z)}{(Delta z)^2} = dfrac{g(Delta r, 0, z) - 2g(0,phi,z)+g(Delta r,pi,z)}{(Delta r)^2} + dfrac{g(Delta r, frac{pi}{2}, z) - 2g(0,phi,z)+g(Delta r,frac{3pi}{2},z)}{(Delta r)^2} + dfrac{g(0, 0, z+Delta z) - 2g(0, phi, z) + g(0, 0, z-Delta z)}{(Delta z)^2},$$
where $phi$ can be anything, since $g(0,phi_1,z)=g(0,phi_2,z)$ for any $phi_1, phi_2$ as they correspond to the same point.



Thus, the finite difference equation that corresponds to the heat equation in the cylindrical coordinates at $r=0$ is the following (using notations from the question):
$$ dfrac{u^{tau+1}_{0,j,k} - u^{tau}_{0,j,k}}{Delta t} = a left( dfrac{u^tau_{1,0,k} - 2u^tau_{0,j,k} + u^tau_{1,beta,k}}{(Delta r)^2} + dfrac{u^tau_{1,alpha,k} - 2u^tau_{0,j,k} + u^tau_{1,gamma,k}}{(Delta r)^2} + dfrac{u^tau_{0,j,k+1} - 2u^tau_{0,j,k} + u^tau_{0,j,k-1}}{(Delta z)^2}right),$$
where $alpha cdot Deltaphi = pi/2$, $~~beta cdot Deltaphi = pi,~~$ and $~~gamma cdot Deltaphi = 3pi/2~~$ (so the grid should be appropriately chosen). And once again, $u^tau_{0,j,k}$ doesn't really depend on $j$.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3065670%2fheat-equation-in-cylindrical-coordinates-at-origin%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    I think I came up with the answer myself. I'll leave it here if anyone meets the similar problem.



    Suppose $f(x, y, z)$ is a sufficiently smooth function defined in Cartesian coordinates and $g(r, phi, z) = f(r cosphi, rsinphi, z)$ is the same function in cylindrical coordinates. We have
    $$left. nabla^2 f right|_{begin{array}{l}x=rcosphi\y=rsinphi\z=zend{array}} = nabla^2 g.$$
    Using second-order central difference approximation for the second derivatives:
    $$left. nabla^2 f right|_{begin{array}{l}x=0\y=0end{array}} approx dfrac{f(Delta x, 0, z) - 2f(0, 0, z) + f(-Delta x, 0, z)}{(Delta x)^2} + dfrac{f(0, Delta y, z) - 2f(0, 0, z) + f(0, -Delta y, z)}{(Delta y)^2} + dfrac{f(0, 0, z+Delta z) - 2f(0, 0, z) + f(0, 0, z-Delta z)}{(Delta z)^2} = dfrac{g(Delta r, 0, z) - 2g(0,phi,z)+g(Delta r,pi,z)}{(Delta r)^2} + dfrac{g(Delta r, frac{pi}{2}, z) - 2g(0,phi,z)+g(Delta r,frac{3pi}{2},z)}{(Delta r)^2} + dfrac{g(0, 0, z+Delta z) - 2g(0, phi, z) + g(0, 0, z-Delta z)}{(Delta z)^2},$$
    where $phi$ can be anything, since $g(0,phi_1,z)=g(0,phi_2,z)$ for any $phi_1, phi_2$ as they correspond to the same point.



    Thus, the finite difference equation that corresponds to the heat equation in the cylindrical coordinates at $r=0$ is the following (using notations from the question):
    $$ dfrac{u^{tau+1}_{0,j,k} - u^{tau}_{0,j,k}}{Delta t} = a left( dfrac{u^tau_{1,0,k} - 2u^tau_{0,j,k} + u^tau_{1,beta,k}}{(Delta r)^2} + dfrac{u^tau_{1,alpha,k} - 2u^tau_{0,j,k} + u^tau_{1,gamma,k}}{(Delta r)^2} + dfrac{u^tau_{0,j,k+1} - 2u^tau_{0,j,k} + u^tau_{0,j,k-1}}{(Delta z)^2}right),$$
    where $alpha cdot Deltaphi = pi/2$, $~~beta cdot Deltaphi = pi,~~$ and $~~gamma cdot Deltaphi = 3pi/2~~$ (so the grid should be appropriately chosen). And once again, $u^tau_{0,j,k}$ doesn't really depend on $j$.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      I think I came up with the answer myself. I'll leave it here if anyone meets the similar problem.



      Suppose $f(x, y, z)$ is a sufficiently smooth function defined in Cartesian coordinates and $g(r, phi, z) = f(r cosphi, rsinphi, z)$ is the same function in cylindrical coordinates. We have
      $$left. nabla^2 f right|_{begin{array}{l}x=rcosphi\y=rsinphi\z=zend{array}} = nabla^2 g.$$
      Using second-order central difference approximation for the second derivatives:
      $$left. nabla^2 f right|_{begin{array}{l}x=0\y=0end{array}} approx dfrac{f(Delta x, 0, z) - 2f(0, 0, z) + f(-Delta x, 0, z)}{(Delta x)^2} + dfrac{f(0, Delta y, z) - 2f(0, 0, z) + f(0, -Delta y, z)}{(Delta y)^2} + dfrac{f(0, 0, z+Delta z) - 2f(0, 0, z) + f(0, 0, z-Delta z)}{(Delta z)^2} = dfrac{g(Delta r, 0, z) - 2g(0,phi,z)+g(Delta r,pi,z)}{(Delta r)^2} + dfrac{g(Delta r, frac{pi}{2}, z) - 2g(0,phi,z)+g(Delta r,frac{3pi}{2},z)}{(Delta r)^2} + dfrac{g(0, 0, z+Delta z) - 2g(0, phi, z) + g(0, 0, z-Delta z)}{(Delta z)^2},$$
      where $phi$ can be anything, since $g(0,phi_1,z)=g(0,phi_2,z)$ for any $phi_1, phi_2$ as they correspond to the same point.



      Thus, the finite difference equation that corresponds to the heat equation in the cylindrical coordinates at $r=0$ is the following (using notations from the question):
      $$ dfrac{u^{tau+1}_{0,j,k} - u^{tau}_{0,j,k}}{Delta t} = a left( dfrac{u^tau_{1,0,k} - 2u^tau_{0,j,k} + u^tau_{1,beta,k}}{(Delta r)^2} + dfrac{u^tau_{1,alpha,k} - 2u^tau_{0,j,k} + u^tau_{1,gamma,k}}{(Delta r)^2} + dfrac{u^tau_{0,j,k+1} - 2u^tau_{0,j,k} + u^tau_{0,j,k-1}}{(Delta z)^2}right),$$
      where $alpha cdot Deltaphi = pi/2$, $~~beta cdot Deltaphi = pi,~~$ and $~~gamma cdot Deltaphi = 3pi/2~~$ (so the grid should be appropriately chosen). And once again, $u^tau_{0,j,k}$ doesn't really depend on $j$.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        I think I came up with the answer myself. I'll leave it here if anyone meets the similar problem.



        Suppose $f(x, y, z)$ is a sufficiently smooth function defined in Cartesian coordinates and $g(r, phi, z) = f(r cosphi, rsinphi, z)$ is the same function in cylindrical coordinates. We have
        $$left. nabla^2 f right|_{begin{array}{l}x=rcosphi\y=rsinphi\z=zend{array}} = nabla^2 g.$$
        Using second-order central difference approximation for the second derivatives:
        $$left. nabla^2 f right|_{begin{array}{l}x=0\y=0end{array}} approx dfrac{f(Delta x, 0, z) - 2f(0, 0, z) + f(-Delta x, 0, z)}{(Delta x)^2} + dfrac{f(0, Delta y, z) - 2f(0, 0, z) + f(0, -Delta y, z)}{(Delta y)^2} + dfrac{f(0, 0, z+Delta z) - 2f(0, 0, z) + f(0, 0, z-Delta z)}{(Delta z)^2} = dfrac{g(Delta r, 0, z) - 2g(0,phi,z)+g(Delta r,pi,z)}{(Delta r)^2} + dfrac{g(Delta r, frac{pi}{2}, z) - 2g(0,phi,z)+g(Delta r,frac{3pi}{2},z)}{(Delta r)^2} + dfrac{g(0, 0, z+Delta z) - 2g(0, phi, z) + g(0, 0, z-Delta z)}{(Delta z)^2},$$
        where $phi$ can be anything, since $g(0,phi_1,z)=g(0,phi_2,z)$ for any $phi_1, phi_2$ as they correspond to the same point.



        Thus, the finite difference equation that corresponds to the heat equation in the cylindrical coordinates at $r=0$ is the following (using notations from the question):
        $$ dfrac{u^{tau+1}_{0,j,k} - u^{tau}_{0,j,k}}{Delta t} = a left( dfrac{u^tau_{1,0,k} - 2u^tau_{0,j,k} + u^tau_{1,beta,k}}{(Delta r)^2} + dfrac{u^tau_{1,alpha,k} - 2u^tau_{0,j,k} + u^tau_{1,gamma,k}}{(Delta r)^2} + dfrac{u^tau_{0,j,k+1} - 2u^tau_{0,j,k} + u^tau_{0,j,k-1}}{(Delta z)^2}right),$$
        where $alpha cdot Deltaphi = pi/2$, $~~beta cdot Deltaphi = pi,~~$ and $~~gamma cdot Deltaphi = 3pi/2~~$ (so the grid should be appropriately chosen). And once again, $u^tau_{0,j,k}$ doesn't really depend on $j$.






        share|cite|improve this answer









        $endgroup$



        I think I came up with the answer myself. I'll leave it here if anyone meets the similar problem.



        Suppose $f(x, y, z)$ is a sufficiently smooth function defined in Cartesian coordinates and $g(r, phi, z) = f(r cosphi, rsinphi, z)$ is the same function in cylindrical coordinates. We have
        $$left. nabla^2 f right|_{begin{array}{l}x=rcosphi\y=rsinphi\z=zend{array}} = nabla^2 g.$$
        Using second-order central difference approximation for the second derivatives:
        $$left. nabla^2 f right|_{begin{array}{l}x=0\y=0end{array}} approx dfrac{f(Delta x, 0, z) - 2f(0, 0, z) + f(-Delta x, 0, z)}{(Delta x)^2} + dfrac{f(0, Delta y, z) - 2f(0, 0, z) + f(0, -Delta y, z)}{(Delta y)^2} + dfrac{f(0, 0, z+Delta z) - 2f(0, 0, z) + f(0, 0, z-Delta z)}{(Delta z)^2} = dfrac{g(Delta r, 0, z) - 2g(0,phi,z)+g(Delta r,pi,z)}{(Delta r)^2} + dfrac{g(Delta r, frac{pi}{2}, z) - 2g(0,phi,z)+g(Delta r,frac{3pi}{2},z)}{(Delta r)^2} + dfrac{g(0, 0, z+Delta z) - 2g(0, phi, z) + g(0, 0, z-Delta z)}{(Delta z)^2},$$
        where $phi$ can be anything, since $g(0,phi_1,z)=g(0,phi_2,z)$ for any $phi_1, phi_2$ as they correspond to the same point.



        Thus, the finite difference equation that corresponds to the heat equation in the cylindrical coordinates at $r=0$ is the following (using notations from the question):
        $$ dfrac{u^{tau+1}_{0,j,k} - u^{tau}_{0,j,k}}{Delta t} = a left( dfrac{u^tau_{1,0,k} - 2u^tau_{0,j,k} + u^tau_{1,beta,k}}{(Delta r)^2} + dfrac{u^tau_{1,alpha,k} - 2u^tau_{0,j,k} + u^tau_{1,gamma,k}}{(Delta r)^2} + dfrac{u^tau_{0,j,k+1} - 2u^tau_{0,j,k} + u^tau_{0,j,k-1}}{(Delta z)^2}right),$$
        where $alpha cdot Deltaphi = pi/2$, $~~beta cdot Deltaphi = pi,~~$ and $~~gamma cdot Deltaphi = 3pi/2~~$ (so the grid should be appropriately chosen). And once again, $u^tau_{0,j,k}$ doesn't really depend on $j$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 8 at 5:23









        JohnJohn

        113




        113






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3065670%2fheat-equation-in-cylindrical-coordinates-at-origin%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith