FireDynamics / fdsreader

Python reader for FDS data
GNU General Public License v3.0
44 stars 18 forks source link

Is there a convenient way to display obstacles in slices? #67

Closed ManuelOsburg closed 9 months ago

ManuelOsburg commented 9 months ago

Areas outside the mesh are labelled as nan. Here I can label "missing areas" with cmap.set_bad(colour='gray') in conjunction with plt.imshow. However, areas inside solids are saved as 0. If gas phase properties also have a value of 0, I cannot simply overwrite these positions with nan.

JanVogelsang commented 9 months ago

If you are using the to_global method on slices, you can use the fill parameter and set it to numpy.nan, e.g.:

import numpy as np
import fdsreader as fds
sim = fds.Simulation(".")
sim.slices[0].to_global(fill=np.nan)

Does that solve your question?