Fatal error when any pencil thickness = 1 and turbines are used#18
Open
karimali5 wants to merge 1 commit intoigridSGS-KSHfrom
Open
Fatal error when any pencil thickness = 1 and turbines are used#18karimali5 wants to merge 1 commit intoigridSGS-KSHfrom
karimali5 wants to merge 1 commit intoigridSGS-KSHfrom
Conversation
Member
|
I believe this was patched in this PR, could you try pulling recent changes from |
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.
I added a fatal error message to igrid.F90 when the domain decomposition (either manual or automatic) result in a single-cell pencil in any direction. This will cause the simulation to fail if wind turbines are used. The reason of faliure is in the actuatorDisk_filtered.F90 file, specifically here:
If the y or z pencils have a single cell, the second or third lines should actually give an error because it would be accessing a location out of bound, but intel compiler returns a zero instead (for yG(1,2,1) or zG(1,1,2)). This yields a zero dy or dz. If, for example, dy=0 (which was in my case), the grid points marked as within the rotor's disk will be selected from points generated along a line rather than selecting from a rectangle.
When the simulation starts with this setup, all of the turbine's thrust is distributed along a few number of points along a line which breaks the simulation (NANs appear). I am not sure if it breaks because of high force/point or during the Gaussian kernel mapping onto the 1D line points. Either way the simulation breaks.
I added this fatal error message to stop the simulation early on if turbines are being used with a single-cell pencil. If this happens, maybe select a specific decomposition (set prow & pcol manually) rather than using the auto mode (prow=pcol=0).