Skip to content

Transformation requirements

While goal-requirements are great to express the purpose of a component with respect to another, components often transform their inputs to their outputs internally, which we specify using transformation-requirements.

For instance, our BrushlessMotor is the component that converts power into torque. We describe this using the sentence must convert power into torque. Lets review an example:

world.esl
1
2
3
4
5
6
7
define component BrushlessMotor
  variables
    power is an ElectricalEnergyFlow
    torque is a MechanicalEnergyFlow

  transformation-requirements
    convert-power: must convert power into torque
world.esl
define type
  MechanicalEnergyFlow is a real with unit Nm
  ElectricalEnergyFlow is a real with unit W
  LiquidMaterialFlow is a real with unit L/s
  EnergyPotential is a real with unit Wh


define verbs
  provide to
  convert into


world
  variables
    torque is a MechanicalEnergyFlow

  components
    pump is a CentrifugalPump
    drive-mechanism is an ElectricalDriveMechanism

  goal-requirements
    provide-torque: drive-mechanism must provide torque to pump


define component CentrifugalPump
  variables
    torque is a MechanicalEnergyFlow
    water-flow is a LiquidMaterialFlow

  transformation-requirements
    convert-torque: must convert torque into water-flow


define component ElectricalDriveMechanism
  variables
    power-potential is an EnergyPotential
    power is an ElectricalEnergyFlow
    torque is a MechanicalEnergyFlow

  transformation-requirements
    convert-power-potential: must convert power-potential into torque

  components
    motor is a BrushlessMotor
    power-source is a Battery
    power-switch is a Switch

  goal-requirements
    provide-power: power-source must provide power to motor


# ---8<--- [start:highlight]
define component BrushlessMotor
  variables
    power is an ElectricalEnergyFlow
    torque is a MechanicalEnergyFlow

  transformation-requirements
    convert-power: must convert power into torque
# ---8<--- [end:highlight]


define component Battery
  empty

define component Switch
  empty

Here, we defined the internal transformation of the brushless motor using must [verb] [variables in] [preposition] [variables out] (preceded by a label).

We also added a transformation requirement for the ElectricalDriveMechanism definition, which you can review in the "File" tab.

Note

Note the instantiation of variables within the BrushlessMotor component definition. These variables are only available within this definition and can only be referenced directly by requirements within this definition.

Tip

With both goal- and transformation-requirements you can accurately describe the flow and conversion of variables throughout your components. This way, it is clear which component "provides" flows and which components "convert" them internally.

Next!

Press next (or N on your keyboard) to head over to the next page! P is for Previous.