forked from gamer-project/gamer
-
Notifications
You must be signed in to change notification settings - Fork 12
Support the leakage scheme for CCSN #72
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
Open
hfhsieh
wants to merge
89
commits into
hyschive:ccsn
Choose a base branch
from
hfhsieh:ccsn_leakage
base: ccsn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
9639809
Add the dYedt field
hfhsieh bd0993a
Add option LEAKAGE for the compiler macro NEUTRINO_SCHEME
hfhsieh e91fb2d
Support the leakage scheme
hfhsieh ca00bd0
[Bugfix] Declare IsInit_dEdt_Nu as an array
hfhsieh d1551f9
Update the CCSN test problem template
hfhsieh 625464d
Minor update
hfhsieh 1dcafed
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 8e147d3
Add Flag_Region() for CCSN
hfhsieh 91d3af1
Record the leakage info
hfhsieh 583a021
Minor update
hfhsieh 49102f8
Minor update
hfhsieh 2ee2f68
Use interpolation to obtain accurate data at neutrino sphere
hfhsieh 345a9d1
Minor updates
hfhsieh 05ea76d
Merge branch 'ccsn' into ccsn_leakage
hfhsieh cc213b6
Fixed incorrect index when constructing the leakage ray
hfhsieh 5a3b2ce
Minor update
hfhsieh 3654a93
Optimize the leakage scheme
hfhsieh 82df6d6
[Bugfix] fix incorrect index and avoid zero division
hfhsieh c03c98b
Always record related parameters when NEUTRINO_SCHEME is set
hfhsieh d6cc497
Merge branch 'ccsn' into ccsn_leakage
hfhsieh c03ff20
Update Input__Parameter
hfhsieh 3e966aa
Add runtime parameter CCSN_REF_RBase for CCSN test problem
hfhsieh 4b6d1ed
Ensure the Eint and Ye updated in leakage scheme are valid
hfhsieh 0b5ac2b
Use the stored dEdt_Nu to estimate timestep in restart runs
hfhsieh 62b1dc9
Merge branch 'ccsn' into ccsn_leakage
hfhsieh f79f6ba
[BugFix] Avoid obsolete syntax of VL arrays
hfhsieh 872c132
Merge branch 'ccsn' into ccsn_leakage
hfhsieh e804bcd
Disable deleptonization when initializing dEdt_Nu
hfhsieh 1b349da
Initialize the dEdt_Nu field when core bounce occurs
hfhsieh 26ca2bd
Update the Mis_GetTimeStep_Leakage()
hfhsieh 53e02a6
Remove obsolete IsInit_dEdt_Nu
hfhsieh ae32c43
Update VLA-related code in Src_Leakage_ComputeLeak()
hfhsieh 92e5f59
Merge branch 'ccsn' into ccsn_leakage
hfhsieh ca3ca8d
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 0afc626
Fixed issue that timestep could be overestimated
hfhsieh 1162cf0
Fixed bugs in Src_Leakage_ComputeTau()
hfhsieh f175da0
Fixed typos
hfhsieh e83207b
Exclude non-leaf patches when estimating the source term time-step
hfhsieh 05e3803
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 012e454
Improve reproducibility for the leakage scheme
hfhsieh b730194
Improve stability of the leakage scheme
hfhsieh f74e37a
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 1c5ff5d
Merge branch 'ccsn' into ccsn_leakage
hfhsieh fa4f62f
Ensure data monotonicity when evaluating shock radius
hfhsieh 9a673ea
[BugFix] Correct termination condition in the leakage scheme
hfhsieh b96d8a2
Merge branch 'ccsn' into ccsn_leakage
hfhsieh a2b2933
Add a runtime parameter for time-step constrained by Ye
hfhsieh 5bf27f5
Record shock radius using different weights
hfhsieh 4d1fad5
[BugFix] Correct minimum temperature in the leakage scheme
hfhsieh d52cf50
Support recording the neutrino heating rate with correct signs
hfhsieh 3b55ee8
Merge branch 'ccsn' into ccsn_leakage
hfhsieh fd641e9
Update configure.py, Makefile_base, and ncts.config
hfhsieh b2f227c
Fixed incompatible code
hfhsieh 0a0d2c9
Set TESTPROB_ID to 50 for CCSN simulations
hfhsieh bc59828
Revise the leakage scheme
hfhsieh a402acd
[BugFix] CCSN_MaxRefine_Rad must take priority over CCSN_AngRes_Max
hfhsieh edf3ba6
Update the functionality of CCSN_REF_RBase
hfhsieh b3883ca
Update the sanity check of leakage parameters
hfhsieh c0987ca
Update the data recording format
hfhsieh 79564d7
Rename Flag_Lightbulb() to Flag_PostBounce()
hfhsieh 64e1317
Merge Mis_GetTimeStep_Lightbulb and Mis_GetTimeStep_Leakage functions
hfhsieh 6e56ee1
Refactory Aux_ComputeRay()
hfhsieh 9073cdf
Disable squential ray mapping
hfhsieh 83d46d8
Support energy mode for temperature profile of the leakage scheme
hfhsieh b131940
Minor
hfhsieh 362a265
Correct the integration in the leakage scheme
hfhsieh abc949e
Fixed compilation error
hfhsieh 9a41e42
[Bugfix] Correct termination condition
hfhsieh 04462df
[Bugfix] Correct selection condition in Aux_ComputeRay()
hfhsieh 241f711
Disable heating rate checks to prevent runtime errors
hfhsieh 002137a
Minor
hfhsieh c1efcc6
[Bugfix] Adjust the bin number if there are no leakage bins in the lo…
hfhsieh 0cc0619
Minor
hfhsieh 5567185
Minor
hfhsieh fe6f763
Fixed incorrect condition in Flag_CCSN()
hfhsieh 366ecb7
Handle overflow and underflow in Compute_FermiIntegral()
hfhsieh d720073
Disable heating rate checks in other modes of Hydro_IsUnphysical()
hfhsieh c64a5e2
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 666229b
Compatible with the main branch
hfhsieh 0ed9b52
Minor
hfhsieh 240ddb7
Minor
hfhsieh 836f61d
Merge branch 'ccsn' into ccsn_leakage
hfhsieh d2378fa
Merge branch 'ccsn' into ccsn_leakage
hfhsieh 1ba5a76
Remove obsolete OPT__OUTPUT_LEAKAGE functionality
hfhsieh 5531648
Initialize the neturino heating rato to 0.0
hfhsieh a2f1780
Store the actual heating rate in the lightbulb scheme
hfhsieh f21930a
Update the timestep constrain based on Ye
hfhsieh d5c9715
Add gpu_regcount_flu to generate_make.sh in CCSN
hfhsieh 486d4f1
[BugFix] Fix obsolete parameters in PRINT_RESET_PARA() in CCSN
hfhsieh 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
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
10 changes: 10 additions & 0 deletions
10
example/test_problem/Hydro/CCSN/Input__Flag_Lohner.Leakage
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Level Threshold_Refine Threshold_Derefine Filter Soften MinDensity | ||
| 0 0.80 0.80 0.01 0.00 0.00 | ||
| 1 0.80 0.80 0.01 0.00 0.00 | ||
| 2 0.80 0.80 0.01 0.00 0.00 | ||
| 3 0.80 0.80 0.01 0.00 0.00 | ||
| 4 0.80 0.80 0.01 0.00 0.00 | ||
| 5 0.80 0.80 0.01 0.00 0.00 | ||
| 6 0.80 0.80 0.01 0.00 0.00 | ||
| 7 0.80 0.80 0.01 0.00 0.00 | ||
| 8 0.80 0.80 0.01 0.00 0.00 |
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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Level Density | ||
| 0 3.0e-9 | ||
| 1 1.0e-8 | ||
| 2 3.0e-8 | ||
| 3 1.0e-7 | ||
| 4 3.0e-7 | ||
| 5 3.0e-7 | ||
| 6 3.0e-7 | ||
| 7 3.0e-7 | ||
| 8 3.0e-7 |
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
351 changes: 351 additions & 0 deletions
351
example/test_problem/Hydro/CCSN/Input__Parameter.Leakage
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # problem-specific runtime parameters | ||
| CCSN_Prob 2 # target CCSN problem | ||
| # 0 : GREP migration test | ||
| # 1 : Post bounce test | ||
| # 2 : Core collapse test | ||
|
|
||
| CCSN_Prof_File IC/s20_W2007 # filename of input profile | ||
|
|
||
| CCSN_Mag 1 # target magnetic field profile [1] | ||
| # ( 0: Ap = B0* varpi^2 * (1 - rho / rho_max)^np * (P / P_max) | ||
| # 1: Ap = 0.5 * B0 * ( R0^3 / (r^3 + R0^3) ) * r * sin(theta) ) | ||
| CCSN_Mag_B0 1.0e14 # magnetic field strength (in gauss) [1.e14] | ||
| CCSN_Mag_np 0.0 # dependence of magnetic field on density [0.0] | ||
| CCSN_Mag_R0 1.0e8 # characteristic radius of magnetic field (in cm) [1.0e8] | ||
|
|
||
| CCSN_GW_OUTPUT 1 # output GW signal (0=off, 1=on) [0] | ||
| CCSN_GW_DT 0.1 # output interval of GW signal [1.0] | ||
|
|
||
| CCSN_Eint_Mode 1 # Mode of obtaining internal energy in SetGridIC() [2] | ||
| # ( 1=Temp Mode: Eint(dens, temp, [Ye]) | ||
| # 2=Pres Mode: Eint(dens, pres, [Ye]) ) | ||
|
|
||
| CCSN_CC_MaxRefine_Flag1 1 # enable limiting maximum refinement level 1 [0] | ||
| CCSN_CC_MaxRefine_Flag2 1 # enable limiting maximum refinement level 2 [0] | ||
| CCSN_CC_MaxRefine_LV1 6 # reduced maximum refinement level 1 to this value [MAX_LEVEL-2] | ||
| CCSN_CC_MaxRefine_LV2 7 # reduced maximum refinement level 2 to this value [MAX_LEVEL-1] | ||
| CCSN_CC_MaxRefine_Dens1 1.0e11 # central density threshold that reduces the maximum refinement level 1 [1.0e11] | ||
| CCSN_CC_MaxRefine_Dens2 1.0e12 # central density threshold that reduces the maximum refinement level 2 [1.0e12] | ||
| CCSN_CC_CentralDensFac 1.0e13 # factor that reduces the dt constrained by the central density (in cgs) during the core collapse [1.0e13] | ||
| CCSN_CC_Red_DT 1.0e-5 # reduced time step (in s) when the central density exceeds CCSN_CC_CentralDensFac before bounce [1e-5] | ||
| CCSN_NuHeat_TimeFac 0.01 # factor that scales the dt constrained by the lightbulb/leakage scheme [0.1] | ||
|
|
||
| CCSN_CC_Rot 0 # mode for rotational profile (0:off, 1:analytical, 2:table) [2] | ||
| # --> analytical formula: Omega(r)=Omega_0*[R_0^2/(r^2+R_0^2)], where r is the spherical radius | ||
| CCSN_CC_Rot_R0 1.0e8 # characteristic radius R_0 (in cm) in the analytical rotational profile [2.0e8] | ||
| CCSN_CC_Rot_Omega0 0.0 # central angular frequency Omega_0 (in rad/s) in the analytical rotational profile [0.5] | ||
| CCSN_CC_Rot_Fac -1.0 # multiplication factor for the tabular rotational profile (<=0 -> off) [-1.0] | ||
|
|
||
| CCSN_REF_RBase -1.0; # reference distance for determining a maximum refinement level based on distance from the box center (in cm) [1.25e7] | ||
|
|
||
| CCSN_Is_PostBounce 0 # boolean that indicates whether core bounce has occurred [0] | ||
|
|
||
| CCSN_DT_YE 1 # dt criterion on Ye (1=Ye-Ye_min/Ye_max, 2=Ye, 3=none) [1] | ||
|
|
||
| CCSN_MaxRefine_Rad 3.0e6 # radius in cm within which to refine to the maximum allowed level [3.0e6] | ||
| CCSN_AngRes_Min -1.0 # minimum angular resolution in degrees (<=0=off) [-1.0] | ||
| CCSN_AngRes_Max -1.0 # maximum angular resolution in degrees (<=0=off) [-1.0] | ||
|
|
||
| CCSN_Shock_ThresFac_Pres 0.5 # pressure threshold factor for detecting postbounce shock [0.5] | ||
| CCSN_Shock_ThresFac_Vel 0.1 # velocity threshold facotr for detecting postbounce shock [0.1] | ||
| CCSN_Shock_Weight 2 # weighting method of the averaged shock radius (1:volume, 2:1/volume) [2] | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.