Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2010-03-13 01:13:41

Nima
Member
From: Canada
Registered: 2009-05-04
Posts: 121

[SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Hello,

I am trying to model a shell structure with variable thickness. I used DEFI_GROUP like the following for defining over 3000 elements:

MESH=DEFI_GROUP(reuse =MESH,
                                         MAILLAGE=MESH,
                                         CREA_GROUP_MA=(
                                         _F(NOM='M25',
                                         GROUP_MA='ES_M001',
                                         NUME_INIT=25,
                                         NUME_FIN=25,),
...

When I run the case I receive following error:

   ! <EXCEPTION> <SOUSTRUC_34>                            !
   !                                                      !
   !  l'indice final est superieur a la taille du groupe  !

Reducing the number of groups to 3 solves this problem. Is there any restriction on the maximum number of element groups? Can it be accessed and increased?

Regards,
Nima

Last edited by Nima (2010-03-17 21:18:04)

Offline

#2 2010-03-13 18:52:30

delmas
Administrator
From: EDF R&D
Registered: 2007-12-12
Posts: 837

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

I don't understand your goal. You want to build a group with only one element in it ?! and repeat it 3000 times ?!


Code_Aster release : unstable on (Ubuntu Precise Pangolin 12.04 64 bits) - GNU + Intel

Code_Aster. What else ?

Offline

#3 2010-03-15 16:10:27

Nima
Member
From: Canada
Registered: 2009-05-04
Posts: 121

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Hello,

Yes. Is there any other way of defining variable shell thikness in Code_Aster? I thought that I may define one group for each element and then in AFFE_CARA_ELEM I assign thickness to each group (each element). I may reduce number of groups by putting elements of almost the same thickness (allowing a tolerance) in one group but I noticed that in order for an element to be part of one group it is required that it shares at least one edge with rest of the group elements.

In some other FE codes thickness of a shell element can be defined for each element in the mesh file. This means that when element is defined by nodes its thickness is also defined or a section/command for defining thickness follows the element definition.

Regards,
Nima

Offline

#4 2010-03-15 17:05:08

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,669

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

hello

Nima wrote:

Hello,
I noticed that in order for an element to be part of one group it is required that it shares at least one edge with rest of the group elements.
Nima

?????????????????????
i think NO!!
where did you see that???

you can define group as you want
though  a group is usually assigned to a parent geometry in the pre processing tool like Gmsh before meshing

jean pierre aubry


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#5 2010-03-15 20:26:22

Nima
Member
From: Canada
Registered: 2009-05-04
Posts: 121

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Hi,

Some time ago when I tried grouping of shell elements, I had an error message regarding elements which shared only one node. When I changed grouping to include neighbor elements with one shared edge, the error disappeared. I may be able to recunstruct this or test it with other cases if you want.

Nima

Offline

#6 2010-03-16 11:16:17

Ect
Member
From: Switzerland
Registered: 2008-05-15
Posts: 103

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Hello,

You might as well work with elements names directly. I have done it for the same purpose:

# Ei are the element names as seen in the .mail

Thickness={
'E1': 0.000750028,
'E2': 0.000750052,
'E3': 0.000751024,
'E4': 0.000751372,
'E5': 0.000753265,
...
}

NCouches=1
EpCoq=[{'GROUP_MA':'GROUND','EPAIS':1}] # manually add a thickness on a particular group
for ee in Thickness.keys():
    EpCoq.append({'MAILLE': ee, 'EPAIS': Thickness[ee], 'COQUE_NCOU': NCouches})
CARA_COQ=AFFE_CARA_ELEM(MODELE=MODELE,COQUE=(EpCoq),);

Hope this helps

Offline

#7 2010-03-16 17:20:47

Nima
Member
From: Canada
Registered: 2009-05-04
Posts: 121

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Thanks Ect,

This is fabulous and it shows that I should start learning python smile. So
'MAILLE': ee
reads element numbers from the Thickness= block and then
'EPAIS': Thickness[ee]
reads the assigned thickness to each element in that block. Is it correct?

Nima

Offline

#8 2010-03-17 14:41:00

Ect
Member
From: Switzerland
Registered: 2008-05-15
Posts: 103

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Hello Nima,

Thickness is a python dictionary, i.e. you can use whatever you want for indexing. Here indices are the elements labels (not the elements number !!!) and the indexed values are the element thickness.

Thickness['E1'] will return you the element thickness of element labeled E1. The label can change depending on your mesher, could be MA1 or anything else. Check how your elements are labeled in the .mail file.

The for loop goes through all the dictionary keys, ee will then be equal to 'E1', 'E2' etc... Then Thickness[ee] will return the thickness.

Using a dictionary is only one way to go, you can as well use a list if you are more familiar with integer indices, or build a text file like this:

E1 0.000750028
E2 0.000750052
E3 0.000751024
E4 0.000751372
E5 0.000753265
....

and read it with (not shure of the exact syntax but should work):

file=open('/path/to/file/thk.dat','r')
data=file.readlines()
file.close()

EpCoq=[]
for line in data:
    [elabel,thickness]=line.split(' ')
    EpCoq.append({'MAILLE': elabel, 'EPAIS': float(thickness),})


Or if your thickness is a function of space coordinates, you can import the aster mesh into the python space and get access to elements labels, connectivity and nodes, to compute elements centroid position and use it to compute the element thickness.

Yes, python with code aster opens a lot of possibilities smile

Offline

#9 2010-03-17 21:17:27

Nima
Member
From: Canada
Registered: 2009-05-04
Posts: 121

Re: [SOLVED] MAX number of GROUP_MAs & Variable shell thickness

Thanks a lot Ect. I did what you advised and it is running now.

Offline