-
Notifications
You must be signed in to change notification settings - Fork 11
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
[WIP] Jet Stirred Reactors #17
base: master
Are you sure you want to change the base?
Conversation
I would suggest integrate the difference between the curves, rather than find the difference of the integrals. |
I'm trying to visualize the difference here... in practice the answer should be the same, no? Though it's easier/more efficient to just integrate once. |
I was imagining these two curves They have the same area under them, so the difference in area under curve is zero, suggesting they are identical and there is no error in the model. If you find the difference between the curves, then the area between that and the y=0 axis (ok, so perhaps I should have said integrate the absolute value of the difference between the curves), the error is significant. |
@rwest got it, that makes sense! |
Agreed. FYI, when I was implementing the error evaluation for perfectly stirred reactor simulations in my older MARS, which marched along the upper branch, I used three points: near extinction turning point, near equilibrium (e.g., a residence time of around 0.1 s), and the logarithmic midpoint between those two points. The overall error was the the max of the error in residence time at the extinction turning point and the error in temperature at the other two points. |
pyteck/simulation.py
Outdated
elif self.kind == 'species profile': | ||
timestep['mole_fractions'] = self.reac.thermo.X | ||
# Add ``timestep`` to table | ||
timestep.append() |
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.
JSR simulations needn't save time history.
Probably this whole method should be in the AutoIgnitionSimulation class, not the Simulation super-class
…d to update process_results)
…need to debug cantera results
…e have been changed to take in temperature index and save .h5 files separately
For our JSR simulations it's maybe worth reading 2E08.pdf and keeping an eye on Cantera/enhancements#31 and Cantera/cantera#1021 |
…sv in data/ folder
…s for species listed in the species key.
I'm resurrecting this PR because I've got a flame speed addition in the works that depends on this. Here's what I've done:
Here's the remaining work:
Here's what I don't plan to do for this PR:
|
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.
Incomplete review; going to wait until refactoring finished. Not clear to me yet how multiple different simulation types are going to coexist and reuse appropriate code/classes.
pyteck/eval_model.py
Outdated
|
||
# Local imports | ||
from .utils import units | ||
from .simulation import Simulation | ||
from .simulation import AutoIgnitionSimulation as Simulation |
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.
In general I'm not sure I like the idea of importing something under a different name - could likely confuse people down the line. Is there a good reason for it?
pyteck/eval_model.py
Outdated
@@ -40,7 +40,7 @@ def create_simulations(dataset, properties): | |||
Returns | |||
------- | |||
simulations : list | |||
List of :class:`Simulation` objects for each simulation | |||
List of :class:`AutoignitionSimulation` objects for each simulation |
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.
Perhaps I should wait to review until refactoring finished, but this file/module/class seems a little confused right now about if it's specific to Autoignition, or if it's generic for all simulations.
So I'm going to pause reviewing now. Let me know if/when I should take another look.
Okay, @rwest I think this one is ready for review. |
Todo:
eval_model.py
simulation.py
numpy.trapz