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: |
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 |
""" |
""" |
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 |
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: |
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) |