Make two point continuation more robust#1779
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1779 +/- ##
========================================
Coverage 73.20% 73.21%
========================================
Files 381 381
Lines 54371 54249 -122
Branches 9248 9239 -9
========================================
- Hits 39803 39716 -87
+ Misses 11590 11563 -27
+ Partials 2978 2970 -8 ☔ View full report in Codecov by Sentry. |
ischoegl
left a comment
There was a problem hiding this comment.
@speth … thanks for tracking down those fixes. I have very minor nits, but would also be interested in @wandadars’s feedback.
This makes time stepping more reliable when two point control is enabled, by making it so adjustments to the boundary velocities can instantaneously propagate to the control points where they are needed to satisfy the algebraic constraints on the temperatures at the control points.
70cc170 to
e20ec14
Compare
| plt.ylabel('Maximum Temperature [K]') | ||
| plt.savefig(output_path / "figure_max_temperature_iterations.png") No newline at end of file | ||
| plt.savefig(output_path / "figure_max_temperature_iterations.png") | ||
| plt.show() |
There was a problem hiding this comment.
With a single plt.show(), the second graph is shown first. To get the correct order, you may want to add another plt.show() below line 192.
|
This is a major improvement to the two-point control implementation. Thank you for the work on tracking down these issues @speth ! Have you looked at the heat release rate quantity between successive calls to the solve() with the two-point control method? I'm seeing the values jump around quite a bit, but when I look at the flow variables, they all seem fairly steady-ish between the calls to solve() with the exception of the temperature decrement. No large variations seem to be present, yet the heat release seems to change quite a bit. Below is two plots of the heat release for two solutions that differ by 5K at the control points. At higher strain rates, the noisy-ness seems to go away. Or at least is hidden by the much higher heat release rates (starting at 10e8 and going to 10e14 as strain increases, for the H2/O2 case I'm looking at.) The quantity is computed as: I'll print these out and look at which one is changing between the solutions later today. |
|
@speth ... I am mostly waiting for a response from you to @wandadars' comment. Other than that, I am ok with approving. |
|
@wandadars, I had seen a few cases with funky looking heat release rate profiles early on, which I believe was related to incorrect density information being used in some cases and was fixed by d671f0f. With the current branch, looking at an H2/O2 flame at a few different pressures, the most negative heat release rate values I see are around -1e5 W/m^3, and I don't see any with the extreme spikes of your first graph. Can you share what conditions those are occurring under? |
|
@speth It might be something with my script that is testing the two-point method. For reference, this is the case I was looking at: |
|
I think this is a result of your very loose absolute tolerance solver interacting with reactions that are very nearly at equilibrium. I notice this mainly with the reaction So, I don't think there's anything to address that's related to the two point solver, or that should be handled as part of this PR. |
I ran with the default tolerances and for completeness, this is the profile as the temperature is marched down. |
|
That's a nice visualization. Can you share the full script for generating those results and plots? You could also consider posting that with a new issue. While I think it's separate from the issues being addressed here, I think there is room for improving the heat release profiles. |
|
Here's the script that generated the gif. |



Changes proposed in this pull request
Flow1D::m_rho) are up to date after a regridding operation that only removes points and where the flame is not re-solved. Previously, this could result in the wrong value of the density being stored in an outputSolutionArrayand incorrect values being calculated for other derived quantities like heat release rate.Uois set correctlyIf applicable, fill in the issue number this pull request is fixing
Fixes #1747
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build&scons test) and unit tests address code coverage