Skip to content

Flip the sign in the rightwards velocity branch - #1529

Closed
d7919 wants to merge 1 commit into
nextfrom
bugfix_weno3_sign_error
Closed

d7919 wants to merge 1 commit into
nextfrom
bugfix_weno3_sign_error

Conversation

@d7919

@d7919 d7919 commented Jan 24, 2019

Copy link
Copy Markdown
Member

This should then match the equations given in Jiang and Peng (1999).

This should then match the equations given in Jiang and Peng (1999).
/ (WENO_SMALL + SQ(f.p - 2.0 * f.c + f.m));

deriv = (-f.m + 3. * f.c - 3. * f.p + f.pp);
deriv = -(-f.m + 3. * f.c - 3. * f.p + f.pp);

@johnomotani johnomotani Jan 24, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right to me. In the limit of smooth f, r->1, so w->1/3. Then the left stencil gives 1./6.*f.mm - f.m + 1./2.*f.c + 1./3.*f.p, which is a 3rd order first derivative (see http://web.media.mit.edu/~crtaylor/calculator.html with points at -2,-1,0,1). Before this change the right stencil is similar, but after it the right stencil would give -2./3.*f.m + 1./2.*f.c + 1./6.*f.pp, which isn't a 3rd order first derivative. Maybe there was a typo in the paper you cited @d7919?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's definitely possible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(in the other limit both branches reduce to a second order central difference, I'm a bit surprised it's second order rather than first order and one sided but that's without thinking about it too hard)

@d7919

d7919 commented Jan 28, 2019

Copy link
Copy Markdown
Member Author

Closing following input from @johnomotani combined with fix to MMS test in #1528 which suggests we do get 3rd order without the change proposed here.

@d7919 d7919 closed this Jan 28, 2019
@d7919
d7919 deleted the bugfix_weno3_sign_error branch February 5, 2019 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants