-
Notifications
You must be signed in to change notification settings - Fork 124
removing duplicated codes in mixture rules for EE bubbles #1071
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5d977c3
integrating mixture routines
ff8ff17
Merge branch 'MFlowCode:master' into bubnorm
hyeoksu-lee ae827a5
update mixture rules
e1e953c
fix mixture rule
50f78b8
correction for vf of EE bubble
4461db2
Merge branch 'MFlowCode:master' into bubnorm
hyeoksu-lee 1568228
add mpp_lim to mixture rule acc
4b7ab1c
add comments
262e980
Merge branch 'bubnorm' into merge
hyeoksu-lee 570e53c
Merge pull request #24 from hyeoksu-lee/merge
hyeoksu-lee f882347
update bubble case validation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -242,34 +242,26 @@ contains | |||||||||
| myalpha(ii) = q_cons_vf(advxb + ii - 1)%sf(j, k, l) | ||||||||||
| end do | ||||||||||
|
|
||||||||||
| myRho = 0._wp | ||||||||||
| n_tait = 0._wp | ||||||||||
| B_tait = 0._wp | ||||||||||
| if (num_fluids == 1) then | ||||||||||
| myRho = myalpha_rho(1) | ||||||||||
| n_tait = gammas(1) | ||||||||||
| B_tait = pi_infs(1)/pi_fac | ||||||||||
| else | ||||||||||
| myRho = 0._wp | ||||||||||
| n_tait = 0._wp | ||||||||||
| B_tait = 0._wp | ||||||||||
|
|
||||||||||
| if (mpp_lim .and. (num_fluids > 2)) then | ||||||||||
| $:GPU_LOOP(parallelism='[seq]') | ||||||||||
| do ii = 1, num_fluids | ||||||||||
| myRho = myRho + myalpha_rho(ii) | ||||||||||
| n_tait = n_tait + myalpha(ii)*gammas(ii) | ||||||||||
| B_tait = B_tait + myalpha(ii)*pi_infs(ii) | ||||||||||
| end do | ||||||||||
| else if (num_fluids > 2) then | ||||||||||
| $:GPU_LOOP(parallelism='[seq]') | ||||||||||
| do ii = 1, num_fluids - 1 | ||||||||||
| myRho = myRho + myalpha_rho(ii) | ||||||||||
| n_tait = n_tait + myalpha(ii)*gammas(ii) | ||||||||||
| B_tait = B_tait + myalpha(ii)*pi_infs(ii) | ||||||||||
| B_tait = B_tait + myalpha(ii)*pi_infs(ii)/pi_fac | ||||||||||
| end do | ||||||||||
| else | ||||||||||
| myRho = myalpha_rho(1) | ||||||||||
| n_tait = gammas(1) | ||||||||||
| B_tait = pi_infs(1)/pi_fac | ||||||||||
| end if | ||||||||||
|
|
||||||||||
| n_tait = 1._wp/n_tait + 1._wp !make this the usual little 'gamma' | ||||||||||
| B_tait = B_tait*(n_tait - 1)/n_tait ! make this the usual pi_inf | ||||||||||
|
Comment on lines
262
to
263
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Prevent a potential division-by-zero error in the calculation of
Suggested change
|
||||||||||
|
|
||||||||||
| myRho = q_prim_vf(1)%sf(j, k, l) | ||||||||||
| myP = q_prim_vf(E_idx)%sf(j, k, l) | ||||||||||
| alf = q_prim_vf(alf_idx)%sf(j, k, l) | ||||||||||
| myR = q_prim_vf(rs(q))%sf(j, k, l) | ||||||||||
|
|
||||||||||
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High-level Suggestion
The new
s_compute_species_fractionsubroutine has a confusing structure with a conditional override at the end. Refactor it to have clear, separate logic paths for each physical model to improve readability. [High-level, importance: 7]Solution Walkthrough:
Before:
After: