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
985 stars 193 forks source link

Is any way to simulate the hydrodynamic behaviour of a bioreactor with Oceananigans.jl? #830

Closed PharmCat closed 4 years ago

PharmCat commented 4 years ago

Is it possible to use Oceananigans.jl with rotating/mooving mesheses?

ali-ramadhan commented 4 years ago

Hi @PharmCat that would be a really interesting application. Are you thinking of a moving mesh where the grid changes with time or are you thinking of a moving boundary?

If it's a moving boundary then I think it's possible to simulate with the current version of Oceananigans.

Support for topography/boundaries is not official as there is no API to specify topography but we've been using the forcing functions API to implement a continuous forcing immersed boundary method to add topography. Basically you strongly relax the velocity to zero inside the topography.

For an example, this PR adds an example/test for viscous flow around a cylinder: https://github.com/CliMA/Oceananigans.jl/pull/693

These are the pertinent lines (PR needs updating a bit as API has changed, improved we think): https://github.com/CliMA/Oceananigans.jl/pull/693/files#diff-7331d4b1c4f866ed7dfe0952578bf1cfR18-R27

I think if you can define a boundary(x, y, z, t) function that returns 1.0 inside the boundary and 0.0 outside the boundary then we can use a very similar script to simulate a moving boundary.

Let us know if you're interested in trying it out and we would be more than happy to help out with setting up the script.

glwagner commented 4 years ago

@PharmCat what is a bioreactor? If you describe what you're trying to do in a bit more detail, we might be able to provide more specific advice.

PharmCat commented 4 years ago

@PharmCat what is a bioreactor? If you describe what you're trying to do in a bit more detail, we might be able to provide more specific advice.

I can link video with simulation: video1 or video2

So if I make model of tank and impeller can I use Oceananigans.jl for hydrodynamic simulation? this is my main question.

@ali-ramadhan

Are you thinking of a moving mesh where the grid changes with time or are you thinking of a moving boundary?

I just start to learn Oceananigans.jl and now i can't say this. Is it possible to use boundary for simulation mooving of rigid body in water?

ali-ramadhan commented 4 years ago

Thanks for the videos @PharmCat, those simulations look pretty cool!

So if I make model of tank and impeller can I use Oceananigans.jl for hydrodynamic simulation? this is my main question.

Yes I think it is possible to simulate mixing tanks in Oceananigans, but I don't know if the simulations will be good. Oceananigans development has not focused on moving boundaries or rigid bodies. I suspect codes like ANSYS Fluent or OpenFOAM would be better for your problem, but I'm not familiar with them.

Some of the impellers look pretty small so if you want to use an immersed boundary method to simulate the rigid body and walls, then you might need high resolutions with many grid points to resolve the impeller. Depending on how fast the impeller spins then your time step might need to be very small.

Also, I don't know how accurate the immersed boundary method is with moving rigid bodies. You might need even smaller time steps to get good accuracy.

I just start to learn Oceananigans.jl and now i can't say this. Is it possible to use boundary for simulation mooving of rigid body in water?

From the videos I think you just want a moving boundary that describes a rotating rigid body. I think this is possible with Oceananigans but nobody has tried it.

If you're interested in trying to simulate a mixing tank with Oceananigans that would be pretty cool! Please let us know if you have any questions (also feel free to open new issues) and if you post your script here we can help with debugging.

PharmCat commented 4 years ago

If you're interested in trying to simulate a mixing tank with Oceananigans that would be pretty cool! Please let us know if you have any questions (also feel free to open new issues) and if you post your script here we can help with debugging.

@ali-ramadhan Thanks! I'l try to do something simillar :)

ali-ramadhan commented 4 years ago

@PharmCat Closing this issue for now but please reopen if you have any questions.