Hello. I face the strange problem with particle statistics. The case is a simple gas duct with inlet, common outlet and particle outlet. Unless there is no particle statistics collected all things are fine. Gas phase calculation is OK, particles are released and fill the domain, I can visualise them with Paraview (PARTICLES.case). But when I enable particle statistics calculation crashes instantly at first iteration with incorrect memory access in lagrangian statistics subroutine.
I investigated with different options and versions. I traced down the problem but it seems like it's a bug, not case options.
The problem appears when you have particle statistics and space-variable time step both enabled. In this case Saturne cannot calculate particle statistics properly. I can use constant timestep for particles but it's very very slow (AFAIR, with larger constant timesteps there are too many lost particles). Would you, please, enable statistics with space-variable timestep for particles?
Particle statistics crash
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Particle statistics crash
- Attachments
-
- Test.xml
- Case file
- (15.04 KiB) Downloaded 11 times
-
- Posts: 4269
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Particle statistics crash
Hello,
Which version are you using ? I tried on a different case in v9.0 and it works fine.
Though beware, in the Lagrangien model, the space-varying time step only seems to apply to the carrier flow and statistics, but the Lagrangien tracking and integration of SDE's use the reference time step. I do not know whether adapting the algorithm to a local time step in a naive manner would make sense (and the discrepancy between the statistics and tracking logic seems to beva bug, though I need to check with a specialist).
Regards,
Yvan
Which version are you using ? I tried on a different case in v9.0 and it works fine.
Though beware, in the Lagrangien model, the space-varying time step only seems to apply to the carrier flow and statistics, but the Lagrangien tracking and integration of SDE's use the reference time step. I do not know whether adapting the algorithm to a local time step in a naive manner would make sense (and the discrepancy between the statistics and tracking logic seems to beva bug, though I need to check with a specialist).
Regards,
Yvan
Re: Particle statistics crash
Thanks for the fast reply!
I attached the listing but it have not uploaded for some reason.
Saturne vesrions tested: 8.0.4, 8.3.0, 8.3.2.
MPI: 1.8.4 (my stable favorite)
CentOS: 7.5
Particles are 7-fraction ash (3.5...175 mkm). Average gas velocity is roughly at level 15 m/s.
I made special tests for the time scheme dependence. Constant and reference adaptive steps was 0.001 s. After 150 iterations on frozen carrier flow penetration difference is very large. With constant time step, particles are only near the inlets. With steady adaptive step (stats off) they penetrate order-of-magnitude deeper in the domain, but there is no statistics.
Workaround for this case (simple duct) is a constant time step of 0.01s. No lost particles. Not sure the balance will be OK on more complex cases like cyclones. Also, it only will work with frozen flow. If you relrease particles on every flow iteration, steady calculation will not run in realistic conditions because the only way is a local timestep (constant one requires unrealistic time).
Please note that the bug only appears with steady mode and "Steady (local time step)" option. Seems like it's not intended to run with particles on, but it will be nice if you will enable statistics for such case.
I attached the listing but it have not uploaded for some reason.
Saturne vesrions tested: 8.0.4, 8.3.0, 8.3.2.
MPI: 1.8.4 (my stable favorite)
CentOS: 7.5
Particles are 7-fraction ash (3.5...175 mkm). Average gas velocity is roughly at level 15 m/s.
I made special tests for the time scheme dependence. Constant and reference adaptive steps was 0.001 s. After 150 iterations on frozen carrier flow penetration difference is very large. With constant time step, particles are only near the inlets. With steady adaptive step (stats off) they penetrate order-of-magnitude deeper in the domain, but there is no statistics.
Workaround for this case (simple duct) is a constant time step of 0.01s. No lost particles. Not sure the balance will be OK on more complex cases like cyclones. Also, it only will work with frozen flow. If you relrease particles on every flow iteration, steady calculation will not run in realistic conditions because the only way is a local timestep (constant one requires unrealistic time).
Please note that the bug only appears with steady mode and "Steady (local time step)" option. Seems like it's not intended to run with particles on, but it will be nice if you will enable statistics for such case.
-
- Posts: 4269
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Particle statistics crash
Hello,
I checked very briefly with Martin, and it seems using a local tile step for the tracking and SDE integration should be possible (though a bit of extra validation when we do enable that would be strongly recommended).
So we'll keep that in mind, but i can't give you an exact timeline for when we do that, at least with the current team, where all the main developers have a pretty full schedule and deadlines to meet. Opening an issue on GitHub to remind us about this and keep track of progress is a good idea though, and I hope we can look into this in a few weeks.
And I'll take a second look at the code in the next few days, because if your tests on a frozen carrrier flow are based on the same checkpoint, it means that the Lagrangian model might actually use the local time step, at least for some operations, for otherwise you would probably have the same penetration.
Best regards,
Yvan
I checked very briefly with Martin, and it seems using a local tile step for the tracking and SDE integration should be possible (though a bit of extra validation when we do enable that would be strongly recommended).
So we'll keep that in mind, but i can't give you an exact timeline for when we do that, at least with the current team, where all the main developers have a pretty full schedule and deadlines to meet. Opening an issue on GitHub to remind us about this and keep track of progress is a good idea though, and I hope we can look into this in a few weeks.
And I'll take a second look at the code in the next few days, because if your tests on a frozen carrrier flow are based on the same checkpoint, it means that the Lagrangian model might actually use the local time step, at least for some operations, for otherwise you would probably have the same penetration.
Best regards,
Yvan
Re: Particle statistics crash
OK, thanks for your attention. I created the issue on GitHub.
https://github.com/code-saturne/code_saturne/issues/152
https://github.com/code-saturne/code_saturne/issues/152