This code implements the original formulation of the Weighted Essentially Non-Oscillatory [1] (WENO) to solve the Loop Quantum Gravity equations of a collapsing star under the assumption of spherical symmetry. It solves the equation
for various initial condition. The simplest possibility is Oppenheimer-Snyder collapse:
where
but arbitrary density profiles are possible.
A Python module to manage the simulations is available here.
To install the Fortran code run the bash script make.sh using the following command
./make.sh
It creates a folder named build that contains a copy of the source code as present at the moment of compilation, the Makefile and the executable named run. It will also create a subfolder named output that will be the default target for the output routines and copy the standard parameter file that can be customized. It requires the HDF5 [2] package to be installed and on the PATH environmental variable.
To not use HDF5 compile using the Makefile with the NOHDF5=1 option
make NOHDF5=1
or modify by hand the make.sh file.
The name and location of the build folder can be customized providing the make.sh script a path as an argument
./make.sh path/to/custom/build/folder
To remove an existing build folder and all its content the dedicated command is
./make.sh remove path/to/build/folder
To run the code there are two optional arguments to be given:
./run [path/to/parameter/file.dat] [path/to/output/folder]
If they are not given the standard paths will be used; they are .
and ./output
respectively. Please note the code assumes the executable is run from inside the build folder; if executing it from elsewhere these two arguments become mandatory.
The test suite includes a set of tests to verify the functionality and correctness of the project. To run the tests, follow the steps below:
-
Open a terminal and navigate to the project's root directory.
-
Change the current directory to the
tests
folder and compile using the command:
make tests
- Run the test suite using the following command:
./tests
- After running the tests, it is recommended to clean up the generated files by running the following command:
make clean
The parameter file contains the following information:
-
ID
: Index representing the initial condition- Explanation: Identifies the specific initial condition to be used in the simulation.
- ID =
0
, full dynamics for Oppenheimer-Snyder collapse, closed universe - ID =
1
, post bounce dynamics for Oppenheimer-Snyder collapse - ID =
2
, post bounce dynamics with peaked initial density function - ID =
3
, full dynamics starting from atan density profile nd smooth$e^b$ - ID =
4
, full dynamics for Oppenheimer-Snyder collapse, flat universe - ID =
5
, full dynamics for Oppenheimer-Snyder collapse, open universe
- ID =
- Range of values: Any integer value between 0 and 5, inclusive.
- Explanation: Identifies the specific initial condition to be used in the simulation.
-
Total simulation time
: Total duration of the simulation- Explanation: Specifies the length of time the simulation will run.
- Range of values: Any positive floating-point number.
-
Characteristic radius, r0
: Characteristic radius used in the simulation- Explanation: Determines the characteristic size of the system.
- Range of values: Any positive floating-point number.
-
Scale factor, a0
: Scale factor used in the simulation- Explanation: Determines the overall curvature of the system.
- Range of values: Any positive floating-point number.
-
Mass
: Mass value used in the simulation- Explanation: Specifies the mass of the system.
- Range of values: Any positive floating-point number.
-
Order of WENO
: Order of the Weighted Essentially Non-Oscillatory (WENO) scheme- Explanation: Determines the accuracy and stability of the numerical method.
- Range of values: 2 (order 3 is not implemented -yet-).
-
Furthest grid point
: Furthest point on the computational grid- Explanation: Specifies the farthest extent of the computational domain.
- Range of values: Any positive floating-point number.
-
Grid spacing
: Spacing between grid points- Explanation: Specifies the distance between neighboring grid points.
- Range of values: Any positive floating-point number.
-
Save output every ## iterations
: Frequency of saving output- Explanation: Determines how often the simulation results are saved.
- Range of values: Any non-negative integer value. Use
0
to disable saving.
-
Print output every ## iterations
: Frequency of printing output- Explanation: Specifies how often the simulation results are printed.
- Range of values: Any non-negative integer value. Use
0
to disable printing.
-
Number of threads
: Number of threads for parallel processing- Explanation: Determines the degree of parallelism in the simulation.
- Range of values: Any positive integer value.
[1] Xu-Dong Liu, Stanley Osher, Tony Chan, Weighted Essentially Non-oscillatory Schemes, Journal of Computational Physics, Volume 115, Issue 1, 1994, Pages 200-212, ISSN 0021-9991, https://doi.org/10.1006/jcph.1994.1187.