-
Notifications
You must be signed in to change notification settings - Fork 119
Self Gravity with FFT
A new Gravity
class is constructed as a member of MeshBlock
. The Gravity
class contains the gravitational potential array phi
. For the FFT gravity solver, boundary function is also separately set for phi
(which is unnecessary for the multigrid gravity solver; see Self-Gravity with MultiGrid).
A new FFTGravityDriver
class is constructed and solves Poisson's equation using FFT assuming periodic BCs in all directions. FFTGravityDriver::Solve()
function is called in the main loop at every substeps:
- loading density from MeshBlocks to the FFT input array
- execute forward FFT
- multiply kernel (-1/k^2; SetNormFactor() takes the
4*pi*G
factor into account) - execute backward FFT
- retrieve the real part of the FFT output to
phi
- call gravity tasklist to send/recv boundary values
The momentum source term due to the gravitational force is included in the flux calculation by adding the gravitational tensor. See athena/src/hydro/gravity_fluxes.cpp
The energy source term due to the gravitational energy flux is separately added as a source term. See athena/src/hydro/gravity_fluxes.cpp
> cd tst/regression/
> ./run_tests.py grav
> ./configure.py --prob=poisson -fft --grav=fft
> cd bin
> ./athena -i ../inputs/hydro/athinput.poisson
Getting Started
User Guide
- Configuring
- Compiling
- The Input File
- Problem Generators
- Boundary Conditions
- Coordinate Systems and Meshes
- Running the Code
- Outputs
- Using MPI and OpenMP
- Static Mesh Refinement
- Adaptive Mesh Refinement
- Load Balancing
- Special Relativity
- General Relativity
- Passive Scalars
- Shearing Box
- Diffusion Processes
- General Equation of State
- FFT
- High-Order Methods
- Super-Time-Stepping
- Orbital Advection
- Rotating System
- Reading Data from External Files
Programmer Guide