Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting vs time stepping vs chemistry #724

Open
inducer opened this issue Aug 12, 2022 · 0 comments
Open

Limiting vs time stepping vs chemistry #724

inducer opened this issue Aug 12, 2022 · 0 comments

Comments

@inducer
Copy link
Contributor

inducer commented Aug 12, 2022

Starting from a plain RK scheme:

$$ \begin{align*} k_{m,i}&=f(y_m+h\sum_j a_{ij} k_{m,j})\\ y_{m+1}&=y_m+h\sum_j b_j k_{1,j} \end{align*} $$

We first have to decide whether we merge the limiter (represented here by $\ell$) into the RHS function:

$$ \begin{align*} k_{m,i}&=f(\ell(y_m+h\sum_j a_{ij} k_{m,j}))\\ y_{m+1}&=y_m+h\sum_j b_j k_{1,j} \end{align*} $$

or whether we limit each computed state estimate:

$$ \begin{align*} k_{m,1}&=f(y_m)\\ k_{m,i}&=f(\ell(y_m+h\sum_j a_{ij} k_{m,j}))\qquad (i\in {2,\dots})\\ y_{m+1}&=\ell(y_m+h\sum_j b_j k_{1,j}) \end{align*} $$

Advantages of the "merged" approach:

  • Simple, requires no modification of the time stepper

Advantages of the "each computed state" approach:

  • State estimates returned from the time stepper represent limited state that RHS will use. (Without this, there is a risk that un-limited state will get used in places where it should not.)
  • The two approaches are equivalent only for specific time integrators, namely those for which every state estimate gets passed to a RHS function immediately after it is computed. Exposing the limiter to the time integrator creates an (intentional!) stumbling block for the implementer of the time integrator to think about when limiting should apply.

An additional complication to think about is the interaction of the limiter with the treatment of the chemistry. The output of the limiter needs to be thermodynamically consistent. A number of questions on this:

  • What does this mean? An existing implementation replaces the internal energy while seeking to keep the temperature constant. Is this the correct thing to do? Why?
  • In view of the above options, how will it be implemented? The linked implementation appears to treat the temperature seed (typically used as the initial guess of the Newton iteration) as the authoritative temperature to be preserved. This seems questionable.

cc @MTCam @lukeolson @jbfreund @tulioricci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant