If I set
Timestep Size = Variable deltaT
Real MATC "tx(0)"
in the Simulation section of the .sif, ElmerSolver immediately gives a segmentation fault. A printout of dt from the first solver called (say MySolver) shows that dt is 0, where dt is a parameter in SUBROUTINE MySolver( Model,Solver,dt,TransientSimulation )
So it looks likes it is impossible to initialize the timestep size to a positive value from variable deltaT since ElmerSolver seems to read this variable before we have a chance to assign a value to it. Kind of a chicken or the egg comes first problem.
Have a nice weekend everybody
unitialized time step size
Re: unitialized time step size
Correction: The error is not segmentation fault but
ERROR:: ExecSimulation: Timestep smaller than epsilon: 0.000E+00
STOP 1
Sorry about that. But the problem remains the same and could be solved by replacing Real MATC "tx(0)" with for example
Real MATC "tx(0)+1"
in which case the printed dt would be 1 but that would entail subtracting 1 from the function that computes deltaT in the fortran code. So that is a potential solution but it is not very elegant. Any thoughts on the matter?
ERROR:: ExecSimulation: Timestep smaller than epsilon: 0.000E+00
STOP 1
Sorry about that. But the problem remains the same and could be solved by replacing Real MATC "tx(0)" with for example
Real MATC "tx(0)+1"
in which case the printed dt would be 1 but that would entail subtracting 1 from the function that computes deltaT in the fortran code. So that is a potential solution but it is not very elegant. Any thoughts on the matter?
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: unitialized time step size
Hi
Why can you not initialize the "deltaT" in "initial condition" section?
Sometimes the timestep size may be difficult to set if it depends on the time itself. So if we have a function
dt_i=f(t_i)=f(t_{i-1}+dt_i)
Usually this would be rather smooth function and solvable with fixed point iteration. For this purpose there is a keyword in the simulation section that allows this kind of iteration, set
and the function can be dependent on time.
-Peter
Why can you not initialize the "deltaT" in "initial condition" section?
Sometimes the timestep size may be difficult to set if it depends on the time itself. So if we have a function
dt_i=f(t_i)=f(t_{i-1}+dt_i)
Usually this would be rather smooth function and solvable with fixed point iteration. For this purpose there is a keyword in the simulation section that allows this kind of iteration, set
Code: Select all
Timestep Size Iterations = Integer 10
-Peter
Re: unitialized time step size
I thought initial and boundary conditions were meant to be used for field variables only. Following your suggestion, I initialized deltaT in the initial condition section and the code now works just fine.
Great thanks,
Marc
Great thanks,
Marc