Asymptotic error of forward Euler
I'm trying to understand the asymptotic error behaviour of forward Euler (finite difference method), as timesteps are decreased (refined), so I feel trust in the method of manufactured solutions (MMS).
But looking at a simple model of a ball accelerating, I noticed you can make the error asymptote to whatever you want...
If the ball begins with zero velocity, then forward euler estimates that it does not move in the first timestep. So the error is the same as the analytically determined position:
Constant acceleration gives velocity $v(t) = t$ and position $p(t)=frac{1}{2}t^2$. So that is the error, which is order $O( (Delta t)^2 )$, for the first timestep to $t=Delta t$. So a plot of error vs timestep, with timestep refinement, will reveal an asymptote of that order.
An increasing acceleration, say $v(t) = t^2$, gives $p(t)=frac{1}{3}t^3$. The error is now order $O( (Delta t)^3 )$, which it again asymptotes to with timestep refinement.
This is troubling, because MMS relies on error vs timestep having the same asymptotic behaviour of the estimation method (in this case, forward Euler, which is a first order method). In this simple example, it doesn't seem to work.
MMS is a well-established technique, so I must be doing something wrong or misunderstanding something... Is it that you should take many timesteps (accumulating error), not just the first one? Is it that this example has only one variable $p$, but fluid simulations have many (a grid of many cells, with many variables in each), and in a complicated scenario, for fluid equatioms, it kind of all evens out?
convergence numerical-methods taylor-expansion finite-differences
add a comment |
I'm trying to understand the asymptotic error behaviour of forward Euler (finite difference method), as timesteps are decreased (refined), so I feel trust in the method of manufactured solutions (MMS).
But looking at a simple model of a ball accelerating, I noticed you can make the error asymptote to whatever you want...
If the ball begins with zero velocity, then forward euler estimates that it does not move in the first timestep. So the error is the same as the analytically determined position:
Constant acceleration gives velocity $v(t) = t$ and position $p(t)=frac{1}{2}t^2$. So that is the error, which is order $O( (Delta t)^2 )$, for the first timestep to $t=Delta t$. So a plot of error vs timestep, with timestep refinement, will reveal an asymptote of that order.
An increasing acceleration, say $v(t) = t^2$, gives $p(t)=frac{1}{3}t^3$. The error is now order $O( (Delta t)^3 )$, which it again asymptotes to with timestep refinement.
This is troubling, because MMS relies on error vs timestep having the same asymptotic behaviour of the estimation method (in this case, forward Euler, which is a first order method). In this simple example, it doesn't seem to work.
MMS is a well-established technique, so I must be doing something wrong or misunderstanding something... Is it that you should take many timesteps (accumulating error), not just the first one? Is it that this example has only one variable $p$, but fluid simulations have many (a grid of many cells, with many variables in each), and in a complicated scenario, for fluid equatioms, it kind of all evens out?
convergence numerical-methods taylor-expansion finite-differences
add a comment |
I'm trying to understand the asymptotic error behaviour of forward Euler (finite difference method), as timesteps are decreased (refined), so I feel trust in the method of manufactured solutions (MMS).
But looking at a simple model of a ball accelerating, I noticed you can make the error asymptote to whatever you want...
If the ball begins with zero velocity, then forward euler estimates that it does not move in the first timestep. So the error is the same as the analytically determined position:
Constant acceleration gives velocity $v(t) = t$ and position $p(t)=frac{1}{2}t^2$. So that is the error, which is order $O( (Delta t)^2 )$, for the first timestep to $t=Delta t$. So a plot of error vs timestep, with timestep refinement, will reveal an asymptote of that order.
An increasing acceleration, say $v(t) = t^2$, gives $p(t)=frac{1}{3}t^3$. The error is now order $O( (Delta t)^3 )$, which it again asymptotes to with timestep refinement.
This is troubling, because MMS relies on error vs timestep having the same asymptotic behaviour of the estimation method (in this case, forward Euler, which is a first order method). In this simple example, it doesn't seem to work.
MMS is a well-established technique, so I must be doing something wrong or misunderstanding something... Is it that you should take many timesteps (accumulating error), not just the first one? Is it that this example has only one variable $p$, but fluid simulations have many (a grid of many cells, with many variables in each), and in a complicated scenario, for fluid equatioms, it kind of all evens out?
convergence numerical-methods taylor-expansion finite-differences
I'm trying to understand the asymptotic error behaviour of forward Euler (finite difference method), as timesteps are decreased (refined), so I feel trust in the method of manufactured solutions (MMS).
But looking at a simple model of a ball accelerating, I noticed you can make the error asymptote to whatever you want...
If the ball begins with zero velocity, then forward euler estimates that it does not move in the first timestep. So the error is the same as the analytically determined position:
Constant acceleration gives velocity $v(t) = t$ and position $p(t)=frac{1}{2}t^2$. So that is the error, which is order $O( (Delta t)^2 )$, for the first timestep to $t=Delta t$. So a plot of error vs timestep, with timestep refinement, will reveal an asymptote of that order.
An increasing acceleration, say $v(t) = t^2$, gives $p(t)=frac{1}{3}t^3$. The error is now order $O( (Delta t)^3 )$, which it again asymptotes to with timestep refinement.
This is troubling, because MMS relies on error vs timestep having the same asymptotic behaviour of the estimation method (in this case, forward Euler, which is a first order method). In this simple example, it doesn't seem to work.
MMS is a well-established technique, so I must be doing something wrong or misunderstanding something... Is it that you should take many timesteps (accumulating error), not just the first one? Is it that this example has only one variable $p$, but fluid simulations have many (a grid of many cells, with many variables in each), and in a complicated scenario, for fluid equatioms, it kind of all evens out?
convergence numerical-methods taylor-expansion finite-differences
convergence numerical-methods taylor-expansion finite-differences
edited Nov 20 '18 at 9:16
asked Nov 20 '18 at 6:48
hyperpallium
442414
442414
add a comment |
add a comment |
active
oldest
votes
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
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006032%2fasymptotic-error-of-forward-euler%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006032%2fasymptotic-error-of-forward-euler%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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