https://github.com/jborrow/sph_example_swift
An example demo using SPH with SWIFT as a submodule.
https://github.com/jborrow/sph_example_swift
Last synced: 3 months ago
JSON representation
An example demo using SPH with SWIFT as a submodule.
- Host: GitHub
- URL: https://github.com/jborrow/sph_example_swift
- Owner: JBorrow
- Created: 2017-12-05T15:04:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-11T15:31:15.000Z (over 7 years ago)
- Last Synced: 2024-12-27T06:41:29.608Z (5 months ago)
- Language: Python
- Size: 390 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SPH Tests in 1D
===============A quick example of an SPH test in 1D. We use `swift` as a submodule to
actually run our test problems rather than having to concern ourselves with
writing our own (slower) SPH code.There are several configuration options that you can tweak. There are of course
the SWIFT configuration options that are available in `parameter_file.yml`, but
the initial condition generator and plotting script are controlled by the
`config.yml` file.### Requirements
+ `python3`
+ `h5py`, `numpy`, `pyyaml`, `pytest` (for the tests) and `matplotlib`. Use
`pip install -r requirements.txt`.
+ `swift`'s requirements, i.e. `hdf5>=1.8.0`, `fftw3`.### Running the problem
To run this, do the following:
+ Ensure the `swiftsim` submodule is loaded/cloned
(i.e. run `git submodule update --init --recursive`)
+ `./run.sh` and wait.`run.sh` sets all of the correct configuration parameters for SWIFT, generates
the initial conditions, makes and runs SWIFT, and then creates plots that it
saves in `./plots`. At the moment the plots are a bit 'rough and ready', but
seeing as the purpose of this is to test the convergence between PE and TSPH,
here are the plots from the initial conditions:### GADGET ICs

### Pressure Entropy ICs
and after convergence:
### GADGET After Convergence

### Pressure Entropy After Convergence
