/[ascend]/trunk/test.py
ViewVC logotype

Diff of /trunk/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1144 by johnpye, Mon Jan 15 10:42:11 2007 UTC revision 1152 by johnpye, Tue Jan 16 09:43:47 2007 UTC
# Line 70  class TestSolver(AscendSelfTester): Line 70  class TestSolver(AscendSelfTester):
70      def testlog10(self):      def testlog10(self):
71          self._run('testlog10')          self._run('testlog10')
72    
73        def testcollapsingcan(self):
74            self._run('collapsingcan',filename="collapsingcan.a4c")
75    
76      def testconopt(self):      def testconopt(self):
77          self._run('testconopt',"CONOPT")                          self._run('testconopt',"CONOPT")                
78    
# Line 464  class TestSteam(AscendSelfTester): Line 467  class TestSteam(AscendSelfTester):
467          M = T.getSimulation('sim',False)          M = T.getSimulation('sim',False)
468          M.run(T.getMethod('on_load'))          M.run(T.getMethod('on_load'))
469          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())
470          self.assertAlmostEqual(M.dTw_dt[4],0.0);          self.assertAlmostEqual(M.dTw_dt[2],0.0);
471          M.run(T.getMethod('configure_dynamic'))          M.run(T.getMethod('configure_dynamic'))
472          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())
473          return M          return M
# Line 485  class TestSteam(AscendSelfTester): Line 488  class TestSteam(AscendSelfTester):
488    
489      def testintegIDA(self):      def testintegIDA(self):
490          M = self.testdsgsat()          M = self.testdsgsat()
491          self.assertAlmostEqual(M.dTw_dt[4],0.0)          self.assertAlmostEqual(M.dTw_dt[2],0.0)
492          Tw1 = float(M.T_w[4])          Tw1 = float(M.T_w[2])
493          T = self.L.findType('dsgsat2')          T = self.L.findType('dsgsat2')
494          M.run(T.getMethod('free_states'))          M.run(T.getMethod('free_states'))
495          I = ascpy.Integrator(M)          I = ascpy.Integrator(M)
# Line 503  class TestSteam(AscendSelfTester): Line 506  class TestSteam(AscendSelfTester):
506          I.solve()          I.solve()
507          I.analyse()          I.analyse()
508          I.solve()          I.solve()
509          self.assertAlmostEqual(float(M.T_w[4]),Tw1)          self.assertAlmostEqual(float(M.T_w[2]),Tw1)
510          M.qdot_s.setRealValueWithUnits(1000,"W/m")          M.qdot_s.setRealValueWithUnits(1000,"W/m")
511          self.assertAlmostEqual(M.qdot_s.as("W/m"),1000)          self.assertAlmostEqual(M.qdot_s.as("W/m"),1000)
512          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())          M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())
513          self.assertNotAlmostEqual(M.dTw_dt[4],0.0)          self.assertNotAlmostEqual(M.dTw_dt[2],0.0)
514  #       I = ascpy.Integrator(M)  #       I = ascpy.Integrator(M)
515  #       I.setEngine('LSODE')  #       I.setEngine('LSODE')
516  #       I.setReporter(ascpy.IntegratorReporterConsole(I))  #       I.setReporter(ascpy.IntegratorReporterConsole(I))

Legend:
Removed from v.1144  
changed lines
  Added in v.1152

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22