Skip to content

Simulation overlays: import pressure, temperature and velocity results and display them on the model #6

Description

@PouyanJay

The airflow overlay is schematic by design: streaklines that show direction, not a result. Some learners and instructors have real simulation data for an engine section and would like to see it on the geometry. This issue covers importing such results and displaying them as overlays.

What is needed

  • Import a simulation result file and show pressure, temperature or velocity as a colour field on the surfaces it maps to, or as a point cloud or vector field in the flow path.
  • A legend with the chosen variable, units and range, and a slider to change the range.
  • A toggle per variable, and a way to fade the overlay against the base material.
  • Clear labelling that the overlay comes from an imported file, with its source name shown.

Decisions to make before building, which is why this issue also carries the research label:

  • Which input format to accept first. A simple CSV or JSON of points with values is enough for a first version and can be produced from any solver. VTK or CGNS support is a larger step and probably belongs to a later release.
  • How results are registered to the model. The models are generic and not built to any real engine's coordinates, so an import needs a transform (scale, offset, rotation) and probably a choice of which engine and which section it belongs to.

Success criteria

  • A documented input format with an example file in the repository that renders on at least one engine.
  • Colour mapping uses a perceptually ordered palette and the legend reads correctly in both themes.
  • The overlay is excluded from picking, from the piece count, and from the separation controller, and it hides itself in Explore mode.
  • Import is done entirely in the browser; no data leaves the device.
  • Files up to ten megabytes load without freezing the interface (parse in a worker).
  • A bad file produces a readable error and leaves the scene unchanged.
  • The help dialog explains what the overlay is and is not.

Suggested approach

  • Start with points: parse x, y, z, value rows into a Float32Array, apply the user transform, and render with T.Points and a custom shader that maps value to colour. This works for any variable and needs no mesh registration.
  • For surface colouring, a second step is to project point values onto the nearest surface using a bounding volume hierarchy on the engine geometry, then write per-vertex colours on a clone of the affected meshes. Keep that behind a separate toggle because it is slower.
  • Put parsing in a web worker so large files do not block rendering. The app is client-only, so no server work is involved.
  • Persist the last transform per engine in local storage, the way the theme is stored, so a user does not re-align on every reload.
  • Add a small example dataset under public/examples/ generated from a simple analytic field, so the feature can be demonstrated and tested without a solver.

Out of scope

Running any simulation in the browser, and time-varying results. Both can be considered after the static case works.

Touchpoints

components/engine/engine-scene.tsx, app/page.tsx, a new lib/overlays/ module, public/examples/, docs/ARCHITECTURE.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dataCatalog, imported datasets, external assetsarea: sceneThree.js scene, geometry, cameras, renderingenhancementNew feature or requestfeatureA new user-facing capabilitypriority: lowNice to haveresearchNeeds investigation or a decision before buildingsize: XLMulti-week, should be split into sub-tasksv0.2.0Planned for the v0.2.0 release

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions