02.09.15 trying to get back into it... - daplff/hiWi_cont GitHub Wiki
So what's new
Done some more code research on how particle numbers are increased/decreased: appears to be no problem at all with inserting new particles, just as long as they have all data associated with them. Have found two routines that change number of particles:
-
recount: simply recount (every 100ts) which particles are still flagged as inside the domain. Shift them to lie contigously in variable arrays, decrease np (num of particles) to this.
-
check_limits: check if particle is outside domain; in that case, flag and set to trash values for pos. etc. Check if open boundary condition particles (and maybe virtual particles??) are inside domain; in that case, copy them into last spot in positions etc. arrays for particles, and increase np by one. simple as pie. Therefore, adding a particle should be that simple.
-
Running the different test scenarios: wokrs fine, get slightly different results from the two different versions though - slightly disturbing. Let's worry about that later though...
-
Fun fact: ran the basin scenario (Case1) and expected the water to stop wobbling at some point. It didn't. Hmm...