-
Notifications
You must be signed in to change notification settings - Fork 139
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
Principal stress calculation does not work for C grid #707
Comments
I can help fix this. Can anyone provide guidance? |
It looks like you could add a call in ice_history.F90 to get stress12T from wherever it's located on the C-grid. That might be the two edges, which would require an average? This is just a diagnostic. |
On the C grid, it looks like we compute stress12U. I assume that's on the U point. Should I just do an "average" of stress12U to get stress12T? Or is there a computation I can do directly on the T grid point? |
The simplest and cheapest approach is to average the stress12U but I think the best approach (slightly more expensive...no issue for scaling) is to calculate stress12T inside the subcycling loop. You could just copy the calculation for stress12T in stressCD_T into stressC_T. If we choose the averaging approach, it would be good to first compare the two approaches (i.e., plot the states of stress with ellipse). |
Thanks @JFLemieux73, I now see how to copy the stress12T calc into stressCD_T. I agree that's better. More soon. |
In stressC_T, we do
If we add the stress12T calculation, it needs shearT,
should this be computed via
which would always be positive (is that OK) or should we compute shearT via
the same way as in stressCD_T. At the present time, divT and tensionT are calculated in strain_rates_T in stressC_T. But we compute shearTsqr and DeltaT from shearTsqr locally as above. If we compute shearT and deltaT via strain_rates_T in stressC_T, then stressC_T is identical to stressCD_T. Is that correct? |
Hum...more complicated than I thought. I think we need the correct sign for shearT. So sqrt(shearT) does not work. The problem if we want to calculate in stran_rates_T is that we don't have vvelE and uvelN to easily compute dvdx and dudy at the T point. Let me look a bit more closely. |
vvelE and uvelN are computed at the end of each subcycle. They are just a 4 pt average of vvelN and uvelE respectively. I don't know if that's good enough or not. shearTsqr is really just an average of shearU**2. Maybe it's reasonable/correct to compute stress12T as an average of stress12U? |
Or in stressC_T we also calculate shearT from the shearU values (similar to shearTsqr). shearT=(shearU(i,j)* uarea(i ,j ) + ... That's the method I would suggest. If we go with stress12T as an average of stress12U it would be good again to compare the states of stress with the other method. |
Just to clarify,
in stressC_T? And shearTsqr /= shearT**2, that's OK, right? |
Since this is just a history diagnostic, I believe we should just average stress12U. |
Yes in stressC_T. And shearTsqr /= shearT**2, that's OK, right? ...you are right Dave you are probably right but I would test both...I just want to make sure the average of the stress12U leads to stresses on and inside the yield curve. |
OK, I'll try both. I'll run C-grid cases with gx3 for 5 days. Is that enough? What do I need to output and plot? |
@phil-blain you have some python code to plot the states of stress on the ellipse, right? Could you please make it available to Tony? Merci! |
I can make some elliptical plots, remind me what the two fields are I'm plotting. Is it sig1 vs sig2? |
unfortunately I do not (Amélie had such a script which I did not copy in time before her account was deleted!) |
I have an ancient one written in IDL - let me dredge it up |
ellipse.pro.txt |
OK, I have some plots. sig1 vs sig2.
The shearT average which then goes into a stress12T computation is better. Its on/inside the ellipse. There are also points I don't show that are way off the domain of the plot for the avg(stress12U) case. So we should go with avg(shearU). It will be a little more expensive, but it's better and based on one test, looks like it won't increase cost by more than 0.5%. One other note, the B-grid has 5x more points than the other 2 plots, so please ignore the density. |
Thanks Tony. It's good to see that the points are on and inside the ellipse. Could you please try it with avg_strength instead of avg_zeta? |
Great! Thanks again Tony. Having the stresses inside and on the ellipse is a good indication that what we coded is ok. |
The problem is that stress12T is used by principal_stress subroutine but it is never calculated (it is zero) for the C grid.
This affects sig1 and sig2 (as diagnotics). sigP is ok.
The text was updated successfully, but these errors were encountered: