Package

equations

massbalance

Permalink

package massbalance

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait MassBalance extends AnyRef

    Permalink

    A trait to represent a mass balance equation.

    A trait to represent a mass balance equation.

    Specify the variable and constant when calling the solveMX function like this:

    10 * 20 + 5 * 40 = x * 15
    scala> inputs = List(MX(Some(10), Some(20)), MX(None, Some(40)))
    scala> outputs = List(MX(None, Some(15)))
    scala> solveMX(inputs, outputs)
    Some(26.7)
    
    50 * 10 * (100 - 15) / 100 = y * 25
    scala> inputs = List(MX(Some(50), Some(10), Some(15)))
    scala> outputs = List(MX(None, Some(25)))
    scala> solveMX(inputs, outputs)
    Some(17)

Value Members

  1. object MassBalance extends MassBalance

    Permalink

    A companion object to represent a mass balance equation.

    A companion object to represent a mass balance equation.

    Specify the variable and constant when calling the solveMX function like this:

    10 * 20 + 5 * 40 = x * 15
    scala> inputs = List(MX(Some(10), Some(20)), MX(None, Some(40)))
    scala> outputs = List(MX(None, Some(15)))
    scala> solveMX(inputs, outputs)
    Some(26.7)
    
    50 * 10 * (100 - 15) / 100 = y * 25
    scala> inputs = List(MX(Some(50), Some(10), Some(15)))
    scala> outputs = List(MX(None, Some(25)))
    scala> solveMX(inputs, outputs)
    Some(17)

Ungrouped