Closed huangynj closed 3 months ago
Hello,
Yes, from what I understand the coalescence process results in removing super-droplets. It was not considered in this example because it concerned only condensation.
The code works when I change the _save
function in simulation.py. Instead of
for drop_id in range(self.particulator.n_sd):
attr[drop_id].append(attr_data[drop_id])
I wrote
for drop_id in range(self.particulator.n_sd):
if drop_id < len(attr_data):
attr[drop_id].append(attr_data[drop_id])
else:
attr[drop_id].append(np.nan)
Then the length of attributes remains the same, but attributes of the "missing" super-droplets are np.nan
. Maybe there is a more elegant way to do it. I'm not sure if it is possible to have a unique drop_id for each super-droplet, perhaps @slayoo can answer this.
Thank you @AgnieszkaMakulska ! Upon coalescence or breakup, in a way the super-droplets inherently loose their "identity", and we do not have (yet) any drop-labeling attribute.
Sorting by one of the attributes before plotting could be a way to identify where, in a given attribute dimension, super-droplet are removed from the system?
@huangynj, please confirm if that helps in your case, so we can add it to the main
branch (and add a test with your sample code). Thanks
@AgnieszkaMakulska @slayoo yes, filling in with np.nan
can temporarily solve the issue. Thanks!
Stale issue message
Let me close this one as addressed. Thanks @huangynj for reporting, thanks @AgnieszkaMakulska for help!
Hello,
I tested the example
Grabowski_and_Pawlowska_2023
, but encountered the following issue.In the
setting.py
, I changedisplacement: float = 1000 * si.m
todisplacement: float = 2000 * si.m
In the
simulation.py
, I addbuilder.add_dynamic(Coalescence(collision_kernel=Golovin(b=1.5e3 / si.second), adaptive=False))
Then run the initial part of
figure_1.ipynb
:However, I encountered the following error.
Does it mean the coalescence process results in removing super-droplets? So that the total size of super-droplets reduces from 200 to 199? If yes, how to know which super-droplet was removed? Is there unique drop_id for each super-droplet?
Thanks,
Yongjie