How to use *restart?

I recently discovered *restart, but I didn’t quite understand it. I saw that it was possible to suspend the program to update *cload after each time step was calculated, but I failedly try it, may I ask how to use this?

Restart feature is meant for cases when an analysis needs to be continued from a previous run since you want to add more steps to the whole case without having to rerun the completed ones.

@Phonix
Hereby a very short example of using restart in the same data set. It’s a little more tricky if you want to use 2 different data sets and restart with the read option. First moving the end of the bar in the x-direction and afterwards from this new position in the z-direction

*NODE
1,1,0,0
2,1,100,0
3,0,100,0
4,0,0,0
5,1,0,1
6,1,100,1
7,0,100,1
8,0,0,1
9,1,50,0
10,0.5,100,0
11,0,50,0
12,0.5,0,0
13,1,50,1
14,0.5,100,1
15,0,50,1
16,0.5,0,1
17,1,0,0.5
18,1,100,0.5
19,0,100,0.5
20,0,0,0.5

*Nset, Nset=fixed
1,12,4,20,8,16,5,17

*Nset, Nset=moved
2,10,3,19,7,14,6,18

*ELEMENT,TYPE=C3D20, ELSET=Eall
1,1,2,3,4,5,6,7,8,9,10,11,12
13,14,15,16,17,18,19,20

*SOLID SECTION, ELSET=Eall, Material=Steel_S355

**======== Steel_S355 ========
*Material, Name=Steel_S355
*DENSITY
8500.0
*ELASTIC, TYPE=ISO
210E9,0.3

*Restart, write
*STEP, Nlgeom, inc=100
*STATIC
0.2, 1, 1E-05, 0.2
*Boundary
fixed,1,3,0
moved,1,1,5

*NODE FILE
U,RF
*El file
S, E
*END STEP

*Restart
*STEP, Nlgeom, inc=100
*STATIC
0.2, 1, 1E-05, 0.2
*Boundary
fixed,1,3,0
moved,3,3,5

*NODE FILE
U,RF
*El file
S, E
*END STEP

@fgr
I want to use the same data. I expect it to pause during the operation and then restart the inp file when I get a new *cload and modify the inp file. Can’t this be done with *restart? *Restart can only work with one of the examples you have shown, i.e. is an example running properly?

@Phonix
Hereby a recipe for splitting data set into 2 or more data sets. You can by yourself make a command shell to automate the process but for the understanding i find et best this way.

  1. Prepare 2 set of data files and name then ex step_1.inp and step_2.inp
  2. Copy step_1.inp to step.inp
  3. Run ccx -i step
  4. Copy step.frd to step_1.frd
  5. Copy step.rout to step.rin
  6. Copy step_2.inp to step.inp
  7. Run ccx -i step
  8. Copy step.frd to step_2.frd

Result from step 1 will be in step_1,frd and step2 in step_2.frd or concatenate the result files manually to 1 file

1 Like

@Phonix step_1.inp

**
** Name this file as step_1.inp
**
*NODE
1,1,0,0
2,1,100,0
3,0,100,0
4,0,0,0
5,1,0,1
6,1,100,1
7,0,100,1
8,0,0,1
9,1,50,0
10,0.5,100,0
11,0,50,0
12,0.5,0,0
13,1,50,1
14,0.5,100,1
15,0,50,1
16,0.5,0,1
17,1,0,0.5
18,1,100,0.5
19,0,100,0.5
20,0,0,0.5

*Nset, Nset=fixed
1,12,4,20,8,16,5,17
*Nset, Nset=xedge
2,18,6
*Nset, Nset=zedge
6,14,7

*ELEMENT,TYPE=C3D20, ELSET=Eall
1,1,2,3,4,5,6,7,8,9,10,11,12
13,14,15,16,17,18,19,20

*SOLID SECTION, ELSET=Eall, Material=Steel_S355

**======== Steel_S355 ========
*Material, Name=Steel_S355
*DENSITY
8500.0
*ELASTIC, TYPE=ISO
210E9,0.3

*Restart, Write
*STEP, Nlgeom, inc=100
*STATIC
0.2, 1, 0.2, 0.2
*Boundary
fixed,1,3,0
*Cload
xedge,1,10000
*NODE FILE
U,RF
*El file
S, E
*END STEP

@Phonix step_2.inp

**
** Name this file as step_2.inp
**
**
** === Restart, Read needs to be very first data card
**
*Restart, Read

*STEP, Nlgeom, inc=100
*STATIC
0.2, 1, 0.2, 0.2
*Boundary
fixed,1,3,0
*Cload
zedge,3,10000
*NODE FILE
U,RF
*El file
S, E
*END STEP

@fgr
thanks your teaching.that’s a good method.
However, when I tried ccx -i step for the second time, I found that the *restart, write command could not be added. As a result, the.rout file could not be generated after the second run. This means that the method only works on 2 data sets. How make it work on more data sets as you say?

@Phonix
You don’t need “*Restart, Write” for the 3’th or subsequent runs. The “*Restart, Read” will by default generate a new “step.rout” file. You can just continue from step 5 in the recipe with a new data set. ex.
5. Copy step.rout to step.rin
6. Copy step_3.inp to step.inp
7. Run ccx -i step
8. Copy step.frd to step_3.frd

