Back to prompt library
Build an EnergyPlus Envelope Window U-Factor Retrofit Modeler — implementation
Linked challenge: Build an EnergyPlus Envelope Window U-Factor Retrofit Modeler
Prompt source
implementation75 lines11 sectionsNo variables1 code block
## Build
Parse EnergyPlus epJSON models to extract thermal envelope window specifications and synthesize window glazing retrofits. Calculate overall area-weighted U-factor reductions before simulation testing.
## User
Building energy consultant
## Workflow
1. Parse EnergyPlus epJSON document to isolate FenestrationSurface:Detailed and Construction objects.
2. Extract current thermal transmittance (U-factor) and surface area for each exterior glazing element.
3. Apply recommended high-performance triple-glazing retrofit parameters to target epJSON construction definitions.
4. Generate a calibrated epJSON delta patch alongside an area-weighted thermal transmittance comparison table.
## Interface
Interactive parameter editor showing current window assemblies, target U-factor slider controls, epJSON diff view, and download link for updated models.
## Data
Download standard EnergyPlus epJSON example models from the public NREL EnergyPlus repository or generate mock epJSON fixtures.
Starter examples below are synthetic. They are not downloaded records.
## Source
[EnergyPlus](https://raw.githubusercontent.com/NREL/EnergyPlus/develop/README.md)
Utilizes the EnergyPlus epJSON schema structure and construction definitions as documented in the EnergyPlus repository and input guides.
## Tools
langgraph, pydantic, streamlit.
LangGraph manages stateful cyclic steps across model parsing, thermal calculation, and epJSON diff generation with checkpointing.
Hosted reasoning model capable of precise numerical computation and structured JSON mutation.
## 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
- Parses FenestrationSurface:Detailed objects from epJSON and computes cumulative glazing surface area.
- Calculates baseline versus retrofit area-weighted window U-factors.
- Outputs valid, schema-compliant epJSON construction replacement blocks.
## Starter Examples
```json
[
{
"input": {
"epjson_model": {
"Window": {
"Win_North": {
"area_m2": 15,
"current_u_factor": 3.2
},
"Win_South": {
"area_m2": 25,
"current_u_factor": 3.2
}
}
},
"target_glazing_u_factor": 1.1
},
"expected_output": {
"total_glazing_area_m2": 40,
"baseline_weighted_u_factor": 3.2,
"retrofit_weighted_u_factor": 1.1,
"thermal_improvement_percent": 65.62,
"patch_applied": true
}
},
{
"input": {
"epjson_model": {
"Window": {}
},
"target_glazing_u_factor": 1.2
},
"expected_output": {
"total_glazing_area_m2": 0,
"baseline_weighted_u_factor": 0,
"retrofit_weighted_u_factor": 0,
"thermal_improvement_percent": 0,
"patch_applied": false,
"warning": "No fenestration surfaces found in model"
}
}
]
```
## Safety
Thermal parameters and modified epJSON files serve as planning proposals and must be verified through certified simulation runs.
Use mock external writes. Require human review before any real deployment.