<p>Let's say our goal is to find <span class="math-container">$\eta$</span> which is the displacement of the fluid relative to its resting position at <span class="math-container">$z = H_2$</span>.</p>
<p>We find
<span class="math-container">\begin{equation}
\begin{split}
p_2 - p_1 &amp;= \require{cancel} \bcancel{p_H} + \rho_1 g(\require{cancel} \bcancel{H}-h_2) + \rho_2g(h_2 - z) \require{cancel} \bcancel{-p_H} - \rho_1g(\require{cancel} \bcancel{H}-z) \\
&amp;= (\rho_2 - \rho_1)gh_2 - (\rho_2 - \rho_1)gz \\
&amp; = (\rho_2 - \rho_1)g(H_2 + \eta) - (\rho_2 - \rho_1)gz
\end{split}
\end{equation}</span></p>
<p>Dividing by <span class="math-container">$(\rho_2 - \rho_1)g$</span> yields</p>
<p><span class="math-container">\begin{equation}
 \eta + H_2 - z =  \frac{p_2 - p_1}{(\rho_2 - \rho_1)g}. 
\end{equation}</span>
The equation above tells us the distance to the interface at some height <span class="math-container">$z$</span> (remember the coordinate origin is at the bottom of the domain). We are interested in the displacement relative to the mean interface height <span class="math-container">$z = H_2$</span>, so we have
<span class="math-container">\begin{equation}
 \eta  =  \frac{p_2 - p_1}{(\rho_2 - \rho_1)g},
