bug in InitFDTD 'MaxTime'

Give some feedback on openEMS.

Moderators: thorsten, sebastian

Post Reply
Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

bug in InitFDTD 'MaxTime'

Post by Hale_812 » Fri 31 Jan 2020, 04:01

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?

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: bug in InitFDTD 'MaxTime'

Post by thorsten » Fri 31 Jan 2020, 08:45

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...

regards
Thorsten

Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

Re: bug in InitFDTD 'MaxTime'

Post by Hale_812 » Mon 03 Feb 2020, 02:19

:)

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.

Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

Re: bug in InitFDTD 'MaxTime'

Post by Hale_812 » Fri 07 Feb 2020, 08:39

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)...

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: bug in InitFDTD 'MaxTime'

Post by thorsten » Sun 09 Feb 2020, 16:20

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.

Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

Re: bug in InitFDTD 'MaxTime'

Post by Hale_812 » Mon 10 Feb 2020, 05:04

1000000000
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

stoptime=1e-7;
FDTD = InitFDTD('CoordSystem', 0, 'MaxTime', stoptime); % 

Post Reply