Skip to main content
Loading navigation
Back to prompt library

Build an IFC Model Code_Aster Structural Simulation Prep Dispatcher — implementation

Linked challenge: Build an IFC Model Code_Aster Structural Simulation Prep Dispatcher

Prompt source

implementation109 lines11 sectionsNo variables1 code block
## Build
Analyze IFC structural models using ifc2ca conventions to prepare finite element analysis inputs. Identify disconnected structural nodes and map structural curve members before simulation execution.

## User
Structural engineering consultant

## Workflow
1. Parse structural IFC files containing IfcStructuralCurveMember elements.
2. Inspect node connectivity using simulated ifc2ca utility logic.
3. Synthesize material structural properties into Code_Aster command blocks.
4. Generate pre-flight simulation reports for engineering review.

## Interface
Engineering pre-processor workbench with 3D wireframe preview, node connectivity table, and text export.

## Data
Use open-source sample structural IFC models from buildingSMART or mock IFC structural test files via IfcOpenShell.
Starter examples below are synthetic. They are not downloaded records.

## Source
[IfcOpenShell](https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.8.0/README.md)
Applies the ifc2ca utility mentioned in the IfcOpenShell repository table for converting IFC structural models to Code_Aster.

## Tools
langgraph, fastapi.
LangGraph manages the multi-stage structural validation pipeline from model parsing to mesh syntax generation.
Hosted reasoning model for mapping material mechanics strings to standard Code_Aster commands.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Flags unlinked structural connection nodes prior to simulation deck generation.
- Outputs structured Code_Aster command strings with valid geometric constraints.
- Simulates file write operations to sandbox directory.

## Starter Examples
```json
[
  {
    "input": {
      "elements": [
        {
          "id": "beam-01",
          "type": "IfcStructuralCurveMember",
          "nodes": [
            "node-A",
            "node-B"
          ],
          "material": "Steel_S355"
        }
      ],
      "nodes": [
        {
          "id": "node-A",
          "coords": [
            0,
            0,
            3
          ]
        },
        {
          "id": "node-B",
          "coords": [
            6,
            0,
            3
          ]
        }
      ]
    },
    "expected_output": {
      "status": "ready",
      "orphan_nodes": [],
      "code_aster_deck": "DEFI_MATERIAU(ELAS=_F(E=210000.0, NU=0.3),); MAILLAGE(POUTRE=_F(GROUP_MA='beam-01'));",
      "warnings": []
    }
  },
  {
    "input": {
      "elements": [
        {
          "id": "beam-02",
          "type": "IfcStructuralCurveMember",
          "nodes": [
            "node-C",
            "node-D"
          ],
          "material": "Timber_C24"
        }
      ],
      "nodes": [
        {
          "id": "node-C",
          "coords": [
            0,
            0,
            0
          ]
        }
      ]
    },
    "expected_output": {
      "status": "failed",
      "orphan_nodes": [
        "node-D"
      ],
      "code_aster_deck": null,
      "warnings": [
        "Element beam-02 references undefined connection node-D"
      ]
    }
  }
]
```

## Safety
Outputs pre-flight simulation configurations only; does not perform physical stress calculations or load clearances.
Use mock external writes. Require human review before any real deployment.