PFR flux: surface (heterogeneous) reaction support is broken
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- backend, testing-qa
Direzione di ricerca
Inizia in t3/utils/flux.py confrontando set_pfr con run_pfr, quindi ispeziona tests/data/models/ e test_pfr_physics_and_profiles. Aggiungi o usa un fixture gas-più-superficie, determina se il diagramma rappresenta lo stato all’uscita o lo stato superficiale sommato e verifica che il percorso supportato riporti le velocità delle superfici integrate del reattore senza rompere i test solo gas.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Correction (see history): this issue was first filed on the assumption that the surface commit would be dropped from #162 before merge. It was not — #162 merged with all four commits, so
34de194and the defects below are inmainnow. This is a bug report, not a feature request.
#162 added a PFR reactor to the flux diagram generator. Its surface-reaction support does not work: passing a non-empty surface_names raises, and even past the raise the numbers it would report are meaningless.
The defects
Both in t3/utils/flux.py, introduced by 34de194:
-
ct.Interfaceis not called that way.run_pfrdoessurface(surface_names.index(surface.name)).thermo, which raises as soon assurface_namesis non-empty. The gas-phase path is unaffected —surface_namesdefaults toNoneand nothing reaches this block. -
The instances read are not the instances simulated. This is the deeper one.
set_pfrconstructs its ownct.Interfaceper cell:for surface in surfaces: surface_instance = ct.Interface(model_path, name=surface.name, phases=[gas_cell]) ct.ReactorSurface(surface_instance, reactor)and attaches those to the reactors, while
run_pfrreads rates off the outersurfaceslist it built separately. Those objects are never attached to any reactor and never advanced, so even with (1) fixed the reported ROPs would come from an unintegrated phase still at inlet conditions.
What a fix needs
set_pfrto return thect.ReactorSurface/ct.Interfaceobjects it creates, sorun_pfrreads rates from the phases that were actually integrated — presumably from the last cell, to match how the gas-phase outlet state is taken.- A decision on which cell's surface state the diagram should represent (outlet only, or summed along the reactor).
- A surface-bearing test fixture. Nothing in
tests/data/models/carries a surface phase, which is why this path is untested in either direction and why the defects survived tomain. A small gas+surface mechanism would also lettest_pfr_physics_and_profilesbe extended.
Interim
Until it is fixed, surface_names should be treated as unsupported. Worth considering an explicit NotImplementedError when it is passed, so it fails with a clear message rather than an ct.Interface object-not-callable error.
Context
- Cantera pin is
>=3.2.0(environment.yml). The surface code was written against a pre-3.x API — the same drift that leftct.PressureController(master=...)inset_pfr, fixed in #162 before merge.
- Lingua principale
- Python
- Stelle
- 14
- Fork
- 7
- Merge medio
- 2g 14m
- PR unite (30g)
- 10
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ReactionMechanismGenerator/T3
-
Type: Feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ReactionMechanismGenerator/T3#163 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
ReactionMechanismGenerator/T3#158 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
ReactionMechanismGenerator/T3#137 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
ReactionMechanismGenerator/T3#136 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ReactionMechanismGenerator/T3#124 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ReactionMechanismGenerator/T3
Issue simili
-
enhancement good first issue Stellar Wave trivial
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
StellarCanary/ProtocolCanary-Fixtures#258 ·
I maintainer di solito rispondono entro 1 giorno
-
github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Hochfrequenz/aibap.mcp#578 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mishraprafful/multihull#150 ·
I maintainer di solito rispondono entro 1 giorno
-
mp: /status reports the server class name as engine_type, not the configured engineForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
python-caldav/caldav#735 ·
I maintainer di solito rispondono entro 1 giorno