/[ascend]/branches/fprops2/test.py
ViewVC logotype

Diff of /branches/fprops2/test.py

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

revision 1273 by johnpye, Sun Feb 4 04:54:20 2007 UTC revision 1276 by johnpye, Sun Feb 4 06:28:53 2007 UTC
# Line 644  class TestSteam(AscendSelfTester): Line 644  class TestSteam(AscendSelfTester):
644          print "dTw/dt = %f" % M.dTw_dt[2]          print "dTw/dt = %f" % M.dTw_dt[2]
645          self.assertNotAlmostEqual(M.dTw_dt[2],0.0)          self.assertNotAlmostEqual(M.dTw_dt[2],0.0)
646    
     def teststeadyida2(self):  
         """ test steady with higher radiation level """  
         M = self.testdsgsat()  
         T = self.L.findType('dsgsat3')  
         M.qdot_s.setRealValueWithUnits(1000,"W/m")  
         M.solve(ascpy.Solver('QRSlv'),ascpy.SolverReporter())  
         M.run(T.getMethod('free_states'))  
         I = ascpy.Integrator(M)  
         I.setEngine('IDA')  
         I.setParameter('linsolver','DENSE')  
         I.setParameter('safeeval',True)  
         I.setParameter('rtol',1e-5)  
         I.setParameter('atolvect',False)  
         I.setParameter('atol',1e-5)  
         I.setInitialSubStep(0.01)  
         I.setMaxSubSteps(100)        
         I.setReporter(ascpy.IntegratorReporterConsole(I))  
         I.setLogTimesteps(ascpy.Units("s"), 1, 3600, 5)  
         I.analyse()  
         I.solve()  
   
647      def testpeturbida(self):          def testpeturbida(self):    
648          M = self.testdsgsat()          M = self.testdsgsat()
649          self.assertAlmostEqual(M.dTw_dt[2],0.0)          self.assertAlmostEqual(M.dTw_dt[2],0.0)
650          T = self.L.findType('dsgsat3')          T = self.L.findType('dsgsat3')
651          M.run(T.getMethod('free_states'))          M.run(T.getMethod('free_states'))
652          # here is the peturbation...          # here is the peturbation...
653          M.qdot_s.setRealValueWithUnits(1000,"W/m")          M.qdot_s.setRealValueWithUnits(1300,"W/m")
654          # IDA has its own initial conditions solver, so no need to call QRSlv here          # IDA has its own initial conditions solver, so no need to call QRSlv here
655          I = ascpy.Integrator(M)          I = ascpy.Integrator(M)
656          I.setEngine('IDA')          I.setEngine('IDA')
# Line 682  class TestSteam(AscendSelfTester): Line 661  class TestSteam(AscendSelfTester):
661          I.setParameter('atol',1e-5)          I.setParameter('atol',1e-5)
662          I.setInitialSubStep(0.1)          I.setInitialSubStep(0.1)
663          I.setReporter(ascpy.IntegratorReporterConsole(I))          I.setReporter(ascpy.IntegratorReporterConsole(I))
664          I.setLogTimesteps(ascpy.Units("s"), 1, 100, 20)          I.setLogTimesteps(ascpy.Units("s"), 1, 3600, 20)
665          I.analyse()          I.analyse()
666          I.solve()          I.solve()
667                    

Legend:
Removed from v.1273  
changed lines
  Added in v.1276

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