Crank-Nicolson is much less accurate than implicit FTCS.
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am worried about this. I am solving the heat equation with ñ=1 and homogeneous Dirichlet boundary conditions. I use dt=0.00001, dx=0.01, nx=101 in the interval [0,1]. I found that the implicit FTCS gives me an error (difference between the analytic solution and the numerically computed solution) between 0 and 0.006. The C-N method for exactly the same problem gives me an error between 0 and 0.14. That is about two orders of magnitude larger in C-N. I expected higer precision in C-N. Any idea why is this happening? I evaluated the error in times 0.1,0.2,0.3,0.4,0.5. I have
graphs for this with $x in [0,1]$ with $dx=0.01$. All is done in Python.
I appreciate any suggestion about this (other than telling me I have a bug in my code. I seriously consider this as an option and I am looking into this, but I cannot yet find a bug).
When I use $dt=0.1$ C-N is more accurate than FTCS. Errors in C-N in $[-0.12,0.3]$ and FTCS $[0,0.8]$.
Thanks.
pde numerical-methods
add a comment |Â
up vote
1
down vote
favorite
I am worried about this. I am solving the heat equation with ñ=1 and homogeneous Dirichlet boundary conditions. I use dt=0.00001, dx=0.01, nx=101 in the interval [0,1]. I found that the implicit FTCS gives me an error (difference between the analytic solution and the numerically computed solution) between 0 and 0.006. The C-N method for exactly the same problem gives me an error between 0 and 0.14. That is about two orders of magnitude larger in C-N. I expected higer precision in C-N. Any idea why is this happening? I evaluated the error in times 0.1,0.2,0.3,0.4,0.5. I have
graphs for this with $x in [0,1]$ with $dx=0.01$. All is done in Python.
I appreciate any suggestion about this (other than telling me I have a bug in my code. I seriously consider this as an option and I am looking into this, but I cannot yet find a bug).
When I use $dt=0.1$ C-N is more accurate than FTCS. Errors in C-N in $[-0.12,0.3]$ and FTCS $[0,0.8]$.
Thanks.
pde numerical-methods
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
1
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am worried about this. I am solving the heat equation with ñ=1 and homogeneous Dirichlet boundary conditions. I use dt=0.00001, dx=0.01, nx=101 in the interval [0,1]. I found that the implicit FTCS gives me an error (difference between the analytic solution and the numerically computed solution) between 0 and 0.006. The C-N method for exactly the same problem gives me an error between 0 and 0.14. That is about two orders of magnitude larger in C-N. I expected higer precision in C-N. Any idea why is this happening? I evaluated the error in times 0.1,0.2,0.3,0.4,0.5. I have
graphs for this with $x in [0,1]$ with $dx=0.01$. All is done in Python.
I appreciate any suggestion about this (other than telling me I have a bug in my code. I seriously consider this as an option and I am looking into this, but I cannot yet find a bug).
When I use $dt=0.1$ C-N is more accurate than FTCS. Errors in C-N in $[-0.12,0.3]$ and FTCS $[0,0.8]$.
Thanks.
pde numerical-methods
I am worried about this. I am solving the heat equation with ñ=1 and homogeneous Dirichlet boundary conditions. I use dt=0.00001, dx=0.01, nx=101 in the interval [0,1]. I found that the implicit FTCS gives me an error (difference between the analytic solution and the numerically computed solution) between 0 and 0.006. The C-N method for exactly the same problem gives me an error between 0 and 0.14. That is about two orders of magnitude larger in C-N. I expected higer precision in C-N. Any idea why is this happening? I evaluated the error in times 0.1,0.2,0.3,0.4,0.5. I have
graphs for this with $x in [0,1]$ with $dx=0.01$. All is done in Python.
I appreciate any suggestion about this (other than telling me I have a bug in my code. I seriously consider this as an option and I am looking into this, but I cannot yet find a bug).
When I use $dt=0.1$ C-N is more accurate than FTCS. Errors in C-N in $[-0.12,0.3]$ and FTCS $[0,0.8]$.
Thanks.
pde numerical-methods
asked Aug 26 at 22:51
Herman Jaramillo
1,174818
1,174818
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
1
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43
add a comment |Â
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
1
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
1
1
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895613%2fcrank-nicolson-is-much-less-accurate-than-implicit-ftcs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
A better site for this question would be scicomp.stackexchange.com.
â Mattos
Aug 26 at 23:14
@Mattos: Thanks for your suggestion. I will post it there. I guess I can include Python code there, right?
â Herman Jaramillo
Aug 27 at 1:43
1
Yes, you can include your code there.
â Mattos
Aug 27 at 2:43