Comments (6)
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.
from pysdm.
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?
from pysdm.
@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
from pysdm.
@AgnieszkaMakulska @slayoo yes, filling in with np.nan
can temporarily solve the issue. Thanks!
from pysdm.
Stale issue message
from pysdm.
Let me close this one as addressed. Thanks @huangynj for reporting, thanks @AgnieszkaMakulska for help!
from pysdm.
Related Issues (20)
- add pressure, temperature terminal velocity HOT 1
- cpp2python: support for np.where -> ?: translation (see, e.g., Pruppacher & Rasmussen ventilation)
- numba backend dissolution() method has a `prange` call outside of JIT-decorated block
- make codecov report line missing coverage in the diffs
- make dimensionality know to backends at instantiation
- mark all derived constants with a '_' prefix? HOT 1
- docs: add an "index" so that we could navigate to all mentions of, sat, Reynolds number from one place
- Eulerian Advection Solver HOT 1
- rephrase `NumberSizeSpectrum` docstring (or better remove the class entirely in favour of `ParticleSizeSpectrumPerVolume`?)
- Time-dependent super-droplet sampling and modification HOT 13
- Random seeding HOT 1
- Particle size spectrum per volume is dependent on volume size? HOT 8
- fix compatibility with NumPy 2.0.0 (dependes on a fix in `python-quantities` package) HOT 1
- STP concentrations in products are calculated as "conc/rhod*rho_STP", but should it be "/rho" instead of "/rhod"? HOT 1
- wet radius initialisation (with examples from 1D kinematic example) HOT 3
- new example comparing PySDM ABIFM immersion freezing with ethz-snow?
- make `output_attributes` user-defined, not hardcoded, empty by default (?) in 1D kinematic simulations
- new example/test comparing with McSnow (freshly open sourced: https://gitlab.dkrz.de/mcsnow/mcsnow)
- make backend.formulae read-only property, and add @strict to backend classes so that `backend.typo = ...` triggers an error HOT 1
- dummy attributes take up space in VTK attribute output despite conveying no information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysdm.