Assigning element attributes during MESH using LATT command in ANSYS APDL
Assigning element attributes during MESH using LATT command in ANSYS APDL
(OP)
Hi all,
Actually I am developing the APDL code for a complex structure. I have narrowed down my query to a simple structure here so that I could apply the same concept on my original structure.
APDL code below is for a structure with 2 perpendicularly connected beams from the origin. My aim is to assign each of the beams with different beam sections of varied geometry(but with same material, same element type). I could this comfortably on GUI. But, when I try to assign it on APDL code, I am ended with a meshed structure of the latest defined section as in the image which I have attached. For example, if I assign the second beam with second section , finally the entire structure is of section 2. And section 1 is completely ignored. If someone could get an idea on why its happening in-spite I have used orientation key-points concept in LATT command, please do let me know. Following is the code with which I am working on: Thanks in advance
/PREP7 !preprocessor
MP,EX,1,1E4 !material definition
MP,NUXY,1,0.0
ET,1,BEAM189 !element definition
!keypoint definition
K,1,0,0,0
K,2,100.0,0,0
K,4,0,100.0,0
!orientation keypoint definition
K,3,50,5,0
K,5,0,50,10
!line joining
LSTR,1,2
LSTR,1,4
!definition of 1st section
SECTYPE,1, BEAM, RECT
SECDATA, 0.2, 5.0
LATT,1,,1,,3,,1
!definition of 2nd section
SECTYPE,2, BEAM, RECT
SECDATA, 0.2, 10.0
LATT,1,,1,,5,,2
!meshing
LESIZE, all, , ,10
LMESH,all
/VIEW,,1,1,1 !view change
/ESHAPE,1 !element shape ON
/PNUM,SEC,1 !element section numbering
EPLOT !plot elements
FINISH
Actually I am developing the APDL code for a complex structure. I have narrowed down my query to a simple structure here so that I could apply the same concept on my original structure.
APDL code below is for a structure with 2 perpendicularly connected beams from the origin. My aim is to assign each of the beams with different beam sections of varied geometry(but with same material, same element type). I could this comfortably on GUI. But, when I try to assign it on APDL code, I am ended with a meshed structure of the latest defined section as in the image which I have attached. For example, if I assign the second beam with second section , finally the entire structure is of section 2. And section 1 is completely ignored. If someone could get an idea on why its happening in-spite I have used orientation key-points concept in LATT command, please do let me know. Following is the code with which I am working on: Thanks in advance
/PREP7 !preprocessor
MP,EX,1,1E4 !material definition
MP,NUXY,1,0.0
ET,1,BEAM189 !element definition
!keypoint definition
K,1,0,0,0
K,2,100.0,0,0
K,4,0,100.0,0
!orientation keypoint definition
K,3,50,5,0
K,5,0,50,10
!line joining
LSTR,1,2
LSTR,1,4
!definition of 1st section
SECTYPE,1, BEAM, RECT
SECDATA, 0.2, 5.0
LATT,1,,1,,3,,1
!definition of 2nd section
SECTYPE,2, BEAM, RECT
SECDATA, 0.2, 10.0
LATT,1,,1,,5,,2
!meshing
LESIZE, all, , ,10
LMESH,all
/VIEW,,1,1,1 !view change
/ESHAPE,1 !element shape ON
/PNUM,SEC,1 !element section numbering
EPLOT !plot elements
FINISH





RE: Assigning element attributes during MESH using LATT command in ANSYS APDL
LATT only works on currently selected lines, so you will need to ensure that you select the lines before you issue the LATT command, something like:
CODE -->
------------
See FAQ569-1083: Asking questions the smart way on Eng-Tips fora for details on how to make best use of Eng-Tips.com
RE: Assigning element attributes during MESH using LATT command in ANSYS APDL
Good day.
Your posted problem is a common mistake which I happen to encounter often when I'm starting to study ANSYS.
As a general rule, when you are trying to apply a property to an ANSYS entity (like keypoints, lines, areas, volumes, elements, nodes), "BE SURE TO SELECT CORRECT THE CORRECT ENTITIES FIRST" (using KSEL, LSEL, ASEL, VSEL, ESEL, NSEL, respectively) before applying commands like LATT, AATT, etc.
In your case, if you don't preselect correct lines, the current LATT that you are going to use will be applied to the "currently selected lines", which is ALL LINES for your present model.
Drej illustration above is correct.
Cheers.
RE: Assigning element attributes during MESH using LATT command in ANSYS APDL
Thanks for your valuable input. The code works fine now.
But, I guess there was no where mentioned on the internet sources that LSEL is the command to be used before LATT, so that it works. Thankyou for letting me know.
Regards,
Kannanr03