\end{equation}</span>
which is the result you are looking for. However, in the document they say that they use four more equations to derive the result. Maybe it's a mistake or maybe I'm missing something.</p>
<p>I was a little confused that you said we can find the result in the document - so for anyone wondering:</p>
<p>Using <span class="math-container">$\phi_n = p_n / \rho_0$</span> and <span class="math-container">$g' = g(\rho_2 - \rho_1)/\rho_0$</span>, we find
<span class="math-container">\begin{equation}
 \eta  =  \frac{(p_2 - p_1)\rho_0}{(\rho_2 - \rho_1)g\rho_0} = -\frac{\phi_1 - \phi_2}{g'},
\end{equation}</span>
which corresponds to what's shown in the document.</p>

CC BY-SA 4.0
2022-04-17T04:22:23.163Z
I’m little confused about the coordinate $z$ here, I mean, to compute the pressure difference between two locations in two layers respectively, why you only used one $z$ in your answer not $z_1$(corresponding to the first layer $/rho_1$) and $z_2$(corresponding to $/rho_2$)? I think the pressure difference is a function of $z_1$ and $z_2$.
 Hou
CC BY-SA 4.0
2022-04-17T08:16:13.520Z
Good question - I have two for you too: What happens if you just use $z= H_2$
? Does this capture the qualitative behaviour of the displacement $\eta$? I think we can't interpret the equations as a difference between two locations. There is just one.
Joscha Fregin
CC BY-SA 4.0
2022-04-17T09:10:03.617Z
But what is the physical meaning of the equation when you set $z=H_2$? $p_1$ and $p_2$ should be the pressure of the two layers respectively.
 Hou
CC BY-SA 4.0
2022-04-17T11:11:16.397Z
The way I understand it is that you just assume that either layer 1 or layer 2 extends to $H_2$, which of course is unphysical in the case of one layer. I struggle to find another explanation for this using the simple rearrangement in my answer above. Notice that in practice you would solve the pde-system to find your unknowns instead of using this equation. Maybe someone else can help out here?
Joscha Fregin
CC BY-SA 4.0
2022-04-17T11:23:02.370Z
Well, I have no ideas now, actually I think it is no need to compute the pressure difference, since we actually use the gradient of the pressure in the momentum equations
 Hou
CC BY-SA 4.0
2022-04-15T10:43:02.770Z
2022-04-16T08:40:57.650Z
2022-04-16T08:40:57.650Z
Joscha Fregin
<p>The 2-layer hydrostatic model is like this<a href="https://i.sstatic.net/t3mjG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/t3mjG.png" alt="enter image description here" /></a></p>
<p>And the pressure of the two layers and the top are<a href="https://i.sstatic.net/VDxAm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VDxAm.png" alt="enter image description here" /></a>
and it is easy to find the horizontal gradient of <span class="math-container">$p_1$</span> and <span class="math-container">$p_2$</span>
<span class="math-container">\begin{equation}
\begin{aligned}
\nabla p_1 &amp;= \nabla p_H\\
\nabla p_2 &amp;= \nabla p_H + g(\rho_2 - \rho_1)\nabla h_2\\
\end{aligned}
\end{equation}</span>
Now my problem is that how to get the result
<span class="math-container">\begin{equation}
p_2 - p_1 = g(\rho_2 - \rho_1)\eta 
\end{equation}</span></p>
<p>from the equations above, where<span class="math-container">$\eta = h_2 - H_2$</span>. I find this result in the book&quot;<a href="http://people.atmos.ucla.edu/jcm/GFD_book.pdf" rel="nofollow noreferrer">Fundamentals of Geophysical Fluid
Dynamics</a>&quot; at page 164.</p>

CC BY-SA 4.0
2022-04-14T13:31:03.223Z
What have you tried? Is this the solution with the rigid layer (top) or with variable water level?
arkaia
CC BY-SA 4.0
2022-04-14T13:58:53.863Z
Is that equation in your reference? I can't find it
Joscha Fregin
CC BY-SA 4.0
2022-04-15T01:40:29.877Z
Just to help us verify... not a homework question, correct?
JeopardyTempest
CC BY-SA 4.0
2022-04-15T08:12:56.603Z
@JeopardyTempest no…I find this problem when I was reading the book
 Hou
CC BY-SA 4.0
2022-04-15T08:14:42.860Z
@J.Fregin The book just give out the result at page 164, I want to figure how to derive it
 Hou
CC BY-SA 4.0
2022-04-15T08:15:59.397Z
@arkaia I think it describes the pressure different between two locations in different layers
 Hou
CC BY-SA 4.0
2022-04-15T10:25:32.953Z
I'm with @J.Fregin... I do not see your final result equation in the book???
JeopardyTempest
CC BY-SA 4.0
2022-04-15T10:45:39.387Z
@JeopardyTempest it is equation 5.3. If you rearrange it you end up with the posted version.
Joscha Fregin
CC BY-SA 4.0
2022-04-15T11:13:13.643Z
sorry equation 5.4
Joscha Fregin
CC BY-SA 4.0
2022-04-15T18:54:15.737Z
@J.Fregin while it's reasonable to see they are the same... it doesn't explain why Hou is asking about their form rather than the 5.4 form... especially why they would've chosen off hand to move η to the other side of the equation...
JeopardyTempest
<models><atmosphere-modelling><fluid-dynamics><ocean-models>
A problem of the 2-Layer hydrostatic model
 Hou
# A problem of the 2-Layer hydrostatic model

(Asked by: username_0 on 2022-04-14)

The 2-layer hydrostatic model is like this[![enter image description here](https://i.sstatic.net/t3mjG.png)](https://i.sstatic.net/t3mjG.png)

And the pressure of the two layers and the top are[![enter image description here](https://i.sstatic.net/VDxAm.png)](https://i.sstatic.net/VDxAm.png)
and it is easy to find the horizontal gradient of $p\_1$ and $p\_2$
\begin{equation}
\begin{aligned}
\nabla p\_1 &= \nabla p\_H\\
\nabla p\_2 &= \nabla p\_H + g(\rho\_2 - \rho\_1)\nabla h\_2\\
\end{aligned}
\end{equation}
Now my problem is that how to get the result
\begin{equation}
p\_2 - p\_1 = g(\rho\_2 - \rho\_1)\eta
\end{equation}

from the equations above, where$\eta = h\_2 - H\_2$. I find this result in the book"[Fundamentals of Geophysical Fluid
Dynamics](http://people.atmos.ucla.edu/jcm/GFD_book.pdf)" at page 164.

**Tags:** models, atmosphere-modelling, fluid-dynamics, ocean-models

> **Comments:**
> **username_1**: What have you tried? Is this the solution with the rigid layer (top) or with variable water level?  
> **username_2**: Is that equation in your reference? I can't find it  
> **username_3**: Just to help us verify... not a homework question, correct?  
> **username_0**: @username_3 no…I find this problem when I was reading the book  
> **username_0**: @J.username_2 The book just give out the result at page 164, I want to figure how to derive it  
> **username_0**: @username_1 I think it describes the pressure different between two locations in different layers  
> **username_3**: I'm with @J.username_2... I do not see your final result equation in the book???  
> **username_2**: @username_3 it is equation 5.3. If you rearrange it you end up with the posted version.  
> **username_2**: sorry equation 5.4  
> **username_3**: @J.username_2 while it's reasonable to see they are the same... it doesn't explain whyusername_0 is asking about their form rather than the 5.4 form... especially why they would've chosen off hand to move η to the other side of the equation...  

---

## 1 answers

### Answer by username_2 on 2022-04-15. Score: 5

Let's say our goal is to find $\eta$ which is the displacement of the fluid relative to its resting position at $z = H\_2$.

We find
\begin{equation}
\begin{split}
p\_2 - p\_1 &= \require{cancel} \bcancel{p\_H} + \rho\_1 g(\require{cancel} \bcancel{H}-h\_2) + \rho\_2g(h\_2 - z) \require{cancel} \bcancel{-p\_H} - \rho\_1g(\require{cancel} \bcancel{H}-z) \\
&= (\rho\_2 - \rho\_1)gh\_2 - (\rho\_2 - \rho\_1)gz \\
& = (\rho\_2 - \rho\_1)g(H\_2 + \eta) - (\rho\_2 - \rho\_1)gz
\end{split}
\end{equation}

Dividing by $(\rho\_2 - \rho\_1)g$ yields

\begin{equation}
\eta + H\_2 - z = \frac{p\_2 - p\_1}{(\rho\_2 - \rho\_1)g}.
\end{equation}
The equation above tells us the distance to the interface at some height $z$ (remember the coordinate origin is at the bottom of the domain). We are interested in the displacement relative to the mean interface height $z = H\_2$, so we have
\begin{equation}
\eta = \frac{p\_2 - p\_1}{(\rho\_2 - \rho\_1)g},
\end{equation}
which is the result you are looking for. However, in the document they say that they use four more equations to derive the result. Maybe it's a mistake or maybe I'm missing something.

I was a little confused that you said we can find the result in the document - so for anyone wondering:

Using $\phi\_n = p\_n / \rho\_0$ and $g' = g(\rho\_2 - \rho\_1)/\rho\_0$, we find
\begin{equation}
\eta = \frac{(p\_2 - p\_1)\rho\_0}{(\rho\_2 - \rho\_1)g\rho\_0} = -\frac{\phi\_1 - \phi\_2}{g'},
\end{equation}
which corresponds to what's shown in the document.

> **Comments:**
> **username_0**: I’m little confused about the coordinate $z$ here, I mean, to compute the pressure difference between two locations in two layers respectively, why you only used one $z$ in your answer not $z_1$(corresponding to the first layer $/rho_1$) and $z_2$(corresponding to $/rho_2$)? I think the pressure difference is a function of $z_1$ and $z_2$.  
> **username_2**: Good question - I have two for you too: What happens if you just use $z= H_2$ ? Does this capture the qualitative behaviour of the displacement $\eta$? I think we can't interpret the equations as a difference between two locations. There is just one.  
> **username_0**: But what is the physical meaning of the equation when you set $z=H_2$? $p_1$ and $p_2$ should be the pressure of the two layers respectively.  
> **username_2**: The way I understand it is that you just assume that either layer 1 or layer 2 extends to $H_2$, which of course is unphysical in the case of one layer. I struggle to find another explanation for this using the simple rearrangement in my answer above. Notice that in practice you would solve the pde-system to find your unknowns instead of using this equation. Maybe someone else can help out here?  
> **username_0**: Well, I have no ideas now, actually I think it is no need to compute the pressure difference, since we actually use the gradient of the pressure in the momentum equations  

---

