/[escript]/trunk/modellib/py_src/mechanics.py
ViewVC logotype

Diff of /trunk/modellib/py_src/mechanics.py

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

revision 814 by gross, Wed Aug 23 09:31:10 2006 UTC revision 819 by gross, Sun Aug 27 23:07:51 2006 UTC
# Line 91  class Mechanics(Model): Line 91  class Mechanics(Model):
91            self.__pde.setValue(X=self.stress_old-self.dthermal_stress*k3)            self.__pde.setValue(X=self.stress_old-self.dthermal_stress*k3)
92            if self.internal_force: self.__pde.setValue(Y=self.internal_force)            if self.internal_force: self.__pde.setValue(Y=self.internal_force)
93            if self.external_force: self.__pde.setValue(y=self.external_force)            if self.external_force: self.__pde.setValue(y=self.external_force)
94              print self.prescribed_velocity
95              print self.location_prescribed_velocity
96            self.__pde.setValue(r=self.prescribed_velocity, \            self.__pde.setValue(r=self.prescribed_velocity, \
97                                q=self.location_prescribed_velocity)                                q=self.location_prescribed_velocity)
98            # solve the PDE:            # solve the PDE:
# Line 153  class DruckerPrager(Mechanics): Line 155  class DruckerPrager(Mechanics):
155             """             """
156             super(DruckerPrager, self).doInitialization()             super(DruckerPrager, self).doInitialization()
157             self.__plastic_stress_old=self.plastic_stress             self.__plastic_stress_old=self.plastic_stress
158             self.__tau_y_old=tau_y=self.shear_length             self.__tau_y_old=self.shear_length
159    
160        def doStepPreprocessing(self,dt):        def doStepPreprocessing(self,dt):
161              """              """
# Line 164  class DruckerPrager(Mechanics): Line 166  class DruckerPrager(Mechanics):
166              """              """
167              super(DruckerPrager, self).doStepPreprocessing(dt)              super(DruckerPrager, self).doStepPreprocessing(dt)
168              self.plastic_stress=self.__plastic_stress_old              self.plastic_stress=self.__plastic_stress_old
             self.tau_y=self.__tau_y_old  
169    
170        def doStep(self,dt):        def doStep(self,dt):
171             G=self.shear_modulus             G=self.shear_modulus
# Line 174  class DruckerPrager(Mechanics): Line 175  class DruckerPrager(Mechanics):
175             tau_Y=self.shear_length             tau_Y=self.shear_length
176             if self.__plastic_stress_old:             if self.__plastic_stress_old:
177                dps=self.plastic_stress-self.__plastic_stress_old                dps=self.plastic_stress-self.__plastic_stress_old
178                h=(tau_Y-self.tau_Y_last)/(dps+self.abs_tol*whereZero(dps))                h=(tau_Y-self.__tau_y_old)/(dps+self.abs_tol*whereZero(dps))
179             else:             else:
180                h=0                h=0
181             # set new tangential operator:             # set new tangential operator:
# Line 191  class DruckerPrager(Mechanics): Line 192  class DruckerPrager(Mechanics):
192        def doStepPostprocessing(self,dt):        def doStepPostprocessing(self,dt):
193            super(DruckerPrager, self).doStepPostprocessing(dt)            super(DruckerPrager, self).doStepPostprocessing(dt)
194            self.plastic_stress=self.__plastic_stress_old=self.plastic_stress            self.plastic_stress=self.__plastic_stress_old=self.plastic_stress
           self.shear_length=self.__tau_y_old  
195    
196        def getNewStress(self,s,gamma_p,du,ds_therm,tau_Y,G,K,alpha,beta,h):        def getNewStress(self,s,gamma_p,du,ds_therm,tau_Y,G,K,alpha,beta,h):
197              k3=kronecker(self.domain)              k3=kronecker(self.domain)

Legend:
Removed from v.814  
changed lines
  Added in v.819

  ViewVC Help
Powered by ViewVC 1.1.26