Page 1 of 1

bug in InitFDTD 'MaxTime'

Posted: Fri 31 Jan 2020, 04:01
by Hale_812
I use
FDTD = InitFDTD('CoordSystem', 1,'MultiGrid',conf.r/2, 'MaxTime', (60*60*10));
for calculating during 10 hours, each made up of 60 minutes, each made up of 60 seconds.
However, the simulation does not stop after 15+ hours.

In the help it is written that 'MaxTime' is a "real" time of simulation....

is it a simulation model synthetic time after all? or time counter just fails?

Re: bug in InitFDTD 'MaxTime'

Posted: Fri 31 Jan 2020, 08:45
by thorsten
Well maybe the wording is misleading. Meant is only the FDTD time but in seconds. Thus your 10 hours would most likely run longer than the universe is old :D

If you want to stop at some point, just create the (empty) file "ABORT" in the sim folder and openEMS will stop normally on the next check...


Re: bug in InitFDTD 'MaxTime'

Posted: Mon 03 Feb 2020, 02:19
by Hale_812

really, that should be long. can I ask for additional stop condition in future version if you plan do publish such? Since the real time monitor is already implemented it looks like a natural feature.

Re: bug in InitFDTD 'MaxTime'

Posted: Fri 07 Feb 2020, 08:39
by Hale_812
No, Thorsten, it does not work. Not always. And I don't know why.
I set the stoptime at 1e-7 and see how it runs beyond 1.5e-7.

Sometimes it stops, sometimes not.

WHy do I do this? I excite a resonator with feeding strips and lumped port, a port load is at the other side.
It is inside MUR box. T\When the excitation ends, the field can decay to -45 dB, or maybe -30 dB, then slowly go up and up, probably due to numeric error accumulation. It happens quite often if ports are not terminated with PEC, and I have ports floating in the air (the feed is not rectangular)...

Re: bug in InitFDTD 'MaxTime'

Posted: Sun 09 Feb 2020, 16:20
by thorsten
Hmm, what does the log say. It should be saying at the beginning to how many timestep the simulation was set if you request a max time.

Re: bug in InitFDTD 'MaxTime'

Posted: Mon 10 Feb 2020, 05:04
by Hale_812
it is crazy large. looks like a precision problem when timesteps are very small.
timestep is 4.28692e-013
stoptime is 1e-7
there should be only 233267 timesteps, but I already got 789965 steps today.

is something wrong here?

Code: Select all

FDTD = InitFDTD('CoordSystem', 0, 'MaxTime', stoptime); %