and the 3’th data set could look like this:

**
** Name this file as step_3.inp
**
**
** === Restart, Read needs to be very first data card
**
*Restart, Read

*STEP, Nlgeom, inc=100
*STATIC
0.2, 1, 0.2, 0.2
*Boundary
fixed,1,3,0
*Cload
zedge,3,-10000
xedge,1,-10000
*NODE FILE
U,RF
*El file
S, E
*END STEP

@fgr
thanks.
The “*Restart, Read” will by default generate a new “step.rout” file. Is this true? I didn’t generate a new “step.rout” file when I ran it scondly.

@Phonix
I have tested the recipe and data sets with ccx_2.20 on both Linux and Windows 10 and found it ok, so in case you fail when exact following the recipe with the listed data sets, then I believe it must be something with your installation and that’s something I can’t help you with.

The normally problem when running multiple steps are keeping track between the different steps so I can only recommend you using a check list or a command shell for this purpose.

I’m sorry, but so far, this is what I’m able to help you with.

@fgr
thanks~
I have succeeded in following your instructions.

1 Like

@fgr
hello,I have some questions in this case.
According to the example you gave me, in step 1, I applied a force in the x direction, and it generated a positive displacement in the x direction; in step 2 I put a z force on it, resulting in a z displacement superimposed on the forward displacement in step1, and producing a new.rout file. But when I apply the same force in the x direction in step3 as in step1, its resulting displacement ends up being the same as in step2 (I’ve changed the new.rout to.rin). This result is obviously incorrect. Do you know the reason?

@Phonix
I’m not sure how to explain it for you, but you have to think of it as an equilibrium of energy in the structure and every time you make a “*Restart” you will lock the specific current state of energy and restart from that specific state again with another change of condition, but in case you apply the same force in the same direction in step 3, then you are not applying extra energy to the structure.

Try to imagine yourself standing on a bathroom scale. The display shows ex 100kg. because you have applied energy to the bathroom scale. Now you lock the bathroom scale’s position/energy and step away from the bathroom scale. The bathroom scale will now hold energy for 100kg even if you are not on the bathroom scale. In the event that you step on the bathroom scale again, you will not add extra energy to the bathing scale but simply just remove the load from the lock.

I hope this gives sense for you.

Result from step 1 will be in step_1,frd and step2 in step_2.frd or concatenate the result files manually to 1 file

Is it possible to make all steps concatenate to one step.frd file automatically?

@greatq
I don’t have present the exact main reason/difference for using multiple steps by use of a single input file and multiple steps by use of multiple input files, but if you can manage to put all steps in a single input file (like first example in this tread) then you will also get all steps in the final output xxxx.frd file
By use of multiple steps in multiple input file I’m not aware of any automatic method to concatenate the multiple xxxx.frd files into a single xxxx.frd file

1 Like

I am using restart to calculate material damage and also using UMAT. I followed the approach in the post, but there was an error. Can someone help me take a look? Thank you. Attached are all my files.

@liberty
1’st , when doing data set failure analysis is a huge advantage to minimize the number elements as much as possible.

It seems you have been using PrePoMax been for generate the input file Analysis-1.inp and it also seems you have tried to apply multiple steps in a single data file.
I don’t know how PrePoMax has implemented multiple restart command in a single data file but for this case I can only recommend the following recipe
https://calculix.discourse.group/t/how-to-use-restart/1656/3
Immediately it seems that a “*Restart, write” is missing just before the first “*Step” and before the second “*Step” you should only have “*Restart” without the “read” option since the “jobname.rin” shouldn’t be read.

I have created two models, and the jobname.rin file contains the calculation results of the previous model. I would like to restart the calculation of the second model based on this.

@liberty
I’m a little confused with the files enclosed in the “0914.zip” and not fully sure about if you want to have multiple steps in a single input file or single step in multiple input files. So hereby a recipe for different single step in multiple input files

1. Prepare 2 set of data files and name them as ex. step_1.inp and step_2.inp

2. Copy step_1.inp to step.inp
       "step_1.inp" holds the original geometri & load for 1'st run

3. Run ccx -i step

4. Copy step.frd to step_1.frd
       "step.frd" holds output specified in the cards "*node file" & "*element file" for 1'st step

5. Copy step.rout to step.rin
       "step.rout" holds the stiffness matrice, strains & deformed geometri from first run

6. Copy step_2.inp to step.inp
       "step_2.inp"  holds load for 2'nd run expected to be added to 1'st result

7. Run ccx -i step

8. Copy step.frd to step_2.frd 
       "step.frd" holds output specified in the cards "*node file" & "*element file" for 2'nd step

Result from step 1 will be in step_1,frd and step2 in step_2.frd

Further a link to an example of a simple beam. 1’st input file load the beam in x-direction and 2’nd input file put additional load to the beam in the z-direction.
Restart_with_seperate_step_files
You can test the example input data files by following above recipe, and afterwards I believe you should be able to modify the example files to fit in your own specific purpose.