-
Notifications
You must be signed in to change notification settings - Fork 11
setting pressure and a dummy temperature #32
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -241,7 +241,7 @@ def update_flame(flame, strain_factor): | |||||||||||||||
| # Create and Solve initial flame | ||||||||||||||||
| gas = ct.Solution(mechanism, eos) | ||||||||||||||||
| if metadata_file != "" and rank == 0: | ||||||||||||||||
| gas.P = press | ||||||||||||||||
| gas.TP = oxmix.T, press # putting a dummy temperature | ||||||||||||||||
| save_table_metadata(gas, os.path.join(outdir, metadata_file)) | ||||||||||||||||
|
Comment on lines
+244
to
245
|
||||||||||||||||
| gas.TP = oxmix.T, press # putting a dummy temperature | |
| save_table_metadata(gas, os.path.join(outdir, metadata_file)) | |
| # Use a separate Solution instance for metadata to avoid | |
| # changing the initial temperature of `gas` | |
| metadata_gas = ct.Solution(mechanism, eos) | |
| metadata_gas.TP = metadata_gas.T, press | |
| save_table_metadata(metadata_gas, os.path.join(outdir, metadata_file)) |
Copilot
AI
Feb 9, 2026
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.
metadata_file is written once and then cleared, using the current loop's press. If pressures contains multiple values, the metadata will silently correspond to whichever pressure happens to be first on rank 0, which is likely incorrect for downstream consumers (the metadata includes a single nominal_pressure). Consider either erroring when multiple pressures are requested (as is done in compute_premixed_flamelets.py) or writing one metadata file per pressure/condition.
| save_table_metadata(gas, os.path.join(outdir, metadata_file)) | |
| metadata_file = "" | |
| base_name, ext = os.path.splitext(metadata_file) | |
| pressure_tag = f"P{press:g}" | |
| metadata_filename = f"{base_name}_{pressure_tag}{ext}" if ext else f"{base_name}_{pressure_tag}" | |
| save_table_metadata(gas, os.path.join(outdir, metadata_filename)) |
Uh oh!
There was an error while loading. Please reload this page.