abaqus

How to run ML within Abaqus material subroutine?

…衆ロ難τιáo~ 提交于 2019-12-24 22:46:22
问题 I'm using Abaqus to run FEA simulations which include a material user subroutine (umat), written in Fortran 77 to define the material model. Currently I'm need to use data from the simulation (at run time) to train a machine learning algorithm (SVR or Random Forest Regression are yet to be chosen). Naturally most of the ML modules are in python, not in Fortran, so I have tried the following approach so far: Within the UMAT I'm calling the python script via command line, the data is written in

Abaqus script measure/calculate surface area

流过昼夜 提交于 2019-12-24 15:58:00
问题 Is there a way to measure/calculate the surface area of a generated model with abaqus ? I'm familiar with Tools -> Query... -> Mass properties in abaqus CAE or the scripting version: from abaqus import * prop=mdb.models['Model'].rootAssembly.getMassProperties() However, I cannot find an equal command for surface area. Appreciate the help! 回答1: The function getArea() returns the surface area of a set of faces. For example: a = mdb.models['Model-1'].rootAssembly a.getArea(a.instances['Part-1-1'

How to request nodal stress output in ABAQUS Python script

对着背影说爱祢 提交于 2019-12-24 14:50:18
问题 I need nodal stresses in the odb. I am aware that I can simply generate a query in the visualization module and therefore can obtain the averaged nodal stress (which I dont think will be of use as its performed after the analysis and I cannot do that in the odb as there is no nodal information for stresses). I can also edit the input file and use Position = NODES in the element output and then running the analysis by calling the input file as source. It generates stresses with nodal data and

Abaqus Python 'Getclosest' command

本小妞迷上赌 提交于 2019-12-24 05:54:48
问题 I'm using the getclosest command to find a vertex. ForceVertex1 = hatInstance.vertices.getClosest(coordinates=((x,y,z,)) This is a dictionary object with Key 0 and two values (hatInstance.vertices[1] and the coordinates of the vertex) The specific output: {0: (mdb.models['EXP-100'].rootAssembly.instances['hatInstance-100'].vertices[1], (62.5242172081597, 101.192447407436, 325.0))} Whenever I try to create a set, the vertex isn't accepted mainAssembly.Set(vertices=ForceVertex1[0][0],name=

os.system not working, but typing the same thing into the command prompt works

懵懂的女人 提交于 2019-12-23 18:53:16
问题 I am trying to run python abaqus through the command prompt using os.system('abaqus CAE noGUI=ODBMechens') It doesn't seem to run anything, but if I go to the command prompt myself and type in abaqus CAE noGUI=ODBMechens it works. I am using python 2.7 on Windows 10. Thanks 回答1: try using the subprocess module (it's newer) instead: for example, subprocess.call(["ls", "-l"]) and in your example, it would be: subprocess.call('abaqus CAE noGUI=ODBMechens') More info on the difference between

Python multiprocessing from Abaqus/CAE

若如初见. 提交于 2019-12-21 02:48:14
问题 I am using a commercial application called Abaqus/CAE 1 with a built-in Python 2.6 interpreter and API. I've developed a long-running script that I'm attempting to split into simultaneous, independent tasks using Python's multiprocessing module. However, once spawned the processes just hang. The script itself uses various objects/methods available only through Abaqus's proprietary cae module, which can only be loaded by starting up the Python bundled with Abaqus/CAE first, which then executes

Ignoring an error message to continue with the loop in python [duplicate]

一曲冷凌霜 提交于 2019-12-20 10:58:28
问题 This question already has answers here : How to properly ignore exceptions (11 answers) Closed 3 years ago . I am using a Python script for executing some function in Abaqus. Now, after running for some iterations Abaqus is exiting the script due to an error. Is it possible in Python to bypass the error and continue with the other iterations? The error message is #* The extrude direction must be approximately orthogonal #* to the plane containing the edges being extruded. The error comes out

Win32 DLL importing issues (DllMain)

懵懂的女人 提交于 2019-12-19 07:23:52
问题 I have a native DLL that is a plug-in to a different application (one that I have essentially zero control of). Everything works just great until I link with an additional .lib file (links my DLL to another DLL named ABQSMABasCoreUtils.dll ). This file contains some additional API from the parent application that I would like to utilize. I haven't even written any code to use any of the functions exported but just linking in this new DLL is causing problems. Specifically, I get the following

Abaqus和Python结合实例

半城伤御伤魂 提交于 2019-12-14 23:07:35
目标 利用 p y t h o n python p y t h o n 中的循环大大简化 A b a q u s Abaqus A b a q u s 中参数的输入过程。 问题 已知某物体有50个箱形截面,每个截面相关参数如图所示: 宽度和高度可以通过 m a t l a b matlab m a t l a b 根据转动惯量和面积相同求出(具体过程在此处不做推导)。 在 A b a q u s Abaqus A b a q u s 中的过程为 1、部件 2、材料 3、剖面 此时需要手动将50个剖面的高度和宽度输入。(厚度已知为1mm) 4、截面 需要在剖面名称中手动选择50个之前定义好的剖面。 5、指派截面 指派 → \rightarrow → 截面。 手动选择每一段 s e c t i o n section s e c t i o n ,如上图所示,直至指派完50个截面。 6、指派截面方向 指派 → \rightarrow → 梁截面方向。 选中整个梁 直接回车确定即可。 7、创建分析步 双击steps 8、装配 → \rightarrow → 实例 9、边界条件、载荷 边界条件:使梁的一端完全固定即可。 载荷:线载荷,每个 s e c t i o n section s e c t i o n 的载荷不同,需要手动输入50次。 10、划分网格

How to parallelize this nested loop in Python that calls Abaqus

自作多情 提交于 2019-12-14 03:18:12
问题 I have the nested loops below. How can i parallelize the outside loop so i can distribute the outside loop into 4 simultaneous runs and wait for all 4 runs to complete before moving on with the rest of the script? for r in range(4): for k in range( r*nAnalysis/4, (r+1)*nAnalysis/4 ): # - Write Abaqus INP file - # writeABQfile(ppos,props,totalTime[k],recInt[k],inpFiles[k],i,lineNum[k],aPath[k]) # - Delete LCK file to Enable Another Analysis - # delFile(aPath[k]+"/"+inpFiles[k]+".lck") # - Run