Skip to content

feat: boundary data on the walls of the simulation domain - #147

Merged
m-fehr merged 3 commits into
masterfrom
feat/domain-boundary-data
Oct 15, 2026
Merged

m-fehr merged 3 commits into
masterfrom
feat/domain-boundary-data

Conversation

@m-fehr

@m-fehr m-fehr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Boundary data on walls of the simulation domain that are not part of an obstruction, e.g. the burning rate on the ground of an outdoor case, are attached to the meshes (Mesh.get_boundary_data). FDS may split such a wall into several patches with the same orientation, e.g. where a vent begins, but Boundary.data maps each orientation to one patch, so all but the last patch were dropped. This is why the data in #81 could not be read.

  • Boundary.patches lists all patches; Boundary.orientations is unique and sorted; vmin/vmax per orientation cover all patches of that orientation and return NaN if there is none. Boundary.data is unchanged but warns when it drops patches.
  • New sim.meshes.get_global_boundary_data_arrays(quantity) combines the domain walls over all meshes into one array per orientation, with the same grid code as Obstruction.get_global_boundary_data_arrays (fix: global boundary arrays keep the time axis first and all face positions #146).
  • Obstruction.vmin/vmax per orientation skip parts of the obstruction without that face instead of failing.
  • Mesh.get_boundary_data has a docstring; the API page and the boundary notebook say where these data live.

Closes #81

Changes in behaviour

  • Boundary.orientations returns each orientation once, sorted (before: one entry per patch, in file order).

Tests

New case bndf_domain (FDS 6.11.1, input in tests/cases/fds_inputs/): two meshes with 0.1 m and 0.2 m cells and a burner vent that splits the floor of each mesh into several patches. The tests check that the patches together cover the floor and that each lands at its place in the global array, without relying on how FDS splits the floor, as they also run on the output of new FDS builds.

🤖 Generated with Claude Code

m-fehr and others added 3 commits October 15, 2026 22:27
Boundary data on walls of the domain that are not part of an obstruction, e.g.
the ground of an outdoor case, are attached to the meshes. FDS may split such a
wall into several patches with the same orientation, e.g. where a vent begins,
but Boundary.data maps each orientation to one patch, so all but the last were
dropped; vmin/vmax per orientation saw only that patch, and orientations listed
duplicates.

- Boundary.patches lists all patches; orientations are unique and sorted;
  vmin/vmax cover all patches of an orientation. Boundary.data stays as it is
  but warns when it drops patches.
- MeshCollection.get_global_boundary_data_arrays combines the domain walls over
  all meshes, with the same grid code as the obstruction faces.
- Mesh.get_boundary_data has a docstring, the API page and the boundary
  notebook say where these data live.

The new case bndf_domain (FDS 6.11.1) has two meshes with 0.1 m and 0.2 m cells
and a burner vent splitting the floor of each into four patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Boundary.vmin/vmax for an orientation without patches return NaN, and
  Obstruction.vmin/vmax skip parts without that face instead of failing; an
  obstruction across meshes has faces only some of its parts write.
- export_obst_raw writes the orientation metadata in the sorted order the data
  follow.
- Mesh and SubObstruction share one quantity lookup, which the global arrays of
  meshes and obstructions use as well.
- The warning of Boundary.data points at the first caller outside fdsreader,
  with the helper moved from smoke3d to utils.misc.
- The Mesh.get_boundary_data docstring mentions faces between meshes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LAZY_LOAD=False keeps its previous effect on boundary data (none): reading
  every patch at load time would have been a silent change.
- get_boundary_data(quantity, orientation) and SubObstruction.get_coordinates
  no longer go through Boundary.data, which may warn.
- The global arrays take the public lookups of meshes and subobstructions
  instead of their internal dicts; the quantity lookup uses Quantity.__eq__.
- Obstruction.vmin/vmax reduce without the NaN values in one expression.
- The domain tests no longer depend on how FDS splits the floor into patches,
  since they also run on the output of new FDS builds; the warning test picks
  the matching warning.
- The notebook states what the ambient-only data in the example are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-fehr
m-fehr merged commit a1e16a6 into master Oct 15, 2026
9 checks passed
@m-fehr
m-fehr deleted the feat/domain-boundary-data branch October 15, 2026 20:49
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.05263% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
fdsreader/bndf/obstruction.py 94.54% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

m-fehr added a commit that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reading boundary files that are not associated with with a namelist object.

1 participant