15 |
base class for mechanics models in updated lagrangean framework |
base class for mechanics models in updated lagrangean framework |
16 |
|
|
17 |
@ivar domain: domain (in) |
@ivar domain: domain (in) |
18 |
@ivar displacement: current displacements |
@ivar internal_force=Data() |
19 |
|
@ivar external_force=Data() |
20 |
|
@ivar prescribed_velocity=Data() |
21 |
|
@ivar location_prescribed_velocity=Data() |
22 |
|
@ivar temperature = None |
23 |
|
@ivar expansion_coefficient = 0. |
24 |
|
@ivar bulk_modulus=1. |
25 |
|
@ivar shear_modulus=1. |
26 |
|
@ivar rel_tol=1.e-3 |
27 |
|
@ivar abs_tol=1.e-15 |
28 |
|
@ivar max_iter=10 |
29 |
|
@ivar displacement=None |
30 |
|
@ivar stress=None |
31 |
|
@ivar velocity=None |
32 |
""" |
""" |
33 |
def __init__(self,debug=False): |
def __init__(self,debug=False): |
34 |
""" |
""" |
103 |
self.__pde.setValue(X=self.stress_old-self.dthermal_stress*k3) |
self.__pde.setValue(X=self.stress_old-self.dthermal_stress*k3) |
104 |
if self.internal_force: self.__pde.setValue(Y=self.internal_force) |
if self.internal_force: self.__pde.setValue(Y=self.internal_force) |
105 |
if self.external_force: self.__pde.setValue(y=self.external_force) |
if self.external_force: self.__pde.setValue(y=self.external_force) |
106 |
|
print self.prescribed_velocity |
107 |
|
print self.location_prescribed_velocity |
108 |
self.__pde.setValue(r=self.prescribed_velocity, \ |
self.__pde.setValue(r=self.prescribed_velocity, \ |
109 |
q=self.location_prescribed_velocity) |
q=self.location_prescribed_velocity) |
110 |
# solve the PDE: |
# solve the PDE: |
167 |
""" |
""" |
168 |
super(DruckerPrager, self).doInitialization() |
super(DruckerPrager, self).doInitialization() |
169 |
self.__plastic_stress_old=self.plastic_stress |
self.__plastic_stress_old=self.plastic_stress |
170 |
self.__tau_y_old=tau_y=self.shear_length |
self.__tau_y_old=self.shear_length |
171 |
|
|
172 |
def doStepPreprocessing(self,dt): |
def doStepPreprocessing(self,dt): |
173 |
""" |
""" |
178 |
""" |
""" |
179 |
super(DruckerPrager, self).doStepPreprocessing(dt) |
super(DruckerPrager, self).doStepPreprocessing(dt) |
180 |
self.plastic_stress=self.__plastic_stress_old |
self.plastic_stress=self.__plastic_stress_old |
|
self.tau_y=self.__tau_y_old |
|
181 |
|
|
182 |
def doStep(self,dt): |
def doStep(self,dt): |
183 |
G=self.shear_modulus |
G=self.shear_modulus |
187 |
tau_Y=self.shear_length |
tau_Y=self.shear_length |
188 |
if self.__plastic_stress_old: |
if self.__plastic_stress_old: |
189 |
dps=self.plastic_stress-self.__plastic_stress_old |
dps=self.plastic_stress-self.__plastic_stress_old |
190 |
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)) |
191 |
else: |
else: |
192 |
h=0 |
h=0 |
193 |
# set new tangential operator: |
# set new tangential operator: |
204 |
def doStepPostprocessing(self,dt): |
def doStepPostprocessing(self,dt): |
205 |
super(DruckerPrager, self).doStepPostprocessing(dt) |
super(DruckerPrager, self).doStepPostprocessing(dt) |
206 |
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 |
|
207 |
|
|
208 |
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): |
209 |
k3=kronecker(self.domain) |
k3=kronecker(self.domain) |