Skip to main content
Loading navigation

Build an EnergyPlus Infiltration Schedule Retrofit Optimizer — implementation

Prompt source

implementation79 lines11 sectionsNo variables1 code block
## Build
Adjust air infiltration schedules and baseline flow rates in EnergyPlus epJSON files. Model building envelope sealing retrofits to reduce winter heating losses while maintaining indoor fresh air rates.

## User
Building retrofit energy analyst

## Workflow
1. Ingest commercial building epJSON energy models containing ZoneInfiltration objects.
2. Evaluate baseline air leakage flow rates against envelope tightness test data.
3. Apply calibrated infiltration reduction schedules reflecting weather-stripping retrofits.
4. Export updated epJSON models ready for EnergyPlus whole-building simulation runs.

## Interface
Retrofit modeling UI showing 24-hour infiltration curves, zone infiltration tables, and simulation export controls.

## Data
Download standard Department of Energy commercial prototype epJSON models from energyplus.net or use synthetic epJSON files.
Starter examples below are synthetic. They are not downloaded records.

## Source
[EnergyPlus](https://raw.githubusercontent.com/NREL/EnergyPlus/develop/README.md)
Uses the EnergyPlus epJSON input schema and ZoneInfiltration:DesignFlowRate object definitions.

## Tools
optuna, pydantic, jsonschema.
Optuna optimizes multi-parameter infiltration flow coefficients to match target envelope tightness constraints.
Local or hosted LLM with schema validation capabilities to ensure epJSON syntax conformance.

## 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
- Modifies ZoneInfiltration:DesignFlowRate parameters without invalidating epJSON schema.
- Calculates percent reduction in peak infiltration flow rates across thermal zones.
- Rejects infiltration adjustments that breach minimum mechanical ventilation standards.

## Starter Examples
```json
[
  {
    "input": {
      "zone_name": "Perimeter_ZN_1",
      "baseline_infiltration_m3s": 0.045,
      "retrofit_package": "Aerosol_Envelope_Sealing",
      "target_reduction_pct": 35,
      "min_ventilation_threshold_m3s": 0.015
    },
    "expected_output": {
      "zone_name": "Perimeter_ZN_1",
      "retrofitted_infiltration_m3s": 0.02925,
      "status": "APPLIED",
      "epjson_patch": {
        "ZoneInfiltration:DesignFlowRate": {
          "Perimeter_ZN_1_Infil": {
            "design_volume_flow_rate": 0.02925,
            "schedule_name": "Retrofit_Infiltration_Sch"
          }
        }
      }
    }
  },
  {
    "input": {
      "zone_name": "Core_ZN_1",
      "baseline_infiltration_m3s": 0.02,
      "retrofit_package": "Aggressive_Caulking",
      "target_reduction_pct": 75,
      "min_ventilation_threshold_m3s": 0.01
    },
    "expected_output": {
      "zone_name": "Core_ZN_1",
      "retrofitted_infiltration_m3s": 0.01,
      "status": "CLAMPED_TO_MIN_VENTILATION",
      "epjson_patch": {
        "ZoneInfiltration:DesignFlowRate": {
          "Core_ZN_1_Infil": {
            "design_volume_flow_rate": 0.01,
            "schedule_name": "Retrofit_Infiltration_Sch"
          }
        }
      }
    }
  }
]
```

## Safety
Generates simulation input files only; does not actuate physical building HVAC systems or modify dampers.
Use mock external writes. Require human review before any real deployment.