5. Calculating a stud-flange connection#
In this part we show how to use the macr_gouj2e_mail function, the macro command POST_GOUJ and the Code_Aster commands to do a global calculation of a stud-flange assembly. We will start by describing the study profile (.astk file), we will continue by explaining the content of the command files (.comm file), results (.resu file) and message files (.mess file). The content of the database (logical unit 38 free format) is described in [§6].
5.1. The study profile#
In the study profile, only two data files are mandatory: the command file (.comm file) and the file containing the database (logical unit 38 free format). The file containing the mesh (.mail file) is automatically generated and is not visible to the user. However, the latter can visualize the mesh produced by putting into the result the « Gibi mesh, (mgib) » file corresponding to the logical unit 53, and by using the command file IMPR_RESU in the command file as indicated in paragraph [§ 5.2.2].
The results file (.resu file) makes it possible to use the results.
5.2. The command file#
The command file (.comm file) must contain the following lines before the command DEBUT ():
Import aster
Import OS
# Generating the file name for the logical unit unit
def name_file (unit):
cur_dir = os.getcwd ()
FileName = cur_dir+”/fort. “ +str (unit)
return FileName
# creation of command files GIBI in units UNITD and UNITP
def macr_gouj2e_mail (TYPE, VARIANTE,, NB_FILET, H_ CORP_BRID, R_ EXT_BRID,
H_ HAUT_BRID, H_ BAS_BRID, FILET_ABST,
UNITD =70, UNITP =71):
text = “***********************************************************n”
text = text + “*n”
text = text + “* CREATION FROM MAILLAGE FROM GOUJON, FILETS AND BRIDE 2D AXISn”
text = text + “* ———————————————————n”
text = text + “*************************************************n”
text = text + “VERSION 1.0n”
text = text + “VERSION FROM 15/07/1999n”
text = text + “*************************************************n”
text = text + “*n”
text = text + “OPTI NIVE 10;n”
text = text + “OPTI ECHO 0;n”
text = text + “***********************************************************n”
text = text + “**PROGRAMME PRINCIPAL**n”
text = text + “***********************************************************n”
text = text + “*n”
text = text + “OPTION DIME 2 ELEM QUA4 ECHO 0;n”
text = text + “* DEBUT PARAMETRES UTILISATEURn”
text = text + “*n”
text = text + “* PARAMETRES GENERAUXn”
text = text + “*n”
text = text + “RI_BRI = “+str (eval (” RIB “+ TYPE + VARIANTE)) +”; “+”n”
text = text + “RE_GOUJ = “+str (eval (” REG “+ TYPE + VARIANTE)) +”; “+”n”
text = text + “PAS = “+str (eval (” HF “+ TYPE + VARIANTE)) +”;” + “n”
text = text + “RE_BRI = “+str (R_ EXT_BRID) +”;n”
text = text + “HTE_BRI = “+str (H_ CORP_BRID) +”;n”
text = text + “NFIL = “+str (NB_FILET) +”;n”
text = text + “H_ MINFI = “+str (H_ BAS_BRID) +”;n”
text = text + “H_ HTBRI = “+str (H_ HAUT_BRID) +”;n”
text = text + “* FIN PARAMETRES UTILISATEURn”
textp= »
If FILET_ABST! =None:
For num in FILET_ABST:
textp = textp + “FILETS = DIFF FILETS FIL00 “+str (num) +”;n”
loc_datg = aster.repdex ()
textp = textp + « « » OPTI DONN “ » » »+loc_datg+ » »gouj2.datg”;n » » »
text = text + « « » OPTI DONN “ » » »+loc_datg+ » » »gouj1.datg”;n » » »
# Command file name for GIBI
FileName DATG = name_file (UNITD)
FileName DATP = name_file (UNITP)
# Opening the gibi command input file
fdgib=open (FileName DATG, “w”)
fdgip=open (FileName DATP, “w”)
fdgib.write (text)
fdgip.write (textp)
fdgib.close ()
fdgip.close ()
Return
# post-processing macro command (ex POST_GOUJ2E)
# calculation of the cumulative reactions according to the nets
def POST_GOUJ_ops (self, TABLE):
Ier=0
### We import the definitions of the commands to be used in the macro
CREA_TABLE =self.get_cmd (“CREA_TABLE”)
aa1= TABLE. EXTR_TABLE ()
aaa=aa1.values ()
v_dy=aaa [“DY”]
v_nu=aaa [“NUME_ORDRE”]
NBVAL =len (V_dy)
nbv=0
For num in V_nu:
if num==v_nu [0]: nbv=nbv+1
if nbv>0: ninch= NBVAL /nbv
else: print « error »
V_f1= [V_dy [i*nbv: (i+1)*nbv] for i in range (ninch)]
V_fo= []
V_cu= []
def add (x, y): return x+y
For list in V_f1:
list.reverse ()
v_fo.append (list)
ftot=reduce (add, list)
V_cu.append ([reduce(add,liste[:i+1]) *100. /ftot for i in range (len (list))])
V_nF = []
for i in range (ninch): V_NF=V_NF+Range (1, nbv+1)
V_re= []
For list in V_fo: V_re=v_re+list
v_rc= []
For list in V_cu: v_rc=v_rc+list
self.declareOut (“tab3”, self.sd)
tab3= CREA_TABLE (LISTE =( _F (PARA = “NUME_ORDRE”,
LISTE_I = V_nu),
_F (PARA = “NUME_FILET”,
LISTE_I = v_NF),
_F (PARA = “REACTION”,
LISTE_R = V_re),
_F (PARA = “REACTION_CUMU”,
LISTE_R = v_RC),
))
Return 0
POST_GOUJ = MACRO (name= » POST_GOUJ « , op= POST_GOUJ_ops, op=, sd_prod=table_sdaster, reentrant=”n”, fr= » »,
TABLE = SIMP (status=”o”, typ=tabl_post_rele),)
Note:
The previous lines are present in the test cases ZZZZ120A and ZZZZ120B , so you will have to copy them at the start of any new command file.
Then the command file should contain the commands and the command sets in the order shown below:
DEBUT ()
INCLUDE ()
mail = {Set of commands that produce the mesh.}
calc = {Set of commands that perform the calculation.}
FIN ()
5.2.1. Order detail INCLUDE#
The syntax for command INCLUDE is as follows:
INCLUDE (UNITE = 38,)
The Logical Unit number (38) corresponds to the file containing the database, cf. [§5.1].
5.2.2. Production of the mesh#
The macr_gouj2e_mail function, cf. [[§3] and the set of commands described below ensure the production of the mesh for a stud-flange assembly such as the one shown on [Figure3.3‑a]. Except for the command IMPR_RESU, they are all required.
the macr_gouj2e_mail function;
The line loc_outils=aster.repout ();
the EXEC_LOGICIEL command;
the PRE_GIBI command;
the command MAIL = LIRE_MAILLAGE;
the command MAIL = DEFI_GROUP;
the optional command IMPR_RESU.
The EXEC_LOGICIEL command starts the Gibi software which generates the mesh file in Gibi format (.mgib file) from the Gibi data files (.datg file) to which the user does not have access.
The macr_gouj2e_mail function is used to retrieve from the database the internal radius of the flange, the external radius of the stud and the thread pitch of the stud characterized by its type and its variant, cf. [§3]. In addition, this function prepares Gibi data files (.datg). The geometric characteristics of the flange and the threads are specified using the operands H_ CORP_BRID (Height of the Flange Body, part of the flange in contact with the threads) and R_ EXT_BRID (External Radius of the Flange) which are mandatory. The operands H_ HAUT_BRID (Height of Top of Bride) and H_ BAS_BRID (Height of Bottom of Bride) are optional, they are zero by default. All dimensions must be given in millimeters. If the user gives values for the heights of the top of the flange and the bottom of the flange, these cannot be less than 1 millimeter. The internal radius of the flange, the external radius of the stud as well as the step or the height of a thread are characteristic quantities of a given assembly that are stored in the base; they are therefore not to be entered by the user.
The total and theoretical number of nets is indicated with the mandatory simple keyword NB_FILET. If some of the threads are missing or missing, the simple keyword FILET_ABST can be used to indicate the list. The missing nets are not meshed.
Note 5.2.2-1:
The name of the mesh concept (here**mail) must be different from the concept names defined in the database, which are listed in [Tableau 5.2.2-1]. In [Tableau 5.2.2-1], the prefixes* SGM, * ** REGM, etc. are reserved for database concepts (which can be enriched later), the « xx » symbol can be equal to* 33, 64, 64, 64, 64, 64, ,, 90, 90,, 90, , 90,, 90, , 90,, , 90,, 90, , 90,, , 90,, , 90,, , 90,, , 115,, 155, , 180, or 186. The « y » symbol can be equal to any of the twenty-six letters of the alphabet. *
Concept name |
Definition |
SGMxxy |
stud section |
REGMxxy |
outer radius of the stud |
HFMxxy |
net height or step |
RIBMxxy |
inside radius of the flange |
CFMxxy |
net configuration |
HBMxxy |
bridle top |
COMxxy |
mechanical behavior |
MABMxxy |
flange material name |
MAGMxxy |
dowel material name |
PFMxxy |
first thread behavior (traction curve) |
DFMxxy |
behavior of the second thread (traction curve) |
FCMxxy |
behavior of running threads (traction curve) |
MGMxxy |
stud material definition (Eet NU) |
MBMxxy |
flange material definition (EET NU) |
FTMxxy |
behavior of a truncated thread (traction curve) |
FTAMxxy |
behavior of a truncated thread type A (traction curve) |
FTBMxxy |
behavior of a truncated type B thread (traction curve) |
JHTMxxy |
behavior of a net whose game is out of tolerance (traction curve) |
HTAMxxy |
behavior of a net whose game is out of tolerance type A (traction curve) |
HTBMxxy |
behavior of a net whose game is out of tolerance type B (traction curve) |
Table 5.2.2-1: List of concept names that are forbidden to the user
Below we show a typical example of a command file for producing the mesh for a stud-flange assembly.
# user data
# the constraints must be met:
#
# flange height less than the number of threads per step:
# NB_FILET * HFM155A < H_ CORP_BRID
#
# inner flange radius less than outer radius:
# RIBM155A < R_ EXT_BRID
#
# outer radius of the stud less than the inner radius of the flange:
# REGM155A < RIBM155A
#
TYPE = “M155”
VARIANTE = “A”
NB_FILET = 56
H_ CORP_BRID = 225.0
R_ EXT_BRID = 140.0
H_ HAUT_BRID = 200.0
H_ BAS_BRID = 0.0
FILET_ABST = (3,4,)
macr_gouj2e_mail (TYPE, VARIANTE, NB_FILET, H_ CORP_BRID, R_ EXT_BRID,
H_ HAUT_BRID, H_ BAS_BRID, FILET_ABST,)
loc_tools=aster.repout ()
EXEC_LOGICIEL (LOGICIEL =loc_tools+”gibi”,
ARGUMENT =( _F (NOM_PARA =”strong.70”),
_F (NOM_PARA =”strong.19”)),);
PRE_GIBI ()
MAIL = LIRE_MAILLAGE ()
MAIL = DEFI_GROUP (reuse = MAIL,
MAILLAGE = MAIL,
CREA_GROUP_NO =( _F (NOM =” NDFILETS “,
GROUP_MA =” CORPSGOU “,
CRIT_NOEUD =” TOUS “))),)
Finally, all mesh entities that may be affected by a particular behavior or load are named:
THE PILE NUMERO 1 CONTIENT 73 OBJET (S) MAILLAGE
THERE ARE 66 OBJET (S) NOMME (S):
CORPSGOU 5 HAUTGOUJ 6 GOUJON 7 FIL001 8 FILETS 9
FIL002 10 FIL005 11 FIL006 12 FIL007 13 FIL008 14
FIL009 15 FIL010 16 FIL011 17 FIL012 18 FIL013 19
FIL014 20 FIL015 21 FIL016 22 FIL017 23 FIL018 24
FIL019 25 FIL020 26 FIL021 27 FIL022 28 FIL023 29
FIL024 30 FIL025 31 FIL026 32 FIL027 33 FIL028 34
FIL029 35 FIL030 36 FIL031 37 FIL032 38 FIL033 39
FIL034 40 FIL035 41 FIL036 42 FIL037 43 FIL038 44
FIL039 45 FIL040 46 FIL041 47 FIL042 48 FIL043 49
FIL044 50 FIL045 51 FIL046 52 FIL047 53 FIL048 54
FIL049 55 FIL050 56 FIL051 57 FIL052 58 FIL053 59
FIL054 60 FIL055 61 FIL056 62 BASGBRID 63 GBRIDE 64
BRIDE 65 HBRIDE 68 BBRIDE 69 DBRIDE 70 MAIL 1
SHBRI 71
THE PILE NUMERO 32 CONTIENT 2453 OBJET (S) POINT
THERE ARE 8 OBJET (S) NOMME (S):
PBFIL 2397 PHFIL 2452 PHGOUJ 2453 PBGBRID 262 PBGFBRID 361
PHGFBRID 636 PCFIL 2397 PCBRID 361
5.2.3. Carrying out the calculation#
Before writing the « calculation » part of the command file, it is advisable to consult the database in order to know the types of threads, materials and traction curves that are associated with a given type of stud-flange connection.
To perform the calculation, the following Code_Aster commands must be linked together:
the DEFI_GROUP command that enriches the mesh by creating groups of nodes;
the AFFE_MODELE command, which affects mechanical phenomena to the different groups of meshes;
the AFFE_CARA_ELEM command, which allows you to define the section of the beam that models the stud and the characteristics of the discretes that model the threads;
the DEFI_MATERIAU command, which allows you to define the materials of the stud threads;
the AFFE_MATERIAU command that assigns the defined materials to the appropriate mesh groups;
the AFFE_CHAR_MECA command that affects boundary conditions and loading;
the DEFI_FONCTION command that defines the multiplier function to be applied to the load;
the DEFI_LIST_REEL command that defines the list of moments;
the STAT_NON_LINE command that performs the calculation;
the CALC_CHAMP command that calculates nodal forces;
the POST_RELEVE_T command that retrieves the relevant results;
the macro command POST_GOUJ which reorganizes the results in the appropriate format;
the IMPR_TABLE command that allows you to print the results.
Concretely, this results in the following commands:
MAIL = DEFI_GROUP (reuse = MAIL,
MAILLAGE = MAIL,
CREA_GROUP_NO =( _F (GROUP_MA =” GOUJON “,
NOM =” GOUJ_NO “,
CRIT_NOEUD =” TOUS “,),
_F (GROUP_MA =” FILETS “,
NOM =” FILET_NO “,
CRIT_NOEUD =” TOUS “,),
_F (GROUP_MA =” BRIDE “,
NOM =” BRIDE_NO “,
CRIT_NOEUD =” TOUS “,),),);
template= AFFE_MODELE (MAILLAGE = MAIL,
AFFE =( _F (GROUP_MA =” GOUJON “,
PHENOMENE =” MECANIQUE “,
MODELISATION =” POU_D_E “,),
_F (GROUP_MA =” FILETS “,
PHENOMENE =” MECANIQUE “,
MODELISATION =”2D_ DIS_T “,),
_F (GROUP_MA =” BRIDE “,
PHENOMENE =” MECANIQUE “,
MODELISATION =” AXIS “,),),);
REGM155A is the outer radius of the M155 variant A stud.
carael = AFFE_CARA_ELEM (MODELE = model,
POUTRE =_F (GROUP_MA =” GOUJON “,
SECTION =” CERCLE “,
CARA =”R”,
VALE = REGM155A,),
DISCRET_2D =_F (GROUP_MA =” FILETS “,
CARA =”K_T_D_L”,
VALE =( 10000000.0,10000000.0,),),);
Three common behaviors can be applied to nets, see [Tableau 5.2.2-1]:
behavior of the first thread (traction curve);
behavior of the second thread (traction curve);
behavior of current threads (traction curve).
Six specific behaviors can be applied to nets, see [Tableau 5.2.2-1]:
behavior of a truncated current stream, (traction curve), cf. [§6.1] Note6.1-1,;
behavior of a truncated thread of type A, (traction curve);
behavior of a truncated thread of type B, (traction curve);
behavior of a running net whose play is out of tolerance, (traction curve);
behavior of the first net whose game is out of type A tolerance (traction curve);
behavior of the second net whose game is out of type B tolerance (traction curve).
The user will have to check in the database that the behaviors he intends to use are well defined, cf. [§6].
For example, for the M155 assembly there are no traction curves for truncated threads or threads that have an excess of tolerance, unlike the M90 assembly.
PFM155A is the pull curve of the first thread of the M155 type stud variant A.
MF_1 = DEFI_MATERIAU (TRACTION =_F (SIGM = PFM155A,),);
DFM155A is the pull curve of the Second Thread of the M155 Variant A stud.
MF_2 = DEFI_MATERIAU (TRACTION =_F (SIGM = DFM155A,),);
FCM155A is the pull curve of the current threads (other threads) of the M155 variant A stud.
MF_C = DEFI_MATERIAU (TRACTION =_F (SIGM = FCM155A,),);
Finally, the particular materials are assigned to the nets that have a particular behavior.
chmat= AFFE_MATERIAU (MAILLAGE = MAIL,
AFFE =( _F (GROUP_MA =” GOUJON “,
MATER = MGM155A,),
_F (GROUP_MA =” FILETS “,
MATER = MF_C,),
_F (GROUP_MA =” BRIDE “,
MATER = MBM155A,),
_F (GROUP_MA =” FIL001 “,
MATER = MF_1,),
_F (GROUP_MA =” FIL002 “,
MATER = MF_2,),),);
There are three types of boundary conditions on the bridle:
external lateral side of the flange locked along y;
external lateral side and base of the flange locked along y;
base of the flange locked according to y.
The value, in Newton, of the traction force applied at the head of the stud is also specified.
.. image: images/100011 FE000069D5000029A72B66FFFE28042676 .svg
:width: 512
:height: 201
.. _refImage_100011 FE000069D5000029A72B66FFFE28042676 .svg:
charm= AFFE_CHAR_MECA (MODELE =model,
DDL_IMPO =_F (GROUP_NO =( “GOUJ_NO”, “”, “FILET_NO”, “BRIDE_NO”,),
DX=0.0,),
FACE_IMPO =( _F (GROUP_MA =( “DBRIDE”, “BBRIDE”,),
DY=0.0,),
_F (GROUP_MA =” GOUJON “,
DZ=0.0,
DRY =0.0,),),
FORCE_NODALE =_F (GROUP_NO =” PHGOUJ “,
FY=1.0,),);
The FORCE_NODALE will be multiplied by the following function during the calculation (command STAT_NON_LINE, keyword EXCIT):
funk= DEFI_FONCTION (NOM_PARA =” INST “,
NOM_RESU =” TOUTRESU “,
VALE =( 0.0,0.5,5.0,5000000.0,),);
The DEFI_LIST_REEL command is used to define the list of times required for the incremental calculation (command STAT_NON_LINE, keyword COMPORTEMENT).
list= DEFI_LIST_REEL (DEBUT =0.0,
INTERVALLE =( _F (JUSQU_A =1.0,
NOMBRE =1,),
_F (JUSQU_A =2.0,
NOMBRE =1,),
_F (JUSQU_A =3.0,
NOMBRE =1,),
_F (JUSQU_A =4.0,
NOMBRE =1,),
_F (JUSQU_A =5.0,
NOMBRE =1,),),);
Two types of calculation can be chosen:
ELASTOPLASTIQUE, we use the behavior of the threads given in the form of a traction curve in the base, we then use the incremental behavior:
_F (RELATION =” DIS_GOUJ2E_ **** PLAS ** “,
DEFORMATION =” PETIT “,
GROUP_MA =” FILETS “,),),
**** ELASTIQUE , this is equivalent to drawing a line with the origin and the first point of the tension curve**files, which allows to do a linear elastic calculation, we use the incremental behavior:
_F (RELATION =” DIS_GOUJ2E_ **** ELAS ** “,
DEFORMATION =” PETIT “,
GROUP_MA =” FILETS “,),),
In the example below we perform a calculation ELASTOPLASTIQUE **.
CALC = STAT_NON_LINE (MODELE =model,
CHAM_MATER =chmat,
CARA_ELEM =carael,
EXCIT =_F (CHARGE =charm,
FONC_MULT =so,
TYPE_CHARGE =” FIXE_CSTE “,),
COMPORTEMENT =( _F (RELATION =” ELAS “,
DEFORMATION =” PETIT “,
GROUP_MA =” GOUJON “,),
_F (RELATION =” ELAS “,
DEFORMATION =” PETIT “,
GROUP_MA =” BRIDE “,),
_F (RELATION =” DIS_GOUJ2E_PLAS “,
DEFORMATION =” PETIT “,
GROUP_MA =” FILETS “,),),
INCREMENT =_F (LIST_INST =list,),
NEWTON =_F (REAC_ITER =3,),
CONVERGENCE =_F (ITER_GLOB_MAXI =20,),);
The CALC_CHAMP command calculates the nodal forces exerted on the nets.
CALC = CALC_CHAMP (reuse = CALC,
RESULTAT = CALC,
PRECISION =0.001,
CRITERE =” RELATIF “,
FORCE =” FORC_NODA “,
GROUP_MA =” FILETS “,);
The keyword factor IMPRESSION is used to choose the format for presenting the results.
tab1= POST_RELEVE_T (ACTION =_F (INTITULE =” RESU_T1 “,
GROUP_NO =” NDFILETS “,
FORMAT_C =” MODULE “,
RESULTAT = CALC,
NOM_CHAM =” FORC_NODA “,
TOUT_ORDRE =” OUI “,
PRECISION =1e-06,
CRITERE =” RELATIF “,
NOM_CMP =”DY”,
REPERE =” GLOBAL “,
MOYE_NOEUD =” OUI “,
OPERATION =” EXTRACTION “,),);
In addition to the classic Code_Aster printing formats, there is the TABLE format specific to the overall calculation of a stud-flange assembly, see [§3.3].
tab2= POST_GOUJ (TABLE =tab1,);
IMPR_TABLE (
TABLE =tab2,
UNITE =8,
FORMAT =” AGRAF “,
FILTRE =_F (NOM_PARA =” NUME_ORDRE “,
VALE_I =1,),
NOM_PARA =( “NUME_ORDRE”, “NUME_FILET”, “”, “”, “REACTION”, “REACTION_CUMU”,),);
Note 5.2.3-1:
See. Note 5.2.2-1.
5.3. The results file#
In this part we only present the TABLE format dedicated to the overall calculation of a stud—flange assembly. In the latter case the results are presented in two parts. The first gives the net number-node number correspondence. The second part is organized in the form of a table with four columns. The first relates to the order or increment number, the second indicates the number of the fillets, the third the Newton reaction of the fillets and the fourth the cumulative reaction of the fillets expressed in %. The TABLE format simply allows you to draw the curves: reaction of the nets according to their number and cumulative reaction of the nets according to their number, using the xmgrace curve drawing software.
Below is an overview of the TABLE format.
Part giving the net number-node number correspondence:
NUME_FILET NOEUDS
1\N1954
2\N1953
3\N1952
4\N1951
5\N1950
.
.
.
.
.
52\N1903
53\N1902
54\N1901
55\N1900
56\N1899
Part giving the order number, the fillet number, the reaction (in N) and the cumulative reaction (in% of the total), example for the order number five:
NUME_ORDRE NUME_FILET REACTION REACTION_CUMU
5 1 3.75966E+05 7.51932E+00
5 2 3.63799E+05 1.47953E+01
5 3 0.00000E+00 1.47953E+01
5 4 0.00000E+00 1.47953E+01
5 5 3.09596E+05 2.09872E+01
5 6 2.84261E+05 2.66724E+01
.
.
.
5 52 3.35943E+04 9.66590E+01
5 53 3.59525E+04 9.73780E+01
5 54 3.90373E+04 9.81588E+01
5 55 4.31747E+04 9.90223E+01
5 56 4.88871E+04 1.00000E+02
Note 5.3-1:
The order number corresponds to the load increment.
5.4. The message file#
This file contains all the Code_Aster commands, the database and all the commands produced by the macro commands. We are not giving an overview of the message file (.mess) here, the reader who wants more details can consult the message files for test cases ZZZZ120A and ZZZZ120B.