Jump to content
LFM1995

Splitting CBEAM elements into individual properties

Recommended Posts

Hi,

 

I have a structure that is composed of many CBEAM elements, all of these CBEAM elements are under one property and one material. I need each of the individual CBEAM elements to have its own property and material. Is there a way to automate this. I have ~9000 beams.

 

I could lower the number of beams to something manageable so I could organize them individually but this is not ideal.

 

The end goal is to be able to alter the material properties of individual CBEAM's, E1 for example, simulating progressive damage with progressive lattice failure.

 

Can anyone help?

 

I have attached my .fem and hm for your visualisation.

 

Kind Regards,

 

Laurence 

clevis2.0run.fem

clevis2.0run.hm

Share this post


Link to post
Share on other sites
*createmark elements 1 "by config" "bar"
set beamIds [hm_getmark elements 1]

foreach beamID $beamIds {
# Create New Component 
*createentity comps name=Component_$beamID
# create material
*createentity mats cardimage=MAT1 name=material_$beamID
set materialID [hm_entityinfo id material "material_$beamID"]
*setvalue mats id=$materialID STATUS=1 1=210000
*setvalue mats id=$materialID STATUS=1 3=0.3
*setvalue mats id=$materialID STATUS=1 4=7.85e-009
*setvalue mats id=$materialID STATUS=1 2=80769.2
# Create New Property
*createentity props cardimage=PBEAM name=property_$beamID
set propertyID [hm_entityinfo id property "property_$beamID"]
*setvalue props id=$propertyID cardimage="PBEAM"
*setvalue props id=$propertyID materialid={mats $materialID}

# Assign it to Component
## Assign the property and Material
*setvalue comps id=[hm_entityinfo id component "Component_$beamID"] propertyid={props $propertyID}
## Assign BeamSection To Property
*setvalue props id=$propertyID STATUS=2 3186={beamsects 1}
*createmark properties 1 $propertyID
*syncpropertybeamsectionvalues 1
*mergehistorystate "" ""
*setvalue props id=$propertyID STATUS=2 500=1
*setvalue props id=$propertyID STATUS=0 36=0
*setvalue props id=$propertyID STATUS=0 37=0
*setvalue props id=$propertyID STATUS=0 38=0
*setvalue props id=$propertyID STATUS=0 39=0

#Move Element
*createmark elements 1 $beamID
*movemark elements 1 "Component_$beamID"

}

It for sure is not ideal and it will take a while but I am curious what the experts think about it :-D

 

Best regards

Merula

 

LFM1995 likes this

Share this post


Link to post
Share on other sites

Hi Merula,

 

Thank you for the script. I had a go on my model and I get a response that says "beamIds" can't be read, no variable exists. Do you have any idea why? 

 

Thanks,

 

Laurence

Share this post


Link to post
Share on other sites
11 hours ago, LFM1995 said:

Hi Merula,

 

Thank you for the script. I had a go on my model and I get a response that says "beamIds" can't be read, no variable exists. Do you have any idea why? 

 

Thanks,

 

Laurence

Did you execute the first two lines?

User Profile Optistruct?

 

maybe just copy it into the tcl command console (at the bottom of the window)

Hope this helps

Merula

Share this post


Link to post
Share on other sites
3 hours ago, tinh said:

I wonder how you alter E1 of 9000 items?

Good question... I suggest he wants to do it with a location... so all beams with a distance lower than x ...

 

Share this post


Link to post
Share on other sites
1 hour ago, Merula said:

Did you execute the first two lines?

User Profile Optistruct?

 

maybe just copy it into the tcl command console (at the bottom of the window)

Hope this helps

Merula

 

Hi Merula & Tinh

 

I now get a message saying "*syncpropertybeamsectionvalues" is an invalid command name. 

 

The basic idea of this is to simulate lattice failure by changing the stiffness, i.e. E1. I've written a basic script that alters the MAT1 material data card for a single  CBEAM property, this uses the allowable range that E1 can be.

 

I can lower the number of bars if necessary, if ~9000 is too computationally challenging.

 

Thanks,

 

Laurence

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...