30.12.08

每隔100秒从ABAQUS结果文件中取出位移、内力的PYTHON代码

#extract displacement, section force from ABAQUS ODB file every 100s and write to files

import odbAccess
odb = session.openOdb('walk.odb')
elemset = odb.rootAssembly.instances['PART-1-1'].elementSets['BEAMELEM']
Pipenode = odb.rootAssembly.instances['PART-1-1'].nodeSets['PIPENODE']
i = 0
OutDispfile = open('Disp.txt','w+')
OutDispfile.write("Node ")
OutDispfile.write("x disp ")
OutDispfile.write("y disp ")
OutDispfile.write("z disp\n")
OutForcefile = open('SF.txt','w+')
OutForcefile.write("Elem ")
OutForcefile.write("SF1 ")
OutForcefile.write("SF2 ")
OutForcefile.write("SF3\n")
while (i<=7700):
    timeframe = odb.getFrame(i)
    dispp = timeframe.fieldOutputs['U']
    for v in dispp.values:
        print 'Node label =', v.nodeLabel
        OutDispfile.write(str(v.nodeLabel))
        OutDispfile.write(" ")
        print 'x disp =', v.data[0]
        OutDispfile.write(str(v.data[0]))
        OutDispfile.write(" ")
        print 'y disp =', v.data[1]
        OutDispfile.write(str(v.data[1]))
        OutDispfile.write(" ")
        print 'z disp =', v.data[2]
        OutDispfile.write(str(v.data[2]))
        OutDispfile.write("\n")
    inforce = timeframe.fieldOutputs['SF']
    inforce = inforce.getSubset(region=elemset)
    for f in inforce.values:
        print 'Elem label =', f.elementLabel
        OutForcefile.write(str(f.elementLabel))
        OutForcefile.write(" ")
        print 'sf1 =', f.data[0]
        OutForcefile.write(str(f.data[0]))
        OutForcefile.write(" ")
        print 'sf2 =', f.data[1]
        OutForcefile.write(str(f.data[1]))
        OutForcefile.write(" ")
        print 'sf3 =', f.data[2]
        OutForcefile.write(str(f.data[2]))
        OutForcefile.write("\n")
    i = i + 100
OutDispfile.close()
OutForcefile.close()
odb.close()

21.12.08

每个人心中有一个平安夜

Christmas In My Heart 《圣诞在我心》 我的圣诞愿望 - 今夜请抱紧我

Every time we say goodbye
There's something breaking deep inside
I tried to hide my feelings to keep myself controlled
But somehow I can't deny what's deep inside my soul

I've been always on the run
So many different places, having fun
But like a river always knows just where to flow
Now that Decemer comes I feel like coming home

It's Christmas in my heart
When I'm with you
No matter where we are or what we do
Tomorrow may be grey
We may be torn apart
But if you stay tonight
It's Christmas in my heart

I don't know how to stay alive
Without your touch without you by my side
Just like the desert's always waiting for the rain
Oh baby, I wish the holy night would come again

Everywhere I go and everyone I know
Is making lots of wishes for old Santa Claus
But all I really need tonight
Is for you to come and hold me tight
What is Christmas without you here by my side
I need you tonight

14.12.08

无欲则刚

君子寡欲,则不役於物,可以直道而行。

11.12.08

Origin X Function - stats

stats ix:=col(1) mean:=mymean sd:=mysd sum:=mysum n:=mynum min:=mymin max:=mymax missing:=mymiss

Origin中的一个X Function, 可用来统计平均值,均方差,和,个数,最小值,最大值,最大值以及空缺个数分别放入mymean, mysd...中
(Simwe Origin班主蓝色梧桐在origin方面可谓高手, ding...)

10.12.08

陆止于此 海始于斯 - Cabo da Roca 罗卡角






心血来潮,把今年去葡萄牙的照片拿出来show一下。(又要被老婆笑话自恋+得意了)

@Cabo da Roca
欧洲大陆最西南角,“陆止于此 海始于斯”。海天相连,碧波拍岸,悬崖峭壁,让人无尽遐想。即使晴空万里,这里的风也是呼啸不止,感觉都站立不稳。
带的摄像机照的不是很清楚,从他处“借”来两张:)

再帖张Google的卫星图,整个伊比利亚半岛的。

Origin Mask




1. Mask for graph
2.Mask for worksheet
Origin seems have "two" Mask tools. Usually i use the 2nd but recently (maybe from the beginning!) i notice the 2nd becomes grey (inactive) for graph. so the 1st can be used.
Tip: Space toggles the standard and the freehand Mask for graph.

8.12.08

常思己过 莫论人非

静坐常思己过,闲谈莫论人非,能受苦乃为志士,肯吃亏不是痴人,

敬君子方显有德,怕小人不算无能,退一步天高地阔,让三分心平气和,

欲进步需思退步,若着手先虑放手,如得意不宜重往,凡做事应有余步。

持黄金为珍贵,知安乐方值千金,事临头三思为妙,怒上心忍让最高。

切勿贪意外之财,知足者人心常乐。若能以此去处事,一生安乐任逍遥。

1.12.08

快乐的征途

多数人认为,一旦达到某个目标,人们就会感到身心舒畅。但问题是你可能永远达不到目标。把快乐建立在还不曾拥有的事情上,无异于剥夺自己创造快乐的权力。记住,快乐是天赋权利。首先就要有良好的感觉,让它使自己在塑造自我的整个旅途中充满快乐,而不要再等到成功的最后一刻才去感受属于自己的欢乐。

-[Read this 10 times everyday!]