Select Page

Let us look at how to add a stepping function to loads in command file.

Here we will re-use the command file that we created for 3D analysis.

We want to add another load to the analysis, force of 2000N in Y direction on the same face that currently has a load of 2000N in Z direction.

Here we want to have a look at the results of individual forces on the guide and also the effect on guide when we combine loads.

Loads will be combined as follows

 Step No Magnitude of ForceY Magnitude of ForceZ 2 1 0 3 0 1 4 1 1

so in Step 2, ForceY will be applied full and ForceZ will not be applied

in Step 3, ForceY will not be applied and ForceZ will be applied full

in Step 4, both ForceY and ForceZ will be applied full.

Here we will re-use command file “3D.comm” and make changes.

Click on “Open .comm File” button on the lower left as shown in figure below In the window that pops up select “3D.comm” and Click “Open” as shown below File 3D.comm will be opened here.  As we are only interested in adding a load and stepping function we will Click on Tab “Load(s)” and add ForceY as shown below. To add stepping function to ForceZ do the following

Enter “ForceZ_s” for “Load Stepping Function Name”, making sure that it is not more than 8 characters long.

Select “ForceZ” for Load Name if it is not selected automatically.

Select “Constant” for Left Side of Function and Right Side of Function.

For the Load Step Pair Enter “2,0,3,1,4,1” which says that for Step 2, Magnitude of ForceZ is 0, for Step 3, Magnitude is 1 and for Step 4, Magnitude is 1.

Click “Add Step” and this stepping function will be added to the analysis.

Do same with ForceY by giving it a Name “ForceY_s” and a stepping function of “2,1,3,0,4,1” As the values for output were already selected for 3D.comm file we will not change it here.

Click “Save .comm File” and save it with a name “3D-Step.comm” When Efficient has written this file, it will show a message as below. Open your command file and have a look of what is in it.

```###############################
#File created by Efficient Software version 0.1.0
#Version of Code_Aster is 11.x
#Author of Efficient is Dhramit Thakore
#https://engineering.moonish.biz
###############################```
```#U4.11.01
#@Eff@#StartCont#DEBUT
DEBUT();```
```#U4.21.01
#@Eff@#MeshType#MED
mesh=LIRE_MAILLAGE(FORMAT='MED',);```
```#U4.41.01
#@Eff@#AnalysisType#Mechanical - 3D
model=AFFE_MODELE(MAILLAGE=mesh, AFFE=_F(TOUT='OUI', PHENOMENE='MECANIQUE', MODELISATION='3D',),);```
```#U4.43.01
#@Eff@#MaterialList#CS;2.1e5;0.3;7.8e-9;All
CS=DEFI_MATERIAU(ELAS=_F(E=2.1e5, NU=0.3, RHO=7.8e-9,),);```
```#U4.43.03
material=AFFE_MATERIAU(MAILLAGE=mesh, AFFE=(_F(TOUT='OUI', MATER=CS,),),);```
```#U4.44.01
#@Eff@#BCList#D.O.F (DDL) on Mesh Group;Fixed;Fix;0;0;0;NA;NA;NA;NA;NA
Fixed=AFFE_CHAR_MECA(MODELE=model, DDL_IMPO=_F(GROUP_MA='Fix',DX=0,DY=0,DZ=0,),);```
```#U4.44.01
```#@Eff@#LoadList#ForceY;Force on Face;Load;NA;2;NA;NA;NA;NA
```#U4.31.02
ForceZ_s=DEFI_FONCTION(NOM_PARA='INST', VALE=(2,0,3,1,4,1,), PROL_GAUCHE='CONSTANT', PROL_DROITE='CONSTANT',);```
```#@Eff@#LoadStepList#ForceY_s;ForceY;Constant;Constant;2,1,3,0,4,1
ForceY_s=DEFI_FONCTION(NOM_PARA='INST', VALE=(2,1,3,0,4,1,), PROL_GAUCHE='CONSTANT', PROL_DROITE='CONSTANT',);```
`list=DEFI_LIST_REEL(DEBUT=2, INTERVALLE=_F(JUSQU_A=4, PAS=1,),);`
`result=MECA_STATIQUE(MODELE=model, CHAM_MATER=material, EXCIT=(_F(CHARGE=Fixed,),_F(CHARGE=ForceZ, FONC_MULT=ForceZ_s,),_F(CHARGE=ForceY, FONC_MULT=ForceY_s,),),LIST_INST=list,);`
```#U4.81.04
result=CALC_CHAMP(reuse=result, RESULTAT=result, CONTRAINTE=('SIGM_ELNO','SIGM_NOEU',), CRITERES=('SIEQ_ELNO','SIEQ_NOEU',), FORCE=('REAC_NODA',),);```
```#U4.91.01
#@Eff@#OutputMEDList#SIGM_ELNO
#@Eff@#OutputMEDList#SIGM_NOEU
#@Eff@#OutputMEDList#SIEQ_ELNO
#@Eff@#OutputMEDList#SIEQ_NOEU
#@Eff@#OutputMEDList#REAC_NODA```
`IMPR_RESU(FORMAT='MED', UNITE=80, RESU=_F(MAILLAGE=mesh, RESULTAT=result, NOM_CHAM=('DEPL', 'SIGM_ELNO', 'SIGM_NOEU', 'SIEQ_ELNO', 'SIEQ_NOEU', 'REAC_NODA',),),);`
```#U4.11.02
FIN();```

Use it in one of your analysis and check results.