Extracting values of fields used for flux boundary conditions at an immersed boundary #4984
Replies: 1 comment 1 reply
-
|
This looks like a cool problem! I am not sure I completely understand the question so I will provide a cloud of information first and hopefully some of it is useful:
Next, I think you are saying that you would like to evaluate a field on the boundary, is that correct? You can save the entire 3D field for this. If you are using a 2D bathymetry representation, then we should also be able to build a diagnostic that outputs a field on the cells that lie just above the immersed boundary. Unfortunately we don't have that yet but I think it is good to add. I think we need to take into account the staggered grid to understand what you are trying to output. Converting your boundary conditions to the discrete form will help. The continuous form boundary conditions do interpolation under the hood. This last point does give me an idea, that one way to recover the field involved in your boundary condition would be to produce a similar function to the one you are using, and then plug this into the same machinery that is used for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to adapt functions I already have for calculating flux boundary conditions at an ice base to be able to output and inspect intermediate values which are used to calculate the fluxes.
I have a module with the rough structure below which creates functions FluxModel and FluxModelBoundaryConditions. I've removed some of the details for clarity.
These functions are then used to construct the boundary conditions for my model:
This has been working well and allows me to prescribe dynamic boundary conditions for ice melt at an immersed boundary (at the top of my domain). However, I would like to inspect intermediate values used in calculating the fluxes such as the tracers and velocities in the boundary-adjacent grid cells and functions of these such as freezing point and melt rate.
I have tried calculating these after the fact and extracting the boundary-adjacent values of the fields using a version of BottomCellValue (from Oceanostics) which works for an immersed boundary at the top of the domain, but am finding some inconsistencies and so would like to make sure I am getting the exact values which are actually being used in the flux calculation for my boundary conditions.
I would like to
(a) extract the values of the fields being used for the boundary condition at the immersed boundary and intermediate functions of them that are part of my flux calculations
(b) save these as fields so I can plot them later.
I should possibly say that I need this is be able to run on GPU.
Any guidance on how to adapt my code would be much appreciated. If it is not possible to do this together with making the boundary conditions, then I'd welcome any ideas on how to be as consistent as possible after the fact. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions