Boundary condition as a function of eddy viscosity #3098
Replies: 3 comments 5 replies
-
Unfortunately this is not super simple to achieve at the moment. The simplest thing to do is to create a new field auxiliary_νₑ = CenterField(grid) and use this field in the boundary condition (either through a parameter or referencing it as a global variable). Then, add a callback to your simulation that copies the eddy diffusivity into your auxiliary field during function copy_eddy_diffusivity!(sim)
model = sim.model
diffusivity_fields = model.diffusivity_fields
parent(auxiliary_νₑ) .= parent(diffusivity_fields.νₑ)
return nothing
end
using Oceananigans: UpdateStateCallsite
simulation.callbacks[:copy_eddy_diffusivity] = Callback(copy_eddy_diffusivity!, callsite=UpdateStateCallsite()) It might be worthwhile to brainstorm ways to streamline this. Finally, you will have to use the |
Beta Was this translation helpful? Give feedback.
-
This issue inspired me to open an issue for a utility that might make implementing models like this a little easier: #3099 Note the solution on #3099 still requires |
Beta Was this translation helpful? Give feedback.
-
What is the physical motivation for using the eddy viscosity in the boundary condition here? I have seen some work in engineering contexts that leverages the LES viscosity (as well as additional information) to compute things like the wall stress. However, I don't think such wall models are commonly used. Certainly in oceanography, simpler wall models that depend (for example) on the wind stress / friction velocity are more prevalent? Or perhaps not! One clear issue is that any LES viscosity is a little dubious near the ocean surface --- SmagorinskyLilly more so than most. The engineering applications I mentioned above are modeling fluxes in and out of solid boundaries, not wavy free surfaces with wave breaking, etc. I'm curious, because I want to assess how important it is to support behavior like this... @seamanticscience might be interested in this discussion too, since it seems to involve biogeochemistry! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I would like to implement a boundary condition which is a function of the eddy viscosity. From the documentation, I know that model.diffusivity_fields.νₑ is calculated but I don't understand how to pass it into the boundary condition function. I have the following function and model:
I have tried several methods but they all give me errors. Is νₑ already a field that I can just pass in or do I have to compute/define it?
Beta Was this translation helpful? Give feedback.
All reactions