Closed AndresSepulveda closed 1 year ago
Hi,
Presently, the sign is not changed for the settling velocity. I believe a consideration for negative time step (as for advection) could be quite easily implemented. I can do that soon, if you find it worth to have?
For objects/elements with constant terminal velocity, the change could also be changed by the user at seed time. See e.g. this example: https://opendrift.github.io/gallery/example_vertical_mixing.html
Hi Knut,
Yes, it would be great if you implement that. We would be using it.
Hi,
I did not check this before, but it actually turns out that the correct sign is applied also to buoyancy, through the internal multiplication of settling/rising speed with self.time_step.total_seconds()
You can test with this minimalistic example:
from datetime import datetime, timedelta
from opendrift.models.oceandrift import OceanDrift
o = OceanDrift(loglevel=50)
o.seed_elements(lon=3, lat=60, time=datetime.now(), z=-100, terminal_velocity=.01)
o.run(duration=timedelta(hours=3), time_step=600)
o.plot_property('z')
Here the particle with positive buoyancy (1 cm/s) rises from -100m to the surface within the 3 hours. If you change timestep in second last line to -600 (i.e. backwards simulation), it will instead sink to -200m So everything seems as it should be.
You can close this issue if you agree.
Very cool, thanks.
Hi,
Can the backwards trajectory be applied to a particle (e.g. larvae) with a given buoyancy or settling velocity?
I understand that u, v, and w are considered in a "backward" way, but does the settling velocity changes sign?