301 all snapwave changes in one#302
Draft
Leynse wants to merge 137 commits into
Draft
Conversation
…ource term calculation instead of bin dependent eeprev_ig, thanks to suggestion of Yasmine - results look promising
…ave energy, instead of the bin one - Works, but not sure whether it is better than snapwave_ig_opt =3
…king point when IG waves should be released - Determined based on delta Dw
…nt waves start breaking (Qb > 1%)
…Zijlema (2022) - Does at first glance not seem to influence much/enough
…h) where waves start breaking - not sure this is the best place to do this...
- Add local wave height water depth ration 'gam' to his output - For now with Qb determined based on upwind point - For now with taking maxval over itheta for both qb and gam output
…king is started the velocity of cg_ig is changed to sqrt(g*h) - In igopt 8 for now set only point 'k' to sqrt(g*h), not yet k1 and k2, to be discussed
…l over a range of different cases
- Does not work well in shadow zones currently, question is mostly how to determine Sxx_cons
… on integrated energies, and at the redistributing them over bins like for Dw - Result pretty much the same as before with igopt 9
…cig as alrready mutliplied by ee_itheta,k) and in 'B' term - ig opt 12 can be the working version in R
- Results don't look good yet, not sure whats wrong, it is like Snapwave trunk commit of Dano of 03-04-2025
…alue to multiply with snapwave_gamma factor for estimating the incident wave breaking point initiation, and setting the srcig to 0 - description: factor times gamma that is used to determine the maximum incident wave breaking point in the surf zone using local incident wave height over water depth ratio, among others used to set the IG source term to 0 shallower than this point - Now include the /sqrt(2) so that value becomes gam (Hrms based) > 0.47 * gamma - used for ig_opt >= 11
…lead to issues, therefore remove for ig_opt 12&12
- Only keep the (already precleaned) ig_opt 11&12 version of subroutine determine_infragravity_source_sink_term - Add description qb_local, gam_local
…e_sink_term' - Rename the main option 11 to ig_opt = 1 (=the default) - For now keep also option 11 for ease, but exactly the same as 1 - Option 2 is name the same as ig_opt 1, but without using the conservative shoaling (as before) - ig_opt = 3 is the same as option 1, but with including the cg_ig adjustment - turn off ig_opt 12 - currently does not work, need to further check moving from R- to B-term
… is a more gradual decreasing of srcig to 0 . - 'transition_factor' is controled around 'gamma_fac_br * gamma' as center - And width controlled by transition_factor_width > 0.005 seems to work well - With this, found best gamma_fac_br to be 0.45 now - adjusted default value
- Though, having the extra do-loop within the main loop probably not wanted for speed - Also definition of effective depth to check!
…l-snapwave-changes-in-one
… 0 to turn off wave forces and thus incident wave setup
…ltares/SFINCS into 301-all-snapwave-changes-in-one
…d-wave-forces' of https://github.com/Deltares/SFINCS into 301-all-snapwave-changes-in-one
…eltares/SFINCS into 301-all-snapwave-changes-in-one
Reinitialize the per-node Tp only for internal and Neumann-connected cells during the wind iteration so boundary cells keep their prescribed Tp (as set by update_boundaries). Implemented a loop that sets Tp(k)=Tpini for inner(k) and Tp(neumannconnected(k)) where present. Also added docs/_build to .gitignore and cleaned up minor whitespace.
- Later improve limiter
…github.com/Deltares/SFINCS into 301-all-snapwave-changes-in-one
* Fix directional asymmetry in wavemaker initialization for south-facing wavemakers Two bugs in initialize_wavemakers() that caused incorrect or zero forcing for wavemakers with phi in the south half-plane (Q3/Q4): Q3 validity check (phi ∈ [π, 1.5π)): wrong index passed to uv_index_z_nm — used Z-cell index ip instead of UV index nmu for the first left-neighbor (md1) check. This caused nearly all Q3 candidates to pass the validity filter, producing spurious wavemaker points for south-west-facing lines. "Below" direction angfac (Q3 nd1/nd2, Q4 nd1/nd2): sin(π − φ) ≡ sin(φ) and sin(φ) ≤ 0 for φ ∈ [π, 2π), so max(sin(π − φ), 0) always returned zero, silencing all south-pointing wavemaker UV faces. Fixed to max(−sin(φ), 0). * - Please double check this Claude bugfix #3 @maarten ! Fix wavemaker side-pointer not set for refined (*2) UV half-edges On quadtree-refined grids, each coarse cell side can have two UV faces (*1 and *2). Only the *1 face was stored in wavemaker_nmu/nmd/num/ndm, so the *2 face injected flux without the continuity solver tracking it, causing mass drift near the wavemaker. No effect on uniform grids. * - only write hm0_ig min/mean/max for wavemaker points * - Last small fixes * - Remove write statements * Warn on wavemaker points at refinement boundary Add a logical flag to detect wavemaker points adjacent to quadtree refinement and emit a log warning. Declares refinement_warning, initializes it to .false., sets it to .true. in the wavemaker point checks (where kcs(iz)==1), and writes a WARNING message to the log if any such cases are found. This helps notify users that wavemaker points along refinement boundaries are not recommended. * - Cleanup message --------- Co-authored-by: Maarten van Ormondt <maarten.vanormondt@deltares.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.