Skip to content
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

STARSS Star Formation and Feedback #198

Merged
merged 82 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
3083433
Adding fixes for multispecies cosmology
Jan 25, 2022
541a82a
Added EnzoMethodStarMakerSTARSS (not fully tested)
Feb 2, 2022
00a5485
removed swap file
Feb 2, 2022
a0bd0b4
Adding EnzoMethodFeedbackSTARSS
Feb 18, 2022
4c1cb7f
bugfixes in EnzoMethodFeedbackSTARSS
Mar 7, 2022
1a78158
debugging EnzoMethodStarMakerSTARSS
Mar 9, 2022
e5248f4
Debugging SF+FB. SF+FB now "working" in cosmological simulations. FB …
Mar 16, 2022
10c67e9
Deposition symmetric now across block boundaries, but doesn't multipl…
Mar 17, 2022
c7307fa
Initial deposition looks good now for particles on block boundaries (…
Mar 18, 2022
fd4dbb3
Rescaling color field densities after deposition
Mar 18, 2022
e144fa6
Bugfixes in EnzoMethodFeedback
Mar 19, 2022
0974029
Fixed bug that was causing accidental deposition of momentum along gr…
Mar 22, 2022
c93e2fc
Found missing factors of cell_volume + small bugs that resulted in un…
Mar 30, 2022
4222785
Added method_feedback_starss test
Mar 31, 2022
b9da479
Added get_mass_difference.py
Mar 31, 2022
65b01f1
Added missing factor of eta_SF to SF routine
Apr 1, 2022
44c2efd
Just using overdensity of cell for SF instead of averaging with surro…
Apr 8, 2022
4a798e6
Cleaning up MethodStarMakerSTARSS
Apr 13, 2022
6ab95ae
Added explicit calculation of MMW to MethodFeedbackSTARSS (rather tha…
Apr 27, 2022
7c71871
subtracting metals from grid when forming star
Apr 27, 2022
a7360ed
Saving particle masses as densities
Apr 28, 2022
21b87e4
Moved compute_done() to p_method_feedback_starss_end(), which solved …
Apr 28, 2022
2eb0237
Changed calculation of virial parameter to just do alpha = total_ener…
Apr 29, 2022
3354bff
commented out cell_volume division that I forgot to undo when going b…
Apr 29, 2022
c5ab4b7
Fixed some print statements
Apr 30, 2022
5679af9
Added option to use new or old virial parameter calculation
May 2, 2022
f8a563e
Fixed conversion to code units for momentum deposition
May 2, 2022
a589735
Accidentally left 'refresh_all_fields' commented out in MethodFeedbac…
May 3, 2022
0314cf5
More tinkering with momentum deposition
May 4, 2022
ae6a058
Accounting for gas removal crossing block boundaries -- this fixed my…
May 4, 2022
d87b41d
Used negative mass CiC to remove gas from central cells instead of ju…
May 5, 2022
4354234
removed 'get_mass_difference.py'
May 5, 2022
bb24209
Fixed sign error. Explosions now going the right way.
May 5, 2022
b82eaef
Fixed mass scaling order of operations for copying field values from …
May 5, 2022
dc33698
Fixed issues related to multiple star particles blowing up in the sam…
May 6, 2022
a98804a
If trying to form large star particle, instead form multiple small pa…
May 9, 2022
285ec89
Fixed virial parameter calculation
May 12, 2022
2a91d4f
Fixing units in virial parameter calculation
May 12, 2022
0c1e103
Added debug flag to store initial positions, velocity, mass, etc. for…
May 12, 2022
c1e354d
Using "potential_copy" field for new virial parameter calculation
May 12, 2022
27af2c8
Enforcing max star particle velocity at formation
May 13, 2022
b179986
Fixed temperature calculation
May 17, 2022
16fb5a5
Fixed race condition that was occasionally leading to negative densit…
May 24, 2022
1980393
Cleaning up MethodFeedbackSTARSS
May 31, 2022
e84b4ec
Initializing default parameters as False for star maker criteria -- c…
May 31, 2022
a04c907
Merge branch 'starss' of https://github.com/WillHicks96/enzo-e into s…
May 31, 2022
e21d98b
More housekeeping. Adding testing files to get ready for PR
Jun 6, 2022
93250f8
Merge branch 'multispecies_cosmology-merge' of https://github.com/Wil…
Jun 6, 2022
a9c7f19
Initializing multispecies fields in EnzoInitialFeedbackTest
Jun 7, 2022
a0b3d62
updated documention
WillHicks96 Jun 7, 2022
53e9d9d
Initializing temporary fields as zero, which fixed bug that popped up…
Jun 9, 2022
f766412
Edited some comments. Cleaned up test files
Jun 10, 2022
2ea7b78
Increased Stopping:cycle for test_cosmo-dd-SF_FB.in to 1000
Jun 10, 2022
2ecc09d
Replacing "is_local" with "is_copy" in parameter files
Jun 13, 2022
2b5c081
Cleaning up variable names
Jun 16, 2022
e1f248a
Updating parameter file with new accumulate field names
Jun 16, 2022
9d71797
More cleaning
Jun 16, 2022
fec1787
More code cleaning
Jun 16, 2022
be85549
Generalizing check_velocity_divergence for non-cube cells
Jun 16, 2022
9a9c227
Fixed comment
Jun 16, 2022
efcdafb
Update src/Enzo/enzo_EnzoMethodGravity.cpp
WillHicks96 Jun 16, 2022
f147f83
Update src/Enzo/enzo_EnzoMethodGravity.cpp
WillHicks96 Jun 16, 2022
f53e0ff
Update src/Enzo/enzo_EnzoMethodGravity.cpp
WillHicks96 Jun 16, 2022
54ebc6f
Update src/Enzo/enzo_EnzoMethodGravity.cpp
WillHicks96 Jun 16, 2022
a4d0c98
Update src/Enzo/enzo_EnzoMethodGrackle.cpp
WillHicks96 Jun 16, 2022
c76a225
Update src/Enzo/enzo_EnzoMethodGrackle.cpp
WillHicks96 Jun 16, 2022
18f58ec
Update src/Enzo/enzo_EnzoSolverMg0.cpp
WillHicks96 Jun 16, 2022
1b50c40
Update src/Enzo/enzo_EnzoSolverMg0.cpp
WillHicks96 Jun 16, 2022
d4f3292
Update src/Enzo/enzo_EnzoSolverMg0.cpp
WillHicks96 Jun 16, 2022
f33031c
More cleaning...
Jun 22, 2022
eeac805
Defining missing deposit fields in constructor
Jun 22, 2022
6248f78
Removed all references to `tiny_number` -- wasn't needed
Jun 23, 2022
cc12575
Made all "deposit" and "accumulate" fields temporary fields.
Jun 24, 2022
a596d1a
Can now build without Grackle
Jun 28, 2022
629dad8
Merge branch 'main' of https://github.com/enzo-project/enzo-e into HEAD
Jun 29, 2022
79b6696
More cleaning/adding comments
Jun 29, 2022
5c5d23b
Changed starZ to type const double
Jun 29, 2022
d2504d0
Merge branch 'main' of https://github.com/enzo-project/enzo-e into HEAD
Jun 29, 2022
ac7bdf6
Set Stopping:time to 0.05 instead of 0.25 in adapt.incl
Jun 29, 2022
7115e18
Added clarifying comments to determineSN() and enforced that for unre…
Jun 30, 2022
220734c
Added assertion that MethodFeedbackSTARSS can only be run with dual e…
Jun 30, 2022
dea6cba
Removed unused output stuff from parameter files in the input directory
Jun 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions config/expanse_icc.py

This file was deleted.

10 changes: 10 additions & 0 deletions doc/source/param/method.incl
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,16 @@ most up-to-date description of Grackle parameters, see the `Grackle parameters <
:Todo: :o:`write`
:Status: **Not accessed**

star_maker
----------

..include:: method_star_maker.incl

feedback
--------

..include:: method_feedback.incl

heat
----

Expand Down
63 changes: 63 additions & 0 deletions doc/source/param/method_feedback.incl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
:p: `Method:feedback` parameters.

----

Parameter: :p:`Method` : :p:`feedback` : :p:`single_sn`
:Summary: :s:`Whether to turn on supernova feedback in EnzoMethodFeedbackSTARSS`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Whether to turn on supernova feedback in EnzoMethodFeedbackSTARSS`

----

Parameter: :p:`Method` : :p:`feedback` : :p:`unrestricted_sn`
:Summary: :s:`Whether to turn on supernova feedback in EnzoMethodFeedbackSTARSS`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Allow for > 1 supernova event per star particle in a timestep.`

----

Parameter: :p:`Method` : :p:`feedback` : :p:`stellar_winds`
:Summary: :s:`Whether to turn on stellar winds in EnzoMethodFeedbackSTARSS`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Whether to turn on stellar wind feedback in EnzoMethodFeedbackSTARSS`

----

Parameter: :p:`Method` : :p:`feedback` : :p:`analytic_SNR_shell_mass`
:Summary: :s:`Calculates supernova remnant shell mass via analytic formulae`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Calculates supernova remnant shell mass via analytic formulae`

----

Parameter: :p:`Method` : :p:`feedback` : :p:`fade_SNR`
:Summary: :s:`Allow coupling to fading phase of SNe in EnzoMethodFeedbackSTARSS`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Allow coupling to fading phase of SNe in EnzoMethodFeedbackSTARSS if cell width is greater than fading radius.`

----

Parameter: :p:`Method` : :p:`feedback` : :p:`NEvents`
:Summary: :s:`Manually set off supernovae in test problems`
:Type: :t:`integer`
:Default: :d:`-1`
:Scope: :z:`Enzo`

:e:`If -1, will probabilistically model supernova. If "NEvents" > 1, will set off N-supernovae per particle, (1 per timestep). Mostly for testing purposes`

----
WillHicks96 marked this conversation as resolved.
Show resolved Hide resolved
191 changes: 191 additions & 0 deletions doc/source/param/method_star_maker.incl
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
:p: `Method:star_maker` parameters.

----

:Parameter: :p:`Method` : :p:`star_maker` : :p:`flavor`
:Summary: :s:`Which star_maker method to use`
:Type: :t:`string`
:Default: :d:`STARSS`
:Scope: :z:`Enzo`

:e:`Options: "STARSS", "stochastic"`

----

:Parameter: :p:`Method` : :p:`star_maker` : :p:`use_density_threshold`
:Summary: :s:`Use number density threshold for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Flag to enable number density threshold for star formation.`

----

:Parameter: :p:`Method` : :p:`star_maker` : :p:`number_density_threshold`
:Summary: :s:`Use number density threshold for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Set number density threshold for star formation. Requires "use_density_threshold"=true.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_overdensity_threshold`
:Summary: :s:`Use overdensity threshold`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Flag to enable overdensity threshold for star formation.`

----
WillHicks96 marked this conversation as resolved.
Show resolved Hide resolved

:Parameter: :p:`Method` : :p:`star_maker` : :p:`overdensity_threshold`
:Summary: :s:`Use overdensity threshold for star formation`
:Type: :t:`float`
:Default: :d:`0.0`
:Scope: :z:`Enzo`

:e:`Set overdensity threshold for star formation. Requires "use_overdensity_threshold"=true.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_velocity_divergence`
:Summary: :s:`Use converging flow criterion for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Flag to check whether div(V) < 0`

----
stefanarridge marked this conversation as resolved.
Show resolved Hide resolved

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_cooling_time`
:Summary: :s:`Check if cooling_time < dynamical_time for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Flag to check if cooling_time < dynamical_time`

----
Comment on lines +64 to +73
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth defining the "cooling time" and "dynamical time" here.


Parameter: :p:`Method` : :p:`star_maker` : :p:`use_temperature_threshold`
:Summary: :s:`Use temperature threshold for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Flag to enable temperature threshold check for star formation`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`temperature_threshold`
:Summary: :s:`Temperature threshold for star formation`
:Type: :t:`float`
:Default: :d:`1e4`
:Scope: :z:`Enzo`

:e:`Set temperature threshold required for star formation. Requires "use_temperature_threshold"=true.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_self_gravitating`
:Summary: :s:`Use FIRE2 virial parameter criterion for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Checks that alpha < 1, where alpha is the virial parameter calculated using the FIRE2 prescription.`

WillHicks96 marked this conversation as resolved.
Show resolved Hide resolved
----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_altAlpha`
:Summary: :s:`Use alternate virial parameter criterion for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Checks that alpha < 1, where alpha is the virial parameter calculated as "potential/total_energy". Currently only accessed by EnzoMethodStarMakerSTARSS. Requires DEBUG_COPY_POTENTIAL flag to be set in EnzoMethodGravity.cpp`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_h2_self_shielding`
:Summary: :s:`Use H2 self-shielding criterion for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Checks that f_shield < 0, f_shield is calculated using fits from Krumholz & Gnedin (2011).'

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`use_jeans_mass`
:Summary: :s:`Use Jeans mass criterion for star formation`
:Type: :t:`logical`
:Default: :d:`false`
:Scope: :z:`Enzo`

:e:`Checks that cell_mass > jeans_mass in a cell'

Comment on lines +125 to +132
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give expression for Jeans mass here.

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`critical_metallicity`
:Summary: :s:`Metallicity threshold for star formation`
:Type: :t:`float`
:Default: :d:`0.0`
:Scope: :z:`Enzo`

:e:`Set metallicity threshold required for star formation`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`maximum_mass_fraction`
:Summary: :s:`Max fraction of gas in a cell that can be converted into a star particle per formation event.`
:Type: :t:`float`
:Default: :d:`0.5`
:Scope: :z:`Enzo`

:e:`Max fraction of gas in a cell that can be converted into a star particle per formation event.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`min_level`
:Summary: :s:`Minimum AMR level required for star formation.`
:Type: :t:`integer`
:Default: :d:`0`
:Scope: :z:`Enzo`

:e:`Set minimum AMR level required for star formation.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`minimum_star_mass`
:Summary: :s:`Minimum star particle mass`
:Type: :t:`float`
:Default: :d:`0.0`
:Scope: :z:`Enzo`

:e:`Set minimum star particle mass.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`maximum_star_mass`
:Summary: :s:`Maximum star particle mass`
:Type: :t:`float`
:Default: :d:`1e4`
:Scope: :z:`Enzo`

:e:`Set maximum star particle mass. For no limit, set "maximum_star_mass" < 0.`

----

Parameter: :p:`Method` : :p:`star_maker` : :p:`turn_off_probability`
:Summary: :s:`Turn off probablistic elements of EnzoMethodStarMakerSTARSS.`
:Type: :t:`logical`
:Default: :d:`fapse`
:Scope: :z:`Enzo`

:e:`Turn off probablistic elements of EnzoMethodStarMakerSTARSS. Mostly meant for debugging.`
stefanarridge marked this conversation as resolved.
Show resolved Hide resolved
Loading