You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In w3srcemd.ftn, TAUNUX and TAUNUY are saved as they are supposed to be first guesses of the interactive solve in FLD1 or FLD2; however, in both routines it looks like the first guess is actually:
! Guessed values of viscous stress
TAUNUX = USTSM**2 * DAIR * wndx / wnd_in_mag
TAUNUY = USTSM**2 * DAIR * wndy / wnd_in_mag
If this is the case, should TAUNUX, TAUNUY be saved? Is there ever a case where in w3fld2 where you would not go into the do while loop that calculates TAUNUX/TAUNUY as above? If these do not need to be saved, we could also change the declaration in w3fld1/2 of TAUNUX/TAUNUY as out only instead of in/out as well.
In principle we should be able to get faster convergence of the iterator by saving TAUNUX and TAUNUY and using the previous step as the starting guess. But since I never fully vetted this (and thus used a bulk value) your proposed changes seem ok. I would leave a note in the code (it looks like there may already be some small note on L359) and perhaps if I (or anyone) ever have some time the convergence issue could be addressed. I'm not sure how these routines contribute to the overall CPU costs, but there are probably some other efficiency gains that could be made.
In terms of CPU costs, I know FLD1 is much slower than FLD2. @SMoorthi-emc brought up we could change some var**2 to var*var for efficiency improvements. FLD2 does add to the computational time, so speeding it up would not be a bad thing. To test this would we just essentially comment out the TAUNUX guesses or put them behind a "if first" call?
In w3srcemd.ftn, TAUNUX and TAUNUY are saved as they are supposed to be first guesses of the interactive solve in FLD1 or FLD2; however, in both routines it looks like the first guess is actually:
If this is the case, should TAUNUX, TAUNUY be saved? Is there ever a case where in w3fld2 where you would not go into the do while loop that calculates TAUNUX/TAUNUY as above? If these do not need to be saved, we could also change the declaration in w3fld1/2 of TAUNUX/TAUNUY as out only instead of in/out as well.
FYI: @breichl Thanks @SMoorthi-emc for bringing up this point
The text was updated successfully, but these errors were encountered: