Skip to content

Improved species solver robustness for coarse grids#2733

Open
EvertBunschoten wants to merge 8 commits intodevelopfrom
feature_flame_lengthscale
Open

Improved species solver robustness for coarse grids#2733
EvertBunschoten wants to merge 8 commits intodevelopfrom
feature_flame_lengthscale

Conversation

@EvertBunschoten
Copy link
Member

Simulations of flames in large domains is difficult because volumetric source terms blow up in large cells, causing the species solver to diverge. I implemented a damping term which scales the species source terms in cells with a length scale above a user-defined threshold. This allows for the flame to propagate through regions of the domain with large cells (such as in the far-field) without diverging, while the source terms in refined regions remain unaffected.

To illustrate how this feature improves robustness, I ran a 2D simulation of a circular flame propagating from a refined region in the middle domain towards the edges where the mesh is significantly more coarse.

grid

The image below shows the temperature field after 30 iterations as computed with the previous implementation (left), and the new implementation with a flame length scale specified as 1e-4 m (right). The solution is unaffected while the flame is within the refined region of the mesh.

iter30

However, the instance the flame reaches the coarser cells, the solver quickly diverges without damping. With the damping active, the flame propagates through the entire domain without an issue.
iter40

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

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

Hmmm but then you are not solving the same equations anymore.
If the issue is "propagation speed" it sounds like something should be done about the CFL.

@EvertBunschoten
Copy link
Member Author

Hmmm but then you are not solving the same equations anymore. If the issue is "propagation speed" it sounds like something should be done about the CFL.

It is not about accurately modeling the propagation of the flame, it is just to allow the flame to propagate through the coarse regions of the domain without the solver diverging. For cells larger than the flame length scale, we can't accurately resolve the propagation of the flame front anyway because the diffusive time scales and reaction source time scales differ at those length scales.

@pcarruscag
Copy link
Member

So is it possible to adjust the diffusion coefficients in those regions?
Numerical diffusion as a way of dealing with instabilities is a more established practice than disabling source terms.

@bigfooted
Copy link
Contributor

I agree with Pedro, it is great that it doesn't blow up, but the solution is not physical anymore. You can look into 'thickened flame' models. In these models, the propagation speed is physically correct, but the flame is artificially thickened by increasing the diffusion coefficient.

@bigfooted
Copy link
Contributor

It's mentioned in Poinsot & Veynante btw.

@EvertBunschoten
Copy link
Member Author

I was not clear when initially describing the problem. The images I showed were of a steady simulation, whereas the thickened flame models described in literature were developed for unsteady problems.
For unsteady flames, adding the correction factor to only the diffusivity seems to improve the propagation of flames in coarse cells very nicely.
The image below shows the comparison between unsteady simulations of an expanding flame front with (right) and without (left) scaling the diffusivity according to the cell volume. The mesh is refined within the purple circle and is very coarse beyond it.

comparison_t001

The flame propagates at the same speed for both cases within the refined region, but changes once the flame goes into the coarse region.
comparison_t0024

With the artificially thickened flame correction (diffusion only), the flame propagates at approximately the same speed through the coarse cells, whereas the flame speed drops significantly without the correction.

comparison_t003

@EvertBunschoten
Copy link
Member Author

For the steady case (constant CFL number=10), it seems that suppressing the source term and enhancing diffusivity in the course cells improves the robustness of the simulations. The image below shows the results of a steady simulation on the same grid as the unsteady simulation without any correction term (left) and with diffusion increased and source terms decreased (right).

steady_comparison_60

At around 80 iterations, the flame front reaches the coarse cells, where the uncorrected simulation quickly diverges.

steady_comparison_80

With the correction terms, the flame front propagates rapidly through the coarse cells, which is expected for a steady simulation, given that larger cells have a larger time step.

steady_comparison_100

@bigfooted
Copy link
Contributor

looks good. Note that the thickened flame model of the paper we discussed https://share.google/Ia0hcPhfoOKvHypb3 recovers the flame speed by also modifying the diffusivity and source term in the energy equation, and therefore modifies the flame temperature.
If you plan to silently do this by default, maybe make the lengthscale depend on the local estimate of the flame thickness (in all regions with non-negligible source terms) and do this when the cell size is > 5 times the flame thickness or so. And start giving warnings to the user on screen about it.

@EvertBunschoten
Copy link
Member Author

looks good. Note that the thickened flame model of the paper we discussed https://share.google/Ia0hcPhfoOKvHypb3 recovers the flame speed by also modifying the diffusivity and source term in the energy equation, and therefore modifies the flame temperature. If you plan to silently do this by default, maybe make the lengthscale depend on the local estimate of the flame thickness (in all regions with non-negligible source terms) and do this when the cell size is > 5 times the flame thickness or so. And start giving warnings to the user on screen about it.

It is possible to calculate the flame thickness during simulations with Equation 4 of the paper you linked. However, the flame speed correction model will not work when the correction factor depends on the local value of the flame thickness.
As the flame propagates through coarse cells, its thickness will increase due to the artificially increased diffusivity. Therefore, the flame will grow in thickness relative to the local cell size, which will reduce the value of the correction factor, leading to a reduction in flame propagation speed.

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.

3 participants

Comments