abaqus中使用python_在abaqus中利用python语言建模例子.doc

在abaqus中利用python语言建模例子

3.1?Creating a part

The first example shows how you can use an Abaqus/CAE script to replicate the functionality of Abaqus/CAE. The script does the following:

Creates a new model in the model database.

Creates a two-dimensional sketch.

Creates a three-dimensional, deformable part.

Extrudes the two-dimensional sketch to create the first geometric feature of the part.

Creates a new viewport.

Displays a shaded image of the new part in the new viewport.

The new viewport and the shaded part are shown in Figure 3–1.

Figure 3–1 The example creates a new viewport and a part.

The example scripts from this manual can be copied to the user's working directory by using the Abaqus fetch utility:

abaqus fetch job=scriptName

where scriptName.py is the name of the script (see “Execution procedure for fetching sample input files,” Section 3.2.12 of the Abaqus Analysis User's Manual). Use the following command to retrieve the script for this example:

abaqus fetch job=modelAExample

Note:? Abaqus does not install the sample scripts by default during the installation procedure. As a result, if the Abaqus fetch utility fails to find the sample script, the script may be missing from your Abaqus installation. You must rerun the installation procedure and request Abaqus sample problems from the list of items to install.

To run the program, do the following:

Start Abaqus/CAE by typing abaqus cae.

From the startup screen, select Run Script.

From the Run Script dialog box that appears, select modelAExample.py.

Click OK to run the script.

Note:? If Abaqus/CAE is already running, you can run the script by selecting FileRun Script from the main menu bar.

3.1.1?The example script

"""

modelAExample.py

A simple example: Creating a part.

"""

from abaqus import *

import testUtils

testUtils.setBackwardCompatibility()

from abaqusConstants import *

import sketch

import part

myModel = mdb.Model(name='Model A')

mySketch = myModel.ConstrainedSketch(name='Sketch A', sheetSize=200.0)

xyCoordsInner = ((-5

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值