/[escript]/trunk/escript/py_src/rheologies.py
ViewVC logotype

Diff of /trunk/escript/py_src/rheologies.py

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

revision 2439 by gross, Tue May 26 02:26:52 2009 UTC revision 2440 by gross, Wed May 27 08:45:55 2009 UTC
# Line 89  class PowerLaw(object): Line 89  class PowerLaw(object):
89           @rtype: C{bool}           @rtype: C{bool}
90           """           """
91           return 0<=id and id<self.getNumMaterials()           return 0<=id and id<self.getNumMaterials()
92      def setEtaTolerance(self,rtol=util.sqrt(util.EPSILON)):      def setEtaTolerance(self,rtol=1.e-4):
93           """           """
94           sets the relative tolerance for the effectice viscosity.           sets the relative tolerance for the effectice viscosity.
95    
# Line 709  class IncompressibleIsotropicFlowCartesi Line 709  class IncompressibleIsotropicFlowCartesi
709               #               #
710               diff=util.Lsup(eta_eff_old-eta_eff)               diff=util.Lsup(eta_eff_old-eta_eff)
711               n=util.Lsup(eta_eff)               n=util.Lsup(eta_eff)
712               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: step %s: max. change in eta_eff is %s."%(iter,diff)               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: step %s: max. rel. change in eta_eff is %s."%(iter,diff/n)
713               converged = diff <= self.getTolerance()* n               converged = diff <= self.getTolerance()* n
714               iter+=1               iter+=1
715               if iter >= iter_max:               if iter >= iter_max:
# Line 730  class IncompressibleIsotropicFlowCartesi Line 730  class IncompressibleIsotropicFlowCartesi
730            if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: iteration on time step %s completed after %s steps."%(self.getTime(),iter)            if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: iteration on time step %s completed after %s steps."%(self.getTime(),iter)
731            return self.getVelocity(), self.getPressure()            return self.getVelocity(), self.getPressure()
732    
733          def getCurrentEtaEff(self):
734              """
735              returns the effective viscosity
736              """
737              return self.__eta_eff
738    
739        def __getDeviatoricStrain(self, v):        def __getDeviatoricStrain(self, v):
740            """            """
741            Returns deviatoric strain of velocity v:            Returns deviatoric strain of velocity v:
742            """            """
743            return util.deviatoric(util.symmetric(util.grad(v)))            return util.deviatoric(util.symmetric(util.grad(v)))
744    
745        def setFlowTolerance(self, tol=1.e-6):        def setFlowTolerance(self, tol=1.e-4):
746            """            """
747            Sets the relative tolerance for the flow solver. See L{StokesProblemCartesian.setTolerance} for details.            Sets the relative tolerance for the flow solver. See L{StokesProblemCartesian.setTolerance} for details.
748    
# Line 752  class IncompressibleIsotropicFlowCartesi Line 758  class IncompressibleIsotropicFlowCartesi
758            @rtype: C{float}            @rtype: C{float}
759            """            """
760            return self.__solver.getTolerance()            return self.__solver.getTolerance()
761        def setFlowSubTolerance(self, tol=1.e-12):        def setFlowSubTolerance(self, tol=1.e-8):
762            """            """
763            Sets the relative tolerance for the subsolver of the flow solver. See L{StokesProblemCartesian.setSubProblemTolerance} for details            Sets the relative tolerance for the subsolver of the flow solver. See L{StokesProblemCartesian.setSubProblemTolerance} for details
764    

Legend:
Removed from v.2439  
changed lines
  Added in v.2440

  ViewVC Help
Powered by ViewVC 1.1.26