-
Notifications
You must be signed in to change notification settings - Fork 7
Omega V1 Governing Equations Design Document #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Omega V1 Governing Equations Design Document #223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, mostly about generalizing the gravitational potential and adding it a few places I think it's missing.
Also, a request to remove the commented-out text to make review easier.
0b73688
to
e70db7a
Compare
c15da50
to
e3573b8
Compare
I have added substantial updates based on feedback and conversations this past week. In particular, the document now uses layer mass-thickness |
6d6a68d
to
f4f7b14
Compare
2c7b073
to
6292d53
Compare
6292d53
to
c5aa14b
Compare
+ \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) | ||
= - \nabla_{3D} p | ||
+ \rho {\bf D}^u + \rho {\bf F}^u | ||
$$ (continuous-momentum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the buoyancy term is missing here rho g khat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first equation set is the most general, so gravity would be within
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sorry, totally missed that. Thanks for the explanation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that one could include gravity in
All, I've made a pretty substantive change in the subgrid scale parameterization section that addresses how to do vertical derivatives in a finite volume framework and recasting the temperature vertical diffusion discussion to be in line with the tri-diagonal solve. The main big question in my mind is to double/triple check the pressure gradient derivation as it is the main difference between this doc and MPAS-Ocean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get a chance to do a last read-through today as I had hoped. But I'm happy to approve things based on the hard work of @mark-petersen, @vanroekel, @sbrus89, @katsmith133, @cbegeman, @alicebarthel and others, and my glancing at things on Wednesday (the pressure-gradient terms in particular).
\frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}. | ||
$$ (def-layer-average) | ||
|
||
Rearranging, is it useful to note that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rearranging, is it useful to note that | |
Rearranging, it is useful to note that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of my comments are to fix typos, broken links, and formatting. The only major thing is that I was not able to follow the Vertical Tracer Diffusion section. I followed the vertical derivatives part and the Vertical Momentum Dissipation section just fine, but then was confused on how and why things were different in the Vertical Tracer Diffusion section. It was a bit confusing and lacked some explanations. Otherwise, I think the rest read and flowed well.
While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). | ||
|
||
#### Vertical tracer diffusion | ||
The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. In an equation for $\tilde{h}_k \varphi$, this term is different than in the velocity equation for vertical turbulent diffusion. In Omega, we will follow the same approach as in MPAS-Ocean and solve the tracer diffusion after the main tracer update. Roughly Omega will compute a temporarily updated tracer as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In an equation for
I think we should explain why its different and we don't just treat it the same way.
$$ | ||
\varphi^{new} = \tilde{h}_k^{old} \varphi^{old} + dt \frac{Adv + Hdiff}{\tilde{h}_k^{new}}. | ||
$$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define the Adv and Hdiff terms?
|
||
While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). | ||
|
||
#### Vertical tracer diffusion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section in general is a bit confusing and could benefit from some rewriting or more explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have a few minor comments. The document was generally easy to follow. I agree with @katsmith133 that the vertical tracer diffusion section could be clarified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to improve the vertical tracer diffusion section. @vanroekel, please review this first and feel free to revise.
Co-authored-by: Hyun (Hyun-Gyu) Kang <[email protected]>
I've made a few updates to W_tr to try be a bit more clear. Since perlmutter is down the docs are here - but all my changes are pushed to this PR. |
I can definitely fix the negative, that's easy and correct to do. I'm not sure I like the alternative proposed. I think this form is physical, just the layer integrated pressure gradient. I'd agree it looks different than most expect, but I think it's physically correct. I don't have a super strong feeling about the alternate form. I can see how that would be cleaner to understand for people. |
If you write |
that is very interesting. if we use (20) can we write the first term (alpha p \grad h) as
? |
|
||
The momentum equation is an expression of Newton's second law and includes two types of external forces. | ||
The first is the body force, represented here as ${\bf b}({\bf x}, t)$, which encompasses any volumetric force acting throughout the fluid, such as gravitational acceleration or the Coriolis force. In some contexts, body forces may be expressible as the gradient of a potential, ${\bf b} = -\nabla_{3D} \Phi$, but this is not assumed in general. | ||
The second is the surface force ${\bf f}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second is the surface force ${\bf f}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. | |
The second is the surface force ${\bf \tau}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. |
p(x,y,z,t) = p^{\text{surf}}(x,y,t) + \int_{z}^{z^{\text{surf}}} \rho(x,y,z',t) g \, dz' | ||
$$ (pressure) | ||
|
||
Here, $p^{\text{surf}}$ is the pressure at the free surface $z^{\text{surf}}(x, y, t)$, and $\rho(z')$ is the local fluid density. This relation holds pointwise in space and time and provides a foundation for defining vertical coordinates based on pressure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't clear why the notation
The hydrostatic approximation also simplifies vertical pressure forces in control-volume integrations. For example, in a finite-volume cell bounded above and below by sloping surfaces, the vertical pressure force reduces to: | ||
|
||
$$ | ||
- p|_{z = z^{\text{top}}} + p|_{z = z^{\text{bot}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a point later on where this is helpful? If so, can we cite an equation?
Added a schematic for the pseudo-velocities: https://portal.nersc.gov/project/e3sm/katsmith/omega_docs/html/design/OmegaV1GoverningEqns.html Feel free to change wording. I could not for the life of me figure out how to label and reference it. I tried: Schematic of pseudo-velocities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The work here is really impressive! It's great to have this level of detail in the derivation. My comments are pretty minor and mostly pertain to clarity. Thanks all, esp @vanroekel for the latest edits.
The inverse relation, giving $\tilde{z}$ in terms of geometric height, follows from the hydrostatic pressure integral: | ||
|
||
$$ | ||
\tilde{z}(z) = -\frac{1}{\rho_0 g} \left( p^{\text{surf}} + \int_{z}^{z^{\text{surf}}} \rho(z') g \, dz' \right) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\tilde{z}(z) = -\frac{1}{\rho_0 g} \left( p^{\text{surf}} + \int_{z}^{z^{\text{surf}}} \rho(z') g \, dz' \right) | |
\tilde{z}(x, y, z, t) = -\frac{1}{\rho_0 g} \left( p^{\text{surf}(x, y, z, t)} + \int_{z}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz' \right) |
I think this aids clarity even though it is perhaps overkill.
|
||
In this formulation: | ||
- $\tilde{w}$ is the vertical **mass flux per unit reference density**, a key variable in a non-Boussinesq framework. | ||
- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than volume flux $w$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than volume flux $w$. | |
- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than the vertical velocity in height coordinates $w$. |
It's weird to call w
a volume flux since it has units of m/s.
|
||
The use of a constant $\rho_0$ in defining pseudo-height does not imply the Boussinesq approximation. In Boussinesq models, $\rho$ is set to $\rho_0$ everywhere except in the buoyancy term (i.e., the vertical pressure gradient or gravitational forcing). Here, by contrast, we retain the full $\rho$ in all terms, and use $\rho_0$ only as a normalization constant—for example, so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. This preserves full mass conservation while making vertical units more intuitive. | ||
|
||
This approach ensures consistency with mass conservation and simplifies vertical discretization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach ensures consistency with mass conservation and simplifies vertical discretization. | |
This approach ensures consistency with mass conservation and simplifies derivation of the discrete equations. |
Is this what you mean? If not, can we say why this simplifies vertical discretization? It isn't obvious to me.
|
||
This approach ensures consistency with mass conservation and simplifies vertical discretization. | ||
|
||
> **Note:** This definition does not invoke the Boussinesq approximation. The full, time- and space-dependent density $\rho(x, y, z, t)$ is retained in all conservation laws. The use of $\rho_0$ is solely for normalization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
|
||
In geophysical flows, the vertical and horizontal directions are treated differently due to rotation and stratification, which lead to distinct characteristic scales of motion. To reflect this, we separate horizontal and vertical fluxes explicitly in the governing equations. | ||
|
||
We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in space) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in space) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. | |
We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in time) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. |
Is this a typo or am I misunderstanding what you mean?
-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k} - \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. | ||
$$ (final-vert-vel-dissipation) | ||
|
||
This form can be interfaced with the Omega [tridiagongal solver](TridiagonalSolver.md) routine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This form can be interfaced with the Omega [tridiagongal solver](TridiagonalSolver.md) routine. | |
This form can be interfaced with the Omega [tridiagonal solver](TridiagonalSolver.md) routine. |
With this, we can now fully discretize [](#discrete-mom-vert-diff) as | ||
|
||
$$ | ||
-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k} - \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k} - \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. | |
-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k} - \left[\left<u^\prime \tilde{w}_{tr}^\prime\right> \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_{k-1} + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. |
|
||
##### Vertical derivatives in a finte volume framework | ||
|
||
Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as | |
Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at layer interfaces. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as |
\varphi^\prime(z) = \left(\varphi_k - \varphi_{k+1}\right) \delta \left(z-\tilde{z}_{k}^{\text{top}}\right). | ||
$$ (weak-derivative) | ||
|
||
If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient | |
If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient centered on layer interfaces |
Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as | ||
|
||
$$ | ||
- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}\tilde{h}_{i,k}]_e}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this level of detail is important here, but in MPAS-O, the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m approving this document based on my review, edits, and the feedback from others.
It’s great to have such a detailed document for the governing equations. This is an excellent work! Many thanks to everyone who contributed to this document.
Derivation of non-Boussinesq primitive equations for Omega Version 1.
See compiled document at
https://portal.nersc.gov/project/e3sm/lvroekel/omega_docs/html/design/OmegaV1GoverningEqns.html