5. Add a new load#
Loads in the sense of Code_Aster are split into two separate directives in EPX: LINK and CHAR. The translation catalog follows this rule by separating loads and links in two different dictionaries: cata_liais and cata_char.
5.1. Add a link#
5.1.1. Liaison dictionary#
To add a new link you have to duplicate a key/value pair from the cata_links dictionary.
cata_links = {
“DDL_IMPO”: {
“MOT_CLE_EPX”: [“BLOQ”, “DEPL”],
# the choice between BLOQ and DEPL is hard made in calc_epx_char
# it is made according to the presence of a function or not
# if function => DEPL, otherwise BLOQ
“ASTER”: [“DX”, “DY”, “DY”, “DZ”, “DRX”, “DRY”, “DRZ”],
“EPX”: [“1”, “2”, “3”, “4”, “5”, “6”],
“ENTITE”: [“GROUP_MA”, “GROUP_NO”],
“NB_CLE_MAX”: {“BLOQ”: 6,
“DEPL”: 1,
},
“VALE_IMPO”: {“BLOQ”: 0. ,
“DEPL”: None,
},
“FONC_MULT”: {“BLOQ”: False,
“DEPL”: True,
},
},
“RELA_CINE_BP”: {
“MOT_CLE_EPX”: [“LCAB”],
“ASTER”: [“CABLE_BP”],
“EPX”: None,
“MOT_CLE_VERIF”: [“SIGM_BPEL”, “RELA_CINE”, “TYPE_EPX”],
“VALE_VERIF”: [“NON”, “OUI”, “”, [“ADHE”, “GLIS”, “FROT”]],
“FONC_MULT”: False,
},
“LIAISON_MAIL”: {
“MOT_CLE_EPX”: [“RELA”],
“FONC_MULT”: False,
},
}
5.1.2. Stages#
Replace the key name with the name of the AFFE_CHAR_MECAà keyword to add.
Indicate in “MOT_CLE_EPX” the name of the corresponding link (s) in EPX. The value should be a list, usually consisting of a single item. Several items in the list indicate that the keyword can correspond to multiple bindings in EPX. The procedure to follow in this case is described in 5.3.
When “MOT_CLE_EPX” takes the value RELA, as for LIAISON_MAIL, CALC_EUROPLEXUS will translate the list of relationships contained in a table attached to the char_meca concept. We then do not follow the other points (except point 8). However, a branch will be required in AFFE_CHAR_MECA for the table containing the relationships to be created (see the Bibfor/load/calirc.f90 routine).
Indicate in “ASTER” the list of keywords to be translated.
Indicate in “EPX” the list of translations for these keywords. Indicate None if the EPX syntax of the link does not allow you to enter this frame (note that this is only possible if the list “ASTER” has only one element).
Indicate in “ENTITE” the keywords (among GROUP_MA and GROUP_NO) that can describe the set to which the link applies. Do not specify this keyword if the*Code_Aster* and/or EPX syntaxes do not fit into this framework.
If the list “ASTER” is greater than 1, indicate in “NB_CLE_MAX” the number of keywords from this list that may be present in the same occurrence of the link. If this number is 1, it is not necessary to specify this key, it is the value by default.
If the values taken by the keywords in the “ASTER” list are imposed, specify this value in “VALE_IMPO”.
Indicate in “FONC_MULT” if the link should be accompanied by a multiplier function (True/False).
Indicate in “MOT_CLE_VERIF” the keywords whose value should only be checked, if any exist.
Indicate in “VALE_VERIF” at the same index the values that the keywords should take.
Each keyword present in the occurrence of the Code_Aster link must be in one of the “ASTER”, “ENTITE” or “MOT_CLE_VERIF” lists. This prevents the user from using keywords that are not taken into account without being notified.
If necessary, specify in “COEF_MULT” the coefficient by which the values from Code_Aster should be multiplied when translating into EPX.
5.2. Add a load#
5.2.1. Loading dictionary#
To add a new load, you must duplicate a key/value pair from the cata_char dictionary. One gives here a key to this dictionary:
cata_charge = {
“FORCE_COQUE”: {
“TYPE_CHAR”: “FACTO”,
“MOT_CLE_EPX”: [“PRES COQU”],
“ASTER”: [“PRES”],
“EPX”: None,
“COEF_MULT”: -1,
“ENTITE”: [“GROUP_MA”],
},
}
5.2.2. Stages#
The steps are exactly the same as for a link with two exceptions:
Indicate in “TYPE_CHAR”, the EPX type of the load (FACTO or CONST). In case FACTO, the load must be accompanied by a multiplier function, but not in case CONST.
Do not give the keyword “FONC_MULT” as it is implied by the type of load.
5.3. Multiple choice processing#
Sometimes a load or a Code_Aster link can correspond to multiple uploads or links in EPX.
First of all, it is necessary to identify what will determine which option is retained. The analysis of this criterion and the resulting choice must be hard-coded in the calc_epx_char.py module in the export_charge routine after the code list:
if len (epx_keyword) > 1:
The dictionary must then be adapted to these multiple possibilities with the following logic. Each key whose value is not the same for each of the cases must be a dictionary whose keys are the different names of the possible loads or links and whose values are the desired values for the key in question. Link DDL_IMPO is an example of this.