/[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 2431 by gross, Wed May 13 02:48:39 2009 UTC revision 2432 by gross, Wed May 20 06:06:20 2009 UTC
# Line 675  class IncompressibleIsotropicFlowCartesi Line 675  class IncompressibleIsotropicFlowCartesi
675               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: eta_eff has been initialied."               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: eta_eff has been initialied."
676            else:            else:
677               eta_eff = self.__eta_eff               eta_eff = self.__eta_eff
   
678            iter=0            iter=0
679            converged=False            converged=False
680            while not converged:            while not converged:
# Line 696  class IncompressibleIsotropicFlowCartesi Line 695  class IncompressibleIsotropicFlowCartesi
695                  v0=v_b*mask_v+v*(1.-mask_v)                  v0=v_b*mask_v+v*(1.-mask_v)
696               v,p=self.__solver.solve(v0,p,show_details=False,               v,p=self.__solver.solve(v0,p,show_details=False,
697                                            verbose=self.checkVerbose(),max_iter=inner_iter_max,usePCG=usePCG)                                            verbose=self.checkVerbose(),max_iter=inner_iter_max,usePCG=usePCG)
              util.saveVTK("v.xml",v=v)  
              util.saveVTK("p.xml",p=p)  
698               #               #
699               #   update eta_eff:               #   update eta_eff:
700               #               #
701               D=self.__getDeviatoricStrain(v)               D=self.__getDeviatoricStrain(v)
              print D[0,0]  
              print D[1,1]  
              print D[1,0]  
702               if mu==None:               if mu==None:
703                   gamma=util.sqrt(2.)*util.length(D)                   gamma=util.sqrt(2.)*util.length(D)
704               else:               else:
705                   gamma=util.sqrt(2.)*util.length(D+s_last/(2*dt*mu))                   gamma=util.sqrt(2.)*util.length(D+s_last/(2*dt*mu))
              print gamma  
              1/0  
706               eta_eff_old ,eta_eff=eta_eff, self.getEtaEff(gamma, pressure=p,dt=dt, eta0=eta_eff, iter_max=iter_max)               eta_eff_old ,eta_eff=eta_eff, self.getEtaEff(gamma, pressure=p,dt=dt, eta0=eta_eff, iter_max=iter_max)
707               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: eta_eff has been updated."               if self.checkVerbose(): print "IncompressibleIsotropicFlowCartesian: eta_eff has been updated."
708               #               #
# Line 743  class IncompressibleIsotropicFlowCartesi Line 735  class IncompressibleIsotropicFlowCartesi
735            """            """
736            Returns deviatoric strain of velocity v:            Returns deviatoric strain of velocity v:
737            """            """
738            return util.deviatoric(util.symmetric(util.grad(2.*v)))            return util.deviatoric(util.symmetric(util.grad(v)))
739    
740        def setFlowTolerance(self, tol=1.e-6):        def setFlowTolerance(self, tol=1.e-6):
741            """            """

Legend:
Removed from v.2431  
changed lines
  Added in v.2432

  ViewVC Help
Powered by ViewVC 1.1.26