Skip to content

Add Valve and Damper base specs with valve/actuator enums#50

Draft
agarnhart wants to merge 1 commit intoProject-Haystack:masterfrom
agarnhart:valve-actuator-enums
Draft

Add Valve and Damper base specs with valve/actuator enums#50
agarnhart wants to merge 1 commit intoProject-Haystack:masterfrom
agarnhart:valve-actuator-enums

Conversation

@agarnhart
Copy link
Contributor

Summary

Add foundational equipment specs and enum types for valve and actuator modeling in the ph library. This introduces abstract base specs for Valve and Damper, updates Actuator with new classification slots, and defines 7 new Enum types (42 values total).

Equipment Specs

  • Valve: abstract base for all valve equipment (actuated and non-actuated) with slots for valveFunction, valvePorts, valveBodyType, pipeFluid, and pipeSection
  • Damper: abstract base for all damper equipment with ductSection slot
  • ValveActuator: updated to Actuator & Valve intersection — inherits both actuator and valve slots
  • DamperActuator: updated to Actuator & Damper intersection — inherits both actuator and damper slots
  • Actuator: gains four new optional slots for fail position, direction, control action, and mechanism

Enum Types

All classifications use Enum rather than Choice to avoid adding new global marker tags to PhEntity.

Enum Values Purpose
ValveFunction 13 Piping role (isolation, control, mixing, bypass, check, …)
ValveBodyType 6 Body construction (globe, butterfly, ball, gate, plug, needle)
ValvePorts 3 Port configuration (twoWay, threeWay, fourWay)
ActuatorFailPosition 4 Fail-safe mode (failOpen, failClosed, failInPlace, failToPosition)
ActuatorDirection 2 Signal mapping (directActing, reverseActing)
ActuatorControlAction 3 Control mode (modulating, twoPosition, floating)
ActuatorMechanism 4 Drive type (electricMotor, pneumatic, hydraulic, solenoid)

Design Rationale

  • Valve/Actuator separation: Non-actuated valves (manual isolation, check, PRV, TMV) are common on mechanical schedules but have no representation in Haystack today. The Valve abstract base gives them a home without requiring actuator metadata.
  • Intersection types: ValveActuator : Actuator & Valve composes both concerns cleanly — valve body identity from Valve, control metadata from Actuator.
  • Enum over Choice: These classifications are descriptive attributes, not functional tags needed for point/equip queries. Using Enum avoids adding 42 new global markers while still providing validated, closed-set values. If any are later deemed important enough for tag-based queries, they can be promoted to Choice.
  • Damper parity: Damper follows the same pattern as Valve so that DamperActuator gains symmetry and future damper-specific slots have a home.

Files Changed

  • src/xeto/ph/enums.xeto — 7 new Enum types in alphabetical order
  • src/xeto/ph/equip.xetoValve, Damper abstract bases; updated Actuator, ValveActuator, DamperActuator

Introduce foundational equipment specs and enum types to support
valve and actuator modeling in the ph library:

Equipment specs:
- Valve: abstract base for all valve equipment (actuated and non-actuated)
  with slots for valveFunction, valvePorts, valveBodyType, pipeFluid,
  and pipeSection
- Damper: abstract base for all damper equipment with ductSection slot
- ValveActuator: updated to Actuator & Valve intersection
- DamperActuator: updated to Actuator & Damper intersection
- Actuator: add actuatorFailPosition, actuatorDirection,
  actuatorControlAction, and actuatorMechanism slots

Enum types (7 new, 42 total values):
- ValveFunction: 13 piping roles (isolation, control, mixing, etc.)
- ValveBodyType: 6 body types (globe, butterfly, ball, etc.)
- ValvePorts: 3 port configurations (twoWay, threeWay, fourWay)
- ActuatorFailPosition: 4 fail-safe modes
- ActuatorDirection: direct/reverse acting
- ActuatorControlAction: modulating, twoPosition, floating
- ActuatorMechanism: 4 drive types (electricMotor, pneumatic, etc.)

All classifications use Enum to avoid adding new global marker tags.
@agarnhart agarnhart marked this pull request as draft March 10, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant