def test_temperatureScale(self):
    dim = Nondimensional()
    dim._configure()
    dim.setTemperatureScale(2.0*kelvin)

    self.assertEqual(1.0*meter, dim.lengthScale())
    self.assertEqual(1.0*pascal, dim.pressureScale())
    self.assertEqual(1.0*second, dim.timeScale())
    self.assertEqual(2.0*kelvin, dim.temperatureScale())
    return
  def test_densityScale(self):
    dim = Nondimensional()
    dim._configure()
    dim.setDensityScale(2.0*kilogram/meter**3)

    self.assertEqual(1.0*meter, dim.lengthScale())
    self.assertEqual(1.0*pascal, dim.pressureScale())
    self.assertEqual(1.0*second, dim.timeScale())
    self.assertEqual(2.0*kilogram/meter**3, dim.densityScale())
    return
示例#3
0
    def test_temperatureScale(self):
        dim = Nondimensional()
        dim._configure()
        dim.setTemperatureScale(2.0 * kelvin)

        self.assertEqual(1.0 * meter, dim.lengthScale())
        self.assertEqual(1.0 * pascal, dim.pressureScale())
        self.assertEqual(1.0 * second, dim.timeScale())
        self.assertEqual(2.0 * kelvin, dim.temperatureScale())
        return
示例#4
0
    def test_densityScale(self):
        dim = Nondimensional()
        dim._configure()
        dim.setDensityScale(2.0 * kilogram / meter**3)

        self.assertEqual(1.0 * meter, dim.lengthScale())
        self.assertEqual(1.0 * pascal, dim.pressureScale())
        self.assertEqual(1.0 * second, dim.timeScale())
        self.assertEqual(2.0 * kilogram / meter**3, dim.densityScale())
        return
  def test_constructor(self):
    dim = Nondimensional()
    dim._configure()

    self.assertEqual(1.0*meter, dim.lengthScale())
    self.assertEqual(1.0*pascal, dim.pressureScale())
    self.assertEqual(1.0*second, dim.timeScale())
    self.assertEqual(1.0*kilogram/meter**3, dim.densityScale())
    self.assertEqual(1.0*kelvin, dim.temperatureScale())

    return
示例#6
0
    def test_constructor(self):
        dim = Nondimensional()
        dim._configure()

        self.assertEqual(1.0 * meter, dim.lengthScale())
        self.assertEqual(1.0 * pascal, dim.pressureScale())
        self.assertEqual(1.0 * second, dim.timeScale())
        self.assertEqual(1.0 * kilogram / meter**3, dim.densityScale())
        self.assertEqual(1.0 * kelvin, dim.temperatureScale())

        return