Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

sweeping the design space HeatGenerationReq opens

This notebook introduces a sweep over deliveredEnergy’s own free power input, querying the relation from the model at every point and checking the sweep against HeatGenerationReq’s own 600 W threshold on HeatGenerator::power, read from the model rather than invented in Python.

Chapter 6 built HeatGenerationReq, a 600 W threshold on HeatGenerator::power, the attribute a real candidate’s power rating binds. Notebook 01 built deliveredEnergy, the energy relation this notebook now sweeps; its own power input stays free precisely so a design space can be explored independently of any one candidate’s rated value. This notebook connects the two: it sweeps deliveredEnergy’s power argument across a range, evaluates the relation at each point through the model, and marks the requirement’s own threshold on the result, instead of an energy figure invented for the plot.

A calc invoked without the library import its parameter types depend on fails to load. The negative control below drops the ScalarValues import Real needs.

Negative control ok: bad.ok=False

The diagnostic reports Real as unresolved: without the import, nothing declares it. HeatGenerationReq’s own 600 W threshold is real; the next cell reads it from the model instead of retyping it.

HeatGenerationReq's own threshold: 600.0 W

power_threshold_w comes from the requirement’s own source text in the loaded model, not a second, independently typed literal: whatever HeatGenerationReq states, this is what the sweep is checked against.

Assumed duration for this sweep: 120.0 s (not derived; this chapter's own worked example)
rated's own power, read from the model: 800 [SI::W]

Each point on the curve is the model’s own deliveredEnergy, evaluated through model.eval at that power, not a formula rebuilt in Python: power and duration are queried, efficiency is rated’s own bound value, read automatically because the calc is invoked through rated itself. Duration is this chapter’s own assumed operating point, stated as such; nothing in Chapters 1-6 derives it.

<Figure size 600x400 with 1 Axes>
At the 600 W threshold: 50.4 k'kg⋅m²⋅s⁻²'
At rated's own 800 W: 67.2 k'kg⋅m²⋅s⁻²'

Delivered energy from HeatGenerator::deliveredEnergy, evaluated by the model across a sweep of the calc’s own free power input, at this chapter’s own assumed duration and rated’s own bound efficiency; the vertical line marks HeatGenerationReq’s own 600 W threshold on HeatGenerator::power, read from the model. It does not derive cycle time or efficiency, and it says nothing about toast quality or user acceptance.

The threshold read from the model, the sweep computed through model.eval, and the plot rendered above are the same model, queried three different ways: nothing here is written to a file.

Try the chapter exercise in exercises/ch07/exercise.ipynb: sweep the coffee maker’s deliveredMass calc across its free throughput argument and mark BrewReq’s own threshold, read from the model.