vanroekel / MPAS-Model

Repository for MPAS models and shared framework releases.
Other
1 stars 4 forks source link

Schwartz inequalities sign and coefficient #4

Open BrodiePearson opened 3 years ago

BrodiePearson commented 3 years ago

The current third-order fluxes of temperature and salinity flux (code linked below) are limited by the inequality $\overline{w'w'\theta'}\leq \sqrt{\sigma^3(1-\sigma)^3(w_u-w_d)^4(\theta_u-\theta_d)^2}$ Which I think is equivalent to $\overline{w'w'\theta'}\leq \sqrt{min[\left(\overline{w'\theta'}\right)^2\overline{w'w'}, \quad \overline{\theta'\theta'}\left(\overline{w'w'}\right)^2]}$

However, the appendix of this paper (Eq. A1) suggests the inequality should apply to the absolute value and depend on the product of a fourth-order moment and a second-order moment, instead of the product of three second-order moments:

$|\overline{w'w'\theta'}|\leq \sqrt{min[\left(\overline{w'w'\theta'\theta'}\right)\overline{w'w'}, \quad \overline{\theta'\theta'}\left(\overline{w'w'w'w'}\right)]}$ or $|\overline{w'w'\theta'}| \leq \sqrt{\sigma(1-\sigma)(1-3\sigma+3\sigma^2)(w_u-w_d)^4(\theta_u-\theta_d)^2}$

Should we change the current code: https://github.com/vanroekel/MPAS-Model/blob/9a1a2dd52b2fb6743ddb94682361689a324adaa6/src/core_ocean/shared/mpas_ocn_adcReconstruct.F#L308-L310 to

w2tTemp = -sigav*(1.0_RKIND - sigav)*(1.0_RKIND - 2.0_RKIND*sigav)*wumdav**2.0_RKIND*tumdav 
 w2tCheck = (sigav*(1.0_RKIND - sigav)*(1.0_RKIND - 3.0_RKIND*sigav + &
       3.0_RKIND*sigav**2.0_RKIND)*wumdav**4*tumdav**2)**0.5 
 w2t(k,iCell) = sign(min(abs(w2tTemp), abs(w2tCheck)), w2tTemp) 

and similar for the salinity limiter?

vanroekel commented 3 years ago

@BrodiePearson sorry for missing this for so long, I apparently don't get notifications even though it is my fork. Anyway, I think you are definitely right. I had started thinking about this w/ regard to w3, but agree this should be fixed here too.

vanroekel commented 3 years ago

@BrodiePearson should the w2tCheck you propose be

 w2tCheck = (sigav**2.0*(1.0_RKIND - sigav)**2.0*(1.0_RKIND - 3.0_RKIND*sigav + &
       3.0_RKIND*sigav**2.0_RKIND)*wumdav**4*tumdav**2)**0.5 

I think we should pick up an extra sig*(1-sig) from the w2 and t2 terms in your equation above

BrodiePearson commented 3 years ago

@vanroekel Yes you're right those extra terms are needed