Provides information about an EnergySystem, such as potential and kinetic energy. The potential and translational energy are always a valid number. The rotational energy, work done,and initial energy can be NaN when they are not defined.

Potential Energy

For simulations where gravity operates in the vertical direction, there are methods here to help calculate the potential energy of a MassObject. Potential energy has an arbitrary zero level. MassObject has a method setZeroEnergyLevel where you can set the zero level which is used by a ForceLaw like GravityLaw, see GravityLaw.getPotentialEnergy.

Constructors

  • Parameters

    • Optional potential: number

      the potential energy of the system, default is zero

    • Optional translational: number

      the translational energy of the system, default is zero

    • Optional rotational: number

      the rotational energy of the system, default is NaN

    • Optional workDone: number

      the amount of work done on the system, default is NaN

    • Optional initialEnergy: number

      the initial energy of the system, default is NaN

    Returns EnergyInfo

Methods

  • Returns the initial energy of the system, or NaN if not defined

    Returns number

    the initial energy of the system, or NaN if not defined

  • Returns the potential energy of the system

    Returns number

    the potential energy of the system

  • Returns the rotational energy of the system, or NaN if not defined

    Returns number

    the rotational energy of the system, or NaN if not defined

  • Returns the total energy of the system: potential + translational + rotational.

    Returns number

    the total energy of the system

  • Returns the translational energy of the system

    Returns number

    the translational energy of the system

  • Returns the amount of work done on the system, or NaN if not defined

    Returns number

    the amount of work done on the system, or NaN if not defined

  • Sets the initial energy of the system

    Parameters

    • value: number

      the initial energy of the system, or NaN if not defined

    Returns void

  • Sets the potential energy of the system

    Parameters

    • value: number

      the potential energy of the system

    Returns void

  • Sets the rotational energy of the system

    Parameters

    • value: number

      the rotational energy of the system, or NaN if not defined

    Returns void

  • Sets the translational energy of the system

    Parameters

    • value: number

      the translational energy of the system

    Returns void

  • Sets the amount of work done on the system

    Parameters

    • value: number

      the amount of work done on the system, or NaN if not defined

    Returns void

Generated using TypeDoc