-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
SolutionArray/HDF interface for 1D FlameBase #805
SolutionArray/HDF interface for 1D FlameBase #805
Conversation
91ca3a8
to
e2c6485
Compare
cb51c17
to
2be7f65
Compare
@speth (and @bryanwweber)... I am stopping here for feedback before adding a couple more tweaks (e.g. adding HDF-based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly interesting, and a good use of the work that you put into the HDF5 / pandas interface to the SolutionArray
class. For the Python interface, this seems like it may be the best way to provide a more useful alternative to the XML output format. Ultimately, we still need some output format that can be used directly from C++, but this might save us from having to do anything annoying like adding a dependency on the HDF5 library.
I did have a few questions / comments:
- I'm not sure I understand the need to extend the interface of
FreeFlame.set_initial_guess
. Why is this different from just usingfrom_solution_array
? - I think it's counterintuitive that
from_solution_array
only sets data for the 1D domain but does not set any of the boundary values. I'm not sure what the best way to handle this is. While in many cases, these values are the same as the first/last grid points, this is not always true (e.g. in the case of the mass fractions inBurnerFlame
). - Is there any way to extend this to include so that the saved data is as complete as what gets written to the XML output files? Some of these properties are per grid point, so the mapping is straightforward, but there are others that don't, e.g. the grid refinement tolerances and the
species_enabled
flag.
Absolutely - at least for HDF (and minus the mechanism which imho should be dealt with separately). I mainly wanted to get feedback before addressing minor issues that will take some time and thought to implement. |
106a481
to
613d5c5
Compare
@speth ... I addressed most of your comments (except for nomenclature I believe all are resolved). Per your questions:
The difference is motivated by restart applications which (1) avoid poor convergence for marginal conditions (i.e. the usual initial guess performs poorly), or (2) quickly fill flame data bases. Based on past experience, it is much quicker to assign a pruned solution from a related condition as an initial guess. Obviously, some small adjustments are needed (e.g. initial temperature), which is where differences arise.
This is an excellent point. My motivation was mainly restart via |
Codecov Report
@@ Coverage Diff @@
## master #805 +/- ##
==========================================
+ Coverage 71.39% 71.45% +0.05%
==========================================
Files 372 372
Lines 43482 43522 +40
==========================================
+ Hits 31045 31098 +53
+ Misses 12437 12424 -13
Continue to review full report at Codecov.
|
e53dd1e
to
433c693
Compare
@speth ... quick question regarding storage of simulation settings: I went through parameters that are accessible from Python, and came up with the following list:
where for tolerances it is straight-forward to store mode and deviating values to avoid clutter. It is straight-forward to save this in tabular form to the same HDF container that also holds the data. Things that I anticipate to be missing at the moment (a few require the implementation of property getters):
|
Here is a brief summary about
|
@speth ...
PS: |
a49fede
to
bc2b7d1
Compare
@speth ... your comment:
prompted me to add this feature to this PR (this includes restoring of settings from HDF data). Regarding the I'd appreciate if you could have a look before this gets larger. Most of what I can think of is implemented at this point; what I anticipate beyond is mostly implementing PS: I will not add anything beyond this point until I hear back.
|
bc2b7d1
to
91e0ea4
Compare
Update: While I'm not adding anything, I moved unrelated renaming changes ( |
Replace the previous alternatives (tangential_velocity_gradient/vGradient) by a single property name (spread_rate).
* Add ability to restart from existing data to remaining FlameBase derived objects. * Add logic to prevent multiple solution attempts for auto solver when restart data is provided.
2b55d27
to
27adf62
Compare
Rebased as newly merged #816 pre-empted fixes within this PR. PS: one potential addition would be to replace PPS: the existing |
82fd62c
to
1bedc2b
Compare
Prevent extra (i.e. double) newline in CSV output on Windows.
98a5237
to
e8e411e
Compare
e8e411e
to
b567742
Compare
Checklist
scons build
&scons test
) and unit tests address code coverageIf applicable, fill in the issue number this pull request is fixing
Partially addresses “big” project ideas (see 1D Flame Development Ideas):
Changes proposed in this pull request
SolutionArray
input/output for 1DFlameBase
objects (i.e.FreeFlame
, etc.)SolutionArray
glitches (i.e. slicing, extra column import)set_initial_guess
E.g. change to
cantera/examples/onedim
folder, and run (withinipython
):