Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding to selecting cell with Python script

Status
Not open for further replies.

Adil Memet

Mechanical
Mar 12, 2023
37
Elementlabel_sqsvuo.jpg


Hello, Dear Friends
I am new to this site and I found it useful discussion about problems we all are dealing with. I have a question about some advice about how to select cell with python script, in which, I created first "Step" then in correspondingly it has to select element from mesh element shown in the picture. basically, first "step" is created then in the interaction model or option, it has to select first cell for activation or deactivation , for the second "step ", it has to select cell number 2 for activation or deactivation and so on. my question is how to write to loop so that it can select one single cell element make interaction. Thank in advance.

Python script:

from part import *
from material import *
from section import *
from assembly import *
from step import *
from interaction import *
from load import *
from mesh import *
from optimization import *
from job import *
from sketch import *
from visualization import *
from connectorBehavior import *

Tol=0.000000001
Speed=0.01
##Pass1
for i in range(2,196) :
mdb.models['Job-1'].HeatTransferStep(deltmx=500,initialInc=0.05,maxInc=0.2,
maxNumInc=1000000,minInc=1e-11,name='Welding-'+str(i),previous='Welding-'+str(i-1))


##activation
for i in range(1,195):
mdb.models['Job-1'].ModelChange(activeInStep=True, createStepName='Welding-'+str(i),
includeStrain=False,name='Welding-'+str(i),region=Region(elements=mdb.models['Job-1'].rootAssembly.instances['Part-1-1'].elements.getByBoundingBox(
-Tol+Speed*(i-1),-(0.0075+Tol),-(0.005+Tol),Tol+Speed*i,0.0075+Tol,Tol)), regionType=ELEMENTS)
 
Replies continue below

Recommended for you

Are you trying to simulate welding ? Did you know that there's a built-in functionality for that available in Abaqus ? It's meant primarily for additive manufacturing process simulations but it can handle welding too.
 
Thank you very much for your quick reply, actually, I want to simulate cutting process (material removal) with moving heat of predefined geometry, which is coming from house coded software as surface mesh element (stl data), yes, you are right, I want to conduct additive manufacturing process simulation for the case of material removal and I want to use model change method for my simulation. Thanks.

Best regards
Adil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor