Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timestep_over_CFL leads to an index error #727

Open
OwenSlevert opened this issue Jun 13, 2024 · 4 comments
Open

timestep_over_CFL leads to an index error #727

OwenSlevert opened this issue Jun 13, 2024 · 4 comments
Labels

Comments

@OwenSlevert
Copy link

Description

Hello,

when using timestep_over_CFL I get following error:

" On rank 0 [Python] Exception: simulation_time and number_of_timesteps are not defined"

When using timesteps, it works without problems. I added a shortened namelist where the error occured (it is a txt file so that I can send it here).

Thanks!

Steps to reproduce the problem

Ocured when running smilei_test

Parameters

  • Smilei version: 5.0
  • Input file: attatched
  • Commands or script used to run the faulty simulation ?
  • Computing resources
    • type of computer: cluster
    • OS
    • C++ compiler: 8.5.0
    • MPI version: 4.1.6
    • HDF5 version: 1.14.0
    • Python version: 3.10.10
    • ...

namelist_short.txt

@Z10Frank
Copy link
Contributor

Z10Frank commented Jun 14, 2024

Can you try to specify in the Main block:

grid_length = ...
cell_length = ...

or

number_of_cells = ...
cell_length = ...

?

I am not sure that specifying a combination of number_of_cells and grid_length is working properly, in case this can be fixed.

@OwenSlevert
Copy link
Author

Yes, I changed it to

dx = 59.71um /1408
dr = 22.54
um /532

Main(
geometry = "AMcylindrical",
interpolation_order = 2,
number_of_AM = 1,
#number_of_cells = [1408, 532],
grid_length = [59.71um, 22.54um],
cell_length = [dx, dr],
simulation_time = 1000,
timestep_over_CFL = 0.8,
#timestep = dt,
number_of_patches = patches,
EM_boundary_conditions = [["silver-muller"],["PML"],],
number_of_pml_cells = [[0,0],[20,20]],
solve_poisson = False,
print_every = 11,
use_BTIS3_interpolation = use_BTIS3_interpolation,
reference_angular_frequency_SI = omega0,
)

It does not crash anymore, but gives several warnings:
WARNING src/Params/Params.cpp:629 (Params) CFL problem: timestep=0.266455 should be smaller than 0.235406
[...]
WARNING src/Params/Params.cpp:1139 (compute) simulation_time has been redefined from 1000.000000 to 999.740105 to match timestep.

It also says that timestep = 0.266455 = 1.131895 x CFL albeit defining it differently. Thats why I am confused that it does have problems with the given CFL number.

@Z10Frank
Copy link
Contributor

But by doing this, does the simulation work with stable fields?
I mean your not reduced simulation.

@OwenSlevert
Copy link
Author

OwenSlevert commented Jun 14, 2024

When setting the CFL condition to 0.5 it works, yes. But at 0.8 it crashes.

Edit: I get the same warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants