29.9.11
25.8.11
pdf-->excel
things become simple. no need fussy and tricky things:
arobat 10: file-->save as-->spreedsheet-->excel or xlm
bingo!
arobat 10: file-->save as-->spreedsheet-->excel or xlm
bingo!
21.7.11
Python bubble sorting
#lst is a array list - lst=[[0,0,0],[0,1,0]...]
#it is the coordinates of the nodes. sorting according with x
def bubblesort(lst):
for i in range(len(lst)-1,0,-1):
for j in range(i):
if (lst[j][0]>lst[j+1][0]):
lst[j],lst[j+1]=lst[j+1],lst[j]
#it is the coordinates of the nodes. sorting according with x
def bubblesort(lst):
for i in range(len(lst)-1,0,-1):
for j in range(i):
if (lst[j][0]>lst[j+1][0]):
lst[j],lst[j+1]=lst[j+1],lst[j]
7.7.11
6.7.11
tricky ABAQUS python script
I got a strange error using python script inside abaqus:
Warning: Sorry, re-evaluated sketch transform does not match journaled transform. Cannot use this sketch
Feature creation failed.
googled and found a post: http://old.nabble.com/help-on-error-of-partitionFaceBySketch,-python-scripts-td19351281.html
the solution is to use full arguments for MakeSketchTransform.
Warning: Sorry, re-evaluated sketch transform does not match journaled transform. Cannot use this sketch
Feature creation failed.
googled and found a post: http://old.nabble.com/help-on-error-of-partitionFaceBySketch,-python-scripts-td19351281.html
the solution is to use full arguments for MakeSketchTransform.
5.7.11
geostress balance
today played around the geostatic balance of a rigid body inside the soil:
1. use initial stress, gostatic, got the result called stage0.csv
2. use stage0.csv as the initial input stress and got the stage1.csv
3. iterate 2 till stage5
4. compare the difference between 2 consecutive stages and the results showed that the difference is also similar. small enough.
Conclusion: if the initial stress, geostatic can balance, use it. no need to do another round.
1. use initial stress, gostatic, got the result called stage0.csv
2. use stage0.csv as the initial input stress and got the stage1.csv
3. iterate 2 till stage5
4. compare the difference between 2 consecutive stages and the results showed that the difference is also similar. small enough.
Conclusion: if the initial stress, geostatic can balance, use it. no need to do another round.
22.6.11
Using numpy or scipy within abaqus python
from http://polymerfem.com/showthread.php?1626-Using-numpy-or-scipy-within-abaqus-python
1. Install Python 2.4.3 (or the same version as your Abaqus runs)
2. Install the appropriate versions of numpy and scipy compatible with Python 2.4.3
3. Create a Custom\Python24\Lib\site-packages directory in your root Abaqus directory. e.g c:\abaqus\custom\Python24\Lib\site-packages
4. Copy the numpy and scipy directories in c:\Python24\Lib\site-packages to c:\abaqus\custom\Python24\Lib\site-packages
As a side note, make sure your import numpy, scipy, scipy.io line appears before the "from odbAccess import *" line in your script file.
An alternative procedure is to do Steps 1 and 2 above and then add a line "PYTHONPATH=c:\Python24\Lib\site-packages" to the abaqus environment file. however, this didn't work for me.
1. Install Python 2.4.3 (or the same version as your Abaqus runs)
2. Install the appropriate versions of numpy and scipy compatible with Python 2.4.3
3. Create a Custom\Python24\Lib\site-packages directory in your root Abaqus directory. e.g c:\abaqus\custom\Python24\Lib\site-packages
4. Copy the numpy and scipy directories in c:\Python24\Lib\site-packages to c:\abaqus\custom\Python24\Lib\site-packages
As a side note, make sure your import numpy, scipy, scipy.io line appears before the "from odbAccess import *" line in your script file.
An alternative procedure is to do Steps 1 and 2 above and then add a line "PYTHONPATH=c:\Python24\Lib\site-packages" to the abaqus environment file. however, this didn't work for me.
订阅:
评论 (Atom)