Hi elmer team,
i want to do some transient computations and i have to use the restart function. Does an example existe, which shows the use of this funktion?
If not, can someone explain me how to use this, please. I'am using ElmerGUI. Is there somewhere an option, with which i can set the restart?
regards
rn
How to create restart files
Re: How to create restart files
ok i created restart files with:
Output File = "case.result"
and then restarted from a timestep with:
Restart File = case.result
Restart Position = 2.
I computed a beam with a bc on the left side like this:
Boundary Condition 1
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
and an initial condition on the right side:
Initial Condition 1
Name = "InitialCondition 1"
Displacement 1 = 0.01
End
I computed the first 10 Timesteps with a dt=0.001 and wrote the restart file. Then i restarted the computation with the result fil, i've written,
at the time of 0.002. I've compared both results: first from the first computation and then from the restart. The values for the displacement were different
in the both cases. What is the fault? Here my .sif:
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 2
Timestep intervals = 500000
Timestep Sizes = 0.000001
Solver Input File = case.sif
Post File = case.ep
Output File = "case.result"
!Restart File = case.result
!Restart Position = 1
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
Initial condition = 1
End
Solver 2
Equation = Result Output
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Output Format = Vtk
End
Solver 1
Equation = Linear elasticity
Procedure = "StressSolve" "StressSolver"
Variable = -dofs 3 Displacement
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
Time Derivative Order = 2
End
Equation 1
Name = "Equation 1"
Calculate Stresses = True
Active Solvers(2) = 2 1
End
Material 1
Name = "Steel (alloy - generic)"
Heat Conductivity = 37.2
Youngs modulus = 200.0e9
Mesh Poisson ratio = 0.285
Heat Capacity = 976.0
Density = 7850.0
Poisson ratio = 0.285
Sound speed = 5100.0
Heat expansion Coefficient = 12.0e-6
End
Initial Condition 1
Name = "InitialCondition 1"
Displacement 1 = 0.01
End
Boundary Condition 1
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
regards rn
Output File = "case.result"
and then restarted from a timestep with:
Restart File = case.result
Restart Position = 2.
I computed a beam with a bc on the left side like this:
Boundary Condition 1
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
and an initial condition on the right side:
Initial Condition 1
Name = "InitialCondition 1"
Displacement 1 = 0.01
End
I computed the first 10 Timesteps with a dt=0.001 and wrote the restart file. Then i restarted the computation with the result fil, i've written,
at the time of 0.002. I've compared both results: first from the first computation and then from the restart. The values for the displacement were different
in the both cases. What is the fault? Here my .sif:
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 2
Timestep intervals = 500000
Timestep Sizes = 0.000001
Solver Input File = case.sif
Post File = case.ep
Output File = "case.result"
!Restart File = case.result
!Restart Position = 1
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
Initial condition = 1
End
Solver 2
Equation = Result Output
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Output Format = Vtk
End
Solver 1
Equation = Linear elasticity
Procedure = "StressSolve" "StressSolver"
Variable = -dofs 3 Displacement
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
Time Derivative Order = 2
End
Equation 1
Name = "Equation 1"
Calculate Stresses = True
Active Solvers(2) = 2 1
End
Material 1
Name = "Steel (alloy - generic)"
Heat Conductivity = 37.2
Youngs modulus = 200.0e9
Mesh Poisson ratio = 0.285
Heat Capacity = 976.0
Density = 7850.0
Poisson ratio = 0.285
Sound speed = 5100.0
Heat expansion Coefficient = 12.0e-6
End
Initial Condition 1
Name = "InitialCondition 1"
Displacement 1 = 0.01
End
Boundary Condition 1
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
regards rn
-
- Site Admin
- Posts: 4866
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: How to create restart files
At least one source for a difference could be that the restart includes just the one instance. Hence when using 2nd order timestepping it will force 1st order scheme at restart. Maybe you could test whether you have exact correspondence with BDF order 1.
-Peter
-Peter
Re: How to create restart files
Ok i tried with BDF Order 1: i computed first the deformation without restarting:
Timestep intervals = 10
Timestep Sizes = 0.001
Output File = "case.result"
!Restart File = case.result
!Restart Position = 2
and then i started a computation with the restart (the same timestep size):
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Timestep intervals = 10
Timestep Sizes = 0.001
Solver Input File = case.sif
Post File = case.ep
Output File = "case_1.result"
Restart File = case.result
Restart Position = 2
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End
Solver 2
Equation = Result Output
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Output Format = Vtk
End
Solver 1
Equation = Linear elasticity
Procedure = "StressSolve" "StressSolver"
Variable = -dofs 3 Displacement
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 200
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
Time Derivative Order = 2
optimize bandwidth = False
End
Equation 1
Name = "Equation 1"
Calculate Stresses = True
Active Solvers(2) = 2 1
End
Material 1
Name = "Steel (alloy - generic)"
Heat Conductivity = 37.2
Youngs modulus = 200.0e9
Mesh Poisson ratio = 0.285
Heat Capacity = 976.0
Density = 7850.0
Poisson ratio = 0.285
Sound speed = 5100.0
Heat expansion Coefficient = 12.0e-6
End
Boundary Condition 1
Target Boundaries(1) = 3
Name = "force"
Force 2 = 250000
End
Boundary Condition 2
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
and get this here in the case.result, the first computation:
Time: 3 3 0.300000000000E-002
displacement 1
Perm: 179 179
1 1
2 2
3 3
4 4
5 5
...
177 177
178 178
179 179
-6.28663559146706865E-074
1.54672114805168850E-005
-1.53459693136461363E-005
-6.28663559146706865E-074
-6.28663559146706865E-074
-1.53571297335832839E-005
1.54458313151421980E-005
-6.28663559146706865E-074
-3.44764042025630022E-006
-6.42809396984468832E-006
-9.18980443138580843E-006
-1.11867439297244321E-005
-1.26908776083000292E-005
-1.40778220321594874E-005
-1.48297661527703205E-005
-1.51886249759363248E-005
-1.87908601104894613E-006
-4.89734963734353630E-006
...
and in the case_1.result there is:
Time: 1 1 0.300000000000E-002
displacement 1
Perm: 179 179
1 1
2 2
3 3
4 4
5 5
6 6
...
176 176
177 177
178 178
179 179
0.0000000000000000
8.88951211590773745E-006
-8.80837622027232527E-006
0.0000000000000000
0.0000000000000000
-8.83746455822413260E-006
8.85053852177481628E-006
0.0000000000000000
-1.58022694914263818E-006
-3.05174433867506328E-006
-4.52955368637457124E-006
-5.70158821635011704E-006
-6.70075506307938182E-006
-7.71372170159645116E-006
-8.32876659783153695E-006
-8.65734723576483902E-006
-8.48597368262170670E-007
-2.28120728666105694E-006
-3.81654889245630651E-006
-5.14465071532359973E-006
-6.18709254452092831E-006
...
any ideas?
Timestep intervals = 10
Timestep Sizes = 0.001
Output File = "case.result"
!Restart File = case.result
!Restart Position = 2
and then i started a computation with the restart (the same timestep size):
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Timestep intervals = 10
Timestep Sizes = 0.001
Solver Input File = case.sif
Post File = case.ep
Output File = "case_1.result"
Restart File = case.result
Restart Position = 2
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End
Solver 2
Equation = Result Output
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
Output Format = Vtk
End
Solver 1
Equation = Linear elasticity
Procedure = "StressSolve" "StressSolver"
Variable = -dofs 3 Displacement
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 200
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
Time Derivative Order = 2
optimize bandwidth = False
End
Equation 1
Name = "Equation 1"
Calculate Stresses = True
Active Solvers(2) = 2 1
End
Material 1
Name = "Steel (alloy - generic)"
Heat Conductivity = 37.2
Youngs modulus = 200.0e9
Mesh Poisson ratio = 0.285
Heat Capacity = 976.0
Density = 7850.0
Poisson ratio = 0.285
Sound speed = 5100.0
Heat expansion Coefficient = 12.0e-6
End
Boundary Condition 1
Target Boundaries(1) = 3
Name = "force"
Force 2 = 250000
End
Boundary Condition 2
Target Boundaries(1) = 5
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
and get this here in the case.result, the first computation:
Time: 3 3 0.300000000000E-002
displacement 1
Perm: 179 179
1 1
2 2
3 3
4 4
5 5
...
177 177
178 178
179 179
-6.28663559146706865E-074
1.54672114805168850E-005
-1.53459693136461363E-005
-6.28663559146706865E-074
-6.28663559146706865E-074
-1.53571297335832839E-005
1.54458313151421980E-005
-6.28663559146706865E-074
-3.44764042025630022E-006
-6.42809396984468832E-006
-9.18980443138580843E-006
-1.11867439297244321E-005
-1.26908776083000292E-005
-1.40778220321594874E-005
-1.48297661527703205E-005
-1.51886249759363248E-005
-1.87908601104894613E-006
-4.89734963734353630E-006
...
and in the case_1.result there is:
Time: 1 1 0.300000000000E-002
displacement 1
Perm: 179 179
1 1
2 2
3 3
4 4
5 5
6 6
...
176 176
177 177
178 178
179 179
0.0000000000000000
8.88951211590773745E-006
-8.80837622027232527E-006
0.0000000000000000
0.0000000000000000
-8.83746455822413260E-006
8.85053852177481628E-006
0.0000000000000000
-1.58022694914263818E-006
-3.05174433867506328E-006
-4.52955368637457124E-006
-5.70158821635011704E-006
-6.70075506307938182E-006
-7.71372170159645116E-006
-8.32876659783153695E-006
-8.65734723576483902E-006
-8.48597368262170670E-007
-2.28120728666105694E-006
-3.81654889245630651E-006
-5.14465071532359973E-006
-6.18709254452092831E-006
...
any ideas?
Re: How to create restart files
ok, i uploaded the sif file and the Gmsh-file. You can try it yourself and tell me then.
regards rn
regards rn
- Attachments
-
- Balken_neu_5.msh
- (28.59 KiB) Downloaded 432 times
-
- case.sif
- (2.37 KiB) Downloaded 448 times
Re: How to create restart files
hello,
i have experienced some difficulties with restart as well, but it still remains unresolved.
see the old elmer forum https://postit.csc.fi/sympa/arc/elmerdi ... 00000.html
regards, Martina.
i have experienced some difficulties with restart as well, but it still remains unresolved.
see the old elmer forum https://postit.csc.fi/sympa/arc/elmerdi ... 00000.html
regards, Martina.
Re: How to create restart files
hello,
i've thought about that problem and maybe i've a solution. Is it possible that the velocity of the structure is forgotten in the restart?
How can i write the velocity in the result file as variable? Maybe then it will compute the right values?
regars rn
i've thought about that problem and maybe i've a solution. Is it possible that the velocity of the structure is forgotten in the restart?
How can i write the velocity in the result file as variable? Maybe then it will compute the right values?
regars rn
Re: How to create restart files
to write out the velocity look at this thread "velocity of nodes in the linear elasticity".
now i will try the restart with this information, if i have time.
regrads rn
now i will try the restart with this information, if i have time.
regrads rn
Re: How to create restart files
If anyone here is trying to use restart files, I couldn't get it working for elasticity either. However I noticed in the elmer models manual a possible alternative called "reloaddata" on page 160. It says:
I might try it some time if I can get it working.This module offers extended features compared to the Restart File option in the Simulation
section. The module reads a new solution step from the solution file on each timestep, whereas the restart
file option reads only the initial state for a simulation
Re: How to create restart files
Hello,
I think that for second order problems, like the Linear Elasticity problem, the displacement and the velocity are necessary to continue from existing solution. Thus the vector of velocity has to be written in the Restart File, i.e. one should use "Calculate Velocity = Logical True" in the solver section.
Still there is a problem, that I do not obtain exactly the same solution and there should be a way to do it. I mean that I start the transient response and I save it using Output File = "case.dat". Than I start it, let say from Restart Position = 3. So the first solution has to be equal to the solution saved on position 4, but it is not. Maybe I miss something small. Here is the sif file. Can someone help me?
The problem which I solve is the transient response of a clamped-free beam excited by a periodic force on the free end.
Regards,
Stan
I think that for second order problems, like the Linear Elasticity problem, the displacement and the velocity are necessary to continue from existing solution. Thus the vector of velocity has to be written in the Restart File, i.e. one should use "Calculate Velocity = Logical True" in the solver section.
Still there is a problem, that I do not obtain exactly the same solution and there should be a way to do it. I mean that I start the transient response and I save it using Output File = "case.dat". Than I start it, let say from Restart Position = 3. So the first solution has to be equal to the solution saved on position 4, but it is not. Maybe I miss something small. Here is the sif file. Can someone help me?
The problem which I solve is the transient response of a clamped-free beam excited by a periodic force on the free end.
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Timestep intervals = 10
Timestep Sizes = 0.001
Solver Input File = case.sif
Post File = case.ep
Output File = "case.dat"
! Restart File = "case.dat"
! Restart Position = 3
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End
Solver 1
Equation = Linear elasticity
Variable = -dofs 3 Displacement
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-8
Linear System Solver = Direct
Linear System Direct Method = Umfpack
Linear System Convergence Tolerance = 1.0e-8
Time Derivative Order = 2
Calculate Velocity = Logical True
End
Equation 1
Name = "eqs"
Calculate Stresses = True
Active Solvers(1) = 1
End
Material 1
Name = "alm"
Density = 2778
Poisson ratio = 0.34
Youngs modulus = 7e10
End
Boundary Condition 1
Target Boundaries(1) = 2
Name = "mass"
Force 3 = Variable time
Real MATC "-1.25e5*cos(30.0*tx)"
End
Boundary Condition 2
Target Boundaries(1) = 4
Name = "wall"
Displacement 3 = 0
Displacement 2 = 0
Displacement 1 = 0
End
Stan