-
Notifications
You must be signed in to change notification settings - Fork 25
Description
What happened?
Description:
When requesting a cell‐centered slice at PBY=0.55 on a uniform 0.1 m grid, fdsreader returns y = [0.60000002] instead of 0.55. Even if ignore_cell_centered=True is passed to get_coordinates(), the result remains 0.60000002. The cell centers on a 0.1 m grid are at
0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95
so a request for PBY=0.55 with CELL_CENTERED=T should locate that exact cell center at 0.55 m.
Steps to reproduce
Reproduction:
- Use a 1 m domain with 0.1 m grid spacing in y (nodal y: 0.0, 0.1, …, 1.0).
- In FDS input:
&SLCF PBY=0.50, QUANTITY='TEMPERATURE' /
&SLCF PBY=0.55, CELL_CENTERED=T, QUANTITY='TEMPERATURE' /
- In Python:
import fdsreader as fds
import os
sim = fds.Simulation(os.getcwd())
for slc in sim.slices:
print(slc.cell_centered, slc.get_coordinates(ignore_cell_centered=False)["y"])
Output:
False [0.5]
True [0.60000002]
- Now call with
ignore_cell_centered=True:
for slc in sim.slices:
print(slc.cell_centered, slc.get_coordinates(ignore_cell_centered=True)["y"])
Output:
False [0.5]
True [0.60000002]
Expected Behavior:
-
For
PBY=0.50, CELL_CENTERED=False→y = [0.50]. -
For
PBY=0.55, CELL_CENTERED=True→y = [0.55], because there is a cell center exactly at 0.55 m. -
If
ignore_cell_centered=True, then the slice should be treated as nodal (so nodal values exist at 0.0, 0.1, …, 1.0), but whenCELL_CENTERED=Trueis present in the slice definition, the coordinates for that slice are still drawn from a pre‐shifted cell‐center array. In either case, a request forPBY=0.55should not return 0.60000002.
Actual Behavior:
-
With
ignore_cell_centered=FalseandCELL_CENTERED=False,y = [0.5]. -
With
ignore_cell_centered=FalseandCELL_CENTERED=True,y = [0.60000002]. -
With
ignore_cell_centered=TrueandCELL_CENTERED=True,y = [0.60000002].
In all cases where CELL_CENTERED=True and PBY=0.55, fdsreader returns 0.60000002 instead of 0.55.
FDS version used
FDS-6.10.1-0-g12efa16-release
fdsreader version used
fdsreader, version 1.11.6