Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Obstruction show/hide events between output times are ignored in masks

Aperta Adatta ai principianti
#133 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Inizia in fdsreader/bndf/obstruction.py, in SubObstruction.get_visible_times, dove gli eventi show/hide corrispondono solo esattamente ai tempi di output; Mesh.get_obstruction_mask utilizza il suo risultato. Modificalo in modo che un evento al tempo t_e si applichi a ogni tempo di output >= t_e. È completato quando un test costruito con oggetti reali Obstruction e SubObstruction, con tempi show e hide tra i tempi di output, restituisce la visibilità corretta a ogni tempo di output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Found while reviewing #131.

SubObstruction.get_visible_times(times) (fdsreader/bndf/obstruction.py) only applies a show/hide event if its time is exactly one of the given output times:

for time in times:
    if time in self.show_times:
        hidden = False
    if time in self.hide_times:
        hidden = True

Show/hide times come from device/control activation and rarely coincide with slice/Plot3D/Smoke3D output times. An obstruction removed at t = 12.3 s with output every 1 s is therefore never hidden, and Mesh.get_obstruction_mask(times) masks it for the whole run. The time-dependent masks (to_global(masked=True) for slices, Plot3D and Smoke3D, and since #131 also 3D slices) are effectively constant for real cases.

Expected: an event at time t_e applies to all output times >= t_e (state of the obstruction at each output time).

A test should use real Obstruction/SubObstruction objects with show/hide times between output times; the tests in #131 use a fake obstruction that returns the visible times directly.

Lingua principale
Python
Stelle
75
Fork
28
Merge medio
1g 20h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FireDynamics/fdsreader

Tutte le issue di FireDynamics/fdsreader

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.