CliMA / Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
https://clima.github.io/OceananigansDocumentation/stable
MIT License
1k stars 196 forks source link

Evaluating suitability for fish larvae simulation #1438

Closed maeckha closed 3 years ago

maeckha commented 3 years ago

For a thesis project about the migration and dispersal of fish larvae in the sea I am looking for CFD tools that allow a newcomer in this field (like myself) the simulation of agent based models (each agent represents a fish) in laminar flows and later in more realistic turbulences. I chose the following steps as milestones:

I am planning to keep this in 2D since doing it in 3D would probably be to difficult given the limited time (3 months). I will not try to simulate the exact ocean currents or the bottom of the ocean.

Are you capable of assessing the suitability of Oceananigans for those steps? Is it possible to deliver those steps?

For the Agent based modelling I will be working with the Agents.jl package probably, since it seems well documented. Since I have found Oceananigans, which is also a CFD tool, I was wondering what you think the differences are between that and WaterLily.jl? Given my description of the project above, would you tend to use either of them? Thank you!

ali-ramadhan commented 3 years ago

Hi @maeckha! Glad you're considering Oceananigans.jl.

I think you have a pretty good plan in place and it seems quite doable within 3 months I believe. I guess you're trying to couple an agent-based larvae model to an ocean model?

Oceananigans.jl should have the features you need I think: mainly Lagrangian particle tracking to advect the larvae around and arbitrary forced passive tracers for the odor from the reef?

I've actually been meaning to set up an example of an agent-based model coupled to Oceananigans.jl (simulating interacting "microbes" in the ocean). It's not fully complete yet but might give you some ideas of how to use Lagrangian particles as agents: https://github.com/CliMA/Oceananigans.jl/pull/1244

If that works, I will implement a continuity equation to simulate the odor which comes from the reef and which is supposed to help the larvae to find back to the home reef.

What is the continuity equation for the odor? It should be easy to advect the odor around as a passive tracer but just curious what the equation looks like.

Since I have found Oceananigans, which is also a CFD tool, I was wondering what you think the differences are between that and WaterLily.jl? Given my description of the project above, would you tend to use either of them?

I'm not super familiar with WaterLily.jl but it's definitely a very nice package (and a great README)!

I think WaterLily.jl has a more mature immersed boundary implementation if you need to have complex boundaries and is auto-diff friendly if you need to do some optimization/inference. @weymouth might be able to elaborate!

Oceananigans.jl has native support for Lagrangian particle tracking and might have more mature diagnostics (e.g. if you need to compute vorticity or other statistics) and more mature output writers (among other quality of life features). The examples in the docs should give a pretty good of the current set of mature features. E.g. this example shows how to add in a passive tracer for plankton and evolve it according to some (continuity?) equation: https://clima.github.io/OceananigansDocumentation/stable/generated/convecting_plankton/