Workflow Playbooks¶
Practical workflows for extending and validating relation-driven models.
Add a New Relation¶
- Place the module in the correct physics domain under
src/fusdb/relations/.... - Define relation with
@relation(output=..., tags=...). - Add hard/soft constraints as needed.
- Register any inverse function or initial guess if backward solve is nontrivial.
- Add/update tests to cover forward solve and at least one inverse/check path.
Add a New Variable¶
- Add variable metadata in
src/fusdb/registry/allowed_variables.yaml. - Define default behavior/tolerances where required.
- Update default relation loading if needed (
reactor_defaults.pyor registry defaults). - Ensure variable unit and dimensionality match all relations that consume it.
Diagnose Inconsistencies¶
- Run solve in check mode (
mode="check") to avoid mutation. - Inspect
violated_relationsandlikely_culprits. - Confirm variable tolerances are realistic for the physics regime.
- If needed, constrain solve order by domain/relation name via
solving_order.
Keep Knowledge and Code Aligned¶
- When formulas or assumptions change, update both:
- relation code / tests
- Knowledge Base pages explaining coupling assumptions
- Prefer explicit naming for profile vs volume-integrated quantities.