Skip to content

Goal requirements

Great! With the groundwork set, we can start adding our first requirement! A goal-requirement defines the goal of a component with respect to another. In case of our pump, we would like to specify that it is the drive-mechanism that provides torque to the pump.

You can express this using the sentence: drive-mechanism must provide torque to pump, thus following the format [active component] must [verb] [variable] [preposition] [passive component].

So the world definition illustrating this becomes:

world.esl
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
world.esl
define type
  MechanicalEnergyFlow is a real with unit Nm
  ElectricalEnergyFlow is a real with unit W


define verbs
  provide to
  convert into


# ---8<--- [start:highlight]
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
# ---8<--- [end:highlight]


define component CentrifugalPump
  empty


define component ElectricalDriveMechanism
  variables
    power is an ElectricalEnergyFlow

  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


define component BrushlessMotor
  empty


define component Battery
  empty


define component Switch
  empty

We also added a goal requirement inside the ElectricalDriveMechanism definition, which you can review under the "File" tab.

Note

Note how the goal requirement has a label provide-torque. Requirements need to have a label for easy identification. This label only has to be unique within the definition of that single component (or the world) and can thus be re-used in any other definition.

Next!

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