-
Notifications
You must be signed in to change notification settings - Fork 251
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
PhantomNR #480
Merged
Merged
PhantomNR #480
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
0dbad15
Added NRSPH code and ET interface
spencermagnall fdf8fd3
Fixed errors in evolve routine
spencermagnall 09e337c
Major update with shell-crossing,exact interp, etc.
spencermagnall cc7d4c0
Added radiation dominated universe setup
spencermagnall 21de775
Fixed the stress energy tensor calc for 3d case and added options for…
spencermagnall 60fe915
Added parrelisation for simple loops
spencermagnall e391255
Added code to change perturbation wavelength
spencermagnall 802756a
merge+fix issues
danieljprice bcd2830
Fixed compilation errors with master branch merge
spencermagnall b949d7d
Added powerspectrum flrw setup
spencermagnall c5bf979
Fixed stress energy calc for radiation dominated
spencermagnall a50b779
Removed extra tmunu calculation
spencermagnall 21f4d08
Merge branch 'master' of https://github.com/danieljprice/phantom
spencermagnall 6da3cd7
[tab-bot] tabs removed
spencermagnall 797203b
[format-bot] F77-style SHOUTING removed
spencermagnall 0f571ec
[header-bot] updated file headers
spencermagnall 1403280
[space-bot] whitespace at end of lines removed
spencermagnall 7f4c06c
[author-bot] updated AUTHORS file
spencermagnall 615c116
[format-bot] end if -> endif; end do -> enddo; if( -> if (
spencermagnall a041762
[indent-bot] standardised indentation
spencermagnall 995d246
fixed tmunu allocation error
spencermagnall 71866a7
Fixed sqrtg allocation error
spencermagnall bf717dc
Added vectorisation to interpolation
spencermagnall 80541de
Code optimisation and phantom checkpoint added
spencermagnall 1c669de
Improved vectorised code
spencermagnall d8c66ad
Removed unused variable warnings
spencermagnall c96d22e
sync fork with latest phantom version
spencermagnall ad57a52
Hopefully fixed build errors in testsuite
spencermagnall e5efd4d
Fixed precision errors in blob test setup and build
spencermagnall ec658ce
Fixed unused variable warning
spencermagnall 7d22e0e
Added documentation for phantomNR and fixed rad dom setup
spencermagnall e56b5b9
Merge remote-tracking branch 'upstream/master'
spencermagnall f177e58
(flrw) fixed complier warnings
spencermagnall 5c1f127
(einsteintk_wrapper) fixed compiler warning
spencermagnall 4cc40b0
(AUTHORS) fixed authors file with bots
spencermagnall 02d1b2b
(flrwpspec) fixed compile/runtime issues
spencermagnall 87c53cc
Implemented requested for pull request
spencermagnall 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 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 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 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 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,79 @@ | ||
PhantomNR | ||
========= | ||
|
||
Using PhantomNR to simulate general relativistic hydrodynamics on dynamical spacetimes | ||
-------------------------------------------------------------------------------------- | ||
|
||
About phantomNR | ||
~~~~~~~~~~~~~~~ | ||
|
||
`phantomNR <https://github.com/spencermagnall/phantomNR>`__ is | ||
an extension to the General Relativistic Smoothed Particle Hydrodynamics code Phantom, | ||
that allows for the evolution of relativistic fluids with evolving spacetime metrics. | ||
This is acomplished via coupling with the numerical relativity framework Einstein Toolkit (ET). | ||
phantomNR's current usage is as a fully relativistic N-Body code for the simulation of inhomogenous | ||
cosmologies (see `Magnall et al. 2023 <https://ui.adsabs.harvard.edu/abs/2023arXiv230715194M/abstract>`__). | ||
Einstein Toolkit acts as a "driver" for both the spacetime evolution, and the hydrodynamic evolution. | ||
As a consquence, simulations are started and mointered entirely within ET, and are setup using a .par | ||
parameter file which describes the parameters of the simulation. In addition, phantomNR also requires | ||
particle information, which is provided via the standard phantom dump file. | ||
|
||
|
||
Compilation and linking | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
You will first need to compile phantom and phantomsetup | ||
using the flrw setup | ||
|
||
:: | ||
|
||
scripts/writemake.sh flrw > Makefile | ||
|
||
make; make setup | ||
|
||
which compiles the libphantom.a static library which is | ||
required for linking and the phantom and phantomsetup binaries. | ||
|
||
You will also need to set the include directory of phantom in Einstein Toolkit | ||
e.g: | ||
|
||
:: | ||
|
||
PHANTOM_DIR = /Users/smag0001/phantom/phantomET/bin | ||
|
||
Generating a phantom dump file from phantom setup | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Particles can be setup using phantomsetup in two ways: | ||
|
||
1. **Using a regular .setup file** | ||
e.g ./phantomsetup flrw.setup will produce a dump file and .in file using an interactive setup routine. | ||
|
||
|
||
3. **Using a .par file** By appending .setup to the end of an Einstein Toolkit parameter file, phantomsetup | ||
will automatically read in (most) relevant quantities about the simulation setup and generate an appropriate | ||
distribution of particles | ||
|
||
|
||
Troubleshooting | ||
--------------- | ||
|
||
**Issue**: Large Constraint Violations | ||
|
||
|
||
|
||
**Solution**: Generally, this is indicative of a mismatch between the spacetime setup by Einstein Toolkit | ||
and the particle distribution which is setup by Phantom. A large raw constraint violation, may not always be indicative | ||
of a poorly initialised setup however. It is important to check the relative constraint violations (TODO insert equations) | ||
|
||
In many cases, a poor initial constraint is simply a consquence of not setting spacetime and consistently (e.g phi=1e-4 for particles, but phi=1e-6 for spacetime). | ||
We reccomend that the .in and dumpfiles are generated using the .par file of Einstein Toolkit to alleviate this issue. | ||
|
||
Constraint violations may also occur due to a low particle and/or grid resolution | ||
|
||
|
||
|
||
|
||
Using phantomNR on Ozstar/NT | ||
------------------------------- | ||
|
||
|
This file contains 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 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 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 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.
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.
please add a comment after the #ifeq giving a description of the setup (this is used in the docs)