- 积分
- 0
- 注册时间
- 2009-11-5
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2010-3-19 14:59:18
|
显示全部楼层
来自 江苏镇江
下面是英文帮助中的例子,讲场变量运算的
# FieldOutput operators example problem
#
# Script that does computations with fields and
# saves the results computed to the output database
#
from odbAccess import *
odb = openOdb(path='fieldOperation.odb')
# Get fields from output database.
field1 = odb.steps['LC1'].frames[1].fieldOutputs['U']
field2 = odb.steps['LC2'].frames[1].fieldOutputs['U']
# Compute difference between fields.
deltaDisp = field2 - field1
# Save new field.
newStep = odb.Step(name='user',
description='user defined results', domain= TIME, timePeriod=0)
newFrame = newStep.Frame(incrementNumber=0, frameValue=0.0)
newField = newFrame.FieldOutput(name='U',
description='delta displacements', type=VECTOR)
newField.addData(field=deltaDisp)
odb.save() |
|