├── .devel
├── .github
├── dependabot.yml
└── workflows
│ ├── black.yml
│ ├── docker.yml
│ └── main.yml
├── .gitignore
├── .readthedocs.yaml
├── .zenodo.json
├── ACKNOWLEDGE
├── AUTHORS
├── CHANGELOG.md
├── CITATION
├── CMakeLists.txt
├── CONTRIBUTING.md
├── INSTALL
├── LICENSE
├── Makefile
├── README.md
├── VERSION
├── cmake
├── FindFFTW.cmake
└── FindMKL.cmake
├── conf.py
├── configure
├── dev_build
├── doc
├── CMakeLists.txt
├── build_menu_pdf.py
├── options.dox
└── source
│ ├── Namelist_Definitions
│ ├── Namelist_Variables.rst
│ ├── boundary_conditions_namelist.txt
│ ├── initial_conditions_namelist.txt
│ ├── io_controls_namelist.txt
│ ├── numerical_controls_namelist.txt
│ ├── physical_controls_namelist.txt
│ ├── problemsize_namelist.txt
│ ├── reference_namelist.txt
│ ├── temporal_controls_namelist.txt
│ └── transport_namelist.txt
│ ├── User_Guide
│ ├── analyze_output.rst
│ ├── arbitrary_scalar_fields.txt
│ ├── coupled_bcs.txt
│ ├── getting_started.rst
│ ├── index.rst
│ ├── model_setup.rst
│ ├── newtonian_cooling.txt
│ ├── physics_math_overview.rst
│ ├── references.bib
│ ├── references.rst
│ ├── run_at_scale.rst
│ ├── run_rayleigh.rst
│ ├── spectral_input.txt
│ ├── troubleshooting.rst
│ ├── under_development.rst
│ └── utilities.rst
│ ├── _static
│ └── cig_logo_dots.png
│ ├── accessing_and_sharing_data.rst
│ ├── citing_rayleigh.rst
│ ├── diagnostic_codes
│ ├── amom_equation.rst
│ ├── axial_field.rst
│ ├── current_density.rst
│ ├── induction_equation.rst
│ ├── ke_equation.rst
│ ├── kinetic_energy.rst
│ ├── magnetic_energy.rst
│ ├── magnetic_field.rst
│ ├── mass_flux.rst
│ ├── me_equation.rst
│ ├── momentum_equation.rst
│ ├── qcodes.rst
│ ├── thermal_energy.rst
│ ├── thermal_equation.rst
│ ├── thermal_field.rst
│ ├── turbKE.rst
│ ├── velocity_field.rst
│ └── vorticity_field.rst
│ ├── getting_help.rst
│ ├── images
│ ├── fig13_Korre&featherstone_2021.jpg
│ ├── fig1_Bice_2023.jpg
│ ├── fig3_Duer_2023.jpg
│ ├── fig3_Orvedahl_2021.jpeg
│ ├── fig6_Heimpel_2022.jpg
│ ├── fig7_hindman2020.jpg
│ └── image_gallery.rst
│ ├── publications
│ ├── all.bib
│ ├── author_plot.R
│ ├── author_plot.png
│ ├── author_plot_no_labels.png
│ ├── publications.rst
│ ├── publications2016.bib
│ ├── publications2018.bib
│ ├── publications2019.bib
│ ├── publications2020.bib
│ ├── publications2021.bib
│ ├── publications2022.bib
│ ├── publications2023.bib
│ └── software.bib
│ ├── quick_reference.rst
│ ├── rayleigh_manual_image_300dpi.jpeg
│ ├── rayleigh_manual_image_logo.jpeg
│ ├── research_enabled_by_rayleigh.rst
│ ├── research_projects.rst
│ └── video_gallery.rst
├── docker-devel
├── docker-devel.bat
├── docker
├── rayleigh-buildenv-focal
│ └── Dockerfile
├── rayleigh-buildenv-jammy
│ ├── Dockerfile
│ └── README.md
├── rayleigh-devel-jammy
│ ├── Dockerfile
│ └── entrypoint.sh
├── rayleigh-tacc
│ ├── Dockerfile
│ ├── Readme.md
│ └── build.sh
└── rayleigh
│ ├── Dockerfile
│ └── README.md
├── environment.yml
├── environment_doc.yml
├── etc
├── check_ipynb_cleared
└── make_dirs
├── examples
├── custom_reference_states
│ ├── Anelastic_Dim_CZ.ipynb
│ ├── Anelastic_NonDim_CZ.ipynb
│ ├── Boussinesq_CZ.ipynb
│ ├── Boussinesq_Dynamo_Viscous.ipynb
│ ├── MESA-input-1Msun-ZAMS.ipynb
│ ├── main_input_Boussinesq
│ ├── main_input_Boussinesq_Dynamo_Viscous
│ ├── main_input_dim_anelastic
│ ├── main_input_mesa
│ ├── main_input_nondim_anelastic
│ ├── mesa.py
│ └── profile_mesa.data
├── custom_thermal_profile
│ └── custom_thermal_profile.ipynb
├── main_input_class
│ ├── jobinfo.txt
│ ├── main_input
│ └── main_input_demo.ipynb
└── ultraspherical_polynomials
│ ├── Reaction_Diffusion.ipynb
│ └── Scalar_Diffusion.ipynb
├── index.rst
├── input_examples
├── README
├── anelastic_dimensional
├── anelastic_nondimensional
├── b2010_case0_0T_input
├── b2010_case0_100T_input
├── b2010_case0_80T_input
├── b2010_case0_InitCond
├── benchmark_diagnostics_input
├── c2001_case0_input
├── c2001_case0_minimal
├── c2001_case1_input
├── c2001_case1_minimal
├── j2011_steady_hydro_input
├── j2011_steady_hydro_minimal
├── j2011_steady_mhd_input
├── j2011_steady_mhd_minimal
├── main_input_jupiter
├── main_input_mhd_jones_FD
└── main_input_sun
├── job_scripts
├── NASA_Pleiades
│ └── pleiades_script.sh
└── TACC_Stampede3
│ └── stampede3_jobscript.sh
├── post_processing
├── Diagnostic_Plotting.ipynb
├── YT_volrender_tutorial1.ipynb
├── YT_volrender_tutorial2.ipynb
├── checkpoint_tutorial.ipynb
├── convert_full3d_to_nc.py
├── convert_full3d_to_vtu.py
├── generate_mapping.py
├── interpolation
│ ├── Interpolation.F90
│ ├── Main.F90
│ ├── Makefile
│ ├── Read_CMD.F90
│ └── test.F90
├── legacy
│ ├── idl
│ │ ├── read_azavg.pro
│ │ ├── read_gavg.pro
│ │ ├── read_profile.pro
│ │ ├── read_reference.pro
│ │ ├── read_shell.pro
│ │ ├── read_shellavg.pro
│ │ ├── read_spectra.pro
│ │ └── read_time.pro
│ ├── kyle_interp
│ │ ├── Makefile
│ │ ├── Makefile.gfortran
│ │ ├── convert_vdf.bsh
│ │ ├── driver.f90
│ │ ├── input
│ │ ├── interp.bsh
│ │ ├── interp.f90
│ │ └── interpolation.f90
│ ├── python
│ │ ├── README
│ │ ├── azavg_util.py
│ │ ├── checkpoint_reading.py
│ │ ├── diagnostic_reading.py
│ │ ├── grid_util.py
│ │ ├── plot_azavg.py
│ │ ├── plot_energy_distro.py
│ │ ├── plot_energy_flux.py
│ │ ├── plot_energy_trace.py
│ │ ├── plot_equatorial_slice.py
│ │ ├── plot_meridional_slice.py
│ │ ├── plot_reference.py
│ │ ├── plot_shell_slice.py
│ │ ├── plot_spectrum.py
│ │ ├── plot_spectrum2.py
│ │ ├── translate_script.py
│ │ ├── view_shell_basemap.py
│ │ └── view_shell_mayavi.py
│ └── spectral_operations.ipynb
├── lut.py
├── lut_mapping.py
├── lut_shortcuts.py.example
├── plot_AZ_Avgs.py
├── plot_Equatorial_Slices.py
├── plot_G_Avgs.py
├── plot_Meridional_Slices.py
├── plot_Point_Probes.py
├── plot_SPH_Modes.py
├── plot_Shell_Avgs.py
├── plot_Shell_Slices.py
├── plot_Shell_Spectra.py
├── plot_shells.ipynb
├── projection.py
├── pyproject.toml
├── rayleigh.py
├── rayleigh_diagnostics.py
├── rayleigh_spectral_input.py
├── reference_tools.py
├── sample_checkpoint_T
├── setup.cfg
├── spectral_utils.py
├── spectral_utils_tutorial.ipynb
├── vapor_converter.ipynb
└── vapor_notebook.ipynb
├── pre_processing
└── rayleigh_spectral_input.py
├── spack-repo
├── packages
│ └── rayleigh
│ │ └── package.py
└── repo.yaml
├── src
├── CMakeLists.txt
├── Data_Structures
│ └── Structures.F90
├── Diagnostics
│ ├── Diagnostics_ADotGradB.F90
│ ├── Diagnostics_Angular_Momentum.F90
│ ├── Diagnostics_Axial_Field.F90
│ ├── Diagnostics_Base.F90
│ ├── Diagnostics_Current_Density.F90
│ ├── Diagnostics_Custom.F90
│ ├── Diagnostics_Energies.F90
│ ├── Diagnostics_Induction.F90
│ ├── Diagnostics_Inertial_Forces.F90
│ ├── Diagnostics_Interface.F90
│ ├── Diagnostics_KE_Flux.F90
│ ├── Diagnostics_Linear_Forces.F90
│ ├── Diagnostics_Lorentz_Forces.F90
│ ├── Diagnostics_Magnetic_Field.F90
│ ├── Diagnostics_Mean_Correction.F90
│ ├── Diagnostics_Miscellaneous.F90
│ ├── Diagnostics_Poynting_Flux.F90
│ ├── Diagnostics_Scalars.F90
│ ├── Diagnostics_Second_Derivatives.F90
│ ├── Diagnostics_Thermal_Energies.F90
│ ├── Diagnostics_Thermal_Equation.F90
│ ├── Diagnostics_Thermodynamic_Gradients.F90
│ ├── Diagnostics_TurbKE_Budget.F90
│ ├── Diagnostics_Velocity_Diffusion.F90
│ ├── Diagnostics_Velocity_Field.F90
│ ├── Diagnostics_Vorticity_Field.F90
│ ├── Verifications
│ │ ├── derivatives
│ │ │ ├── main_input
│ │ │ └── verify_derivatives.ipynb
│ │ └── kinetic_helicity
│ │ │ ├── main_input
│ │ │ └── test_helicity_components.py
│ ├── amom_equation_codes.F
│ ├── axial_field_codes.F
│ ├── current_density_codes.F
│ ├── induction_equation_codes.F
│ ├── ke_equation_codes.F
│ ├── kinetic_energy_codes.F
│ ├── magnetic_energy_codes.F
│ ├── magnetic_field_codes.F
│ ├── mass_flux_codes.F
│ ├── me_equation_codes.F
│ ├── momentum_equation_codes.F
│ ├── scalars_field_codes.F
│ ├── thermal_energy_codes.F
│ ├── thermal_equation_codes.F
│ ├── thermal_field_codes.F
│ ├── turbKE_codes.F
│ ├── velocity_field_codes.F
│ └── vorticity_field_codes.F
├── IO
│ ├── BufferedOutput.F90
│ ├── General_IO.F90
│ ├── MakeDir.F90
│ ├── MakeDir.F90_IBM
│ ├── Parallel_IO.F90
│ ├── Spherical_IO.F90
│ └── cmkdir.c
├── Include
│ └── indices.F
├── Machinefiles
│ ├── machine.Mira
│ ├── machine.Nick
│ ├── machine.Pleiades
│ ├── machine.Sanitas
│ ├── machine.SummitCU
│ ├── machine.blank
│ └── old_makefiles
│ │ ├── Makefile_CIG
│ │ ├── Makefile_CU
│ │ ├── Makefile_Discover
│ │ ├── Makefile_Fermi
│ │ ├── Makefile_LCD
│ │ ├── Makefile_Mira
│ │ ├── Makefile_Nick
│ │ ├── Makefile_Nick2
│ │ ├── Makefile_Pleiades
│ │ ├── Makefile_Scylla
│ │ ├── Makefile_Stampede
│ │ └── Makefile_Standard
├── Makefile
├── Makefile.fdeps
├── Math_Layer
│ ├── Chebyshev_Polynomials.F90
│ ├── Chebyshev_Polynomials.mira_omp
│ ├── Chebyshev_Polynomials_Alt.F90
│ ├── Finite_Difference.F90
│ ├── Fourier_Derivatives.F90
│ ├── Fourier_Transform.F90
│ ├── Fourier_Transform.mira_omp
│ ├── Legendre_Polynomials.F90
│ ├── Legendre_Transforms.F90
│ ├── Legendre_Transforms.F90_oldlayout
│ ├── Linear_Solve.F90
│ ├── Math_Constants.F90
│ ├── Math_Utility.F90
│ ├── Ra_Precision.F90
│ ├── Spectral_Derivatives.F90
│ ├── Theta_Derivatives.F90
│ └── Timing.F90
├── Parallel_Framework
│ ├── All_to_All.F90
│ ├── General_MPI.F90
│ ├── ISendReceive.F90
│ ├── Load_Balance.F90
│ ├── Load_Balance.notes
│ ├── MPI_LAYER.F90
│ ├── Makefile
│ ├── Parallel_Framework.F90
│ ├── Parallel_Framework.mira_omp
│ ├── Ra_MPI_Base.F90
│ ├── SendReceive.F90
│ ├── Spherical_Buffer.F90
│ ├── Transposes.notes
│ └── reports
│ │ ├── assemble_cube.idl
│ │ ├── assemble_cube.pro
│ │ ├── deriv_test.idl
│ │ ├── grid
│ │ ├── read_4d.pro
│ │ ├── read_4dc.pro
│ │ ├── read_grid.pro
│ │ └── read_sr.pro
├── Physics
│ ├── Benchmarking.F90
│ ├── BoundaryConditions.F90
│ ├── Checkpointing.F90
│ ├── ClockInfo.F90
│ ├── Controls.F90
│ ├── Fields.F90
│ ├── Generic_Input.F90
│ ├── Initial_Conditions.F90
│ ├── Input.F90
│ ├── Main.F90
│ ├── PDE_Coefficients.F90
│ ├── ProblemSize.F90
│ ├── Run_Parameters.F90
│ ├── Sphere_Driver.F90
│ ├── Sphere_Hybrid_Space.F90
│ ├── Sphere_Linear_Terms.F90
│ ├── Sphere_Physical_Space.F90
│ ├── Sphere_Spectral_Space.F90
│ └── Timers.F90
├── Test_Suite
│ ├── TestSuite.F90
│ ├── Test_Cheby.F90
│ └── Test_SHT.F90
├── format_var.sh
├── gen_header.sh
└── object_list
└── tests
├── c2001_case0
├── Benchmark_Reports
│ └── 00000400
└── main_input
├── c2001_case0_FD_uniform
├── Benchmark_Reports
│ └── 00000400
└── main_input
├── chi_scalar
├── T.check
│ └── main_input
├── T
│ └── main_input
├── bench
│ └── main_input
├── chi.check
│ └── main_input
├── chi
│ └── main_input
├── run_test.sh
└── test_output.py
├── coupled_bcs
├── const
│ ├── generate_input.py
│ └── main_input
├── run_test.sh
└── test_output.py
├── custom_reference
├── augment
│ ├── Benchmark_Reports
│ │ └── 00000200
│ ├── augment.py
│ └── main_input
├── basic
│ ├── Benchmark_Reports
│ │ └── 00000200
│ ├── gen_case0.py
│ └── main_input
└── run_test.sh
├── generic_input
├── base
│ └── main_input
├── bcs_base
│ └── main_input
├── bcs_script
│ └── main_input
├── radial_base
│ └── main_input
├── radial_dense
│ ├── generate_input.py
│ └── main_input
├── radial_sparse
│ ├── generate_input.py
│ └── main_input
├── run_test.sh
├── script
│ ├── generate_magnetic_input.py
│ └── main_input
└── test_output.py
└── unit_tests
└── SHT
├── expected_output.out
└── main_input
/.devel:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/.devel
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Set update schedule for GitHub Actions
2 |
3 | version: 2
4 | updates:
5 |
6 | - package-ecosystem: "github-actions"
7 | directory: "/"
8 | schedule:
9 | # Check for updates to GitHub Actions every week
10 | interval: "weekly"
11 |
--------------------------------------------------------------------------------
/.github/workflows/black.yml:
--------------------------------------------------------------------------------
1 | name: Lint
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | lint:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v4
10 | - uses: psf/black@stable
11 | with:
12 | src: "./post_processing/rayleigh.py"
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | interp3d
2 | make.inc
3 |
4 | /src/build/
5 | /src/build/compile
6 |
7 | /doc/build
8 |
9 | *~
10 |
11 | *.mod
12 |
13 | *.o
14 |
15 | *.swp
16 |
17 | *.pyc
18 |
19 | fd_notes.log
20 |
21 | fd_notes.aux
22 |
23 | fd_notes.dvi
24 |
25 | /bin/
26 |
27 |
28 | # files generated by latex
29 | *.clo
30 | *.cls
31 | *.aux
32 | *.auxlock
33 | *.dpth
34 | *.dep
35 | *.glo
36 | *.idx
37 | *.log
38 | *.bcf
39 | *.toc
40 | *.ist
41 | *.acn
42 | *.acr
43 | *.alg
44 | *.bbl
45 | *.blg
46 | *.dvi
47 | *.glg
48 | *.gls
49 | *.ilg
50 | *.ind
51 | *.lof
52 | *.lot
53 | *.maf
54 | *.mtc
55 | *.mtc1
56 | *.md5
57 | *.out
58 | *.synctex.gz
59 | *.gz
60 | *.run.xml
61 | *.nav
62 | *.snm
63 | *.vrb
64 |
65 | # python compiled modules
66 | *.pyc
67 | *.pyo
68 |
69 | # lut_shortcuts: meant to be edited/changed by the user
70 | # lut_mapping_custom: includes user defined code
71 | post_processing/lut_shortcuts.py
72 | post_processing/lut_mapping_custom.py
73 |
74 | # files generated by eclipse IDE
75 | .cproject
76 | .metadata/
77 | .project
78 | RemoteSystemsTempFiles/
79 |
80 | # MacOS desktop file
81 | .DS_Store
82 |
83 | # Jupyter notebook checkpoints
84 | .ipynb_checkpoints
85 |
86 | # Reference State files generated by notebooks
87 | CZtest.dat
88 | dimensional.dat
89 | Boussinesq.dat
90 | custom_ref_viscous.dat
91 | cref_from_MESA.dat
92 | .vscode/settings.json
93 |
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | #Use Mamba instead of Conda to avoid running into memory limits (recommended by ReadtheDocs)
9 | build:
10 | os: "ubuntu-20.04"
11 | tools:
12 | python: "mambaforge-4.10"
13 |
14 | # Build documentation in the root directory with Sphinx
15 | sphinx:
16 | configuration: ./conf.py
17 |
18 | # Optionally build your docs in additional formats such as PDF and ePub
19 | formats:
20 | - pdf
21 |
22 | conda:
23 | environment: environment_doc.yml
24 |
--------------------------------------------------------------------------------
/.zenodo.json:
--------------------------------------------------------------------------------
1 | {
2 | "creators": [
3 | {
4 | "name": "Nicholas Featherstone",
5 | "affiliation": "University of Colorado",
6 | "orcid": "0000-0002-2256-5884"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/ACKNOWLEDGE:
--------------------------------------------------------------------------------
1 | For any work that uses Rayleigh, or work that uses software which incorporates
2 | Rayleigh source code, please acknowledge the authors and funding agencies as
3 | indicated in our online documentation:
4 |
5 | https://rayleigh-documentation.readthedocs.io/en/latest/doc/source/citing_rayleigh.html
6 |
7 | If you have no access to the online documentation, please refer to the following file in the Rayleigh repository:
8 |
9 | doc/source/citing_rayleigh.rst
10 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Rayleigh was originally developed by Nicholas Featherstone.
2 |
3 | Since then many more people have contributed and Rayleigh has grown into a
4 | project with many authors. A complete and growing list can be found at:
5 | https://github.com/geodynamics/Rayleigh/graphs/contributors.
6 |
7 | Rayleigh's primary developers are:
8 | - Nicholas Featherstone
9 | - Philipp Edelmann
10 | - Rene Gassmoeller
11 | - Loren Matilsky
12 | - Ryan Orvedahl
13 | - Cian Wilson
14 |
15 | Special thanks to Michael Calkins, Moritz Heimpel, Bradley Hindman, Wei Jiang,
16 | Ryan Orvedahl, Krista Soderlund, and Rakesh Yadav for their intensive beta
17 | testing of early version of the Rayleigh code.
18 |
--------------------------------------------------------------------------------
/CITATION:
--------------------------------------------------------------------------------
1 |
2 | Please cite the appropriate references if you publish results that were obtained in some part using Rayleigh as indicated in our online documentation:
3 |
4 | https://rayleigh-documentation.readthedocs.io/en/latest/doc/source/citing_rayleigh.html
5 |
6 | If you have no access to the online documentation, please refer to the following file in the Rayleigh repository:
7 |
8 | doc/source/citing_rayleigh.rst
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | 1.2.0
2 |
--------------------------------------------------------------------------------
/dev_build:
--------------------------------------------------------------------------------
1 | make distclean
2 | ./configure -devel "$@"
3 | make -j
4 | make install
5 |
--------------------------------------------------------------------------------
/doc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2024 by the authors of the RAYLEIGH code.
3 | #
4 | # This file is part of RAYLEIGH.
5 | #
6 | # RAYLEIGH is free software; you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation; either version 3, or (at your option)
9 | # any later version.
10 | #
11 | # RAYLEIGH is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with RAYLEIGH; see the file LICENSE. If not see
18 | # .
19 |
20 |
21 | CMAKE_MINIMUM_REQUIRED(VERSION 3.13.4)
22 |
23 | ####################################################
24 | # Generate the manual
25 | ####################################################
26 |
27 | # Find the documentation sources
28 | file(GLOB_RECURSE SOURCES
29 | source/*)
30 |
31 | # Build HTML target
32 | message(STATUS "===== Configuring documentation ===============")
33 | message(STATUS "")
34 |
35 | ADD_CUSTOM_COMMAND(
36 | OUTPUT
37 | ${PROJECT_BINARY_DIR}/doc/build/html/index.html
38 | COMMAND
39 | sphinx-build -M html ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}/doc/build
40 | DEPENDS
41 | ${SOURCES}
42 | COMMENT
43 | "Generating the html documentation."
44 | )
45 |
46 | ADD_CUSTOM_TARGET(doc_html
47 | DEPENDS
48 | ${PROJECT_BINARY_DIR}/doc/build/html/index.html
49 | )
50 |
51 | # Build pdf target
52 | ADD_CUSTOM_COMMAND(
53 | OUTPUT
54 | ${PROJECT_BINARY_DIR}/doc/build/latex/rayleigh.pdf
55 | COMMAND
56 | sphinx-build -M latexpdf ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}/doc/build
57 | DEPENDS
58 | ${SOURCES}
59 | COMMENT
60 | "Generating the latexpdf documentation."
61 | )
62 |
63 | ADD_CUSTOM_TARGET(doc_pdf
64 | DEPENDS
65 | ${PROJECT_BINARY_DIR}/doc/build/latex/rayleigh.pdf
66 | )
67 |
68 | ################################################################
69 | # The final target: Build it all
70 | ################################################################
71 | message(STATUS "Setting up build information")
72 | ADD_CUSTOM_TARGET(doc
73 | DEPENDS
74 | doc_html
75 | doc_pdf
76 | )
77 |
--------------------------------------------------------------------------------
/doc/source/Namelist_Definitions/Namelist_Variables.rst:
--------------------------------------------------------------------------------
1 |
2 | .. _namelists:
3 |
4 | Input parameters
5 | ==============================================
6 |
7 | This page provides a quick reference for all supported namelist variables in the main_input file.
8 |
9 |
10 | Problemsize
11 | -------------------------
12 | This namelist is used to specify the grid.
13 |
14 |
15 | .. include:: ../Namelist_Definitions/problemsize_namelist.txt
16 |
17 | Numerical Controls
18 | -------------------------
19 | This namelist provides access to Rayleigh's run-time optimization options.
20 |
21 | .. include:: ../Namelist_Definitions/numerical_controls_namelist.txt
22 |
23 | Physical Controls
24 | -------------------------
25 | This namelist controls the physical effects used in a Rayleigh simulation.
26 |
27 | .. include:: ../Namelist_Definitions/physical_controls_namelist.txt
28 |
29 | Temporal Controls
30 | -------------------------
31 | This namelist controls timing, time-stepping, and checkpointing in Rayleigh.
32 |
33 | .. include:: ../Namelist_Definitions/temporal_controls_namelist.txt
34 |
35 | IO Controls
36 | -------------------------
37 | This namelist provides various options to control Rayleigh's input and output cadence and structure.
38 |
39 | .. include:: ../Namelist_Definitions/io_controls_namelist.txt
40 |
41 | Output
42 | -------------------------
43 | This namelist is described in extensive detail in Rayleigh/post_processing/Diagnostic_Plotting.ipynb. Please see that document for a discussion of these namelist variables and the general structure of Rayleigh's output.
44 |
45 |
46 | Boundary Conditions
47 | -------------------------
48 | This namelist provides those options necessary to determine the boundary conditions employed in a Rayleigh model.
49 |
50 | .. include:: ../Namelist_Definitions/boundary_conditions_namelist.txt
51 |
52 | Initial Conditions
53 | -------------------------
54 | All variables necessary to initialize velocity, temperature, pressure, and magnetic field are supplied here.
55 |
56 | .. include:: ../Namelist_Definitions/initial_conditions_namelist.txt
57 |
58 |
59 | Reference
60 | -------------------------
61 | This namelist provides options to control the properties of Rayleigh's background state.
62 |
63 | .. include:: ../Namelist_Definitions/reference_namelist.txt
64 |
65 | Transport
66 | -------------------------
67 | This namelist enables control of Rayleigh's diffusivities.
68 |
69 | .. include:: ../Namelist_Definitions/transport_namelist.txt
70 |
--------------------------------------------------------------------------------
/doc/source/Namelist_Definitions/io_controls_namelist.txt:
--------------------------------------------------------------------------------
1 | **stdout_file**
2 | If desired, set this variable to the name of a file to which Rayleigh's text output is redirected. This can be useful for monitoring run progress and time-step size on systems that otherwise don't produce the text output until a run has complete. The default value is 'nofile,' which indicates that Rayleigh should not redirect stdout to a file.
3 | **stdout_flush_interval**
4 | Number of lines to cache before writing to the stdout_file if used. This prevents excessive disk access while a model is evolving. The default value if 50.
5 | **jobinfo_file**
6 | Set this variable to the name of a file, generated during Rayleigh's initialization, that contains the values assigned to each namelist variable, along with compiler and Git hash information. The default filename is 'jobinfo.txt'
7 | **terminate_file**
8 | The name of a file that, if found in the top-level simulation directory, indicates Rayleigh should terminate execution. This can be useful when trying to exit a run cleanly before the scheduled wall time runs out. The default filename is 'terminate'.
9 | **terminate_check_interval**
10 | Number of iterations between successive checks for the presence of the job termination file. The default value is 50.
11 | **statusline_interval**
12 | Number of iterations between successive outputs to sdout indicating time step number and size. The default value is 1, so that iteration number and time-step size are printed during every time step.
13 | **outputs_per_row**
14 | Determines the number of process columns that particpate in MPI-IO during checkpointing and diagnostic outputs. Acceptable values fall in the range [1,nprow], with a default value of 1.
15 | **integer_output_digits**
16 | Number of digits to use for all integer-based filenames (e.g., G_Avgs/00000001). The default value is 8.
17 | **integer_input_digits**
18 | Number of digits for integer-based checkpoint names to be read during a restart. The default value is 8.
19 | **decimal_places**
20 | Number of digits to use after then decimal point for those portions of Rayleigh's text output that displayed in scientific notation. The default value is 3.
21 |
22 |
23 |
--------------------------------------------------------------------------------
/doc/source/Namelist_Definitions/numerical_controls_namelist.txt:
--------------------------------------------------------------------------------
1 | **band_solve**
2 | For use with models employing either a finite-difference scheme or at least three Chebyshev domains in radius. In those models, the rows of the normally dense matrices used in the Crank-Nicolson scheme may be rearranged into a banded or block-banded form for finite-difference and Chebyshev methods respectively. Setting this variable to .true. will perform this rearrangement, and Rayleigh will execute a band, rather than dense, solve during each timestep. Using the band-solve approach can help save memory and may yield performance gains. No benefit is gained for models using one or two Chebyshev domains. The default behavior is to use a dense solve (band_solve = .false.).
3 | **static_transpose**
4 | When set to .true., buffer space used during Rayleigh's transposes is allocated once at runtime. The default behavior (static_tranpose=.false.) is to allocate and deallocate buffer space during each transpose. On some machines, avoiding this cycle of allocation/deallocation has led to minor performance improvements.
5 | **static_config**
6 | When set to .true., sphericalbuffer configurations (e.g., p3a, s2b) are allocated once at runtime. The default behavior (static_config=.false.) is to save memory by deallocating memory associated with the prior configuration space following a transpose. If memory is not an issue, this may lead to minor performance improvements on some systems.
7 | **pad_alltoall**
8 | When set to .true., transpose buffers are padded throughout with zeros to enforce uniform message size, and a standard alltoall is used for each transpose. The default behavior (pad_alltoall=.false.) uses alltoallv and variable message sizes. Depending on the underlying alltoall algorithms in the MPI implementation used, performance my differ between these two approaches.
9 | **chebyshev**
10 | When set to .true. (the default setting), a Chebyshev collocation scheme will be employed in radius. When set to .false., a 4th-order finite-difference scheme will instead be employed for the interior points, and 2nd-order finite differences will be applied at the inner and outer radial boundaries.
11 |
12 |
--------------------------------------------------------------------------------
/doc/source/Namelist_Definitions/transport_namelist.txt:
--------------------------------------------------------------------------------
1 | **{nu,kappa,eta}_type**
2 | Determines the radial profile of the associated diffusion coefficient.
3 | * type 1 : no radial variation
4 | * type 2 : diffusivity profile varies as :math:`\rho^{n}` for some real number *n*.
5 | * type 3 : diffusivity profile is read from a custom-reference-state file
6 |
7 | **{nu,kappa,eta}_top**
8 | Specifies the value of the associated diffusion coefficient at the upper boundary. This is primarily used for dimensional models or those employing a custom nondimensionalization via Rayleigh's custom-reference interface. For Rayleigh's intrinsic nondimensional reference states, the following values are assumed:
9 | * reference_type 1: :math:`\nu_\mathrm{top}=1`, :math:`\kappa_\mathrm{top}=1/\mathrm{Pr}`, :math:`\eta_\mathrm{top}=1/\mathrm{Pm}`
10 | * reference_type 3: :math:`\nu_\mathrm{top}=\mathrm{Ek}`, :math:`\kappa_\mathrm{top}=\mathrm{Ek}/\mathrm{Pr}`, :math:`\eta_\mathrm{top}=\mathrm{Ek}/\mathrm{Pm}`
11 | **{nu,kappa,eta}_power**
12 | Denotes the value of the exponent *n* in the :math:`\rho^{n}` variation associated with diffusion type 2.
13 | **hyperdiffusion**
14 | Set this to variable to .true. to enable hyperdiffusion. The default value is .false. When active, diffusivities are multiplied by an additional factor such that:
15 | * :math:`\{\nu,\kappa,\eta\}\rightarrow\{\nu,\kappa,\eta\}\left(1+\alpha\left(\frac{\ell-1}{\ell_\mathrm{max}-1}\right)^\beta\right)`
16 | **hyperdiffusion_alpha**
17 | Determines the value of :math:`\alpha` when hyper diffusion is active.
18 | **hyperdiffusion_beta**
19 | Determines the value of :math:`\beta` when hyper diffusion is active.
20 |
--------------------------------------------------------------------------------
/doc/source/User_Guide/index.rst:
--------------------------------------------------------------------------------
1 | User Guide
2 | **********
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 |
7 | getting_started
8 | physics_math_overview
9 | model_setup
10 | run_rayleigh
11 | run_at_scale
12 | analyze_output
13 | ../../../CONTRIBUTING.md
14 | troubleshooting
15 | references
16 | utilities
17 | under_development
18 |
--------------------------------------------------------------------------------
/doc/source/User_Guide/newtonian_cooling.txt:
--------------------------------------------------------------------------------
1 | .. _newtonian_cooling:
2 |
3 | Newtonian Cooling
4 | -----------------------
5 |
6 | We have added an initial implementation of Newtonian cooling to the code that adds a term to the thermal energy equation of the form
7 |
8 | .. math::
9 | :label: newton
10 |
11 | \frac{\partial \Theta}{\partial t} = \frac{\Delta\Theta_{\mathrm{eq}}-\Theta}{\tau_\mathrm{eq}}.
12 |
13 | Here, :math:`\Delta\Theta_\mathrm{eq}` is a target temperature/entropy variation about the background state and :math:`\tau_\mathrm{eq}` is the cooling timescale. Newtonian cooling can be turned on by setting ``newtonian_cooling=.true.`` in the ``physical_controls_namelist``, and the cooling time is similarly controlled by specifying the value of ``newtonian_cooling_time``.
14 |
15 | At present, :math:`\Delta\Theta_\mathrm{eq}` is allowed to take one of two forms. These are controlled by setting the ``newtonian_cooling_type`` variable in ``physical_controls_namelist``. A value of 1 yields
16 |
17 | .. math::
18 | :label: ncteq1
19 |
20 | \Delta\Theta_\mathrm{eq} = A\,f_\mathrm{c}(r),
21 |
22 | and a value of 2 yields
23 |
24 | .. math::
25 | :label: ncteq2
26 |
27 | \Delta\Theta_\mathrm{eq} = A\,f_\mathrm{c}(r)\mathrm{sin}(\theta)\mathrm{sin}(\phi),
28 |
29 | where :math:`f_\mathrm{c}(r)` is the radial cooling profile. It is 1 by default, but the user can specify a file from which to read a custom profile by setting the ``newtonian_cooling_profile_file`` variable in the ``physical_controls_namelist``. The amplitude :math:`A` is controlled by setting the variable ``newtonian_cooling_tvar_amp``. As an example, to use Newtonian cooling, one can and and modify the following lines in the ``physical_controls_namelist``.
30 |
31 | ::
32 |
33 | &physical_controls_namelist
34 | newtonian_cooling = .true.
35 | newtonian_cooling_type = 1
36 | newtonian_cooling_time = 1.0d0
37 | newtonian_cooling_tvar_amp = 1.0d0
38 | newtonian_cooling_profile_file = 'my_cooling_profile.dat'
39 | /
40 |
41 |
42 |
--------------------------------------------------------------------------------
/doc/source/User_Guide/references.rst:
--------------------------------------------------------------------------------
1 | .. raw:: latex
2 |
3 |
4 | \clearpage
5 |
6 |
7 | References
8 | ===========
9 |
10 | .. bibliography:: references.bib
11 |
--------------------------------------------------------------------------------
/doc/source/User_Guide/utilities.rst:
--------------------------------------------------------------------------------
1 | .. raw:: latex
2 |
3 | \clearpage
4 |
5 | .. _utilities:
6 |
7 | Utilities
8 | =========
9 |
10 | This page documents various utility scripts that are used with Rayleigh, either for pre- or post-processing.
11 |
12 | .. _spectral_input:
13 |
14 | Spectral Input
15 | --------------
16 |
17 | .. include:: spectral_input.txt
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/doc/source/_static/cig_logo_dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/_static/cig_logo_dots.png
--------------------------------------------------------------------------------
/doc/source/accessing_and_sharing_data.rst:
--------------------------------------------------------------------------------
1 | Accessing and Sharing Model Data
2 | ***********************************
3 |
4 | Accessing Available Datasets
5 | ----------------------------
6 |
7 | Rayleigh model configurations and checkpoint data of several publications can be accessed here:
8 |
9 | - https://osf.io/j275z/
10 | - https://osf.io/qbt32/
11 | - https://doi.org/10.5281/zenodo.7117668
12 |
13 | A large number of Rayleigh simulations were generated as part of the INCITE project
14 | "Frontiers in Planetary and Stellar Magnetism Through High Performance Computing"
15 | supported by the Department of Energy and the Computational Infrastructure for Geodynamics.
16 | Results and publications of this project can be found here:
17 |
18 | - https://geodynamics.org/groups/dynamo/frontiers
19 | - https://incite.readthedocs.io/en/latest/
20 |
21 | Sharing Your Rayleigh Data
22 | --------------------------
23 |
24 | If you want to share your Rayleigh data, please follow our established best practics:
25 |
26 | Under construction.
27 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/axial_field.rst:
--------------------------------------------------------------------------------
1 | Axial Field
2 | ====================================================================
3 |
4 | ======================================================= ====== =====================
5 | :math:`v_z` 2801 v\_z
6 | :math:`\overline{v_z}` 2802 vm\_z
7 | :math:`v^\prime_z` 2803 vp\_z
8 | :math:`\frac{\partial v_z}{\partial z}` 2804 dvzdz
9 | :math:`\overline{\frac{\partial v_z}{\partial z}}` 2805 dvzdz\_m
10 | :math:`\frac{\partial v_z}{\partial z}^\prime` 2806 dvzdz\_p
11 | :math:`\omega_z` 2807 vort\_z
12 | :math:`\overline{\omega_z}` 2808 vortm\_z
13 | :math:`\omega_z^\prime` 2809 vortp\_z
14 | :math:`v_z \omega_z` 2810 kin\_helicity\_z
15 | :math:`\overline{v_z} \overline{\omega_z}` 2811 kin\_helicity\_z\_mm
16 | :math:`v_z^{\prime} \omega_z^\prime` 2812 kin\_helicity\_z\_pp
17 | :math:`\overline{v_z} \omega_z^\prime` 2813 kin\_helicity\_z\_mp
18 | :math:`v_z^\prime \overline{\omega_z}` 2814 kin\_helicity\_z\_pm
19 | :math:`B_z` 2815 B\_z
20 | :math:`\overline{B_z}` 2816 Bm\_z
21 | :math:`B_z^\prime` 2817 Bp\_z
22 | :math:`\mathcal{J}_z` 2818 J\_z
23 | :math:`\overline{\mathcal{J}_z}` 2819 Jm\_z
24 | :math:`\mathcal{J}_z^\prime` 2820 Jp\_z
25 | :math:`\frac{\partial \Theta}{\partial z}` 2821 dTvardz
26 | :math:`\overline{\frac{\partial \Theta}{\partial z}}` 2822 dTvardz\_m
27 | :math:`\frac{\partial \Theta}{\partial z}^\prime` 2823 dTvardz\_p
28 | :math:`\frac{\partial P}{\partial z}` 2824 dPdz
29 | :math:`\overline{\frac{\partial P}{\partial z}}` 2825 dPdz\_m
30 | :math:`\frac{\partial P^\prime}{\partial z}` 2826 dPdz\_p
31 | ======================================================= ====== =====================
32 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/kinetic_energy.rst:
--------------------------------------------------------------------------------
1 | Kinetic Energy
2 | ====================================================================
3 |
4 | =========================================================== ===== ===================
5 | :math:`\frac{1}{2}\mathrm{f}_1{\boldsymbol v}^2` 401 kinetic\_energy
6 | :math:`\frac{1}{2}\mathrm{f}_1v_r^2` 402 radial\_ke
7 | :math:`\frac{1}{2}\mathrm{f}_1v_\theta^2` 403 theta\_ke
8 | :math:`\frac{1}{2}\mathrm{f}_1v_\phi^2` 404 phi\_ke
9 | :math:`\frac{1}{2}\mathrm{f}_1\overline{\boldsymbol v}^2` 405 mkinetic\_energy
10 | :math:`\frac{1}{2}\mathrm{f}_1\overline{v_r}^2` 406 radial\_mke
11 | :math:`\frac{1}{2}\mathrm{f}_1\overline{v_\theta}^2` 407 theta\_mke
12 | :math:`\frac{1}{2}\mathrm{f}_1\overline{v_\phi}^2` 408 phi\_mke
13 | :math:`\frac{1}{2}\mathrm{f}_1{\boldsymbol v'}^2` 409 pkinetic\_energy
14 | :math:`\frac{1}{2}\mathrm{f}_1{v_r'}^2` 410 radial\_pke
15 | :math:`\frac{1}{2}\mathrm{f}_1{v_\theta'}^2` 411 theta\_pke
16 | :math:`\frac{1}{2}\mathrm{f}_1{v_\phi'}^2` 412 phi\_pke
17 | :math:`{\boldsymbol v}^2` 413 vsq
18 | :math:`{v_r}^2` 414 radial\_vsq
19 | :math:`{v_\theta}^2` 415 theta\_vsq
20 | :math:`{v_\phi}^2` 416 phi\_vsq
21 | :math:`\overline{\boldsymbol v}^2` 417 mvsq
22 | :math:`\overline{v_r}^2` 418 radial\_mvsq
23 | :math:`\overline{v_\theta}^2` 419 theta\_mvsq
24 | :math:`\overline{v_\phi}^2` 420 phi\_mvsq
25 | :math:`{\boldsymbol v'}^2` 421 pvsq
26 | :math:`{v_r'}^2` 422 radial\_pvsq
27 | :math:`{v_\theta'}^2` 423 theta\_pvsq
28 | :math:`{v_\phi'}^2` 424 phi\_pvsq
29 | =========================================================== ===== ===================
30 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/magnetic_energy.rst:
--------------------------------------------------------------------------------
1 | Magnetic Energy
2 | ====================================================================
3 |
4 | =================================================== ====== ====================
5 | :math:`\frac{1}{2}c_4\boldsymbol{B}^2` 1101 magnetic\_energy
6 | :math:`\frac{1}{2}c_4B_r^2` 1102 radial\_me
7 | :math:`\frac{1}{2}c_4B_\theta^2` 1103 theta\_me
8 | :math:`\frac{1}{2}c_4B_\phi^2` 1104 phi\_me
9 | :math:`\frac{1}{2}c_4\overline{\boldsymbol{B}}^2` 1105 mmagnetic\_energy
10 | :math:`\frac{1}{2}c_4\overline{B_r}^2` 1106 radial\_mme
11 | :math:`\frac{1}{2}c_4\overline{B_\theta}^2` 1107 theta\_mme
12 | :math:`\frac{1}{2}c_4\overline{B_\phi}^2` 1108 phi\_mme
13 | :math:`\frac{1}{2}c_4\boldsymbol{B'}^2` 1109 pmagnetic\_energy
14 | :math:`\frac{1}{2}c_4{B_r'}^2` 1110 radial\_pme
15 | :math:`\frac{1}{2}c_4{B_\theta'}^2` 1111 theta\_pme
16 | :math:`\frac{1}{2}c_4{B_\phi'}^2` 1112 phi\_pme
17 | =================================================== ====== ====================
18 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/mass_flux.rst:
--------------------------------------------------------------------------------
1 | Mass Flux
2 | ====================================================================
3 |
4 | ========================================= ===== ===============
5 | :math:`\mathrm{f}_1v_r` 201 rhov\_r
6 | :math:`\mathrm{f}_1v_\theta` 202 rhov\_theta
7 | :math:`\mathrm{f}_1v_\phi` 203 rhov\_phi
8 | :math:`\mathrm{f}_1v_r'` 204 rhovp\_r
9 | :math:`\mathrm{f}_1v_\theta'` 205 rhovp\_theta
10 | :math:`\mathrm{f}_1v_\phi'` 206 rhovp\_phi
11 | :math:`\mathrm{f}_1\overline{v_r}` 207 rhovm\_r
12 | :math:`\mathrm{f}_1\overline{v_\theta}` 208 rhovm\_theta
13 | :math:`\mathrm{f}_1\overline{v_\phi}` 209 rhovm\_phi
14 | ========================================= ===== ===============
15 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/qcodes.rst:
--------------------------------------------------------------------------------
1 | .. _quantityCodes:
2 |
3 | Output Quantity Codes
4 | =====================
5 |
6 | .. toctree::
7 | :maxdepth: 2
8 | :caption: Below are tables enumerating the menu codes necessary to specify diagnostic outputs in Rayleigh.
9 |
10 | velocity_field
11 | mass_flux
12 | vorticity_field
13 | kinetic_energy
14 | thermal_field
15 | thermal_energy
16 | magnetic_field
17 | current_density
18 | magnetic_energy
19 | momentum_equation
20 | thermal_equation
21 | induction_equation
22 | amom_equation
23 | ke_equation
24 | me_equation
25 | turbKE
26 | axial_field
27 |
28 | Note that we use the shorthand :math:`{\boldsymbol{\mathcal{J}}}` to denote the curl of :math:`{\boldsymbol{B}}`, namely :math:`{\boldsymbol{\mathcal{J}}\equiv\boldsymbol{\nabla}\times\boldsymbol{B}}`.
29 |
--------------------------------------------------------------------------------
/doc/source/diagnostic_codes/thermal_energy.rst:
--------------------------------------------------------------------------------
1 | Thermal Energy
2 | ====================================================================
3 |
4 | ================================================================== ===== =========================
5 | :math:`\mathrm{f}_1\mathrm{f}_4\Theta` 701 thermal\_energy\_full
6 | :math:`\mathrm{f}_1\mathrm{f}_4\Theta` 702 thermal\_energy\_p
7 | :math:`\mathrm{f}_1\mathrm{f}_4\overline{\Theta}` 703 thermal\_energy\_m
8 | :math:`c_P \hat{\rho}T` 704 enthalpy\_full
9 | :math:`c_P \hat{\rho}T'` 705 enthalpy\_p
10 | :math:`c_P \hat{\rho}\overline{T}` 706 enthalpy\_m
11 | :math:`\left(\mathrm{f}_1\mathrm{f}_4\Theta\right)^2` 707 thermal\_energy\_sq
12 | :math:`\left(\mathrm{f}_1\mathrm{f}_4\Theta\right)^2` 708 thermal\_energyp\_sq
13 | :math:`\left(\mathrm{f}_1\mathrm{f}_4\overline{\Theta}\right)^2` 709 thermal\_energym\_sq
14 | :math:`\left(c_P \hat{\rho}T\right)^2` 710 enthalpy\_sq
15 | :math:`\left(c_P \hat{\rho}T'\right)^2` 711 enthalpyp\_sq
16 | :math:`\left(c_P \hat{\rho}\overline{T}\right)^2` 712 enthalpym\_sq
17 | ================================================================== ===== =========================
18 |
--------------------------------------------------------------------------------
/doc/source/getting_help.rst:
--------------------------------------------------------------------------------
1 | Getting Help
2 | ============
3 |
4 | For questions on the source code of Rayleigh, portability, installation, new or existing features, etc., use the `Rayleigh forum `_. This is also the place where we announce our regular user calls. For a more direct contact you can also join our `Slack channel `_.
5 |
--------------------------------------------------------------------------------
/doc/source/images/fig13_Korre&featherstone_2021.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig13_Korre&featherstone_2021.jpg
--------------------------------------------------------------------------------
/doc/source/images/fig1_Bice_2023.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig1_Bice_2023.jpg
--------------------------------------------------------------------------------
/doc/source/images/fig3_Duer_2023.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig3_Duer_2023.jpg
--------------------------------------------------------------------------------
/doc/source/images/fig3_Orvedahl_2021.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig3_Orvedahl_2021.jpeg
--------------------------------------------------------------------------------
/doc/source/images/fig6_Heimpel_2022.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig6_Heimpel_2022.jpg
--------------------------------------------------------------------------------
/doc/source/images/fig7_hindman2020.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/images/fig7_hindman2020.jpg
--------------------------------------------------------------------------------
/doc/source/images/image_gallery.rst:
--------------------------------------------------------------------------------
1 |
2 | Image Gallery
3 | =============
4 |
5 | .. figure:: fig7_hindman2020.jpg
6 | :width: 85%
7 | :align: center
8 |
9 | Radial velocity profiles near the top of shell for stellar-like convection that is sufficiently supercritical :cite:`Hindman_2020`
10 |
11 |
12 | .. figure:: fig3_Duer_2023.jpg
13 | :width: 85%
14 | :align: center
15 |
16 | Zonal velocity near the top near the top of the shell and midway through for convection in gas giants :cite:`Duer_2023`
17 |
18 | .. figure:: fig6_Heimpel_2022.jpg
19 | :width: 85%
20 | :align: center
21 |
22 | Snapshots of various properties including: entropy gradient, radial vorticity, and zonal velocity for convection in gas giants for a south polar view (-30 deg lattitude) and a north polar view (top-down) :cite:`Heimpel_2022`
23 |
24 |
25 | .. figure:: fig3_Orvedahl_2021.jpeg
26 | :width: 85%
27 | :align: center
28 |
29 | Meridional slices of the zonal component of lorentz and coriolis forces displaying a force balance in a dynamo simulation :cite:`Orvedahl_2021`
30 |
31 | .. figure:: fig1_Bice_2023.jpg
32 | :width: 85%
33 | :align: center
34 |
35 | Mollweide projection and meridional slices for both the radial and longitudinal magnetic field of a M-dwarf dynamo simulation :cite:`Bice_2023a`
36 |
37 | .. figure:: fig13_Korre&featherstone_2021.jpg
38 | :width: 85%
39 | :align: center
40 |
41 | Meridional slices showcasing the mass flux (meridional circulation) and the differential rotation for various rotation rates :cite:`Korre_2021`
42 |
--------------------------------------------------------------------------------
/doc/source/publications/author_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/publications/author_plot.png
--------------------------------------------------------------------------------
/doc/source/publications/author_plot_no_labels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/publications/author_plot_no_labels.png
--------------------------------------------------------------------------------
/doc/source/publications/publications.rst:
--------------------------------------------------------------------------------
1 | .. raw:: latex
2 |
3 |
4 | \clearpage
5 |
6 |
7 | Publications
8 | ============
9 |
10 | A list of publications using the Rayleigh code.
11 |
12 | Software Citation
13 | -----------------
14 |
15 | **List:** :cite:`nicholas_featherstone_2024_11391213`, :cite:`nicholas_featherstone_2022_6522806` :cite:`nicholas_featherstone_2021_5774039`, :cite:`nicholas_featherstone_2021_5683601`, :cite:`nicholas_featherstone_2018_1158290`, :cite:`nicholas_featherstone_2018_1236565`
16 |
17 |
18 | .. bibliography:: software.bib
19 |
20 | Publications by Year
21 | --------------------
22 | 2023
23 | ^^^^
24 | **List:** :cite:`Bice_2023a`, :cite:`Bice_2023b`, :cite:`Duer_2023`
25 |
26 | .. bibliography:: publications2023.bib
27 |
28 | 2022
29 | ^^^^
30 | **List:** :cite:`Camisassa_2022`, :cite:`Matilsky_2022`, :cite:`Heimpel_2022`
31 |
32 | .. bibliography:: publications2022.bib
33 |
34 | 2021
35 | ^^^^
36 | **List:** :cite:`Orvedahl_2021`, :cite:`Calkins_2021`, :cite:`Korre_2021`
37 |
38 | .. bibliography:: publications2021.bib
39 |
40 | 2020
41 | ^^^^
42 | **List:** :cite:`Matilsky_2020a`, :cite:`Matilsky_2020b`, :cite:`Hindman_2020`
43 |
44 | .. bibliography:: publications2020.bib
45 |
46 | 2019
47 | ^^^^
48 | **List:** :cite:`Buffett+Matsui2019`
49 |
50 | .. bibliography:: publications2019.bib
51 |
52 | 2018
53 | ^^^^
54 | **List:**
55 | :cite:`Karak_etal2018`, :cite:`Miquel_etal2018`, :cite:`Orvedahl_etal2018`
56 |
57 |
58 | .. bibliography:: publications2018.bib
59 |
60 | 2017
61 | ^^^^
62 | blank
63 |
64 | 2016
65 | ^^^^
66 | **List:** :cite:`Featherstone_Hindmam_2016`, :cite:`Matsui_etal_2016`, :cite:`OMara_etal2016`
67 |
68 |
69 | .. bibliography:: publications2016.bib
70 |
71 | Co-Author Network
72 | -----------------
73 |
74 | Network diagram illustrates the relationship between authors of the above publications.
75 |
76 | .. figure:: author_plot.png
77 | :width: 95%
78 | :align: center
79 |
--------------------------------------------------------------------------------
/doc/source/publications/publications2019.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order they are entered in this file.
4 | %
5 | % Add Publications for 2019 ONLY
6 | %
7 | @Article{Buffett+Matsui2019,
8 | author="Buffett, B.
9 | and Matsui, H.",
10 | title="Equatorially trapped waves in Earth's core",
11 | journal="Geophysical Journal International",
12 | year="2019",
13 | volume="218",
14 | number="2",
15 | pages="1210--1225",
16 | optkeywords="Rayleigh",
17 | optnote="exported from refbase (https://geodynamics.org/cig/refbase/show.php?record=1739), last updated on Thu, 20 Jun 2019 08:58:07 -0700",
18 | issn="0956-540X",
19 | doi="10.1093/gji/ggz233",
20 | opturl="https://academic.oup.com/gji/article/218/2/1210/5491334"
21 | }
22 |
--------------------------------------------------------------------------------
/doc/source/publications/publications2020.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order they are entered in this file.
4 | %
5 | % Add Publications for 2020 ONLY
6 | %
7 | @Article{Matilsky_2020a,
8 | author = "Loren I. Matilsky and Bradley W. Hindman and Juri Toomre",
9 | title = "Revisiting the Sun’s Strong Differential Rotation along Radial Lines",
10 | journal = "The Astrophysical Journal",
11 | year = "2020",
12 | volume = "898",
13 | number = "2",
14 | pages = "111",
15 | optkeywords="Rayleigh",
16 | issn = "1538-4357",
17 | doi = "10.3847/1538-4357/ab9ca0",
18 | opturl = "https://dx.doi.org/10.3847/1538-4357/ab9ca0"
19 | }
20 |
21 | @Article{Matilsky_2020b,
22 | author = {Loren I. Matilsky and Juri Toomre},
23 | title = {Exploring Bistability in the Cycles of the Solar Dynamo through Global Simulations},
24 | journal = {The Astrophysical Journal},
25 | year = {2020},
26 | volume = {892},
27 | number = {2},
28 | pages = {106},
29 | optkeywords={Rayleigh},
30 | issn = {1538-4357},
31 | doi = {10.3847/1538-4357/ab791c},
32 | opturl = {https://dx.doi.org/10.3847/1538-4357/ab791c}
33 | }
34 |
35 | @Article{Hindman_2020,
36 | author = {Bradley W. Hindman and Nicholas A. Featherstone and Keith Julien},
37 | title = {Morphological Classification of the Convective Regimes in Rotating Stars},
38 | journal = {The Astrophysical Journal},
39 | year = {2020},
40 | volume = {898},
41 | number = {2},
42 | pages = {120},
43 | optkeywords={Rayleigh},
44 | issn = {1538-4357},
45 | doi = {10.3847/1538-4357/ab9ec2},
46 | opturl = {https://dx.doi.org/10.3847/1538-4357/ab9ec2}
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/doc/source/publications/publications2021.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order they are entered in this file.
4 | %
5 | % Add Publications for 2021 ONLY
6 | %
7 | @Article{Orvedahl_2021,
8 | author = {Orvedahl, Ryan J and Featherstone, Nicholas A and Calkins, Michael A},
9 | title = "{Large-scale magnetic field saturation and the Elsasser number in rotating spherical dynamo models}",
10 | journal = {Monthly Notices of the Royal Astronomical Society: Letters},
11 | year = {2021},
12 | volume = {507},
13 | number = {1},
14 | pages = {L67-L71},
15 | optkeywords={Rayleigh},
16 | issn = {1745-3925},
17 | doi = {10.1093/mnrasl/slab097},
18 | opturl = {https://academic.oup.com/mnrasl/article-pdf/507/1/L67/54645614/slab097.pdf}
19 | }
20 |
21 | @Article{Calkins_2021,
22 | author = {Calkins, Michael A and Orvedahl, Ryan J and Featherstone, Nicholas A},
23 | title = "{Large-scale balances and asymptotic scaling behaviour in spherical dynamos}",
24 | journal = {Geophysical Journal International},
25 | year = {2021},
26 | volume = {227},
27 | number = {2},
28 | pages = {1228-1245},
29 | optkeywords={Rayleigh},
30 | issn = {0956-540X},
31 | doi = {10.1093/gji/ggab274},
32 | opturl = {https://academic.oup.com/gji/article-pdf/227/2/1228/39558185/ggab274.pdf}
33 | }
34 |
35 | @Article{Korre_2021,
36 | author = {Lydia Korre and Nicholas A. Featherstone},
37 | title = {On the Dynamics of Overshooting Convection in Spherical Shells: Effect of Density Stratification and Rotation},
38 | journal = {The Astrophysical Journal},
39 | year = {2021},
40 | volume = {923},
41 | number = {1},
42 | pages = {52},
43 | optkeywords={Rayleigh},
44 | issn = {1538-4357},
45 | doi = {10.3847/1538-4357/ac2dea},
46 | opturl = {https://dx.doi.org/10.3847/1538-4357/ac2dea}
47 | }
48 |
49 |
50 |
--------------------------------------------------------------------------------
/doc/source/publications/publications2022.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order they are entered in this file.
4 | %
5 | % Add Publications for 2022 ONLY
6 | %
7 | @Article{Camisassa_2022,
8 | author = {Maria E. Camisassa and Nicholas A. Featherstone},
9 | title = {Solar-like to Antisolar Differential Rotation: A Geometric Interpretation},
10 | journal = {The Astrophysical Journal},
11 | year = {2022},
12 | volume = {938},
13 | number = {1},
14 | pages = {65},
15 | optkeywords={Rayleigh},
16 | issn = {1538-4357},
17 | doi = {10.3847/1538-4357/ac879f},
18 | opturl = {https://dx.doi.org/10.3847/1538-4357/ac879f}
19 | }
20 |
21 | @Article{Matilsky_2022,
22 | author = {Loren I. Matilsky and Bradley W. Hindman and Nicholas A. Featherstone and Catherine C. Blume and Juri Toomre},
23 | title = {Confinement of the Solar Tachocline by Dynamo Action in the Radiative Interior},
24 | journal = {The Astrophysical Journal Letters},
25 | year = {2022},
26 | volume = {940},
27 | number = {2},
28 | pages = {L50},
29 | optkeywords={Rayleigh},
30 | issn = {1538-4357},
31 | doi = {10.3847/2041-8213/ac93ef},
32 | opturl = {https://dx.doi.org/10.3847/2041-8213/ac93ef}
33 | }
34 |
35 | @Article{Heimpel_2022,
36 | author = {Moritz H. Heimpel and Rakesh K. Yadav and Nicholas A. Featherstone and Jonathan M. Aurnou},
37 | title = {Polar and mid-latitude vortices and zonal flows on Jupiter and Saturn},
38 | journal = {Icarus},
39 | year = {2022},
40 | volume = {379},
41 | pages = {114942},
42 | optkeywords={Rayleigh},
43 | issn = {0019-1035},
44 | doi = {https://doi.org/10.1016/j.icarus.2022.114942},
45 | opturl = {https://www.sciencedirect.com/science/article/pii/S001910352200063X}
46 | }
47 |
--------------------------------------------------------------------------------
/doc/source/publications/publications2023.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order they are entered in this file.
4 | %
5 | % Add Publications for 2023 ONLY
6 | %
7 |
8 | @Article{Bice_2023a,
9 | author = {Connor P. Bice and Juri Toomre},
10 | title = {Effects of Full-sphere Convection on M-dwarf Dynamo Action, Flux Emergence, and Spin-down},
11 | journal = {The Astrophysical Journal},
12 | year = {2023},
13 | volume = {951},
14 | number = {1},
15 | pages = {79},
16 | optkeywords={Rayleigh},
17 | issn = {1538-4357},
18 | doi = {10.3847/1538-4357/acd2db},
19 | opturl = {https://dx.doi.org/10.3847/1538-4357/acd2db}
20 | }
21 |
22 |
23 | @Article{Bice_2023b,
24 | author = {Connor P. Bice and Juri Toomre},
25 | title = {Nature of Intense Magnetism and Differential Rotation in Convective Dynamos of M-dwarf Stars with Tachoclines},
26 | journal = {The Astrophysical Journal},
27 | year = {2023},
28 | volume = {947},
29 | number = {1},
30 | pages = {36},
31 | optkeywords={Rayleigh},
32 | issn = {1538-4357},
33 | doi = {10.3847/1538-4357/acac78},
34 | url = {https://dx.doi.org/10.3847/1538-4357/acac78}
35 | }
36 |
37 |
38 | @Article{Duer_2023,
39 | author = {Duer, K. and Galanti, E. and Kaspi, Y.},
40 | title = "{Gas Giant Simulations of Eddy-Driven Jets Accompanied by Deep Meridional Circulation}",
41 | journal = {AGU Advances},
42 | year = {2023},
43 | volume = {4},
44 | number = {6},
45 | eid = {e2023AV000908},
46 | pages = {e2023AV000908},
47 | issn = {2576-604X},
48 | doi = {10.1029/2023AV000908},
49 | opturl = {https://ui.adsabs.harvard.edu/abs/2023AGUA....400908D}
50 | }
51 |
--------------------------------------------------------------------------------
/doc/source/publications/software.bib:
--------------------------------------------------------------------------------
1 | %
2 | % CAUTION!!!
3 | % Entries will appear in the order the are entered in this file.
4 | %
5 | % Add software citation below
6 | %
7 |
8 | @misc{nicholas_featherstone_2024_11391213,
9 | author = "Featherstone, N.",
10 | title="Rayleigh 1.2.0",
11 | year="2024",
12 | organization="",
13 | optkeywords="Rayleigh",
14 | doi="http://doi.org/10.5281/zenodo.11391213",
15 | opturl="https://doi.org/10.5281/zenodo.11391213"
16 |
17 | }
18 |
19 | @misc{nicholas_featherstone_2022_6522806,
20 | author = "Featherstone, N.",
21 | title="Rayleigh 1.1.0",
22 | year="2022",
23 | organization="",
24 | optkeywords="Rayleigh",
25 | doi="http://doi.org/10.5281/zenodo.6522806",
26 | opturl="https://doi.org/10.5281/zenodo.6522806"
27 |
28 | }
29 |
30 | @misc{nicholas_featherstone_2021_5774039,
31 | author = "Featherstone, N.",
32 | title="Rayleigh 1.0.1",
33 | year="2021",
34 | organization="",
35 | optkeywords="Rayleigh",
36 | doi="http://doi.org/10.5281/zenodo.5774039",
37 | opturl="https://doi.org/10.5281/zenodo.5774039"
38 |
39 | }
40 | @misc{nicholas_featherstone_2021_5683601,
41 | author = "Featherstone, N.",
42 | title="Rayleigh 1.0.0",
43 | year="2021",
44 | organization="",
45 | optkeywords="Rayleigh",
46 | doi="http://doi.org/10.5281/zenodo.5683601",
47 | opturl="https://doi.org/10.5281/zenodo.5683601"
48 | }
49 |
50 | @misc{nicholas_featherstone_2018_1236565,
51 | author = "Featherstone, N.",
52 | title="Rayleigh 0.9.1",
53 | year="2018",
54 | organization="",
55 | optkeywords="Rayleigh",
56 | doi="http://doi.org/10.5281/zenodo.1236565",
57 | opturl="https://doi.org/10.5281/zenodo.1236565"
58 | }
59 |
60 | @misc{nicholas_featherstone_2018_1158290,
61 | author = "Featherstone, N.",
62 | title="Rayleigh Version 0.9.0",
63 | year="2018",
64 | organization="Computational Infrastructure for Geodynamics",
65 | address="Davis, CA",
66 | optkeywords="Rayleigh",
67 | doi="http://doi.org/10.5281/zenodo.1158290",
68 | opturl="https://doi.org/10.5281/zenodo.1158290"
69 | }
70 |
--------------------------------------------------------------------------------
/doc/source/quick_reference.rst:
--------------------------------------------------------------------------------
1 | Quick Reference
2 | ********************
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | Namelist_Definitions/Namelist_Variables.rst
8 | diagnostic_codes/qcodes
9 |
--------------------------------------------------------------------------------
/doc/source/rayleigh_manual_image_300dpi.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/rayleigh_manual_image_300dpi.jpeg
--------------------------------------------------------------------------------
/doc/source/rayleigh_manual_image_logo.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/doc/source/rayleigh_manual_image_logo.jpeg
--------------------------------------------------------------------------------
/doc/source/research_enabled_by_rayleigh.rst:
--------------------------------------------------------------------------------
1 | Research Enabled by Rayleigh
2 | ********************
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | research_projects
8 | video_gallery
9 | images/image_gallery
10 | publications/publications
11 |
--------------------------------------------------------------------------------
/doc/source/research_projects.rst:
--------------------------------------------------------------------------------
1 | Research Projects
2 | *****************
3 |
4 | Under construction.
5 |
6 | One of the research projects using Rayleigh: https://geodynamics.org/groups/dynamo/frontiers.
7 |
--------------------------------------------------------------------------------
/doc/source/video_gallery.rst:
--------------------------------------------------------------------------------
1 | .. raw:: latex
2 |
3 | \clearpage
4 |
5 | .. |nbspc| unicode:: U+00A0 .. non-breaking space
6 |
7 | .. ADDING YOUR VIDEOS
8 | .. Embed YouTube videos changing the width to 30% and deleting the height
9 | .. Follow the format below creating a unique alias for your video
10 |
11 | .. |Feathern1| raw:: html
12 |
13 |
14 |
15 | .. |Feathern2| raw:: html
16 |
17 |
18 |
19 | .. |Feathern3| raw:: html
20 |
21 |
22 |
23 | Video Gallery
24 | =============
25 |
26 |
27 | Rotating
28 | --------
29 | .. ADD A URL so the link will print in the pdf version since the videos do not
30 |
31 | .. raw:: latex
32 |
33 | \url{https://www.youtube.com/embed/3iRggdo3i0I}
34 | \url{https://www.youtube.com/embed/1KArtuLYUmY}
35 | \url{https://www.youtube.com/embed/OUICRNiFhpU}
36 |
37 | .. Place videos 3 across separated by 2 non-breaking white space.
38 | .. Insert a blank line between rows.
39 |
40 | |Feathern1| |nbspc| |nbspc| |Feathern2| |nbspc| |nbspc| |Feathern3|
41 |
--------------------------------------------------------------------------------
/docker-devel:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | USE_PODMAN=0
4 |
5 | USAGE="Launches a Rayleigh development container\n
6 | Options:\n
7 | -p Use podman instead of docker to run the container.
8 | "
9 |
10 | while getopts ph o
11 | do
12 | case $o in
13 | p) USE_PODMAN=1;;
14 | h) echo "$USAGE"; exit 1;;
15 | esac
16 | done
17 | shift `expr $OPTIND - 1`
18 |
19 | HAS_DOCKER=$(command -v docker > /dev/null && echo 1 || echo 0)
20 | HAS_PODMAN=$(command -v podman > /dev/null && echo 1 || echo 0)
21 |
22 | if [ $HAS_DOCKER -eq 0 -a $HAS_PODMAN -ne 0 ]
23 | then
24 | echo "docker not installed. Falling back to podman."
25 | USE_PODMAN=1
26 | fi
27 |
28 | if [ $USE_PODMAN -ne 0 ]
29 | then
30 | CMD=podman
31 | prefix=docker://
32 | else
33 | CMD=docker
34 | prefix=
35 | fi
36 |
37 | "$CMD" run -it --rm -v "$HOME":/work -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" -e HOSTUSER="$(id -n -u)" "$prefix"geodynamics/rayleigh-devel-jammy:latest
38 |
--------------------------------------------------------------------------------
/docker-devel.bat:
--------------------------------------------------------------------------------
1 | :: echo off
2 |
3 | docker run -it --rm -v "%USERPROFILE%":/work -e NOUIDWARN=1 geodynamics/rayleigh-devel-jammy:latest
4 |
--------------------------------------------------------------------------------
/docker/rayleigh-buildenv-focal/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:focal
2 |
3 | RUN apt update && \
4 | DEBIAN_FRONTEND='noninteractive' \
5 | DEBCONF_NONINTERACTIVE_SEEN='true' \
6 | apt install --yes \
7 | g++ \
8 | gfortran \
9 | git \
10 | libblas-dev \
11 | libfftw3-dev \
12 | liblapack-dev \
13 | libopenmpi-dev \
14 | make \
15 | nano \
16 | wget \
17 | python3-pip \
18 | texlive-base \
19 | texlive-latex-base \
20 | texlive-latex-recommended \
21 | texlive-latex-extra \
22 | lmodern \
23 | makedepf90 \
24 | latexmk \
25 | pandoc \
26 | python3-numpy \
27 | python3-scipy \
28 | python3-funcsigs
29 |
30 | RUN pip3 install sphinxcontrib-bibtex==1.0.0 nbstripout nbsphinx jupyter-client ipykernel recommonmark vtk
31 |
32 | # Export compilers
33 | ENV CC mpicc
34 | ENV CXX mpicxx
35 | ENV FC mpifort
36 |
--------------------------------------------------------------------------------
/docker/rayleigh-buildenv-jammy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:jammy
2 |
3 | RUN apt-get update && \
4 | DEBIAN_FRONTEND='noninteractive' \
5 | DEBCONF_NONINTERACTIVE_SEEN='true' \
6 | apt-get install --yes \
7 | g++ \
8 | gfortran \
9 | git \
10 | intel-mkl \
11 | libopenmpi-dev \
12 | make \
13 | nano \
14 | wget \
15 | python3-pip \
16 | sphinx-common \
17 | texlive-base \
18 | texlive-latex-base \
19 | texlive-latex-recommended \
20 | texlive-latex-extra \
21 | lmodern \
22 | makedepf90 \
23 | latexmk \
24 | pandoc \
25 | python3-numpy \
26 | python3-scipy \
27 | python3-funcsigs \
28 | python3-sphinxcontrib.bibtex \
29 | python3-sphinx-book-theme \
30 | python3-recommonmark \
31 | python3-nbsphinx \
32 | python3-vtk7 \
33 | jupyter \
34 | && apt-get clean && rm -r /var/lib/apt/lists/*
35 |
36 | RUN pip3 install nbstripout
37 |
38 | # Export compilers
39 | ENV CC mpicc
40 | ENV CXX mpicxx
41 | ENV FC mpifort
42 |
--------------------------------------------------------------------------------
/docker/rayleigh-buildenv-jammy/README.md:
--------------------------------------------------------------------------------
1 | Build environment for Rayleigh using the Ubuntu Jammy Docker container.
2 |
--------------------------------------------------------------------------------
/docker/rayleigh-devel-jammy/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM geodynamics/rayleigh-buildenv-jammy
2 |
3 | RUN apt update && \
4 | DEBIAN_FRONTEND='noninteractive' \
5 | DEBCONF_NONINTERACTIVE_SEEN='true' \
6 | apt install --yes \
7 | sudo
8 |
9 | COPY /entrypoint.sh /entrypoint.sh
10 |
11 | ENTRYPOINT /entrypoint.sh
12 |
13 | # Export compilers
14 | ENV CC mpicc
15 | ENV CXX mpicxx
16 | ENV FC mpifort
17 |
--------------------------------------------------------------------------------
/docker/rayleigh-devel-jammy/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | export HOME=/work
4 | cd "$HOME"
5 |
6 | if [ -n "$HOSTGID" -a -n "$HOSTUSER" -a -n "$HOSTUID" ]
7 | then
8 | # only create user if all options are provided
9 |
10 | # This only creates the group if a group with that GID does not already exist.
11 | getent group $HOSTGID > /dev/null || groupadd -g $HOSTGID $HOSTUSER
12 | useradd -u $HOSTUID -g $HOSTGID -d /work -s /bin/bash $HOSTUSER
13 |
14 | echo "$HOSTUSER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/nopasswd
15 |
16 | sudo -u $HOSTUSER /bin/bash --rcfile /etc/bash.bashrc -i
17 | else
18 | if [ "${NOUIDWARN}" != 1 ]
19 | then
20 | echo
21 | echo "You are running this container without providing the HOSTUSER, HOSTGID, and HOSTUID"
22 | echo "environment variables. This means the container will use the root user and it might create files"
23 | echo "owned by root in your home directory if you run this on Docker with Linux as a host system."
24 | echo 'Consider running this using the "docker-devel" script from the Rayleigh main directory.'
25 | echo
26 | fi
27 | /bin/bash --rcfile /etc/bash.bashrc -i
28 | fi
29 |
--------------------------------------------------------------------------------
/docker/rayleigh-tacc/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM tacc/tacc-base:ubuntu22.04-impi19.0.9-common
2 |
3 | LABEL maintainer
4 |
5 | RUN apt-get update || true && \
6 | DEBIAN_FRONTEND=noninteractive apt-get install --yes \
7 | git libmkl-dev libfftw3-dev
8 |
9 | RUN cd /opt && git clone 'https://github.com/geodynamics/Rayleigh.git'
10 |
11 | ENV FC mpifc
12 | ENV CC mpicc
13 | ENV MKLROOT /opt/intel/compilers_and_libraries_2020.0.166/linux/mkl
14 | ENV LD_LIBRARY_PATH="${MKLROOT}/lib/intel64:${LD_LIBRARY_PATH}"
15 |
16 | RUN cd /opt/Rayleigh && \
17 | ./configure --with-fftw=/usr --FFLAGS_OPT="-march=skylake-avx512 -O3 -ffixed-line-length-132" \
18 | \
19 | && make -j \
20 | && make install \
21 | && make clean
22 |
23 | ENV RAYLEIGH_DIR /opt/Rayleigh
24 |
25 | ENV PATH="${RAYLEIGH_DIR}/bin:${PATH}"
26 |
--------------------------------------------------------------------------------
/docker/rayleigh-tacc/Readme.md:
--------------------------------------------------------------------------------
1 | This is a docker container that can be used to run Rayleigh on the set of TACC
2 | supercomputers, in particular Frontera and Stampede3, without having to manually
3 | compile the code.
4 |
5 | Steps to use this container on Stampede3/Frontera are described on
6 | https://rayleigh-documentation.readthedocs.io/en/latest/doc/source/User_Guide/getting_started.html.
7 |
--------------------------------------------------------------------------------
/docker/rayleigh-tacc/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This script generates a docker image from the latest Rayleigh development version.
4 | # It requires a docker installation on the local machine, and the ability to
5 | # communicate with the docker daemon without root user privileges (see the docker
6 | # webpage for an explanation).
7 | # Note: This container is build from the developer version on Github, it does not use
8 | # the local Rayleigh folder. Therefore local changes are not included in the container.
9 |
10 | docker build --no-cache -t geodynamics/rayleigh:tacc-latest . 2>&1 | tee build.log
11 |
--------------------------------------------------------------------------------
/docker/rayleigh/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM geodynamics/rayleigh-buildenv-jammy:latest
2 |
3 | # expose the port for Jupyter
4 | EXPOSE 8888
5 |
6 | # define Rayleigh directory
7 | ENV RAYLEIGH_DIR /opt/Rayleigh
8 |
9 | RUN git clone 'https://github.com/geodynamics/Rayleigh.git' ${RAYLEIGH_DIR}
10 |
11 | WORKDIR ${RAYLEIGH_DIR}
12 |
13 | RUN ./configure \
14 | -debian-mkl \
15 | && make \
16 | && make install \
17 | && make clean
18 |
19 | # Add Rayleigh to the path
20 | ENV PATH="${RAYLEIGH_DIR}/bin:${PATH}"
21 | ENV PYTHONPATH="${RAYLEIGH_DIR}/post_processing${PYTHONPATH:+:$PYTHONPATH}"
22 |
23 | # Allow running OpenMPI as root and avoid warning messages
24 | ENV OMPI_ALLOW_RUN_AS_ROOT=1
25 | ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
26 | ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
27 |
--------------------------------------------------------------------------------
/docker/rayleigh/README.md:
--------------------------------------------------------------------------------
1 | This container hosts a built version of Rayleigh.
2 |
--------------------------------------------------------------------------------
/environment.yml:
--------------------------------------------------------------------------------
1 | # Rayleigh development environment.
2 | #
3 | # If you change this file with a package relevant for
4 | # building the documentation make sure to also update
5 | # environment_doc.yml.
6 |
7 | name: radev
8 | channels:
9 | - conda-forge
10 | dependencies:
11 | - python=3.9
12 | - make=4.3
13 | - git=2.30
14 | - matplotlib=3.4
15 | - jupyter=1.0
16 | - scipy=1.10
17 | - sphinx=4.0
18 | - sphinxcontrib-bibtex=2.2
19 | - nbsphinx=0.8
20 | - pandoc=3.2
21 | - recommonmark=0.7
22 | - sphinx-book-theme
23 | - compilers=1.4.2
24 | - openblas=0.3.25
25 | - fftw=3.3
26 | - openmpi=4.1.6
27 | - funcsigs=1.0
28 | - vtk=9.0
29 | - docopt=0.6
30 |
--------------------------------------------------------------------------------
/environment_doc.yml:
--------------------------------------------------------------------------------
1 | # Rayleigh documentation environment.
2 | #
3 | # If you change this file make sure to also update
4 | # environment.yml.
5 |
6 | name: radoc
7 | channels:
8 | - conda-forge
9 | dependencies:
10 | - python=3.9
11 | - matplotlib=3.4
12 | - jupyter=1.0
13 | - scipy=1.10
14 | - sphinx=4.0
15 | - sphinxcontrib-bibtex=2.2
16 | - nbsphinx=0.8
17 | - pandoc=3.2
18 | - recommonmark=0.7
19 | - sphinx-book-theme
20 | - funcsigs=1.0
21 | - vtk=9.0
22 |
--------------------------------------------------------------------------------
/etc/check_ipynb_cleared:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if ! type nbstripout > /dev/null
4 | then
5 | echo "You need to install the nbstripout command."
6 | echo "Use the Python package manager of your choice (pip, conda, ...)."
7 | echo "Example: pip install --user nbstripout"
8 | exit 1
9 | fi
10 |
11 | CLEAR=0
12 |
13 | while getopts hc f
14 | do
15 | case "$f" in
16 | h)
17 | echo "usage: $(basename "$0") [-c]"
18 | echo "Checks if outputs are cleared from Jupyter notebook and"
19 | echo "returns non-zero exit status if not."
20 | echo
21 | echo " -c clear output from Jupyter notebooks"
22 | exit 0
23 | ;;
24 | c)
25 | CLEAR=1
26 | ;;
27 | *)
28 | exit 1
29 | ;;
30 | esac
31 | done
32 | shift $((OPTIND - 1))
33 |
34 | IPYNB="$(git ls-files|grep '\.ipynb$')"
35 |
36 | ERR=0
37 | for x in ${IPYNB}
38 | do
39 | if ! nbstripout < "$x" | diff - "$x" > /dev/null
40 | then
41 | if [ "$CLEAR" -ne 0 ]
42 | then
43 | echo "clearing output from $x"
44 | nbstripout "$x"
45 | else
46 | echo "$x" still contains output
47 | ERR=1
48 | fi
49 | fi
50 | done
51 |
52 | exit $ERR
53 |
--------------------------------------------------------------------------------
/etc/make_dirs:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | mkdir Checkpoints
3 | mkdir AZ_Avgs
4 | mkdir G_Avgs
5 | mkdir Shell_Avgs
6 | mkdir Shell_Slices
7 | mkdir Timings
8 | mkdir Spherical_3D
9 | mkdir Shell_Spectra
10 | mkdir Benchmark_Reports
11 | mkdir Equatorial_Slices
12 | mkdir Meridional_Slices
13 | mkdir SPH_Mode_Samples
14 | mkdir Point_Probes
15 |
--------------------------------------------------------------------------------
/examples/custom_reference_states/main_input_Boussinesq_Dynamo_Viscous:
--------------------------------------------------------------------------------
1 |
2 | ! This main_input file should be used with the custom reference state that is output
3 | ! from the jupyter notebook 'Boussinesq_Dynamo_Viscous.ipynb'
4 |
5 | &problemsize_namelist
6 |
7 | n_r = 38
8 | l_max = 42
9 | nprow = 6
10 | npcol = 4
11 | aspect_ratio = 0.4d0
12 | shell_depth = 1.0d0
13 |
14 | /
15 |
16 | &numerical_controls_namelist
17 |
18 | chebyshev = .true.
19 |
20 | /
21 |
22 | &physical_controls_namelist
23 |
24 | rotation = .True.
25 | magnetism = .True.
26 | viscous_heating = .false.
27 | ohmic_heating = .false.
28 |
29 | /
30 |
31 | &temporal_controls_namelist
32 |
33 | max_time_step = 1.0d-4
34 | max_iterations = 100000
35 | alpha_implicit = 0.50001d0
36 | checkpoint_interval = 500000
37 | quicksave_interval = 2000
38 | num_quicksaves = 2
39 | cflmin = 0.4d0
40 | cflmax = 0.6d0
41 |
42 | /
43 |
44 | &io_controls_namelist
45 |
46 | /
47 |
48 | &output_namelist
49 |
50 | ! Kinetic energy, magnetic energy
51 | globalavg_values = 401,405,409,1101,1105,1109
52 | globalavg_frequency = 10
53 | globalavg_nrec = 10
54 |
55 |
56 | /
57 |
58 |
59 |
60 | &Boundary_Conditions_Namelist
61 |
62 | no_slip_boundaries = .true.
63 | strict_L_Conservation = .false.
64 | T_Top = 0.0d0
65 | T_Bottom = 1.0d0
66 | fix_tvar_top = .true.
67 | fix_tvar_bottom = .true.
68 |
69 | /
70 |
71 | &Initial_Conditions_Namelist
72 |
73 | init_type = 7
74 | magnetic_init_type = 7
75 | temp_amp = 1.0d-5
76 | restart_iter = 0
77 |
78 | /
79 |
80 | &Test_Namelist
81 |
82 | /
83 |
84 | &Reference_Namelist
85 |
86 | reference_type = 4
87 | custom_reference_file='custom_ref_viscous.dat'
88 |
89 | Ekman_Number = 2.0d-3
90 | Rayleigh_Number = 1.12d5
91 | Prandtl_Number = 1.0
92 | Magnetic_Prandtl_Number = 5.0d0
93 | heating_type = 0 ! No heating
94 | gravity_power = 1.0d0 ! g ~ radius
95 |
96 | /
97 |
98 | &Transport_Namelist
99 |
100 | /
101 |
--------------------------------------------------------------------------------
/examples/custom_reference_states/main_input_mesa:
--------------------------------------------------------------------------------
1 | !This initializes a non-rotating, 1 Msol star from a MESA profile file.
2 | !Run the notebook "MESA-input-1Msun-ZAMS.ipynb" to the custom reference file.
3 | &problemsize_namelist
4 | n_r = 128
5 | n_theta = 192
6 | nprow = 2
7 | npcol = 2
8 | rmin = 5.1d10
9 | rmax = 6.8e10
10 | /
11 | &numerical_controls_namelist
12 | /
13 | &physical_controls_namelist
14 | rotation = .false.
15 | magnetism = .false.
16 | advect_reference_state = .true.
17 | /
18 | &temporal_controls_namelist
19 | max_time_step = 1000.0d0
20 | max_iterations = 2000000
21 | checkpoint_interval = 100000
22 | quicksave_interval = 25000
23 | num_quicksaves = 3
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | meridional_values = 1,2,3 ! radial and phi components of velocity; temperature
31 | meridional_frequency = 20000
32 | meridional_nrec = 2
33 | meridional_indices_nrm = 0.7
34 |
35 |
36 | ! velocity, temperature, energy fluxes, and Kinetic Energy
37 | shellavg_values = 1,2,3,501, 1440, 1435, 1455, 1470, 1923, 1938
38 | shellavg_frequency = 200
39 | shellavg_nrec = 50
40 |
41 | ! Kinetic energy, Mean KE, Diff-Rot KE, and Convective KE
42 | globalavg_values = 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412
43 | globalavg_frequency = 100
44 | globalavg_nrec = 100
45 |
46 | shellslice_levels_nrm = 0.3, 0.7,0.9
47 | shellslice_values = 1,2,3 ! velocity components
48 | shellslice_frequency = 1000
49 | shellslice_nrec = 2
50 |
51 |
52 |
53 | /
54 |
55 | &Boundary_Conditions_Namelist
56 | no_slip_boundaries = .false.
57 | strict_L_Conservation = .false.
58 | dtdr_bottom = 0.0d0
59 | T_Top = 0.0d0
60 | fix_tvar_top = .true.
61 | fix_tvar_bottom = .false.
62 | fix_dtdr_bottom = .true.
63 | /
64 | &Initial_Conditions_Namelist
65 | init_type = 7
66 | magnetic_init_type = 7
67 | mag_amp = 1.0d0
68 | temp_amp = 1.0d1
69 | temp_w = 0.01d4
70 | restart_iter = 1000000
71 | /
72 | &Test_Namelist
73 | /
74 | &Reference_Namelist
75 | reference_type = 4
76 | custom_reference_file='cref_from_MESA.dat'
77 | heating_type = 1
78 | pressure_specific_heat = 3.5d8
79 | angular_velocity = 0.d0
80 |
81 | !override_constants=T
82 | override_constant(5)= T
83 | ra_constants(5)= 8d12 ! nu_top
84 |
85 | override_constant(6)= T
86 | ra_constants(6)= 8d12 ! kappa_top
87 |
88 | override_constant(1)= T
89 | ra_constants(1) = 0.d0 ! 2 x angular velocity
90 |
91 | !override_constant(10)= T
92 | !ra_constants(10) = 3.846d33 ! luminosity
93 |
94 |
95 |
96 | /
97 | &Transport_Namelist
98 | /
99 |
--------------------------------------------------------------------------------
/examples/custom_reference_states/mesa.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 |
3 | G = 6.67428e-8 # dyne cm^2 / g^2
4 | clight = 2.9979246e+10 # cm / s
5 | arad = 7.5657e-15 # erg cm^-3 K^-4
6 | msol = 1.9891e+33 # g
7 | rsol = 6.9598e10 # cm
8 | kb = 1.3806503e-16 # g cm^2 / K s^2
9 | Na = 6.022142e+23 # 1 / mol
10 | Rgas = 83144621.0 # erg / mol K
11 | solarlum = 3.846e33 # erg / s
12 | umass = 1.660538921e-24 # g
13 | hplanck = 6.62607e-27 # g cm^2 / s
14 |
15 | class profile(object):
16 | def __init__(self, filename, profile=True):
17 | with open(filename, 'r') as f:
18 | f.readline() # skip column numbers
19 | labels = f.readline().split()
20 | values = f.readline().split()
21 | # first few are integers
22 | if profile:
23 | n_int = 2
24 | else:
25 | n_int = 1
26 | for l, v in zip(labels[:n_int], values[:n_int]):
27 | self.__dict__[labels[0]] = int(v)
28 | for l, v in zip(labels[2:], values[2:]):
29 | if v.startswith('"'):
30 | self.__dict__[l] = v.strip('"')
31 | else:
32 | self.__dict__[l] = float(v)
33 |
34 | f.readline()
35 | f.readline()
36 |
37 | self.columns = f.readline().split()
38 | values = np.loadtxt(f)
39 | for i, l in enumerate(self.columns):
40 | self.__dict__[l] = values[:,i]
41 |
42 | class history(profile):
43 | def __init__(self, *args, **kwargs):
44 | kwargs['profile'] = False
45 | super(history,self).__init__(*args, **kwargs)
46 |
--------------------------------------------------------------------------------
/index.rst:
--------------------------------------------------------------------------------
1 | *Rayleigh*: MHD in Spherical Geometry
2 | ======================================
3 |
4 | Rayleigh solves the magnetohydrodynamic (MHD) equations, in a rotating frame, within spherical shells,
5 | using the anelastic or Boussinesq approximations.
6 | Derivatives in Rayleigh are calculated using a spectral transform scheme.
7 | Spherical harmonics are used as basis functions in the horizontal direction.
8 | Chebyshev polynomials or finite-differences are employed in radius.
9 | Time-stepping is accomplished using the semi-implicit Crank-Nicolson method
10 | for the linear terms, and the Adams-Bashforth method for the nonlinear terms.
11 | Both methods are second-order in time.
12 |
13 | This documentation is structured into the following sections:
14 |
15 | .. toctree::
16 | :maxdepth: 1
17 |
18 | doc/source/User_Guide/index.rst
19 | doc/source/citing_rayleigh
20 | doc/source/accessing_and_sharing_data
21 | doc/source/research_enabled_by_rayleigh
22 | doc/source/quick_reference
23 | doc/source/getting_help
24 |
25 |
--------------------------------------------------------------------------------
/input_examples/README:
--------------------------------------------------------------------------------
1 | Rayleigh Input Examples
2 |
3 | This directory contains example input files for Rayleigh.
4 | To use one of these files, copy it to your Rayleigh run directory and rename it
5 | to "main_input ."
6 |
7 | Only the file benchmark_diagnostics_input will produce output.
8 | To add output to the other examples, copy the entries from its output_namelist
9 | into the output_namelist of your chosen main_input file.
10 |
--------------------------------------------------------------------------------
/input_examples/b2010_case0_0T_input:
--------------------------------------------------------------------------------
1 | ! The Breuer_2010 Benchmark for thermal-chemical buoyancy systems.
2 | &problemsize_namelist
3 | n_r = 48
4 | n_theta = 96
5 | nprow = 8
6 | npcol = 12
7 | aspect_ratio = 0.35d0
8 | shell_depth = 1.0d0
9 | /
10 | &numerical_controls_namelist
11 | /
12 | &physical_controls_namelist
13 | benchmark_mode = 0
14 | rotation = .True.
15 | magnetism = .false.
16 | viscous_heating = .false.
17 | ohmic_heating = .false.
18 | n_active_scalars = 1
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 100000
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 |
31 |
32 | globalavg_values = 401,405,409
33 | globalavg_frequency = 1000
34 | globalavg_nrec = 10
35 |
36 |
37 | shellavg_values = 401,405,409,501,507,10001,10002
38 | shellavg_frequency = 1000
39 | shellavg_nrec = 10
40 |
41 | equatorial_values = 1,501,10001
42 | equatorial_frequency = 1000
43 | equatorial_nrec = 10
44 |
45 | shellslice_levels_nrm = 0.675
46 | shellslice_values = 1
47 | shellslice_frequency = 1000
48 | shellslice_nrec = 10
49 |
50 |
51 | azavg_values = 1,2,3,201,202,501
52 | azavg_frequency = 1000
53 | azavg_nrec = 10
54 |
55 |
56 | /
57 | &Boundary_Conditions_Namelist
58 | no_slip_boundaries = .true.
59 | strict_L_Conservation = .false.
60 | T_Top = 0.0d0
61 | T_Bottom = 1.0d0
62 | fix_tvar_top = .true.
63 | fix_tvar_bottom = .true.
64 | chi_a_Top = 0.0d0
65 | chi_a_Bottom = 1.0d0
66 | fix_chivar_a_top = .true.
67 | fix_chivar_a_bottom = .true.
68 | /
69 | &Initial_Conditions_Namelist
70 | init_type = 8
71 | !restart_iter = 0
72 | t_init_file = 'b2010_case0_initcond'
73 | chi_a_init_file = 'b2010_case0_initcond'
74 | /
75 | &Test_Namelist
76 | /
77 | &Reference_Namelist
78 |
79 | Ekman_Number = 1.0d-3
80 | Rayleigh_Number = 0.0d0
81 | Prandtl_Number = 3.0d-1
82 | chi_a_Rayleigh_Number = -6.0d5
83 | chi_a_Prandtl_Number = 3.0d0
84 |
85 | Magnetic_Prandtl_Number = 5.0d0
86 | reference_type = 1
87 | heating_type = 0
88 | gravity_power = 1.0d0
89 | /
90 | &Transport_Namelist
91 | /
92 |
--------------------------------------------------------------------------------
/input_examples/b2010_case0_100T_input:
--------------------------------------------------------------------------------
1 | ! The Breuer_2010 Benchmark for thermal-chemical buoyancy systems.
2 | &problemsize_namelist
3 | n_r = 48
4 | n_theta = 96
5 | nprow = 8
6 | npcol = 12
7 | aspect_ratio = 0.35d0
8 | shell_depth = 1.0d0
9 | /
10 | &numerical_controls_namelist
11 | /
12 | &physical_controls_namelist
13 | benchmark_mode = 0
14 | rotation = .True.
15 | magnetism = .false.
16 | viscous_heating = .false.
17 | ohmic_heating = .false.
18 | n_active_scalars = 0
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 100000
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 |
31 |
32 | globalavg_values = 401,405,409
33 | globalavg_frequency = 1000
34 | globalavg_nrec = 10
35 |
36 |
37 | shellavg_values = 401,405,409,501,507,10001,10002
38 | shellavg_frequency = 1000
39 | shellavg_nrec = 10
40 |
41 | equatorial_values = 1,501,10001
42 | equatorial_frequency = 1000
43 | equatorial_nrec = 10
44 |
45 | shellslice_levels_nrm = 0.675
46 | shellslice_values = 1
47 | shellslice_frequency = 1000
48 | shellslice_nrec = 10
49 |
50 |
51 | azavg_values = 1,2,3,201,202,501
52 | azavg_frequency = 1000
53 | azavg_nrec = 10
54 |
55 |
56 | /
57 | &Boundary_Conditions_Namelist
58 | no_slip_boundaries = .true.
59 | strict_L_Conservation = .false.
60 | T_Top = 0.0d0
61 | T_Bottom = 1.0d0
62 | fix_tvar_top = .true.
63 | fix_tvar_bottom = .true.
64 | chi_a_Top = 0.0d0
65 | chi_a_Bottom = 1.0d0
66 | fix_chivar_a_top = .true.
67 | fix_chivar_a_bottom = .true.
68 | /
69 | &Initial_Conditions_Namelist
70 | init_type = 8
71 | !restart_iter = 0
72 | t_init_file = 'b2010_case0_initcond'
73 | chi_a_init_file = 'b2010_case0_initcond'
74 | /
75 | &Test_Namelist
76 | /
77 | &Reference_Namelist
78 |
79 | Ekman_Number = 1.0d-3
80 | Rayleigh_Number = 6.0d4
81 | Prandtl_Number = 3.0d-1
82 | chi_a_Rayleigh_Number = -0.0d5
83 | chi_a_Prandtl_Number = 3.0d0
84 |
85 | Magnetic_Prandtl_Number = 5.0d0
86 | reference_type = 1
87 | heating_type = 0
88 | gravity_power = 1.0d0
89 | /
90 | &Transport_Namelist
91 | /
92 |
--------------------------------------------------------------------------------
/input_examples/b2010_case0_80T_input:
--------------------------------------------------------------------------------
1 | ! The Breuer_2010 Benchmark for thermal-chemical buoyancy systems.
2 | &problemsize_namelist
3 | n_r = 48
4 | n_theta = 96
5 | nprow = 8
6 | npcol = 12
7 | aspect_ratio = 0.35d0
8 | shell_depth = 1.0d0
9 | /
10 | &numerical_controls_namelist
11 | /
12 | &physical_controls_namelist
13 | benchmark_mode = 0
14 | rotation = .True.
15 | magnetism = .false.
16 | viscous_heating = .false.
17 | ohmic_heating = .false.
18 | n_active_scalars = 1
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 100000
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 |
31 |
32 | globalavg_values = 401,405,409
33 | globalavg_frequency = 1000
34 | globalavg_nrec = 10
35 |
36 |
37 | shellavg_values = 401,405,409,501,507,10001,10002
38 | shellavg_frequency = 1000
39 | shellavg_nrec = 10
40 |
41 | equatorial_values = 1,501,10001
42 | equatorial_frequency = 1000
43 | equatorial_nrec = 10
44 |
45 | shellslice_levels_nrm = 0.675
46 | shellslice_values = 1
47 | shellslice_frequency = 1000
48 | shellslice_nrec = 10
49 |
50 |
51 | azavg_values = 1,2,3,201,202,501
52 | azavg_frequency = 1000
53 | azavg_nrec = 10
54 |
55 |
56 | /
57 | &Boundary_Conditions_Namelist
58 | no_slip_boundaries = .true.
59 | strict_L_Conservation = .false.
60 | T_Top = 0.0d0
61 | T_Bottom = 1.0d0
62 | fix_tvar_top = .true.
63 | fix_tvar_bottom = .true.
64 | chi_a_Top = 0.0d0
65 | chi_a_Bottom = 1.0d0
66 | fix_chivar_a_top = .true.
67 | fix_chivar_a_bottom = .true.
68 | /
69 | &Initial_Conditions_Namelist
70 | init_type = 8
71 | !restart_iter = 0
72 | t_init_file = 'b2010_case0_initcond'
73 | chi_a_init_file = 'b2010_case0_initcond'
74 | /
75 | &Test_Namelist
76 | /
77 | &Reference_Namelist
78 |
79 | Ekman_Number = 1.0d-3
80 | Rayleigh_Number = 4.8d4
81 | Prandtl_Number = 3.0d-1
82 | chi_a_Rayleigh_Number = -1.2d5
83 | chi_a_Prandtl_Number = 3.0d0
84 |
85 | Magnetic_Prandtl_Number = 5.0d0
86 | reference_type = 1
87 | heating_type = 0
88 | gravity_power = 1.0d0
89 | /
90 | &Transport_Namelist
91 | /
92 |
--------------------------------------------------------------------------------
/input_examples/b2010_case0_InitCond:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/input_examples/b2010_case0_InitCond
--------------------------------------------------------------------------------
/input_examples/c2001_case0_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 1
13 | benchmark_integration_interval = 100
14 | benchmark_report_interval = 10000
15 | rotation = .True.
16 | magnetism = .false.
17 | viscous_heating = .false.
18 | ohmic_heating = .false.
19 | advect_reference_state = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 100000
24 | checkpoint_interval = 10000
25 | cflmin = 0.4d0
26 | cflmax = 0.6d0
27 | /
28 | &io_controls_namelist
29 | /
30 | &output_namelist
31 |
32 |
33 | /
34 |
35 | &Boundary_Conditions_Namelist
36 | no_slip_boundaries = .true.
37 | strict_L_Conservation = .false.
38 | dtdr_bottom = 0.0d0
39 | T_Top = 0.0d0
40 | T_Bottom = 1.0d0
41 | fix_tvar_top = .true.
42 | fix_tvar_bottom = .true.
43 | /
44 | &Initial_Conditions_Namelist
45 | init_type = 1 ! Benchmark init
46 | temp_amp = 1.0d1
47 | temp_w = 0.01d4
48 | restart_iter = -1
49 | /
50 | &Test_Namelist
51 | /
52 | &Reference_Namelist
53 | Ekman_Number = 1.0d-3
54 | Rayleigh_Number = 1.0d5
55 | Prandtl_Number = 1.0d0
56 | Magnetic_Prandtl_Number = 5.0d0
57 | reference_type = 1
58 | heating_type = 0 ! No heating
59 | gravity_power = 1.0d0 ! g ~ radius
60 | /
61 | &Transport_Namelist
62 | /
63 |
--------------------------------------------------------------------------------
/input_examples/c2001_case0_minimal:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 64
3 | n_theta = 96
4 | nprow = 16
5 | npcol = 32
6 | /
7 | &numerical_controls_namelist
8 | /
9 | &physical_controls_namelist
10 | benchmark_mode = 1
11 | benchmark_integration_interval = 100
12 | benchmark_report_interval = 5000
13 | /
14 | &temporal_controls_namelist
15 | max_iterations = 25000
16 | checkpoint_interval = 100000
17 | quicksave_interval = 10000
18 | num_quicksaves = 2
19 | /
20 | &io_controls_namelist
21 | /
22 | &output_namelist
23 | /
24 |
25 | &Boundary_Conditions_Namelist
26 | /
27 | &Initial_Conditions_Namelist
28 | /
29 | &Test_Namelist
30 | /
31 | &Reference_Namelist
32 | /
33 | &Transport_Namelist
34 | /
35 |
--------------------------------------------------------------------------------
/input_examples/c2001_case1_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 64
3 | n_theta = 96
4 | nprow = 16
5 | npcol = 32
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 2
13 | benchmark_integration_interval = 100
14 | benchmark_report_interval = 10000
15 | rotation = .True.
16 | magnetism = .true.
17 | viscous_heating = .false.
18 | ohmic_heating = .false.
19 | advect_reference_state = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 150000
24 | checkpoint_interval = 10000
25 | cflmin = 0.4d0
26 | cflmax = 0.6d0
27 | /
28 | &io_controls_namelist
29 | /
30 | &output_namelist
31 |
32 | /
33 |
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | dtdr_bottom = 0.0d0
38 | T_Top = 0.0d0
39 | T_Bottom = 1.0d0
40 | fix_tvar_top = .true.
41 | fix_tvar_bottom = .true.
42 | fix_dtdr_bottom = .false.
43 | /
44 | &Initial_Conditions_Namelist
45 | init_type = 1
46 | magnetic_init_type = 1
47 | mag_amp = 1.0d0
48 | temp_amp = 1.0d1
49 | temp_w = 0.01d4
50 | restart_iter = -1
51 | /
52 | &Test_Namelist
53 | /
54 | &Reference_Namelist
55 | Ekman_Number = 1.0d-3
56 | Rayleigh_Number = 1.0d5
57 | Prandtl_Number = 1.0d0
58 | Magnetic_Prandtl_Number = 5.0d0
59 | reference_type = 1
60 | heating_type = 0
61 | gravity_power = 1.0d0
62 | /
63 | &Transport_Namelist
64 | /
65 |
--------------------------------------------------------------------------------
/input_examples/c2001_case1_minimal:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 64
3 | n_theta = 96
4 | nprow = 16
5 | npcol = 32
6 | /
7 | &numerical_controls_namelist
8 | /
9 | &physical_controls_namelist
10 | benchmark_mode = 2
11 | benchmark_integration_interval = 100
12 | benchmark_report_interval = 10000
13 | /
14 | &temporal_controls_namelist
15 | max_iterations = 150000
16 | checkpoint_interval = 100000
17 | quicksave_interval = 10000
18 | num_quicksaves = 2
19 | /
20 | &io_controls_namelist
21 | /
22 | &output_namelist
23 | /
24 |
25 | &Boundary_Conditions_Namelist
26 | /
27 | &Initial_Conditions_Namelist
28 | /
29 | &Test_Namelist
30 | /
31 | &Reference_Namelist
32 | /
33 | &Transport_Namelist
34 | /
35 |
--------------------------------------------------------------------------------
/input_examples/j2011_steady_hydro_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 128
3 | n_theta = 192
4 | nprow = 64
5 | npcol = 32
6 | rmin = 2.45d9
7 | rmax = 7.0d9
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | rotation = .true.
13 | magnetism = .false.
14 | benchmark_mode = 3
15 | benchmark_integration_interval = 100
16 | benchmark_report_interval = 10000
17 | advect_reference_state = .false.
18 | /
19 | &temporal_controls_namelist
20 | max_time_step = 30.0d0
21 | max_iterations = 5000000
22 | checkpoint_interval = 100000
23 | cflmin = 0.4d0
24 | cflmax = 0.6d0
25 | /
26 | &io_controls_namelist
27 | /
28 | &output_namelist
29 |
30 | /
31 |
32 | &Boundary_Conditions_Namelist
33 | strict_L_Conservation = .false.
34 | T_Top = 0.0d0
35 | T_Bottom = 851225.7d0
36 | fix_tvar_top = .true.
37 | fix_tvar_bottom = .true.
38 | /
39 | &Initial_Conditions_Namelist
40 | init_type = 6
41 | temp_amp = 1.0d1
42 | temp_w = 0.01d4
43 | restart_iter = 0
44 | /
45 | &Test_Namelist
46 | /
47 | &Reference_Namelist
48 | reference_type = 2
49 | heating_type = 0
50 | poly_n = 2.0d0
51 | poly_Nrho = 5.0d0
52 | poly_mass = 1.9D30
53 | poly_rho_i = 1.1d0
54 | pressure_specific_heat = 1.0509d8
55 | angular_velocity = 1.76d-4
56 | /
57 | &Transport_Namelist
58 | nu_top = 3.64364d12
59 | kappa_top = 3.64364d12
60 | /
61 |
--------------------------------------------------------------------------------
/input_examples/j2011_steady_hydro_minimal:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 128
3 | n_theta = 192
4 | nprow = 32
5 | npcol = 16
6 | /
7 | &numerical_controls_namelist
8 | /
9 | &physical_controls_namelist
10 | benchmark_mode = 3
11 | benchmark_integration_interval = 100
12 | benchmark_report_interval = 10000
13 | /
14 | &temporal_controls_namelist
15 | max_iterations = 200000
16 | checkpoint_interval = 100000
17 | quicksave_interval = 10000
18 | num_quicksaves = 2
19 | /
20 | &io_controls_namelist
21 | /
22 | &output_namelist
23 | /
24 |
25 | &Boundary_Conditions_Namelist
26 | /
27 | &Initial_Conditions_Namelist
28 | /
29 | &Test_Namelist
30 | /
31 | &Reference_Namelist
32 | /
33 | &Transport_Namelist
34 | /
35 |
--------------------------------------------------------------------------------
/input_examples/j2011_steady_mhd_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 128
3 | n_theta = 192
4 | nprow = 2
5 | npcol = 2
6 | rmin = 2.45d9
7 | rmax = 7.0d9
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | rotation = .true.
13 | magnetism = .true.
14 | benchmark_mode = 4
15 | benchmark_integration_interval = 100
16 | benchmark_report_interval = 10000
17 | advect_reference_state = .false.
18 | /
19 | &temporal_controls_namelist
20 | max_time_step = 200.0d0
21 | max_iterations = 5000000
22 | checkpoint_interval = 100000
23 | cflmin = 0.4d0
24 | cflmax = 0.6d0
25 | /
26 | &io_controls_namelist
27 | /
28 | &output_namelist
29 |
30 | /
31 |
32 | &Boundary_Conditions_Namelist
33 | strict_L_Conservation = .true.
34 | T_Top = 0.0d0
35 | T_Bottom = 774268.3d0
36 | fix_tvar_top = .true.
37 | fix_tvar_bottom = .true.
38 | /
39 | &Initial_Conditions_Namelist
40 | init_type = 7
41 | magnetic_init_type = 7
42 | mag_amp = 1.0d0
43 | temp_amp = 1.0d1
44 | temp_w = 0.01d4
45 | conductive_profile =.true.
46 | restart_iter = 0
47 | /
48 | &Test_Namelist
49 | /
50 | &Reference_Namelist
51 | reference_type = 2
52 | heating_type = 0
53 | poly_n = 2.0d0
54 | poly_Nrho = 3.0d0
55 | poly_mass = 1.9D30
56 | poly_rho_i = 1.1d0
57 | pressure_specific_heat = 1.0509d8
58 | angular_velocity = 1.76d-4
59 | /
60 | &Transport_Namelist
61 | nu_top = 7.28728d12
62 | kappa_top = 7.28728d12
63 | eta_top = 1.457456d11
64 | /
65 |
--------------------------------------------------------------------------------
/input_examples/j2011_steady_mhd_minimal:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 128
3 | n_theta = 192
4 | nprow = 2
5 | npcol = 2
6 | /
7 | &numerical_controls_namelist
8 | /
9 | &physical_controls_namelist
10 | benchmark_mode = 4
11 | benchmark_integration_interval = 100
12 | benchmark_report_interval = 10000
13 | /
14 | &temporal_controls_namelist
15 | max_iterations = 5000000
16 | checkpoint_interval = 100000
17 | quicksave_interval = 25000
18 | num_quicksaves = 2
19 | /
20 | &io_controls_namelist
21 | /
22 | &output_namelist
23 | /
24 |
25 | &Boundary_Conditions_Namelist
26 | /
27 | &Initial_Conditions_Namelist
28 | /
29 | &Test_Namelist
30 | /
31 | &Reference_Namelist
32 | /
33 | &Transport_Namelist
34 | /
35 |
--------------------------------------------------------------------------------
/input_examples/main_input_jupiter:
--------------------------------------------------------------------------------
1 | ! This setup is similar to the non-dimensional anelastic run
2 | ! of Heimpel et al., 2016, Nature Geoscience Letters, 9, 19
3 | &problemsize_namelist
4 | n_r = 128
5 | n_theta = 192
6 | nprow = 2
7 | npcol = 2
8 | aspect_ratio = 0.9d0
9 | shell_depth = 1.0d0
10 | /
11 | &numerical_controls_namelist
12 | /
13 | &physical_controls_namelist
14 | rotation = .true.
15 | advect_reference_state = .false.
16 | /
17 | &temporal_controls_namelist
18 | max_time_step = 0.05d0 ! timescale is 1/Omega, fastest wave is 1/2 that - divide by 10 to be safe
19 | max_iterations = 1000000
20 | check_frequency = 100000
21 | cflmin = 0.4d0
22 | cflmax = 0.6d0
23 | quicksave_interval = 10000
24 | num_quicksaves = 3
25 | save_last_timestep = .true.
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 |
31 | /
32 |
33 | &Boundary_Conditions_Namelist
34 | no_slip_boundaries = .false.
35 | dTdr_top = 85.81d0
36 | dTdr_bottom = -1.0d0
37 | fix_dtdr_top = .true.
38 | fix_dtdr_bottom = .true.
39 | /
40 | &Initial_Conditions_Namelist
41 | conductive_profile = .true. !ell =0 entropy is conductive
42 | init_type = 7
43 | magnetic_init_type = 7
44 | mag_amp = 1.0d0
45 | temp_amp = 0.01d0
46 | temp_w = 0.01d4
47 | restart_iter = 0
48 | /
49 | &Test_Namelist
50 | /
51 | &Reference_Namelist
52 | reference_type = 3
53 | Ekman_Number = 3.0d-6
54 | Prandtl_Number = 1.0d0
55 | Modified_Rayleigh_Number = 0.048d0
56 | heating_type = 4
57 | poly_n = 2.0d0
58 | poly_Nrho = 5.0d0
59 | /
60 | &Transport_Namelist
61 | hyperdiffusion = .true.
62 | hyperdiffusion_alpha = 120.0
63 | hyperdiffusion_beta = 3.0d0
64 | /
65 |
--------------------------------------------------------------------------------
/input_examples/main_input_mhd_jones_FD:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 128
3 | n_theta = 192
4 | nprow = -1
5 | npcol = -1
6 | rmin = 2.45d9
7 | rmax = 7.0d9
8 | /
9 | &numerical_controls_namelist
10 | chebyshev = false
11 | /
12 | &physical_controls_namelist
13 | rotation = .true.
14 | magnetism = .true.
15 | benchmark_mode = 4
16 | benchmark_integration_interval = 100
17 | benchmark_report_interval = 10000
18 | advect_reference_state = .false.
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 200.0d0
22 | max_iterations = 5000000
23 | checkpoint_interval = 100000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | /
31 |
32 | &Boundary_Conditions_Namelist
33 | strict_L_Conservation = .true.
34 | T_Top = 0.0d0
35 | T_Bottom = 774268.3d0
36 | fix_tvar_top = .true.
37 | fix_tvar_bottom = .true.
38 | /
39 | &Initial_Conditions_Namelist
40 | init_type = 7
41 | magnetic_init_type = 7
42 | mag_amp = 1.0d0
43 | temp_amp = 1.0d1
44 | temp_w = 0.01d4
45 | conductive_profile =.true.
46 | restart_iter = 0
47 | /
48 | &Test_Namelist
49 | /
50 | &Reference_Namelist
51 | reference_type = 2
52 | heating_type = 0
53 | poly_n = 2.0d0
54 | poly_Nrho = 3.0d0
55 | poly_mass = 1.9D30
56 | poly_rho_i = 1.1d0
57 | pressure_specific_heat = 1.0509d8
58 | angular_velocity = 1.76d-4
59 | /
60 | &Transport_Namelist
61 | nu_top = 7.28728d12
62 | kappa_top = 7.28728d12
63 | eta_top = 1.457456d11
64 | /
65 |
--------------------------------------------------------------------------------
/input_examples/main_input_sun:
--------------------------------------------------------------------------------
1 | !This initializes a rotating, solar-like case, spanning the innermost
2 | !3 density scaleheights of the convection zone.
3 | !This run setup is similar to the non-rotating runs found in
4 | !Featherstone & Hindman, 2016, ApJ, 818, 32
5 | &problemsize_namelist
6 | n_r = 128
7 | n_theta = 768
8 | nprow = 64
9 | npcol = 32
10 | rmin = 5.0d10
11 | rmax = 6.5860209d10
12 | /
13 | &numerical_controls_namelist
14 | /
15 | &physical_controls_namelist
16 | rotation = .true.
17 | magnetism = .false.
18 | advect_reference_state = .false.
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 1000.0d0
22 | max_iterations = 5000000
23 | checkpoint_interval = 100000
24 | quicksave_interval = 25000
25 | num_quicksaves = 3
26 | cflmin = 0.4d0
27 | cflmax = 0.6d0
28 | /
29 | &io_controls_namelist
30 | /
31 | &output_namelist
32 |
33 | /
34 |
35 | &Boundary_Conditions_Namelist
36 | no_slip_boundaries = .false.
37 | strict_L_Conservation = .false.
38 | dtdr_bottom = 0.0d0
39 | T_Top = 0.0d0
40 | T_Bottom = 851225.7d0
41 | fix_tvar_top = .true.
42 | fix_tvar_bottom = .false.
43 | fix_dtdr_bottom = .true.
44 | /
45 | &Initial_Conditions_Namelist
46 | init_type = 7
47 | magnetic_init_type = 7
48 | mag_amp = 1.0d0
49 | temp_amp = 1.0d1
50 | temp_w = 0.01d4
51 | restart_iter = 0
52 | /
53 | &Test_Namelist
54 | /
55 | &Reference_Namelist
56 | reference_type = 2
57 | heating_type = 1
58 | luminosity = 3.846d33
59 | poly_n = 1.5d0
60 | poly_Nrho = 3.0d0
61 | poly_mass = 1.98891D33
62 | poly_rho_i = 0.18053428d0
63 | pressure_specific_heat = 3.5d8
64 | angular_velocity = 2.6d-6
65 | /
66 | &Transport_Namelist
67 | nu_top = 2.d12
68 | kappa_top = 2.d12
69 | /
70 |
--------------------------------------------------------------------------------
/job_scripts/NASA_Pleiades/pleiades_script.sh:
--------------------------------------------------------------------------------
1 | #PBS -S /bin/bash
2 | #PBS -q long # 'long' queue allows jobs up to 5 days (use 'normal' for 8 hours or less).
3 | #PBS -j oe
4 | #PBS -W group_list=s1234 # account number
5 | #PBS -m e
6 | #PBS -N nrho5_ff_5 # job name
7 | #PBS -l walltime=120:00:00 # run for 120 hours
8 | #PBS -l select=74:ncpus=28:mpiprocs=28:model=bro # Request 74 Broadwell nodes. 28 MPI ranks per node.
9 |
10 | module purge
11 | module load comp-intel
12 | module load mpi-hpe
13 | export OMP_NUM_THREADS=1
14 |
15 | # Link the Rayleigh executables from your home directory (modify the path below accordingly)
16 | ln -s /home4/nfeather/Ra_share/Rayleigh/bin/* .
17 | sleep 10
18 |
19 | # Run the code
20 | # Make sure that the number of cores is <= select*mpiprocs
21 | mpiexec -np 2048 ./rayleigh.avx2 -nprow 64 -npcol 32
22 |
23 |
24 | # Compilation Notes
25 | #
26 | # To configure and build Rayleigh, the following commands should suffice:
27 | #
28 | # module purge
29 | # module load comp-intel
30 | # module load mpi-hpe
31 | # ./configure --FC=mpif90 --CC=icc (select 'ALL')
32 | # make -j
33 | # make install
34 |
35 | # Additional notes
36 | # (1) Pleiades is a hetergenous cluster, composed of many (primarily Intel) processor types.
37 | # We suggest selecting the 'ALL' option when configuring Rayleigh to ensure that a unique
38 | # executable is created for each of the possible vectorization options.3
39 | #
40 | # (2) This script is set up to run Rayleigh on 2048 Pleiades Broadwell cores.
41 | # Each Broadwell node has 28 cores, so 74 nodes (2072 cores) must be requested
42 | # in order to have access to 2048 cores. This is typical of most Pleiades node
43 | # configurations as most node types do not possess a core-count that is a power of 2.
44 | #
45 | # (3) To change the node type, change (i) the PBS 'select' line and the Rayleigh
46 | # executable correspondingly. Some alternative examples are:
47 | #
48 | # a) Sandybridge Nodes (128 nodes, 2048 cores):
49 | # PBS -l select=128:ncpus=16:mpiprocs=16:model=san
50 | # mpiexec -np 2048 ./rayleigh.avx -nprow 64 -npcol 32
51 | # b) Ivybridge Nodes (103 nodes, 2060 cores):
52 | # PBS -l select=103:ncpus=20:mpiprocs=20:model=ivy
53 | # mpiexec -np 2048 ./rayleigh.avx -nprow 64 -npcol 32
54 | # c) Haswell Nodes (86 nodes, 2064 cores):
55 | # PBS -l select=86:ncpus=24:mpiprocs=24:model=has
56 | # mpiexec -np 2048 ./rayleigh.avx2 -nprow 64 -npcol 32
57 |
58 |
--------------------------------------------------------------------------------
/job_scripts/TACC_Stampede3/stampede3_jobscript.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #SBATCH -J geodynamo-test # Job name
3 | #SBATCH -o log.o%j # Name of stdout output file
4 | #SBATCH -e error.e%j # Name of stderr error file
5 | #SBATCH -p skx-dev # Queue (partition) name; skx-dev for testing; skx, icx, or spr for production.
6 | #SBATCH -N 1 # Total # of nodes. 1-4 for skx-dev. >=4 for skx-normal
7 | #SBATCH --ntasks-per-node 48 # 48 for skx-dev and skx, 80 for icx, 112 for spr
8 | #SBATCH -t 00:10:00 # Run time (hh:mm:ss) max 2h on skx-dev, max 48h on everything else
9 | #SBATCH --mail-user=
10 | #SBATCH --mail-type=none # Send no email
11 |
12 | module list
13 |
14 | # Launch MPI code...
15 |
16 | export OMP_NUM_THREADS=1
17 |
18 | # Replace this with the path and name of the Rayleigh binary
19 | export RAYLEIGH_BINARY=./rayleigh
20 |
21 | # Replace -n X with correct number of MPI ranks, or remove to use all ranks
22 | # requested on the nodes above. This assumes you submit
23 | # the job from the directory of your main_input file.
24 | ibrun -n 48 ${RAYLEIGH_BINARY}
25 |
--------------------------------------------------------------------------------
/post_processing/interpolation/Makefile:
--------------------------------------------------------------------------------
1 | PROG = interp3d
2 |
3 | BASEOPTS_GNU = -cpp -fopenmp -ffree-form -ffree-line-length-none -O3
4 | OPTSF90_GNU = $(BASEOPTS_GNU) -march=native -mtune=native
5 | F90_GNU = gfortran
6 |
7 | BASEOPTS_INTEL1 = -qopenmp -real-size 32 -O3 -ipo -align all -align rec16byte -ftz -vec-threshold5 -auto
8 | BASEOPTS_INTEL2 = -qopt-subscript-in-range -ansi-alias -fno-fnalias -fno-alias -qopt-prefetch -no-prec-div -unroll
9 | OPTSF90_INTEL = -xHost $(BASEOPTS_INTEL1) $(BASEOPTS_INTEL2)
10 | F90_INTEL = ifort
11 |
12 | interp3d.gnu:
13 | $(F90_GNU) $(OPTSF90_GNU) -c Interpolation.F90
14 | $(F90_GNU) $(OPTSF90_GNU) -c Read_CMD.F90
15 | $(F90_GNU) $(OPTSF90_GNU) Main.F90 Interpolation.o Read_CMD.o -o $(PROG)
16 |
17 | interp3d.intel:
18 | $(F90_INTEL) $(OPTSF90_INTEL) -c Interpolation.F90
19 | $(F90_INTEL) $(OPTSF90_INTEL) -c Read_CMD.F90
20 | $(F90_INTEL) $(OPTSF90_INTEL) Main.F90 Interpolation.o Read_CMD.o -o $(PROG)
21 |
22 | clean:
23 | touch temp.o temp.mod
24 | rm *.o *.mod $(PROG)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/post_processing/interpolation/test.F90:
--------------------------------------------------------------------------------
1 | PROGRAM HELLO
2 |
3 | INTEGER NTHREADS, TID, OMP_GET_NUM_THREADS,
4 | + OMP_GET_THREAD_NUM
5 |
6 | C Fork a team of threads giving them their own copies of variables
7 | !$OMP PARALLEL PRIVATE(NTHREADS, TID)
8 |
9 |
10 | C Obtain thread number
11 | TID = OMP_GET_THREAD_NUM()
12 | PRINT *, 'Hello World from thread = ', TID
13 |
14 | C Only master thread does this
15 | IF (TID .EQ. 0) THEN
16 | NTHREADS = OMP_GET_NUM_THREADS()
17 | PRINT *, 'Number of threads = ', NTHREADS
18 | END IF
19 |
20 | C All threads join master thread and disband
21 | !$OMP END PARALLEL
22 |
23 | END
24 |
25 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_azavg.pro:
--------------------------------------------------------------------------------
1 | PRO READ_AZAVG, file, res
2 | endian_tag = 0L
3 | version = 0L
4 | nrec = 0L
5 | ntheta = 0L
6 | nr = 0L
7 | nq = 0L
8 | CLOSE, 13
9 | OPENR, 13, file
10 | READU,13, endian_tag
11 | If (endian_tag ne 314) THEN BEGIN
12 | endian1 = endian_tag
13 | CLOSE,13
14 | OPENR,13,file, /swap_if_little_endian
15 | READU,13,endian_tag
16 | IF (endian_tag ne 314) THEN BEGIN
17 | print, 'Unable to discern endianess of file!'
18 | print, "Expected integer value 314 in first 4 bytes"
19 | print, "Found : ", endian1
20 | print, "And : ", endian_tag
21 | STOP
22 | ENDIF
23 |
24 | Endif
25 | ; Read the data dimensions
26 | READU,13, version
27 | READU,13, nrec
28 | READU,13, nr
29 | READU,13, ntheta
30 | READU,13, nq
31 |
32 |
33 | ; Read the header arrays
34 | qvals = LONARR(nq)
35 | radius = DBLARR(nr)
36 | costheta = DBLARR(ntheta)
37 |
38 | READU,13,qvals
39 | READU,13,radius
40 | READU,13,costheta
41 |
42 |
43 | ; Read the individual records
44 | vals = DBLARR(nr,ntheta,nq,nrec)
45 | tmp = DBLARR(nr,ntheta)
46 | time = DBLARR(nrec)
47 | iter = LONARR(nrec)
48 | it = 0L
49 | tm = 0.0d0
50 | FOR i = 0, nrec-1 DO BEGIN
51 | FOR k = 0, nq -1 DO BEGIN
52 | READU,13,tmp
53 | vals[*,*,k,i] = tmp
54 | ENDFOR
55 | READU,13,tm
56 | READU,13,it
57 | time[i] = tm
58 | iter[i] = it
59 | ENDFOR
60 | CLOSE, 13
61 |
62 | ; Build a lookup table for the quantity codes
63 | qmax = 901L
64 | lut = LONARR(qmax+1)
65 | lut[*] = qmax*2
66 | FOR i = 0, nq -1 DO BEGIN
67 | lut[qvals[i]] = i
68 | ENDFOR
69 |
70 |
71 | res = {vals:vals, radius:radius, costheta:costheta,qvals:qvals, time:time, $
72 | iter:iter, version:version, lut:lut}
73 |
74 | END
75 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_gavg.pro:
--------------------------------------------------------------------------------
1 | PRO READ_GAVG, file, res
2 | endian_tag = 0L
3 | version = 0L
4 | nrec = 0L
5 | nq = 0L
6 | CLOSE, 13
7 | OPENR, 13, file
8 | READU,13, endian_tag
9 | If (endian_tag ne 314) THEN BEGIN
10 | endian1 = endian_tag
11 | CLOSE,13
12 | OPENR,13,file, /swap_if_little_endian
13 | READU,13,endian_tag
14 | IF (endian_tag ne 314) THEN BEGIN
15 | print, 'Unable to discern endianess of file!'
16 | print, "Expected integer value 314 in first 4 bytes"
17 | print, "Found : ", endian1
18 | print, "And : ", endian_tag
19 | STOP
20 | ENDIF
21 |
22 | Endif
23 | ; Read the data dimensions
24 | READU,13, version
25 | READU,13, nrec
26 | READU,13, nq
27 |
28 |
29 | ; Read the header arrays
30 | qvals = LONARR(nq)
31 |
32 | READU,13,qvals
33 |
34 |
35 | ; Read the individual records
36 | vals = DBLARR(nrec,nq)
37 | time = DBLARR(nrec)
38 | iter = LONARR(nrec)
39 | it = 0L
40 | tm = 0.0d0
41 | tmp = DBLARR(nq)
42 | FOR i = 0, nrec-1 DO BEGIN
43 | READU,13,tmp
44 | vals[i,*] = tmp
45 | READU,13,tm
46 | READU,13,it
47 | time[i] = tm
48 | iter[i] = it
49 | ENDFOR
50 | CLOSE, 13
51 |
52 | ; Build a lookup table for the quantity codes
53 | qmax = 901L
54 | lut = LONARR(qmax+1)
55 | lut[*] = qmax*2
56 | FOR i = 0, nq -1 DO BEGIN
57 | lut[qvals[i]] = i
58 | ENDFOR
59 |
60 | res = {vals:vals, qvals:qvals, time:time, $
61 | iter:iter, version:version, lut:lut}
62 |
63 | END
64 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_profile.pro:
--------------------------------------------------------------------------------
1 | pro read_profile, file, res
2 | CLOSE, 13
3 |
4 | openr, 13, file
5 | endian_tag = 0L
6 | READU,13, endian_tag
7 | If (endian_tag ne 314) THEN BEGIN
8 | endian1 = endian_tag
9 | CLOSE,13
10 | OPENR,13,file, /swap_if_little_endian
11 | READU,13,endian_tag
12 | IF (endian_tag ne 314) THEN BEGIN
13 | print, 'Unable to discern endianess of file!'
14 | print, "Expected integer value 314 in first 4 bytes"
15 | print, "Found : ", endian1
16 | print, "And : ", endian_tag
17 | STOP
18 | ENDIF
19 |
20 | Endif
21 |
22 |
23 |
24 | nr = 0L
25 | n2 = 0L
26 | readu,13,nr
27 | readu,13,n2
28 | nq = n2-1
29 | vals = dblarr(nr,nq)
30 |
31 |
32 | radius = dblarr(nr)
33 | readu,13, radius
34 | readu,13, vals
35 |
36 | close, 13
37 | res = {radius:radius, vals:vals}
38 |
39 | end
40 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_reference.pro:
--------------------------------------------------------------------------------
1 | pro read_reference, file, res
2 | CLOSE, 13
3 |
4 | openr, 13, file
5 | endian_tag = 0L
6 | READU,13, endian_tag
7 | If (endian_tag ne 314) THEN BEGIN
8 | endian1 = endian_tag
9 | CLOSE,13
10 | OPENR,13,file, /swap_if_little_endian
11 | READU,13,endian_tag
12 | IF (endian_tag ne 314) THEN BEGIN
13 | print, 'Unable to discern endianess of file!'
14 | print, "Expected integer value 314 in first 4 bytes"
15 | print, "Found : ", endian1
16 | print, "And : ", endian_tag
17 | STOP
18 | ENDIF
19 |
20 | Endif
21 |
22 |
23 |
24 | nr = 0L
25 | readu,13,nr
26 |
27 | radius = dblarr(nr)
28 | density = dblarr(nr)
29 | dlnrho = dblarr(nr)
30 | d2lnrho = dblarr(nr)
31 | pressure = dblarr(nr)
32 | temperature = dblarr(nr)
33 | dlnt = dblarr(nr)
34 | dsdr = dblarr(nr)
35 | entropy = dblarr(nr)
36 | gravity = dblarr(nr)
37 | readu,13, radius
38 | readu,13, density
39 | readu,13, dlnrho
40 | readu,13, d2lnrho
41 | readu,13, pressure
42 | readu,13, temperature
43 | readu,13, dlnt
44 | readu,13, dsdr
45 | readu,13, entropy
46 | readu,13, gravity
47 |
48 | close, 13
49 | res = {radius:radius, density:density,pressure:pressure,temperature:temperature,dlnro:dlnrho, $
50 | gravity:gravity, dlnT:dlnT, d2lnrho:d2lnrho, dsdr:dsdr,entropy:entropy}
51 | end
52 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_shell.pro:
--------------------------------------------------------------------------------
1 | PRO READ_SHELL, file, res
2 | endian_tag = 0L
3 | version = 0L
4 | nrec = 0L
5 | ntheta = 0L
6 | nr = 0L
7 | nq = 0L
8 | CLOSE, 13
9 | OPENR, 13, file
10 | READU,13, endian_tag
11 | If (endian_tag ne 314) THEN BEGIN
12 | endian1 = endian_tag
13 | CLOSE,13
14 | OPENR,13,file, /swap_if_little_endian
15 | READU,13,endian_tag
16 | IF (endian_tag ne 314) THEN BEGIN
17 | print, 'Unable to discern endianess of file!'
18 | print, "Expected integer value 314 in first 4 bytes"
19 | print, "Found : ", endian1
20 | print, "And : ", endian_tag
21 | STOP
22 | ENDIF
23 |
24 | Endif
25 | ; Read the data dimensions
26 | READU,13, version
27 | READU,13, nrec
28 | READU,13, ntheta
29 | READU,13, nr
30 | READU,13, nq
31 | nphi = 2*ntheta
32 |
33 |
34 | ; Read the header arrays
35 | qvals = LONARR(nq)
36 | radius = DBLARR(nr)
37 | shell_inds = LONARR(nr)
38 | costheta = DBLARR(ntheta)
39 |
40 | READU,13,qvals
41 | READU,13,radius
42 | READU,13,shell_inds
43 | READU,13,costheta
44 |
45 |
46 | ; Read the individual records
47 | vals = DBLARR(nphi,ntheta,nr,nq,nrec)
48 | tmp = DBLARR(nphi,ntheta)
49 | time = DBLARR(nrec)
50 | iter = LONARR(nrec)
51 | it = 0L
52 | tm = 0.0d0
53 | FOR i = 0, nrec-1 DO BEGIN
54 | FOR k = 0, nq -1 DO BEGIN
55 | FOR j = 0, nr -1 DO BEGIN
56 | READU,13,tmp
57 | vals[*,*,j,k,i] = tmp
58 | ENDFOR
59 | ENDFOR
60 | READU,13,tm
61 | READU,13,it
62 | time[i] = tm
63 | iter[i] = it
64 | ENDFOR
65 | CLOSE, 13
66 |
67 | ; Build a lookup table for the quantity codes
68 | qmax = 901L
69 | lut = LONARR(qmax+1)
70 | lut[*] = qmax*2
71 | FOR i = 0, nq -1 DO BEGIN
72 | lut[qvals[i]] = i
73 | ENDFOR
74 |
75 |
76 | res = {vals:vals, radius:radius, costheta:costheta,qvals:qvals, shell_inds:shell_inds, time:time, $
77 | iter:iter, version:version, lut:lut}
78 |
79 | END
80 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_shellavg.pro:
--------------------------------------------------------------------------------
1 | PRO READ_SHELLAVG, file, res
2 | endian_tag = 0L
3 | version = 0L
4 | nrec = 0L
5 | nr = 0L
6 | nq = 0L
7 | CLOSE, 13
8 | OPENR, 13, file
9 | READU,13, endian_tag
10 | If (endian_tag ne 314) THEN BEGIN
11 | endian1 = endian_tag
12 | CLOSE,13
13 | OPENR,13,file, /swap_if_little_endian
14 | READU,13,endian_tag
15 | IF (endian_tag ne 314) THEN BEGIN
16 | print, 'Unable to discern endianess of file!'
17 | print, "Expected integer value 314 in first 4 bytes"
18 | print, "Found : ", endian1
19 | print, "And : ", endian_tag
20 | STOP
21 | ENDIF
22 |
23 | Endif
24 | ; Read the data dimensions
25 | READU,13, version
26 | READU,13, nrec
27 | READU,13, nr
28 | READU,13, nq
29 |
30 |
31 | ; Read the header arrays
32 | qvals = LONARR(nq)
33 | radius = DBLARR(nr)
34 |
35 | READU,13,qvals
36 | READU,13,radius
37 |
38 |
39 | ; Read the individual records
40 | IF (version eq 1) THEN BEGIN
41 | vals = DBLARR(nr,nq,nrec)
42 | nmom = 1
43 | ENDIF
44 | IF (version ge 2) THEN BEGIN
45 | vals = DBLARR(nr,4,nq,nrec)
46 | nmom = 4
47 | ENDIF
48 | tmp = DBLARR(nr)
49 | time = DBLARR(nrec)
50 | iter = LONARR(nrec)
51 | it = 0L
52 | tm = 0.0d0
53 | If (version eq 1) THEN BEGIN
54 | FOR i = 0, nrec-1 DO BEGIN
55 | FOR k = 0, nq -1 DO BEGIN
56 | READU,13,tmp
57 | vals[*,k,i] = tmp
58 | ENDFOR
59 | READU,13,tm
60 | READU,13,it
61 | time[i] = tm
62 | iter[i] = it
63 | ENDFOR
64 | ENDIF ELSE BEGIN
65 | FOR i = 0, nrec-1 DO BEGIN
66 | FOR k = 0, nq -1 DO BEGIN
67 | For m = 0, nmom-1 DO BEGIN
68 | READU,13,tmp
69 | vals[*,m,k,i] = tmp
70 | ENDFOR
71 | ENDFOR
72 | READU,13,tm
73 | READU,13,it
74 | time[i] = tm
75 | iter[i] = it
76 | ENDFOR
77 |
78 | ENDELSE
79 |
80 | CLOSE, 13
81 |
82 | ; Build a lookup table for the quantity codes
83 | qmax = 901L
84 | lut = LONARR(qmax+1)
85 | lut[*] = qmax*2
86 | FOR i = 0, nq -1 DO BEGIN
87 | lut[qvals[i]] = i
88 | ENDFOR
89 |
90 | res = {vals:vals, radius:radius, qvals:qvals, time:time, $
91 | iter:iter, version:version, lut:lut}
92 |
93 | END
94 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_spectra.pro:
--------------------------------------------------------------------------------
1 | PRO READ_SPECTRA, file, res
2 | endian_tag = 0L
3 | version = 0L
4 | nrec = 0L
5 | lmax = 0L
6 | nr = 0L
7 | nq = 0L
8 | CLOSE, 13
9 | OPENR, 13, file
10 | READU,13, endian_tag
11 | If (endian_tag ne 314) THEN BEGIN
12 | endian1 = endian_tag
13 | CLOSE,13
14 | OPENR,13,file, /swap_if_little_endian
15 | READU,13,endian_tag
16 | IF (endian_tag ne 314) THEN BEGIN
17 | print, 'Unable to discern endianess of file!'
18 | print, "Expected integer value 314 in first 4 bytes"
19 | print, "Found : ", endian1
20 | print, "And : ", endian_tag
21 | STOP
22 | ENDIF
23 |
24 | Endif
25 | ; Read the data dimensions
26 | READU,13, version
27 | READU,13, nrec
28 | READU,13, lmax
29 | READU,13, nr
30 | READU,13, nq
31 |
32 |
33 | ; Read the header arrays
34 | qvals = LONARR(nq)
35 | radius = DBLARR(nr)
36 | shell_inds = LONARR(nr)
37 |
38 | READU,13,qvals
39 | READU,13,radius
40 | READU,13,shell_inds
41 |
42 |
43 | ; Read the individual records
44 | vals = DCOMPLEXARR(lmax+1,lmax+1,nr,nq,nrec)
45 | tmp = DBLARR(lmax+1,lmax+1)
46 | time = DBLARR(nrec)
47 | iter = LONARR(nrec)
48 | it = 0L
49 | tm = 0.0d0
50 | FOR i = 0, nrec-1 DO BEGIN
51 | FOR im = 0, 1 DO BEGIN
52 | FOR k = 0, nq -1 DO BEGIN
53 | FOR j = 0, nr -1 DO BEGIN
54 | READU,13,tmp
55 | if (im eq 0) THEN BEGIN
56 | if (j eq 1) and (k eq 0) then begin
57 | ;if i eq 0 then begin
58 | ;for mm = 0, 127 do print, mm, tmp[2,mm]
59 | ;endif
60 | endif
61 | vals[*,*,j,k,i] = dcomplex(tmp,0)
62 | endif else begin
63 | vals[*,*,j,k,i] = vals[*,*,j,k,i]+dcomplex(0,tmp)
64 | endelse
65 | ENDFOR
66 | ENDFOR
67 | ENDFOR
68 | READU,13,tm
69 | READU,13,it
70 | time[i] = tm
71 | iter[i] = it
72 | ENDFOR
73 | CLOSE, 13
74 |
75 | ; Build a lookup table for the quantity codes
76 | qmax = 901L
77 | lut = LONARR(qmax+1)
78 | lut[*] = qmax*2
79 | FOR i = 0, nq -1 DO BEGIN
80 | lut[qvals[i]] = i
81 | ENDFOR
82 |
83 | pow = Total(abs(vals)^2,2)
84 | ke = reform(pow[*,*,lut[1],*])+reform(pow[*,*,lut[2],*])+reform(pow[*,*,lut[3],*])
85 | res = {vals:vals, radius:radius, qvals:qvals, shell_inds:shell_inds, time:time, $
86 | iter:iter, version:version, lut:lut, pow:pow,ke:ke}
87 |
88 | END
89 |
--------------------------------------------------------------------------------
/post_processing/legacy/idl/read_time.pro:
--------------------------------------------------------------------------------
1 | PRO READ_TIME, file, res, swap = swap
2 | if (keyword_set(swap)) THEN BEGIN
3 | openu,13,file, /swap_if_little_endian
4 | ENDIF ELSE BEGIN
5 | openu,13,file
6 | ENDELSE
7 | ncol = 0L
8 | nrow = 0L
9 | ntimers = 0L
10 | nr = 0L
11 | lmax = 0L
12 | niter = 0L
13 | READU,13, ncol
14 | READU,13, nrow
15 | READU,13, ntimers
16 | READU,13, nr
17 | READU,13, lmax
18 | READU,13,niter
19 | np = nrow*ncol
20 | col_rank = LONARR(np)
21 | row_rank = LONARR(np)
22 | alltimes = DBLARR(ntimers,np)
23 | READU,13,col_rank
24 | READU,13,row_rank
25 | READU,13,alltimes
26 |
27 | close, 13
28 |
29 | res = {alltimes:alltimes, col_rank:col_rank, row_rank:row_rank, $
30 | np:np, nrow:nrow,ncol:ncol,lmax:lmax,nr:nr,niter:niter}
31 |
32 | End
33 |
34 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/Makefile:
--------------------------------------------------------------------------------
1 | # CU/NCAR Janus
2 | DOPTS = 1
3 |
4 | .SUFFIXES: .o .f90
5 |
6 | MPIF90 = ifort
7 |
8 | BASEOPTS = -openmp -real-size 32 -O3 -ipo -align all -align rec16byte -ftz -vec-threshold5 -auto -opt-subscript-in-range -ansi-alias -fno-fnalias -fno-alias -opt-prefetch -no-prec-div -unroll
9 |
10 | COPTS = -openmp -O3 -m64 -ipo -xSSE3
11 |
12 | OPTSF90AMD = -m64 -xSSE3 $(BASEOPTS)
13 |
14 | OPTSF90WES = -xHost $(BASEOPTS)
15 |
16 | OPTSF90_ERR = -fpp -openmp -O0 -traceback -g -check all -debug all -warn all
17 |
18 |
19 | ifeq (${DOPTS},0)
20 | OPTSF90=$(OPTSF90_ERR)
21 | LIBS = -lstdc++
22 | EXEC="interpolator.dbg"
23 | OBJSMPI = interp.o
24 | else ifeq (${DOPTS},1)
25 | OPTSF90=$(OPTSF90WES)
26 | LIBS = -lstdc++
27 | EXEC="interpolator.wes"
28 | OBJSMPI = interp.o
29 | else ifeq (${DOPTS},2)
30 | OPTSF90=$(OPTSF90AMD)
31 | EXEC="interpolator.amd"
32 | LIBS = -lstdc++
33 | OBJSMPI = interp.o amd_optimization.o
34 | else
35 | OPTSF90=$(OPTSF90_ERR)
36 | LIBS = -lstdc++
37 | EXEC="interpolator.err"
38 | OBJSMPI = interp.o
39 | endif
40 |
41 | main: driver.f90 $(OBJSMPI)
42 | $(MPIF90) $(OPTSF90) -o $(EXEC) driver.f90 $(OBJSMPI) $(LIBS)
43 |
44 | clean:
45 | touch temp.o temp.mod
46 | rm *.o *.mod
47 |
48 | .f90.o:
49 | $(MPIF90) $(OPTSF90) -c $<
50 |
51 | .cpp.o:
52 | icpc $(COPTS) -c $<
53 |
54 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/Makefile.gfortran:
--------------------------------------------------------------------------------
1 | # For Mac OS 10.9 "Mavericks" or linux gfortran
2 | .SUFFIXES: .o .f90
3 |
4 | MPIF90 = gfortran
5 |
6 | BASEOPTS = -cpp -fopenmp -ffree-form -ffree-line-length-none -O3
7 |
8 | OPTSF90_MAC = $(BASEOPTS) -march=native -mtune=native -Wa,-q
9 |
10 | OPTSF90_FST = $(BASEOPTS) -march=native -mtune=native
11 |
12 | OPTSF90_ERR = -cpp -fopenmp -ffree-form -ffree-line-length-none -O0 -fbacktrace -Wall -fcheck=all
13 |
14 | ifeq (${MAKECMDGOALS},clean)
15 | DOPTS = 3
16 | else
17 | DOPTS = 0
18 | endif
19 |
20 | EXEC = "interpolator.app"
21 | OBJSMPI = driver.f90 interpolation.o
22 |
23 | ifeq (${DOPTS},0)
24 | OPTSF90 = $(OPTSF90_ERR)
25 | else ifeq (${DOPTS},1)
26 | OPTSF90 = $(OPTSF90_FST)
27 | else ifeq (${DOPTS},2)
28 | OPTSF90 = $(OPTSF90_MAC)
29 | endif
30 |
31 | main: $(if $(strip $(DOPTS)), $(OBJSMPI), $(error Specify the DOPTS flag to select the desired optimization level))
32 | $(MPIF90) $(OPTSF90) $(OBJSMPI) -o $(EXEC)
33 |
34 | clean:
35 | touch temp.o temp.mod
36 | rm *.o *.mod
37 |
38 | .f90.o:
39 | $(MPIF90) $(OPTSF90) -c $<
40 |
41 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/convert_vdf.bsh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #Command line options:
4 | #First argument $1 is directory with the data.
5 | #Second argument $2 is the timestep number.
6 | #Third argument $3 is the size of the data cubes (ncube from interpolator).
7 | #Fourth argument is optional and only passes additional flags to raw2vdf
8 | # such as -nthread, -dbl [for double precision data], and -swap for byte swapping
9 | # be sure to enclose the entire string in quotes.
10 |
11 |
12 | #Source your vapor-setup.sh (fix directory name), only required if not sourced at startup.
13 | #On Macs this is:
14 | #source /Applications/VAPOR/VAPOR.app/Contents/MacOS/vapor-setup.sh
15 | #source /your/vapor/bin/directory/goes/here/vapor-setup.sh
16 |
17 | source /shared/vapor-2.3.0/bin/vapor-setup.sh
18 |
19 | #Change to data directory
20 | cd $1
21 |
22 | #Set vdf file name here.
23 | vdfname=("$2.vdf")
24 |
25 | #Create vdf metadata.
26 | cmd=("vdfcreate -dimension $3x$3x$3 -extents -1:-1:-1:1:1:1 -vars3d Vr:Vt:Vp:Vx:Vy:Vz:KE:Wx:Wy:Wz:Wm:Br:Bt:Bp:Bx:By:Bz:ME:Jx:Jy:Jz:Jm $vdfname")
27 | echo $cmd
28 | eval $cmd
29 |
30 | #Feel free to add more variables here when desired.
31 | #Variables in the vdf metadata file
32 | declare -a vnames=("Vr" "Vt" "Vp" "Vx" "Vy" "Vz" "KE" "Wx" "Wy" "Wz" "Wm" "Br" "Bt" "Bp" "Bx" "By" "Bz" "ME" "Jx" "Jy" "Jz" "Jm")
33 |
34 | #Variables from ASH and interpolator output
35 | declare -a qnames=("Vr" "Vtheta" "Vphi" "Vx" "Vy" "Vz" "KE" "Wx" "Wy" "Wz" "Wm" "Br" "Btheta" "Bphi" "Bx" "By" "Bz" "ME" "Jx" "Jy" "Jz" "Jm")
36 |
37 | #Get number of array elements.
38 | nvar=${#vnames[@]}
39 |
40 | #Loop over variable names for raw2vdf.
41 | for ((i=0; i<${nvar}; i++));
42 | do
43 | #Build file name
44 | filename=("$2_${qnames[$i]}_cube")
45 | #Build command string
46 | cmd=("raw2vdf $4 -varname ${vnames[$i]} $vdfname $filename")
47 | #Show command string
48 | echo $cmd
49 | #Execute command string
50 | eval $cmd
51 | done
52 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/driver.f90:
--------------------------------------------------------------------------------
1 | Program Driver
2 |
3 | Use Interpolation
4 |
5 | Implicit None
6 |
7 | Integer :: namelist_unit=20, kk, nk
8 | Real*8 :: tbeg, tend, tavg
9 | Character(len=64) :: arg
10 |
11 | Call getarg(1,arg)
12 | Print*, 'Have read file name part:', arg
13 |
14 | Call Initialize()
15 |
16 | tavg = 0d0
17 | kk = 0
18 | nk = (final_iteration-initial_iteration)/iteration_step
19 | Do iteration=initial_iteration, final_iteration, iteration_step
20 | tbeg = 0d0
21 | Call cpu_time(tbeg)
22 | Call Make_Iteration_Filename()
23 | Call Interpolate()
24 | tend = 0d0
25 | Call cpu_time(tend)
26 | tend = tend-tbeg
27 | If (kk .eq. 0) Then
28 | tavg = tend
29 | Else
30 | tavg = 0.5d0*(tavg + tend)
31 | EndIf
32 |
33 | If (kk .gt. 1) Then
34 | Print*, 'Time remaining:', Dble(nk-kk)*tavg
35 | EndIf
36 | kk = kk + 1
37 | EndDo
38 |
39 | Call Finalize()
40 |
41 | Contains
42 |
43 | Subroutine Initialize()
44 | Call Read_Input()
45 | Call omp_set_num_threads(nthrd)
46 | Call Make_Iteration_Filename()
47 | Call Read_Grid()
48 | End Subroutine Initialize
49 |
50 | Subroutine Finalize()
51 | Call Finalize_Interp()
52 | Print*, 'Finished!'
53 | Stop
54 | End Subroutine Finalize
55 |
56 | Subroutine Read_Input()
57 |
58 | Namelist /ProblemSpec_Namelist/ nr, ncube, nthrd, nfloat, cartesian, perm_dir, &
59 | initial_iteration, final_iteration, iteration_step, quantity
60 |
61 | ! read in namelists
62 | Open(namelist_unit,file='input',status='old')
63 | Read(namelist_unit,nml=ProblemSpec_Namelist)
64 | Close(namelist_unit)
65 |
66 | iteration = initial_iteration
67 |
68 | quantity = '_'//trim(arg)
69 |
70 | End Subroutine Read_Input
71 |
72 | End Program Driver
73 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/input:
--------------------------------------------------------------------------------
1 | &ProblemSpec_Namelist
2 | !Number of OpenMP threads.
3 | nthrd = 4
4 | !I/O type
5 | !Set to 2 for double precision output, to 1 for single precision.
6 | nfloat = 2
7 |
8 | !Spherical interpolation
9 | !Resolution for uniform radial grid (Spherical Interpolation)
10 | nr = 128
11 |
12 | !Cartesian interpolation.
13 | !Set = T if a tricubic cartesian interpolation.
14 | cartesian = T
15 | !Resultion of cartesian cube.
16 | ncube = 128
17 |
18 | !Directory for I/O
19 | perm_dir = './Spherical_3D/'
20 |
21 | !Iteration range to be interpolated.
22 | !If only one file set initial and final iteration equal to that iteration.
23 | initial_iteration = 9000
24 | final_iteration = 9000
25 |
26 | !Step size between files
27 | iteration_step = 5000
28 | !Quantity to be interpolated, be sure to include underscore.
29 | quantity = '_0001'
30 | /
31 |
--------------------------------------------------------------------------------
/post_processing/legacy/kyle_interp/interp.bsh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #declare -a names=("Vr" "Vtheta" "Vphi" "Vx" "Vy" "Vz" "KE" "Br" "Btheta" "Bphi" "Bx" "By" "Bz" "ME" "Wr" "Wt" "Wp" "Wx" "Wy" "Wz" "Wm" "Jr" "Jt" "Jp" "Jx" "Jy" "Jz" "Jm")
4 |
5 | declare -a names=("Vr" "Vtheta" "Vphi" "Br" "Btheta" "Bphi")
6 |
7 | for i in "${names[@]}"
8 | do
9 | echo $i
10 | `/home2/augustso/Desktop/general_interpolator/interpolator.wes $i > tmp`
11 | output=$(.
19 | #
20 |
21 | import numpy as np
22 | def gen_cheby_grid(nx,xmin,xmax):
23 | """Returns a Chebyshev grid (using zeros, not extrema)
24 | spanning xmin to xmax, with nx points.
25 | """
26 | xgrid = np.zeros(nx,dtype='float64')
27 | theta = np.zeros(nx,dtype='float64')
28 | ctheta = np.zeros(nx,dtype='float64')
29 | arg = np.zeros(1,dtype='float64')
30 | tmp = np.zeros(1,dtype='float64')
31 | tmp[0] = nx
32 | dctheta = np.pi/tmp[0]
33 | tmp[0] = 0.5
34 | ctheta0 = dctheta*tmp[0]
35 | arg = ctheta0
36 | for i in range(nx):
37 | ctheta[i] = arg
38 | xgrid[i] = np.cos(arg)
39 | arg = arg+dctheta
40 | dx = xmax-xmin
41 | xgrid = (xgrid+1.0)*0.5*dx+xmin
42 |
43 | ############
44 | # OLD FORTRAN
45 | # Integer :: i
46 | # Real*8 :: arg
47 | # ! Calculate the colocation points X { -1 , 1
48 | # ! Also calculate the theta grid ctheta { 0 , pi
49 | # Allocate(x(1:N_max))
50 | # Allocate(ctheta(1:N_max))
51 | # If (use_extrema) Then !Use the extrema of T_{N_max}
52 | # dctheta = pi/(N_max-1)
53 | # ctheta0 = 0.0d0
54 | # arg = ctheta0
55 | # Do i = 1, N_max
56 | # ctheta(i) = arg
57 | # x(i) = cos(arg)
58 | # arg = arg+dctheta
59 | # Enddo
60 |
61 |
62 | # Else !Use the zeroes of T_{N_max}
63 | #
64 | # dctheta = pi/N_max
65 | # ctheta0 = dctheta*0.5d0
66 | # arg = ctheta0
67 | # Do i = 1, N_Max
68 | # ctheta(i) = arg
69 | # x(i) = cos(arg)
70 | # arg = arg+dctheta
71 | # Enddo
72 | #
73 | # Endif
74 |
75 | ##########3
76 | return xgrid
77 |
--------------------------------------------------------------------------------
/post_processing/legacy/python/translate_script.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | #
4 | # This file is part of RAYLEIGH.
5 | #
6 | # RAYLEIGH is free software; you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation; either version 3, or (at your option)
9 | # any later version.
10 | #
11 | # RAYLEIGH is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with RAYLEIGH; see the file LICENSE. If not see
18 | # .
19 | #
20 |
21 | import numpy as np
22 | import os
23 | from checkpoint_reading import *
24 |
25 | iteration = 2
26 | #1.
27 | #translates iteration 2 checkpiont files FROM the native endianness
28 |
29 | translate_checkpoint(iteration, '','translation')
30 |
31 | #2.
32 | #translates iteration 2 checkpiont files TO the native endianness
33 | #translate_checkpoint(iteration, '','translation',tonative=True)
34 |
35 |
--------------------------------------------------------------------------------
/post_processing/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.black]
2 | line-length = 88
3 |
--------------------------------------------------------------------------------
/post_processing/rayleigh_spectral_input.py:
--------------------------------------------------------------------------------
1 | ../pre_processing/rayleigh_spectral_input.py
--------------------------------------------------------------------------------
/post_processing/sample_checkpoint_T:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/post_processing/sample_checkpoint_T
--------------------------------------------------------------------------------
/post_processing/setup.cfg:
--------------------------------------------------------------------------------
1 | [pycodestyle]
2 | max-line-length = 88
3 | # ignoring E203 is needed for compatibility with black for now
4 | ignore = E203
5 |
--------------------------------------------------------------------------------
/spack-repo/repo.yaml:
--------------------------------------------------------------------------------
1 | repo:
2 | namespace: rayleigh
3 |
--------------------------------------------------------------------------------
/src/Data_Structures/Structures.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Structures
22 | !//////////////////////////////////////////////////////////
23 | ! This module contains various data structures that do not
24 | ! have associated methods.
25 | Type, Public :: rmcontainer1d
26 | Real*8, Allocatable :: data(:)
27 | End Type rmcontainer1d
28 |
29 | Type, Public :: rmcontainer
30 | Real*8, Allocatable :: data(:,:)
31 | End Type rmcontainer
32 |
33 | Type, Public :: rmcontainer3d
34 | Real*8, Allocatable :: data(:,:,:)
35 | End Type rmcontainer3d
36 |
37 | Type, Public :: rmcontainer4d
38 | Real*8, Allocatable :: data(:,:,:,:)
39 | End Type rmcontainer4d
40 |
41 | Type, Public :: imcontainer1d
42 | Integer, Allocatable :: data(:)
43 | End Type imcontainer1d
44 |
45 | End Module Structures
46 |
--------------------------------------------------------------------------------
/src/Diagnostics/Verifications/derivatives/main_input:
--------------------------------------------------------------------------------
1 | !/////////////////////////////////////////////////////
2 | ! This Input file is for use with the
3 | ! Python notebook: verify_derivatives.ipynb
4 | !
5 | ! That notebook provides a visual check on the derivatives
6 | ! calculated by Rayleigh at output time (not during the
7 | ! main calculation).
8 | !
9 | ! This input file is designed to continue from timtestep
10 | ! 100,000 of the Christen el al . case 1 (steady MHD)
11 | ! Boussinesq dynamo benchmark.
12 | !
13 | ! Really, any input file that uses the same set of outputs
14 | ! as those defined here should work with the notebook.
15 |
16 | &problemsize_namelist
17 | n_r = 64
18 | n_theta = 96
19 | nprow = 2
20 | npcol = 2
21 | /
22 | &numerical_controls_namelist
23 | /
24 | &physical_controls_namelist
25 | benchmark_mode = 2
26 | benchmark_integration_interval = 100
27 | benchmark_report_interval = 10000
28 | /
29 | &temporal_controls_namelist
30 | max_iterations = 150000
31 | checkpoint_interval = 100000
32 | quicksave_interval = 10000
33 | num_quicksaves = 2
34 | /
35 | &io_controls_namelist
36 | /
37 | &output_namelist
38 |
39 | ! r-derivatives (1,2), theta-derivatives(1,2), and r/theta derivatives
40 | meridional_values = 1,2,3,10,11,12,19, 20, 21, 55,56,57,64,65,66, 82,83,84
41 | 501,502,507,508,513,514, 537,538,543,544,555,556
42 | 801,802,803,810,811,812, 819, 820, 821,
43 | 855,856,857, 864, 865, 866, 882, 883, 884
44 | meridional_frequency = 1
45 | meridional_nrec = 2
46 | meridional_indices_nrm = 0.7
47 |
48 | !phi derivatives (1,2), theta-phi derivatives
49 | shellslice_levels_nrm = 0.9
50 | shellslice_values = 1,2,3, 28, 29, 30, 73, 74, 75, 100, 101, 102,
51 | 501, 502, 519, 520, 549,550, 567, 568
52 | 801,802,803, 828, 829, 830, 873, 874, 875, 900, 901, 902
53 | shellslice_frequency = 1
54 | shellslice_nrec = 2
55 |
56 | ! r-phi derivatives
57 | equatorial_values = 1,2,3, 91,92,93,
58 | 501, 502, 561, 562,
59 | 801, 802, 803, 891, 892, 893
60 | equatorial_frequency = 1
61 | equatorial_nrec = 2
62 |
63 |
64 |
65 |
66 | /
67 |
68 | &Boundary_Conditions_Namelist
69 | /
70 | &Initial_Conditions_Namelist
71 | init_type=-1
72 | restart_iter=100000
73 | /
74 | &Test_Namelist
75 | /
76 | &Reference_Namelist
77 | /
78 | &Transport_Namelist
79 | /
80 |
81 |
--------------------------------------------------------------------------------
/src/Diagnostics/Verifications/kinetic_helicity/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 1
13 | benchmark_integration_interval = 100
14 | benchmark_report_interval = 5000
15 | rotation = .True.
16 | magnetism = .false.
17 | viscous_heating = .false.
18 | ohmic_heating = .false.
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 1.0d-4
22 | max_iterations = 40000
23 | checkpoint_interval = 100000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 |
31 | meridional_values = 324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,1,2,3,4,5,6,7,8,9,301,302,303,304,305,306,307,308,309
32 | meridional_frequency = 10
33 | meridional_nrec = 10
34 | meridional_indices_nrm = 0.7
35 |
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | dtdr_bottom = 0.0d0
42 | T_Top = 0.0d0
43 | T_Bottom = 1.0d0
44 | fix_tvar_top = .true.
45 | fix_tvar_bottom = .true.
46 | /
47 | &Initial_Conditions_Namelist
48 | init_type = 1 ! Benchmark init
49 | temp_amp = 1.0d1
50 | temp_w = 0.01d4
51 | restart_iter = -1
52 | /
53 | &Test_Namelist
54 | /
55 | &Reference_Namelist
56 | Ekman_Number = 1.0d-3
57 | Rayleigh_Number = 1.0d5
58 | Prandtl_Number = 1.0d0
59 | Magnetic_Prandtl_Number = 5.0d0
60 | reference_type = 1
61 | heating_type = 0 ! No heating
62 | gravity_power = 1.0d0 ! g ~ radius
63 | /
64 | &Transport_Namelist
65 | /
66 |
--------------------------------------------------------------------------------
/src/Diagnostics/magnetic_energy_codes.F:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | !///////////////////////////////////////////////////////////
22 | ! Magnetic Energies
23 | Integer, Parameter :: meoffset = joffset+100 ! :OFFSET CODE:
24 |
25 | Integer, Parameter :: magnetic_energy = meoffset+1 ! :tex: $\frac{1}{2}c_4\boldsymbol{B}^2$
26 | Integer, Parameter :: radial_me = meoffset+2 ! :tex: $\frac{1}{2}c_4B_r^2$
27 | Integer, Parameter :: theta_me = meoffset+3 ! :tex: $\frac{1}{2}c_4B_\theta^2$
28 | Integer, Parameter :: phi_me = meoffset+4 ! :tex: $\frac{1}{2}c_4B_\phi^2$
29 |
30 | Integer, Parameter :: mmagnetic_energy = meoffset+5 ! :tex: $\frac{1}{2}c_4\overline{\boldsymbol{B}}^2$
31 | Integer, Parameter :: radial_mme = meoffset+6 ! :tex: $\frac{1}{2}c_4\overline{B_r}^2$
32 | Integer, Parameter :: theta_mme = meoffset+7 ! :tex: $\frac{1}{2}c_4\overline{B_\theta}^2$
33 | Integer, Parameter :: phi_mme = meoffset+8 ! :tex: $\frac{1}{2}c_4\overline{B_\phi}^2$
34 |
35 | Integer, Parameter :: pmagnetic_energy = meoffset+9 ! :tex: $\frac{1}{2}c_4\boldsymbol{B'}^2$
36 | Integer, Parameter :: radial_pme = meoffset+10 ! :tex: $\frac{1}{2}c_4{B_r'}^2$
37 | Integer, Parameter :: theta_pme = meoffset+11 ! :tex: $\frac{1}{2}c_4{B_\theta'}^2$
38 | Integer, Parameter :: phi_pme = meoffset+12 ! :tex: $\frac{1}{2}c_4{B_\phi'}^2$
39 |
40 |
--------------------------------------------------------------------------------
/src/Diagnostics/mass_flux_codes.F:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Integer, Parameter :: rhovoffset = voffset+200 ! :OFFSET CODE:
22 | !------------ Mass Flux ---------------------!
23 | ! Full
24 | Integer, Parameter :: rhov_r = rhovoffset+1 ! :tex: $\mathrm{f}_1v_r$
25 | Integer, Parameter :: rhov_theta = rhovoffset+2 ! :tex: $\mathrm{f}_1v_\theta$
26 | Integer, Parameter :: rhov_phi = rhovoffset+3 ! :tex: $\mathrm{f}_1v_\phi$
27 | ! Fluctuating
28 | Integer, Parameter :: rhovp_r = rhovoffset+4 ! :tex: $\mathrm{f}_1v_r'$
29 | Integer, Parameter :: rhovp_theta = rhovoffset+5 ! :tex: $\mathrm{f}_1v_\theta'$
30 | Integer, Parameter :: rhovp_phi = rhovoffset+6 ! :tex: $\mathrm{f}_1v_\phi'$
31 | ! Mean
32 | Integer, Parameter :: rhovm_r = rhovoffset+7 ! :tex: $\mathrm{f}_1\overline{v_r}$
33 | Integer, Parameter :: rhovm_theta = rhovoffset+8 ! :tex: $\mathrm{f}_1\overline{v_\theta}$
34 | Integer, Parameter :: rhovm_phi = rhovoffset+9 ! :tex: $\mathrm{f}_1\overline{v_\phi}$
35 |
--------------------------------------------------------------------------------
/src/Diagnostics/thermal_energy_codes.F:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | !--- Thermal Energies
22 | Integer, Parameter :: teoffset = pt_off+200 ! :OFFSET CODE:
23 | Integer, Parameter :: thermal_energy_full = teoffset+1 ! rho_bar T_bar S :tex: $\mathrm{f}_1\mathrm{f}_4\Theta$
24 | Integer, Parameter :: thermal_energy_p = teoffset+2 ! rho_bar T_bar S' :tex: $\mathrm{f}_1\mathrm{f}_4\Theta$
25 | Integer, Parameter :: thermal_energy_m = teoffset+3 ! rho_bar T_bar :tex: $\mathrm{f}_1\mathrm{f}_4\overline{\Theta}$
26 |
27 | !--- Enthalpy
28 | Integer, Parameter :: enthalpy_full = teoffset+4 ! :tex: $c_P \hat{\rho}T$
29 | Integer, Parameter :: enthalpy_p = teoffset+5 ! :tex: $c_P \hat{\rho}T'$
30 | Integer, Parameter :: enthalpy_m = teoffset+6 ! :tex: $c_P \hat{\rho}\overline{T}$
31 |
32 | !--- Quadratics
33 | Integer, Parameter :: thermal_energy_sq = teoffset+7 ! rho_bar T_bar S :tex: $\left(\mathrm{f}_1\mathrm{f}_4\Theta\right)^2$
34 | Integer, Parameter :: thermal_energyp_sq = teoffset+8 ! rho_bar T_bar S' :tex: $\left(\mathrm{f}_1\mathrm{f}_4\Theta\right)^2$
35 | Integer, Parameter :: thermal_energym_sq = teoffset+9 ! rho_bar T_bar :tex: $\left(\mathrm{f}_1\mathrm{f}_4\overline{\Theta}\right)^2$
36 |
37 | Integer, Parameter :: enthalpy_sq = teoffset+10 ! :tex: $\left(c_P \hat{\rho}T\right)^2$
38 | Integer, Parameter :: enthalpyp_sq = teoffset+11 ! :tex: $\left(c_P \hat{\rho}T'\right)^2$
39 | Integer, Parameter :: enthalpym_sq = teoffset+12 ! :tex: $\left(c_P \hat{\rho}\overline{T}\right)^2$
40 |
--------------------------------------------------------------------------------
/src/IO/MakeDir.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module MakeDir
22 |
23 | Implicit None
24 |
25 | Contains
26 |
27 | !Wrapper to C routine that calls mkdir.
28 | !System calls are often inaccessible through Fortran, but not through C.
29 | Subroutine Make_Directory(dirname, ecode)
30 | character(*), Intent(In) :: dirname
31 | Integer, Intent(Out) :: ecode
32 | Integer :: cmkdir
33 | ecode = cmkdir(Trim(dirname)//char(0))
34 | End Subroutine Make_Directory
35 |
36 | End Module MakeDir
37 |
--------------------------------------------------------------------------------
/src/IO/MakeDir.F90_IBM:
--------------------------------------------------------------------------------
1 | Module MakeDir
2 |
3 | Implicit None
4 |
5 | Contains
6 |
7 | !Wrapper to C routine that calls mkdir.
8 | !System calls are often inaccessible through Fortran, but not through C.
9 | Subroutine Make_Directory(dirname, ecode)
10 | character(*), Intent(In) :: dirname
11 | Integer, Intent(Out) :: ecode
12 | Integer :: cmkdir
13 | !ecode = cmkdir(Trim(dirname)//char(0))
14 | End Subroutine Make_Directory
15 |
16 | End Module MakeDir
17 |
--------------------------------------------------------------------------------
/src/IO/cmkdir.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // Simple directory creation routine
4 |
5 | int cmkdir_(char *cc, int ll)
6 | {
7 | int status;
8 | cc[ll--] = '\0'; // NULL terminate the string
9 |
10 | //printf("Creating Directory: %s\n",cc);
11 | status = mkdir(cc,0755); // 755 sets permissions on the directory
12 |
13 | return(status);
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/src/Include/indices.F:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | #define RHSP wsp%p3b
22 | #define DO_IDX Do t = my_theta%min, my_theta%max; Do r = my_r%min, my_r%max ;Do k = 1, n_phi
23 | #define END_DO enddo; enddo; enddo
24 | #define IDX k,r,t
25 | #define FIELDSP wsp%p3a
26 | #define IDXM r,t
27 | #define DO_IDX2 Do mp = my_mp%min, my_mp%max; m = m_values(mp); Do imi = 1, 2; Do r = my_r%min, my_r%max
28 | #define IDX2 m:l_max,r,imi
29 | #define SBUFFA wsp%s2a(mp)%data
30 | #define SBUFFB wsp%s2b(mp)%data
31 | #define ASBUFFA cobuffer%s2a(mp)%data
32 | #define DO_PSI Do t = my_theta%min, my_theta%max; Do r = my_r%min, my_r%max ;Do k = 1, n_phi
33 | #define DO_PSI2 Do t = my_theta%min, my_theta%max; Do r = my_r%min, my_r%max
34 | #define END_DO2 enddo; enddo
35 | #define PSI k,r,t
36 | #define PSI2 r,t
37 | #define DDBUFF d2buffer%p3a
38 |
39 |
--------------------------------------------------------------------------------
/src/Machinefiles/machine.blank:
--------------------------------------------------------------------------------
1 | FC = unknown
2 | CC = unknown
3 | DEFAULT = opt
4 | DEBUG = dbg
5 | VERSIONS = $(DEFAULT) $(DEBUG)
6 | RAYLEIGH_INC = unknown
7 | FFLAGS_$(DEFAULT) = unknown $(RAYLEIGH INC)
8 | LIB_$(DEFAULT) = unknown -lstdc++
9 | FFLAGS_$(DEBUG) = unknown $(RAYLEIGH_INC)
10 | LIB_$(DEBUG) = unknown -lstdc++
11 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_CIG:
--------------------------------------------------------------------------------
1 | F90 = mpif90
2 | CC = gcc
3 | # Flags for the LAPack Libraries
4 |
5 | LIBFLAGS = -L/usr/lib/x86_64-linux-gnu -lfftw3 -L/usr/lib -lblas -llapack -lstdc++
6 |
7 |
8 | ifeq ($(RAYLEIGH_OPT),debug)
9 | F90FLAGS = -O1 -fbounds-check -fbacktrace -ffixed-line-length-132 -I/usr/include
10 | else
11 | F90FLAGS = -O3 -ffixed-line-length-132 -I/usr/include
12 | endif
13 |
14 |
15 |
16 | PROG = rayleigh
17 |
18 | .SUFFIXES: .o .F90 .f .F .c
19 | include object_list
20 |
21 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
22 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
23 | .F90.o :
24 | $(F90) $(F90FLAGS) -c $<
25 | .cc.o:
26 | $(CC) $(CFLAGS) -c *.cc
27 | clean :
28 | rm -f *.o *.mod rayleigh
29 | ready :
30 |
31 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_CU:
--------------------------------------------------------------------------------
1 | F90 = ifort
2 | CC = icc
3 | F90 = mpiifort
4 |
5 | ifeq ($(RAYLEIGH_OPT1),debug)
6 | F90FLAGS = -FR -fpp -r8 -O0 -g -traceback -xAVX -CB -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw ## -I$(CU_IMPI_INC)
7 | else
8 | F90FLAGS = -FR -fpp -r8 -O3 -xCORE-AVX2 -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw ##-I$(CU_IMPI_INC)
9 | endif
10 |
11 |
12 |
13 |
14 | LIBFLAGS = -lstdc++ -mkl ##-L$(CURC_IMPI_LIB) -lmpi -lmpifort
15 |
16 | PROG = rayleigh
17 |
18 | .SUFFIXES: .o .F90 .f .F
19 |
20 | include object_list
21 |
22 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
23 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
24 | .F90.o :
25 | $(F90) $(F90FLAGS) -c $<
26 | .cc.o:
27 | $(CC) $(CFLAGS) -c *.cc
28 | clean :
29 | rm -f *.o *.mod rayleigh
30 | ready :
31 |
32 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Discover:
--------------------------------------------------------------------------------
1 | F90 = mpif90
2 | CC = icc
3 | ifeq ($(RAYLEIGH_DEBUG),debug)
4 | F90FLAGS = -FR -fpp -r8 -O0 -g -traceback -xSSE4.2 -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
5 | else
6 | F90FLAGS = -FR -fpp -r8 -O3 -xAVX -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
7 | endif
8 |
9 |
10 | LIBFLAGS = -lstdc++ -mkl
11 |
12 | PROG = rayleigh
13 |
14 | .SUFFIXES: .o .F90 .f .F
15 |
16 | include object_list
17 |
18 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
19 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
20 | .F90.o :
21 | $(F90) $(F90FLAGS) -c $<
22 | .cc.o:
23 | $(CC) $(CFLAGS) -c *.cc
24 | clean :
25 | rm -f *.o *.mod rayleigh
26 | ready :
27 |
28 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_LCD:
--------------------------------------------------------------------------------
1 | F90 = /usr/local/mpich2-1.0.7/bin/mpif90
2 | F90 = mpif90
3 | # Flags for the MKL libraries
4 | LIBFLAGS = -mkl -I$(MKLROOT)/include/fftw
5 |
6 | #use the first of these for debugging (comment out second line to debug)
7 | ifeq ($(RAYLEIGH_OPT1),debug)
8 | ## F90FLAGS = -r8 -O0 -CB -g -traceback -fpp -FR -check all -check uninit -warn all -ftrapuv -gen-interfaces -warn interfaces -fpe0 -I$(MKLROOT)/include/fftw
9 | F90FLAGS = -r8 -O3 -CB -g -traceback -fpp -FR -I$(MKLROOT)/include/fftw
10 | else
11 | F90FLAGS = -r8 -O3 -xSSE4.2 -fpp -FR -I$(MKLROOT)/include/fftw
12 | endif
13 | ifeq ($(RAYLEIGH_OPT1),openmp)
14 | F90FLAGS = -r8 -O3 -xSSE4.2 -fpp -FR -openmp -Duseomp=.true. -Dusemkl=.true. -I$(MKLROOT)/include/fftw
15 | ##F90FLAGS = -r8 -O0 -g -traceback -xSSE4.2 -fpp -FR -openmp -Duseomp=.true. -I$(MKLROOT)/include/fftw
16 | endif
17 |
18 | PROG = rayleigh
19 |
20 | .SUFFIXES: .o .F90 .f .F
21 | ##DSOBJ = Structures.o
22 | ##PFOBJ = MPI_Base.o All_to_All.o SendReceive.o ISendReceive.o General_MPI.o MPI_LAYER.o Load_Balance.o Parallel_Framework.o
23 | ##MOBJ = Timing.o Finite_Difference.o Chebyshev_Polynomials.o Linear_Solve.o Legendre_Polynomials.o Legendre_Transforms.o \
24 | Fourier_Transform.o Spectral_Derivatives.o
25 | ##IOOBJ = Spherical_IO.o
26 | ##POBJ = Run_Parameters.o Controls.o Timers.o ProblemSize.o ReferenceState.o TransportCoefficients.o BoundaryConditions.o NonDimensionalization.o Fields.o Checkpointing.o Initial_Conditions.o Diagnostics.o \
27 | ## ClockInfo.o Linear_Terms_Sphere.o Spectral_Space_Sphere.o Physical_Space_Sphere.o Hybrid_Space_Sphere.o Drive_Sphere.o
28 | ##TOBJ = Test_SHT.o Test_Cheby.o TestSuite.o
29 | ##MAINOBJ = Input.o Main.o
30 | include object_list
31 |
32 |
33 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
34 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
35 |
36 | .F90.o :
37 | $(F90) $(F90FLAGS) -c $<
38 | clean :
39 | rm -f *.o *.mod rayleigh
40 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Nick:
--------------------------------------------------------------------------------
1 | F90 = /usr/local/mpich2-1.0.7/bin/mpif90
2 | F90 = mpif90
3 | CC = gcc
4 | # Flags for the LAPack Libraries
5 |
6 | ifeq ($(RAYLEIGH_OPT1),openmp)
7 | LIBFLAGS = -L/usr/lib/x86_64-linux-gnu -lfftw3_threads -lfftw3 -lm -L/usr/lib -lblas -llapack -lstdc++
8 | else
9 | LIBFLAGS = -L/usr/lib/x86_64-linux-gnu -lfftw3 -L/usr/lib -lblas -llapack -lstdc++ -L/home/nick/Pardiso/ -lpardiso500-GNU481-X86-64
10 | endif
11 |
12 |
13 | ifeq ($(RAYLEIGH_OPT1),openmp)
14 | F90FLAGS = -O1 -fbounds-check -Duseomp=.true. -cpp -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include
15 | else
16 | F90FLAGS = -O1 -fbounds-check -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include -I/home/nick/Pardiso
17 | endif
18 |
19 | ifeq ($(RAYLEIGH_OPT1),debug)
20 | F90FLAGS = -O1 -fbounds-check -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include
21 | else
22 | F90FLAGS = -O3 -ffixed-line-length-132 -fopenmp -I/usr/include -I/home/nick/Pardiso
23 | endif
24 |
25 |
26 | PROG = rayleigh
27 |
28 | .SUFFIXES: .o .F90 .f .F .c
29 | include object_list
30 |
31 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
32 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
33 | .F90.o :
34 | $(F90) $(F90FLAGS) -c $<
35 | .cc.o:
36 | $(CC) $(CFLAGS) -c *.cc
37 | clean :
38 | rm -f *.o *.mod pseudo
39 | ready :
40 |
41 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Nick2:
--------------------------------------------------------------------------------
1 | F90 = /usr/local/mpich2-1.0.7/bin/mpif90
2 | F90 = mpif90
3 | CC = gcc
4 | # Flags for the LAPack Libraries
5 | FFTW_LIB = /home/nick/MYLIB/fftw-3.3.5/lib
6 | FFTW_INC = /home/nick/MYLIB/fftw-3.3.5/include
7 |
8 | ifeq ($(RAYLEIGH_OPT1),openmp)
9 | LIBFLAGS = -L/usr/lib/x86_64-linux-gnu -lfftw3_threads -lfftw3 -lm -L/usr/lib -lblas -llapack -lstdc++
10 | else
11 | LIBFLAGS = -L/$(FFTW_LIB) -lfftw3 -L/usr/lib -lblas -llapack -lstdc++
12 | endif
13 |
14 |
15 | ifeq ($(RAYLEIGH_OPT1),openmp)
16 | F90FLAGS = -O1 -fbounds-check -Duseomp=.true. -cpp -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include
17 | else
18 | F90FLAGS = -O1 -fbounds-check -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include -I/home/nick/Pardiso
19 | endif
20 |
21 | ifeq ($(RAYLEIGH_OPT1),debug)
22 | ##F90FLAGS = -O1 -fbounds-check -fbacktrace -ffixed-line-length-132 -fopenmp -I/usr/include
23 | F90FLAGS = -O0 -fbounds-check -fbacktrace -ffixed-line-length-132 -I/usr/include -I$(FFTW_INC)
24 |
25 | else
26 | F90FLAGS = -O3 -mavx -ffixed-line-length-132 -I/usr/include -I$(FFTW_INC)
27 | endif
28 |
29 |
30 | PROG = rayleigh
31 |
32 | .SUFFIXES: .o .F90 .f .F .c
33 | include object_list
34 |
35 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
36 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
37 | .F90.o :
38 | $(F90) $(F90FLAGS) -c $<
39 | .cc.o:
40 | $(CC) $(CFLAGS) -c *.cc
41 | clean :
42 | rm -f *.o *.mod rayleigh
43 | ready :
44 |
45 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Pleiades:
--------------------------------------------------------------------------------
1 | F90 = ifort
2 | CC = icc
3 |
4 | ifeq ($(RAYLEIGH_OPT1),debug)
5 | F90FLAGS = -FR -fpp -r8 -O0 -g -traceback -xSSE4.2 -CB -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
6 | else
7 | F90FLAGS = -FR -fpp -r8 -O3 -xSSE4.2 -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
8 | endif
9 | ifeq ($(RAYLEIGH_OPT1),sandy)
10 | F90FLAGS = -FR -fpp -r8 -O3 -xAVX -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
11 | endif
12 |
13 |
14 |
15 |
16 | LIBFLAGS = -lstdc++ -lmpi -mkl
17 |
18 | PROG = rayleigh
19 |
20 | .SUFFIXES: .o .F90 .f .F
21 |
22 | include object_list
23 |
24 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
25 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
26 | .F90.o :
27 | $(F90) $(F90FLAGS) -c $<
28 | .cc.o:
29 | $(CC) $(CFLAGS) -c *.cc
30 | clean :
31 | rm -f *.o *.mod rayleigh
32 | ready :
33 |
34 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Scylla:
--------------------------------------------------------------------------------
1 | F90 = /usr/local/mpich2-1.0.7/bin/mpif90
2 | F90 = mpif90
3 | F90 = /usr/lib64/openmpi/bin/mpif90
4 | # Flags for the MKL libraries
5 | LIBFLAGS = -mkl -I$(MKLROOT)/include/fftw
6 |
7 | #use the first of these for debugging (comment out second line to debug)
8 | ifeq ($(RAYLEIGH_DEBUG),debug)
9 | F90FLAGS = -r8 -O0 -CB -g -traceback -fpp -FR -check all -warn all -I$(MKLROOT)/include/fftw
10 | else
11 | F90FLAGS = -r8 -O3 -xSSE4.2 -fpp -FR -I$(MKLROOT)/include/fftw
12 | endif
13 | PROG = rayleigh
14 |
15 | .SUFFIXES: .o .F90 .f .F
16 | ##DSOBJ = Structures.o
17 | ##PFOBJ = MPI_Base.o All_to_All.o SendReceive.o ISendReceive.o General_MPI.o MPI_LAYER.o Load_Balance.o Parallel_Framework.o
18 | ##MOBJ = Timing.o Finite_Difference.o Chebyshev_Polynomials.o Linear_Solve.o Legendre_Polynomials.o Legendre_Transforms.o \
19 | Fourier_Transform.o Spectral_Derivatives.o
20 | ##IOOBJ = Spherical_IO.o
21 | ##POBJ = Run_Parameters.o Controls.o Timers.o ProblemSize.o ReferenceState.o TransportCoefficients.o BoundaryConditions.o NonDimensionalization.o Fields.o Checkpointing.o Initial_Conditions.o Diagnostics.o \
22 | ## ClockInfo.o Linear_Terms_Sphere.o Spectral_Space_Sphere.o Physical_Space_Sphere.o Hybrid_Space_Sphere.o Drive_Sphere.o
23 | ##TOBJ = Test_SHT.o Test_Cheby.o TestSuite.o
24 | ##MAINOBJ = Input.o Main.o
25 | include object_list
26 |
27 |
28 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
29 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
30 |
31 | .F90.o :
32 | $(F90) $(F90FLAGS) -c $<
33 | clean :
34 | rm -f *.o *.mod rayleigh
35 |
--------------------------------------------------------------------------------
/src/Machinefiles/old_makefiles/Makefile_Stampede:
--------------------------------------------------------------------------------
1 | F90 = mpif90
2 |
3 | ifeq ($(RAYLEIGH_OPT1),debug)
4 | F90FLAGS = -FR -fpp -r8 -O0 -g -traceback -xSSE4.2 -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
5 | else
6 | F90FLAGS = -FR -fpp -r8 -O3 -xAVX -shared_intel -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
7 | endif
8 | LIBFLAGS = -lstdc++ -lmpi -mkl
9 | ifeq ($(RAYLEIGH_OPT1),mvapich)
10 | LIBFLAGS = -lstdc++ -mkl
11 | endif
12 |
13 | PROG = rayleigh
14 |
15 | ifeq ($(RAYLEIGH_OPT1),mic)
16 | F90FLAGS = -FR -fpp -r8 -O3 -openmp -mmic -Duseomp=.true. -Dusemkl=.true. -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
17 | LIBFLAGS = -lstdc++ -mkl -mmic
18 | PROG = rayleigh.mic
19 | endif
20 |
21 |
22 |
23 |
24 |
25 |
26 | .SUFFIXES: .o .F90 .f .F
27 |
28 | include object_list
29 |
30 | $(PROG) :$(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
31 | $(F90) $(F90FLAGS) -o $(PROG) $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ) $(LIBFLAGS)
32 | .F90.o :
33 | $(F90) $(F90FLAGS) -c $<
34 | clean :
35 | rm -f *.o *.mod rayleigh
36 | ready :
37 |
38 |
--------------------------------------------------------------------------------
/src/Math_Layer/Fourier_Derivatives.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Fourier_Derivatives
22 |
23 | Interface d_by_dphi
24 | Module Procedure d_by_dphi3D
25 | End Interface
26 |
27 | Contains
28 | !/////////////////////////////////////////////
29 | ! d_by_dm3D
30 | ! Computes derivative of arrin along first dimension
31 | ! Arrin is assumed to be in spectral space in dimension 1
32 | ! Storage of m values is assumed to be in FFTW's r2c in place format
33 | ! Note that this has no spatial scale factor (d_by_dphi vs d_by_dx)
34 | Subroutine d_by_dphi3D(arrin,arrout)
35 | Implicit None
36 | Integer :: i, j, k, m, ashape(1:3),ni,nj,nk
37 | Real*8, Intent(InOut) :: arrin(:,1:,1:)
38 | Real*8, Intent(InOut) :: arrout(:,1:,1:)
39 | ashape = shape(arrin)
40 | ni = ashape(2)
41 | nj = ashape(3)
42 | nk = ashape(1)
43 | Do j = 1, nj
44 | Do i = 1, ni
45 | Do k = 1, nk,2
46 | m = (k-1)/2
47 | arrout(k,i,j) = -m*arrin(k+1,i,j)
48 | arrout(k+1,i,j) = m*arrin(k,i,j)
49 | Enddo
50 | Enddo
51 | Enddo
52 | End Subroutine d_by_dphi3D
53 |
54 |
55 |
56 | End Module Fourier_Derivatives
57 |
--------------------------------------------------------------------------------
/src/Math_Layer/Math_Constants.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Math_Constants
22 | Use Ra_Precision
23 | Implicit None
24 | Real*8 :: One_Third = 1.0d0/3.0d0
25 | Real*8 :: Pi = 3.1415926535897932384626433832795028841972d0
26 | Real*8 :: four_pi, over_eight_pi, two_pi
27 | Real*8 :: Half = 0.5d0
28 | Real*8 :: Zero = 0.0d0
29 | Real*8 :: one=1.0d0
30 | Real*8 :: two=2.0d0
31 | Contains
32 | Subroutine Set_Math_Constants()
33 | Implicit None
34 | four_pi = 4.0d0*pi
35 | two_pi = 2.0d0*pi
36 | over_eight_pi = 1.0d0/(8.0d0*pi)
37 | End Subroutine Set_Math_Constants
38 | End Module Math_Constants
39 |
--------------------------------------------------------------------------------
/src/Math_Layer/Ra_Precision.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Ra_Precision
22 | Use, Intrinsic :: ISO_Fortran_Env
23 | Implicit None
24 | Integer, Parameter :: Ra_dp = REAL64
25 | Integer, Parameter :: Ra_int = INT32
26 |
27 |
28 | End Module Ra_Precision
29 |
--------------------------------------------------------------------------------
/src/Math_Layer/Timing.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Timing
22 | USE RA_MPI_BASE, Only : MPI_WTIME, MPI_WTICK
23 | Type, Public :: Timer
24 | Real*8 :: delta, elapsed
25 | Real*8 :: t1
26 |
27 | Contains
28 | Procedure :: Init => Initialize_Timer
29 | Procedure :: startclock
30 | Procedure :: stopclock
31 | Procedure :: increment
32 | End Type Timer
33 |
34 |
35 | Contains
36 |
37 | Subroutine get_ticklength(tl)
38 | Implicit None
39 | Real*8, Intent(InOUt) :: tl
40 | tl = mpi_wtick()
41 | End Subroutine get_ticklength
42 |
43 |
44 | Subroutine Initialize_Timer(self)
45 | Implicit None
46 | Class(Timer) :: self
47 | self%elapsed = 0.0d0
48 | self%t1 = 0.0d0
49 | self%delta = 0.0d0
50 | End Subroutine Initialize_Timer
51 |
52 | Subroutine Startclock(self)
53 | Implicit None
54 | Class(Timer) :: self
55 | self%t1 = MPI_WTIME()
56 | End Subroutine Startclock
57 |
58 | Subroutine Stopclock(self)
59 | Implicit None
60 | Real*8 :: t2
61 | Class(Timer) :: self
62 | t2 = MPI_WTIME()
63 | self%delta = t2-self%t1
64 | End Subroutine Stopclock
65 |
66 | Subroutine Increment(self)
67 | Implicit None
68 | Class(Timer) :: self
69 | Call self%stopclock()
70 | self%elapsed = self%elapsed+self%delta
71 | End Subroutine Increment
72 | End Module Timing
73 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/Makefile:
--------------------------------------------------------------------------------
1 | FFTWINC = /home3/feathern/FFTW3/include
2 | FFTWLIB = /home3/feathern/FFTW3/lib
3 | F90 = /usr/local/mpich2-1.0.7/bin/mpif90
4 | F90FLAGS = -ip -ipo -r8 -O3 -fpp -FR -fp-model strict -I$(FFTWINC)
5 | LIBFLAGS = -L/home3/feathern/FFTW3/lib/ -lfftw3 -lm -lc
6 | F90FLAGS = -r8 -O0 -CB -g -traceback -fpp -FR
7 | ##LIBFLAGS = -lmpi -lmpio
8 | PROG = pfw
9 |
10 | .SUFFIXES: .o .F90 .f .F
11 | OBJ = MPI_Base.o All_to_All.o MPI_LAYER.o Load_Balance.o Parallel_Framework.o \
12 |
13 |
14 | $(PROG) : $(OBJ)
15 |
16 | .F90.o :
17 | $(F90) $(F90FLAGS) -c $<
18 | clean :
19 | rm -f *.o *.mod
20 |
21 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/Ra_MPI_Base.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module Ra_MPI_Base
22 | #ifdef USE_MPI_F77_BINDINGS
23 | Include 'mpif.h'
24 | #elif USE_MPI_F08_BINDINGS
25 | Use MPI_F08
26 | #else
27 | Use MPI
28 | #endif
29 |
30 | Type communicator
31 | #ifdef USE_MPI_F08_BINDINGS
32 | Type(MPI_Comm) :: comm ! The mpi handle for this group
33 | #else
34 | Integer :: comm ! The mpi handle for this group
35 | #endif
36 | Integer :: np ! The number of processors in this group
37 | Integer :: rank ! A processes's local rank within this group
38 | End Type communicator
39 |
40 | Private :: mpi_null_delete_fn, mpi_dup_fn, mpi_null_copy_fn
41 | Public :: mpi_wtime,mpi_wtick
42 | End Module Ra_MPI_Base
43 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/assemble_cube.idl:
--------------------------------------------------------------------------------
1 | ntheta = 128
2 | nphi = 2*ntheta
3 | spawn, 'ls workspace/*initial', ifiles
4 | ni = N_ELEMENTS(ifiles)
5 |
6 | cube = dblarr(nphi,100,ntheta,1)
7 | for i = 0, ni -1 DO BEGIN
8 | read_4d,ifiles[i],dat, lims = lims
9 | rstart = lims.rstart
10 | rend = lims.rend
11 | tstart = lims.tstart
12 | tend = lims.tend
13 | cube[*,rstart:rend,tstart:tend,0] = dat
14 | endfor
15 |
16 | spawn, 'ls workspace/*post', ifiles
17 | ni = N_ELEMENTS(ifiles)
18 | cube2 = 0*cube
19 |
20 | for i = 0, ni -1 DO BEGIN
21 | read_4d,ifiles[i],dat, lims = lims
22 | rstart = lims.rstart
23 | rend = lims.rend
24 | tstart = lims.tstart
25 | tend = lims.tend
26 | cube2[*,rstart:rend,tstart:tend,0] = dat
27 | endfor
28 |
29 |
30 | end
31 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/assemble_cube.pro:
--------------------------------------------------------------------------------
1 | spawn, 'ls workspace/*initial', ifiles
2 | ni = N_ELEMENTS(ifles)
3 | cube = dblarr(64,100,32,1)
4 | for i = 0, ni -1 DO BEGIN
5 | read_4d,dat,ifiles[i], lims = lims
6 | rstart = lims.rstart
7 | rend = lims.rend
8 | tstart = lims.tstart
9 | tend = lims.tend
10 | cube[*,istart:iend,tstart:tend,0] = dat
11 | endfor
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/deriv_test.idl:
--------------------------------------------------------------------------------
1 | ntheta = 128
2 | nphi = 2*ntheta
3 | spawn, 'ls workspace/*w1', ifiles
4 | ni = N_ELEMENTS(ifiles)
5 |
6 | cube = dblarr(nphi,100,ntheta,1)
7 | for i = 0, ni -1 DO BEGIN
8 | read_4d,ifiles[i],dat, lims = lims
9 | rstart = lims.rstart
10 | rend = lims.rend
11 | tstart = lims.tstart
12 | tend = lims.tend
13 | cube[*,rstart:rend,tstart:tend,0] = dat
14 | endfor
15 |
16 | spawn, 'ls workspace/*w2', ifiles
17 | ni = N_ELEMENTS(ifiles)
18 | cube2 = 0*cube
19 |
20 | for i = 0, ni -1 DO BEGIN
21 | read_4d,ifiles[i],dat, lims = lims
22 | rstart = lims.rstart
23 | rend = lims.rend
24 | tstart = lims.tstart
25 | tend = lims.tend
26 | cube2[*,rstart:rend,tstart:tend,0] = dat
27 | endfor
28 |
29 |
30 | end
31 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/grid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/geodynamics/Rayleigh/6790d6570722b5c36a26cc4314dcf82569746c4b/src/Parallel_Framework/reports/grid
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/read_4d.pro:
--------------------------------------------------------------------------------
1 | PRO read_4d, file,data, lims = lims
2 | OPENU, 13,file, /f77_unformatted
3 | n1 = 0L
4 | n2 = 0L
5 | n3 = 0L
6 | n4 = 0L
7 | readu,13, n1
8 | readu,13, n2
9 | readu,13, n3
10 | readu,13, n4
11 | data = dblarr(n1,n2,n3,n4)
12 | readu,13, data
13 | readu,13, n1
14 | readu,13, n2
15 | readu,13, n3
16 | readu,13, n4
17 | lims = {rstart:n1-1,rend:n2-1,tstart:n3-1,tend:n4-1}
18 | close, 13
19 |
20 | END
21 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/read_4dc.pro:
--------------------------------------------------------------------------------
1 | PRO read_4d, file,data
2 | OPENU, 13,file, /f77_unformatted
3 | n1 = 0L
4 | n2 = 0L
5 | n3 = 0L
6 | n4 = 0L
7 | readu,13, n1
8 | readu,13, n2
9 | readu,13, n3
10 | readu,13, n4
11 | data = dcomplexarr(n1,n2,n3,n4)
12 | readu,13, data
13 | close, 13
14 |
15 | END
16 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/read_grid.pro:
--------------------------------------------------------------------------------
1 | pro read_grid, r,costheta
2 | n = 0L
3 | OPENU, 13, 'grid', /f77_unformatted
4 | READU,13,n
5 | r = dblarr(n)
6 | READU,13,r
7 | READU,13,n
8 | costheta = dblarr(n)
9 | readu,13,costheta
10 | close, 13
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/src/Parallel_Framework/reports/read_sr.pro:
--------------------------------------------------------------------------------
1 | PRO read_sr, file,res
2 | OPENU, 13,file, /f77_unformatted
3 | np = 0L
4 | readu,13, np
5 | sc = lonarr(np)
6 | sd = lonarr(np)
7 | rc = lonarr(np)
8 | rd = lonarr(np)
9 | readu,13, sc
10 | readu,13, sd
11 | readu,13, rc
12 | readu,13, rd
13 |
14 | close, 13
15 |
16 | res = {np:np, scount:sc,sdisp:sd,rcount:rc,rdisp:rd}
17 | END
18 |
--------------------------------------------------------------------------------
/src/Physics/ClockInfo.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module ClockInfo
22 | Use Controls, Only : max_time_step
23 | Implicit None
24 | Logical :: new_timestep = .true.
25 | Logical :: euler_step = .false.
26 | Real*8 :: new_deltat, deltat, old_deltat
27 | Real*8 :: min_dt_change = 0.1d0
28 | !Real*8 :: max_time_step = 5.0d-4
29 | !Real*8 :: min_time_step = 1.0d-13
30 | Real*8 :: old_ab_factor = 1.0d0, new_ab_factor = 1.0d0
31 | Real*8 :: simulation_time
32 |
33 | Integer :: iteration
34 | Character*8 :: t_ofmt = '(ES12.5)' ! For formatted timestep output
35 | Logical :: output_iteration = .false.
36 | End Module ClockInfo
37 |
--------------------------------------------------------------------------------
/src/Test_Suite/TestSuite.F90:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (C) 2018 by the authors of the RAYLEIGH code.
3 | !
4 | ! This file is part of RAYLEIGH.
5 | !
6 | ! RAYLEIGH is free software; you can redistribute it and/or modify
7 | ! it under the terms of the GNU General Public License as published by
8 | ! the Free Software Foundation; either version 3, or (at your option)
9 | ! any later version.
10 | !
11 | ! RAYLEIGH is distributed in the hope that it will be useful,
12 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | ! GNU General Public License for more details.
15 | !
16 | ! You should have received a copy of the GNU General Public License
17 | ! along with RAYLEIGH; see the file LICENSE. If not see
18 | ! .
19 | !
20 |
21 | Module TestSuite
22 | Use Test_SHT
23 | Use Test_Cheby
24 | Use ProblemSize
25 | Implicit None
26 | Logical :: test_mode = .false.
27 | Logical :: test_legendre = .false.
28 | Logical :: test_full_sht = .false.
29 | Logical :: test_chebyshev = .false.
30 | Namelist /Test_Namelist/ test_mode, ntest_transform_loops, test_legendre, test_full_sht, test_chebyshev
31 | Contains
32 | Subroutine Test_Lib()
33 | If (my_rank .eq. 0) Then
34 | write(6,*)'Initiating library function tests.'
35 | write(6,*)
36 | Endif
37 | If (test_legendre) Call Test_Legendre_Transforms()
38 | If (test_full_sht) Call Test_Spherical_Transforms()
39 | If (test_chebyshev) Call Test_Chebyshev_Transforms()
40 | End Subroutine Test_Lib
41 |
42 |
43 | End Module TestSuite
44 |
--------------------------------------------------------------------------------
/src/format_var.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #########################################################################
3 | # format_var.sh
4 | #
5 | # For use in conjunction with gen_header.sh.
6 | # Expands a lengthy string into multiple lines of
7 | # length 55 or less. Appends each line with appropriate
8 | # Fortran line-continuation and string-concatenation
9 | # characters.
10 | #
11 | # Calling syntax:
12 | # ./format_var.sh $VNAME $OFILE
13 | #
14 | #
15 | # Command-line inputs:
16 | # VNAME : The variable declaration to expand into multi-line format
17 | # OFILE : The .F that each line is written to
18 | ###########################################################################
19 |
20 | UNAME=$1
21 | OFILE=$2
22 |
23 | vlen=${#UNAME}
24 |
25 | COUNTER=0
26 | SLEN=55
27 |
28 | i=0
29 | IFS='%'
30 | while [ $i -lt $vlen ]; do
31 | nextline=${UNAME:$i:$SLEN}
32 |
33 | if [ $i -eq 0 ]
34 | then
35 | nextline="$nextline"\"
36 | else
37 | nextline=" "\""$nextline"\"
38 | fi
39 |
40 | if [ $(( $i + $SLEN )) -ge $vlen ]
41 | then
42 | nextline="$nextline"\/\/"\"---\""\/\/"Char(0)"
43 | else
44 | nextline="$nextline"\/\/" &"
45 | fi
46 | echo $nextline >> $OFILE
47 | let i=i+$SLEN
48 | done
49 | echo '' >> $OFILE
50 | unset IFS
51 |
--------------------------------------------------------------------------------
/src/object_list:
--------------------------------------------------------------------------------
1 | DSOBJ = Ra_Precision.o Structures.o BufferedOutput.o cmkdir.o MakeDir.o
2 | PFOBJ = Ra_MPI_Base.o Timing.o All_to_All.o SendReceive.o ISendReceive.o General_MPI.o MPI_LAYER.o Timers.o Load_Balance.o \
3 | Parallel_Framework.o Spherical_Buffer.o Parallel_IO.o General_IO.o
4 | MOBJ = Math_Constants.o Finite_Difference.o Chebyshev_Polynomials.o \
5 | Chebyshev_Polynomials_Alt.o Linear_Solve.o Legendre_Polynomials.o Legendre_Transforms.o \
6 | Math_Utility.o Fourier_Transform.o Spectral_Derivatives.o
7 | IOOBJ = Spherical_IO.o
8 | POBJ = Controls.o ClockInfo.o ProblemSize.o PDE_Coefficients.o Fields.o \
9 | Generic_Input.o Checkpointing.o \
10 | BoundaryConditions.o Initial_Conditions.o \
11 | Diagnostics_Base.o \
12 | Diagnostics_Second_Derivatives.o \
13 | Diagnostics_Velocity_Diffusion.o \
14 | Diagnostics_ADotGradB.o \
15 | Diagnostics_Velocity_Field.o Diagnostics_Magnetic_Field.o \
16 | Diagnostics_Current_Density.o Diagnostics_Vorticity_Field.o Diagnostics_Axial_Field.o \
17 | Diagnostics_Thermal_Energies.o Diagnostics_Thermal_Equation.o\
18 | Diagnostics_Thermodynamic_Gradients.o Diagnostics_Linear_Forces.o \
19 | Diagnostics_Energies.o \
20 | Diagnostics_Lorentz_Forces.o Diagnostics_Induction.o \
21 | Diagnostics_Inertial_Forces.o Diagnostics_Angular_Momentum.o \
22 | Diagnostics_TurbKE_Budget.o Diagnostics_KE_Flux.o Diagnostics_Poynting_Flux.o \
23 | Diagnostics_Miscellaneous.o Diagnostics_Custom.o \
24 | Diagnostics_Mean_Correction.o \
25 | Diagnostics_Interface.o \
26 | Diagnostics_Scalars.o \
27 | Benchmarking.o Sphere_Linear_Terms.o \
28 | Sphere_Spectral_Space.o Sphere_Hybrid_Space.o Sphere_Physical_Space.o Sphere_Driver.o
29 | TOBJ = Test_SHT.o Test_Cheby.o TestSuite.o
30 | MAINOBJ = Run_Parameters.o Input.o Main.o
31 |
32 | OBJ = $(DSOBJ) $(PFOBJ) $(MOBJ) $(IOOBJ) $(POBJ) $(TOBJ) $(MAINOBJ)
33 |
--------------------------------------------------------------------------------
/tests/c2001_case0/Benchmark_Reports/00000400:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | RAYLEIGH ACCURACY BENCHMARK SUMMARY
3 |
4 | Benchmark: Christensen et al. 2001 (Non-MHD, Case 0)
5 |
6 | Radial Resolution N_R = 48
7 | Angular Resolution N_theta = 64
8 |
9 | Averaging Interval (Viscous Diffusion Times) : 0.030000
10 |
11 | Beginning Iteration : 100
12 | Ending Iteration : 400
13 | Number of Samples : 4
14 | ----------------------------------------------------------------------------
15 | Observable | Measured | Suggested | % Difference | Std. Dev.
16 | ----------------------------------------------------------------------------
17 | Kinetic Energy : 28.015316 58.348000 -51.985816 13.571364
18 | Temperature : 0.339570 0.428120 -20.683445 0.027416
19 | Vphi : -6.022263 -10.157100 -40.708836 2.167046
20 | Drift Frequency : 11.007091 0.182400 5934.589100 3.655992
21 |
--------------------------------------------------------------------------------
/tests/c2001_case0/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller and faster version of the
2 | ! input_examples/benchmark_diagnostics_input model. The output of the model is
3 | ! not yet in steady-state, but only used as a regression test. Whenever
4 | ! something changes the functionality of tthe code, it will hopefully affect
5 | ! the results of this benchmark.
6 |
7 | &problemsize_namelist
8 | n_r = 48
9 | n_theta = 64
10 | nprow = 2
11 | npcol = 2
12 | aspect_ratio = 0.35d0
13 | shell_depth = 1.0d0
14 | /
15 | &numerical_controls_namelist
16 | /
17 | &physical_controls_namelist
18 | benchmark_mode = 1
19 | benchmark_integration_interval = 100
20 | benchmark_report_interval = 400
21 | rotation = .True.
22 | magnetism = .false.
23 | viscous_heating = .false.
24 | ohmic_heating = .false.
25 | /
26 | &temporal_controls_namelist
27 | max_time_step = 1.0d-4
28 | max_iterations = 400
29 | checkpoint_interval = 100000
30 | cflmin = 0.4d0
31 | cflmax = 0.6d0
32 | /
33 | &io_controls_namelist
34 | /
35 | &output_namelist
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | dtdr_bottom = 0.0d0
42 | T_Top = 0.0d0
43 | T_Bottom = 1.0d0
44 | fix_tvar_top = .true.
45 | fix_tvar_bottom = .true.
46 | /
47 | &Initial_Conditions_Namelist
48 | init_type = 1 ! Benchmark init
49 | temp_amp = 1.0d1
50 | temp_w = 0.01d4
51 | restart_iter = -1
52 | /
53 | &Test_Namelist
54 | /
55 | &Reference_Namelist
56 | Ekman_Number = 1.0d-3
57 | Rayleigh_Number = 1.0d5
58 | Prandtl_Number = 1.0d0
59 | Magnetic_Prandtl_Number = 5.0d0
60 | reference_type = 1
61 | heating_type = 0 ! No heating
62 | gravity_power = 1.0d0 ! g ~ radius
63 | /
64 | &Transport_Namelist
65 | /
66 |
--------------------------------------------------------------------------------
/tests/c2001_case0_FD_uniform/Benchmark_Reports/00000400:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | RAYLEIGH ACCURACY BENCHMARK SUMMARY
3 |
4 | Benchmark: Christensen et al. 2001 (Non-MHD, Case 0)
5 |
6 | Radial Resolution N_R = 48
7 | Angular Resolution N_theta = 64
8 |
9 | Averaging Interval (Viscous Diffusion Times) : 0.030000
10 |
11 | Beginning Iteration : 100
12 | Ending Iteration : 400
13 | Number of Samples : 4
14 | ----------------------------------------------------------------------------
15 | Observable | Measured | Suggested | % Difference | Std. Dev.
16 | ----------------------------------------------------------------------------
17 | Kinetic Energy : 28.301141 58.348000 -51.495953 13.514207
18 | Temperature : 0.341681 0.428120 -20.190460 0.027911
19 | Vphi : -6.129535 -10.157100 -39.652707 2.190392
20 | Drift Frequency : 11.914373 0.182400 6432.002964 3.873469
21 |
--------------------------------------------------------------------------------
/tests/c2001_case0_FD_uniform/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller and faster version of the
2 | ! input_examples/benchmark_diagnostics_input model. The output of the model is
3 | ! not yet in steady-state, but only used as a regression test. Whenever
4 | ! something changes the functionality of tthe code, it will hopefully affect
5 | ! the results of this benchmark.
6 |
7 | &problemsize_namelist
8 | n_r = 48
9 | n_theta = 64
10 | nprow = 2
11 | npcol = 2
12 | aspect_ratio = 0.35d0
13 | shell_depth = 1.0d0
14 | /
15 | &numerical_controls_namelist
16 | chebyshev=.false.
17 | /
18 | &physical_controls_namelist
19 | benchmark_mode = 1
20 | benchmark_integration_interval = 100
21 | benchmark_report_interval = 400
22 | rotation = .True.
23 | magnetism = .false.
24 | viscous_heating = .false.
25 | ohmic_heating = .false.
26 | /
27 | &temporal_controls_namelist
28 | max_time_step = 1.0d-4
29 | max_iterations = 400
30 | checkpoint_interval = 100000
31 | cflmin = 0.4d0
32 | cflmax = 0.6d0
33 | /
34 | &io_controls_namelist
35 | /
36 | &output_namelist
37 | /
38 |
39 | &Boundary_Conditions_Namelist
40 | no_slip_boundaries = .true.
41 | strict_L_Conservation = .false.
42 | dtdr_bottom = 0.0d0
43 | T_Top = 0.0d0
44 | T_Bottom = 1.0d0
45 | fix_tvar_top = .true.
46 | fix_tvar_bottom = .true.
47 | /
48 | &Initial_Conditions_Namelist
49 | init_type = 1 ! Benchmark init
50 | temp_amp = 1.0d1
51 | temp_w = 0.01d4
52 | restart_iter = -1
53 | /
54 | &Test_Namelist
55 | /
56 | &Reference_Namelist
57 | Ekman_Number = 1.0d-3
58 | Rayleigh_Number = 1.0d5
59 | Prandtl_Number = 1.0d0
60 | Magnetic_Prandtl_Number = 5.0d0
61 | reference_type = 1
62 | heating_type = 0 ! No heating
63 | gravity_power = 1.0d0 ! g ~ radius
64 | /
65 | &Transport_Namelist
66 | /
67 |
--------------------------------------------------------------------------------
/tests/chi_scalar/T.check/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 0
13 | rotation = .True.
14 | magnetism = .false.
15 | viscous_heating = .false.
16 | ohmic_heating = .false.
17 | n_active_scalars = 2
18 | n_passive_scalars = 2
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 1
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | globalavg_values = 401,501,503,505,507,509,511,513,515,517,519,521,523,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10201,10202,10203,10204,10205,10206,10207,10208,10209,10210,10211,10212,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212
31 | globalavg_frequency = 1
32 | globalavg_nrec = 1
33 | /
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | T_Top = 0.0d0
38 | T_Bottom = 1.0d0
39 | fix_tvar_top = .true.
40 | fix_tvar_bottom = .true.
41 | chi_a_Top(1) = 0.0d0
42 | chi_a_Bottom(1) = 1.0d0
43 | fix_chivar_a_top(1) = .true.
44 | fix_chivar_a_bottom(1) = .true.
45 | chi_a_Top(2) = 0.0d0
46 | chi_a_Bottom(2) = 1.0d0
47 | fix_chivar_a_top(2) = .true.
48 | fix_chivar_a_bottom(2) = .true.
49 | chi_p_Top(1) = 0.0d0
50 | chi_p_Bottom(1) = 1.0d0
51 | fix_chivar_p_top(1) = .true.
52 | fix_chivar_p_bottom(1) = .true.
53 | chi_p_Top(2) = 0.0d0
54 | chi_p_Bottom(2) = 1.0d0
55 | fix_chivar_p_top(2) = .true.
56 | fix_chivar_p_bottom(2) = .true.
57 | /
58 | &Initial_Conditions_Namelist
59 | init_type = -1
60 | /
61 | &Test_Namelist
62 | /
63 | &Reference_Namelist
64 | Ekman_Number = 1.0d-3
65 | Rayleigh_Number = 1.0d5
66 | Prandtl_Number = 1.0d0
67 | chi_a_Rayleigh_Number(1) = 0.0
68 | chi_a_Prandtl_Number(1) = 1.0d0
69 | chi_a_Rayleigh_Number(2) = 0.0
70 | chi_a_Prandtl_Number(2) = 1.0d0
71 | chi_p_Prandtl_Number(1) = 1.0d0
72 | chi_p_Prandtl_Number(2) = 1.0d0
73 | Magnetic_Prandtl_Number = 5.0d0
74 | reference_type = 1
75 | heating_type = 0 ! No heating
76 | gravity_power = 1.0d0 ! g ~ radius
77 | /
78 | &Transport_Namelist
79 | /
80 |
--------------------------------------------------------------------------------
/tests/chi_scalar/T/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 0
13 | rotation = .True.
14 | magnetism = .false.
15 | viscous_heating = .false.
16 | ohmic_heating = .false.
17 | n_active_scalars = 2
18 | n_passive_scalars = 2
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 17
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | globalavg_values = 401,501,503,505,507,509,511,513,515,517,519,521,523,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10201,10202,10203,10204,10205,10206,10207,10208,10209,10210,10211,10212,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212
31 | globalavg_frequency = 17
32 | globalavg_nrec = 1
33 | /
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | T_Top = 0.0d0
38 | T_Bottom = 1.0d0
39 | fix_tvar_top = .true.
40 | fix_tvar_bottom = .true.
41 | chi_a_Top(1) = 0.0d0
42 | chi_a_Bottom(1) = 1.0d0
43 | fix_chivar_a_top(1) = .true.
44 | fix_chivar_a_bottom(1) = .true.
45 | chi_a_Top(2) = 0.0d0
46 | chi_a_Bottom(2) = 1.0d0
47 | fix_chivar_a_top(2) = .true.
48 | fix_chivar_a_bottom(2) = .true.
49 | chi_p_Top(1) = 0.0d0
50 | chi_p_Bottom(1) = 1.0d0
51 | fix_chivar_p_top(1) = .true.
52 | fix_chivar_p_bottom(1) = .true.
53 | chi_p_Top(2) = 0.0d0
54 | chi_p_Bottom(2) = 1.0d0
55 | fix_chivar_p_top(2) = .true.
56 | fix_chivar_p_bottom(2) = .true.
57 | /
58 | &Initial_Conditions_Namelist
59 | init_type = 8
60 | t_init_file = '../bench_t_init'
61 | chi_a_init_file(1) = '../bench_t_init'
62 | chi_a_init_file(2) = '../bench_t_init'
63 | chi_p_init_file(1) = '../bench_t_init'
64 | chi_p_init_file(2) = '../bench_t_init'
65 | /
66 | &Test_Namelist
67 | /
68 | &Reference_Namelist
69 | Ekman_Number = 1.0d-3
70 | Rayleigh_Number = 1.0d5
71 | Prandtl_Number = 1.0d0
72 | chi_a_Rayleigh_Number(1) = 0.0
73 | chi_a_Prandtl_Number(1) = 1.0d0
74 | chi_a_Rayleigh_Number(2) = 0.0
75 | chi_a_Prandtl_Number(2) = 1.0d0
76 | chi_p_Prandtl_Number(1) = 1.0d0
77 | chi_p_Prandtl_Number(2) = 1.0d0
78 | Magnetic_Prandtl_Number = 5.0d0
79 | reference_type = 1
80 | heating_type = 0 ! No heating
81 | gravity_power = 1.0d0 ! g ~ radius
82 | /
83 | &Transport_Namelist
84 | /
85 |
--------------------------------------------------------------------------------
/tests/chi_scalar/bench/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 1
13 | benchmark_integration_interval = 13
14 | benchmark_report_interval = 13
15 | rotation = .True.
16 | magnetism = .false.
17 | viscous_heating = .false.
18 | ohmic_heating = .false.
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 13
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | globalavg_values = 401
31 | globalavg_frequency = 13
32 | globalavg_nrec = 1
33 | /
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | T_Top = 0.0d0
38 | T_Bottom = 1.0d0
39 | fix_tvar_top = .true.
40 | fix_tvar_bottom = .true.
41 | /
42 | &Initial_Conditions_Namelist
43 | init_type = 1 ! Benchmark init
44 |
45 | /
46 | &Test_Namelist
47 | /
48 | &Reference_Namelist
49 | Ekman_Number = 1.0d-3
50 | Rayleigh_Number = 1.0d5
51 | Prandtl_Number = 1.0d0
52 | Magnetic_Prandtl_Number = 5.0d0
53 | reference_type = 1
54 | heating_type = 0 ! No heating
55 | gravity_power = 1.0d0 ! g ~ radius
56 | /
57 | &Transport_Namelist
58 | /
59 |
--------------------------------------------------------------------------------
/tests/chi_scalar/chi.check/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 0
13 | rotation = .True.
14 | magnetism = .false.
15 | viscous_heating = .false.
16 | ohmic_heating = .false.
17 | n_active_scalars = 2
18 | n_passive_scalars = 2
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 1
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | globalavg_values = 401,501,503,505,507,509,511,513,515,517,519,521,523,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10201,10202,10203,10204,10205,10206,10207,10208,10209,10210,10211,10212,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212
31 | globalavg_frequency = 1
32 | globalavg_nrec = 1
33 | /
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | T_Top = 0.0d0
38 | T_Bottom = 1.0d0
39 | fix_tvar_top = .true.
40 | fix_tvar_bottom = .true.
41 | chi_a_Top(1) = 0.0d0
42 | chi_a_Bottom(1) = 1.0d0
43 | fix_chivar_a_top(1) = .true.
44 | fix_chivar_a_bottom(1) = .true.
45 | chi_a_Top(2) = 0.0d0
46 | chi_a_Bottom(2) = 1.0d0
47 | fix_chivar_a_top(2) = .true.
48 | fix_chivar_a_bottom(2) = .true.
49 | chi_p_Top(1) = 0.0d0
50 | chi_p_Bottom(1) = 1.0d0
51 | fix_chivar_p_top(1) = .true.
52 | fix_chivar_p_bottom(1) = .true.
53 | chi_p_Top(2) = 0.0d0
54 | chi_p_Bottom(2) = 1.0d0
55 | fix_chivar_p_top(2) = .true.
56 | fix_chivar_p_bottom(2) = .true.
57 | /
58 | &Initial_Conditions_Namelist
59 | init_type = -1
60 | /
61 | &Test_Namelist
62 | /
63 | &Reference_Namelist
64 | Ekman_Number = 1.0d-3
65 | Rayleigh_Number = 0.0
66 | Prandtl_Number = 1.0d0
67 | chi_a_Rayleigh_Number(1) = -1.0d5
68 | chi_a_Prandtl_Number(1) = 1.0d0
69 | chi_a_Rayleigh_Number(2) = 0.0
70 | chi_a_Prandtl_Number(2) = 1.0d0
71 | chi_p_Prandtl_Number(1) = 1.0d0
72 | chi_p_Prandtl_Number(2) = 1.0d0
73 | Magnetic_Prandtl_Number = 5.0d0
74 | reference_type = 1
75 | heating_type = 0 ! No heating
76 | gravity_power = 1.0d0 ! g ~ radius
77 | /
78 | &Transport_Namelist
79 | /
80 |
--------------------------------------------------------------------------------
/tests/chi_scalar/chi/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 0
13 | rotation = .True.
14 | magnetism = .false.
15 | viscous_heating = .false.
16 | ohmic_heating = .false.
17 | n_active_scalars = 2
18 | n_passive_scalars = 2
19 | /
20 | &temporal_controls_namelist
21 | max_time_step = 7.5e-5
22 | max_iterations = 17
23 | checkpoint_interval = 10000
24 | cflmin = 0.4d0
25 | cflmax = 0.6d0
26 | /
27 | &io_controls_namelist
28 | /
29 | &output_namelist
30 | globalavg_values = 401,501,503,505,507,509,511,513,515,517,519,521,523,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10201,10202,10203,10204,10205,10206,10207,10208,10209,10210,10211,10212,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212
31 | globalavg_frequency = 17
32 | globalavg_nrec = 1
33 | /
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | strict_L_Conservation = .false.
37 | T_Top = 0.0d0
38 | T_Bottom = 1.0d0
39 | fix_tvar_top = .true.
40 | fix_tvar_bottom = .true.
41 | chi_a_Top(1) = 0.0d0
42 | chi_a_Bottom(1) = 1.0d0
43 | fix_chivar_a_top(1) = .true.
44 | fix_chivar_a_bottom(1) = .true.
45 | chi_a_Top(2) = 0.0d0
46 | chi_a_Bottom(2) = 1.0d0
47 | fix_chivar_a_top(2) = .true.
48 | fix_chivar_a_bottom(2) = .true.
49 | chi_p_Top(1) = 0.0d0
50 | chi_p_Bottom(1) = 1.0d0
51 | fix_chivar_p_top(1) = .true.
52 | fix_chivar_p_bottom(1) = .true.
53 | chi_p_Top(2) = 0.0d0
54 | chi_p_Bottom(2) = 1.0d0
55 | fix_chivar_p_top(2) = .true.
56 | fix_chivar_p_bottom(2) = .true.
57 | /
58 | &Initial_Conditions_Namelist
59 | init_type = 8
60 | t_init_file = '../bench_t_init'
61 | chi_a_init_file(1) = '../bench_t_init'
62 | chi_a_init_file(2) = '../bench_t_init'
63 | chi_p_init_file(1) = '../bench_t_init'
64 | chi_p_init_file(2) = '../bench_t_init'
65 | /
66 | &Test_Namelist
67 | /
68 | &Reference_Namelist
69 | Ekman_Number = 1.0d-3
70 | Rayleigh_Number = 0.0
71 | Prandtl_Number = 1.0d0
72 | chi_a_Rayleigh_Number(1) = -1.0d5
73 | chi_a_Prandtl_Number(1) = 1.0d0
74 | chi_a_Rayleigh_Number(2) = 0.0
75 | chi_a_Prandtl_Number(2) = 1.0d0
76 | chi_p_Prandtl_Number(1) = 1.0d0
77 | chi_p_Prandtl_Number(2) = 1.0d0
78 | Magnetic_Prandtl_Number = 5.0d0
79 | reference_type = 1
80 | heating_type = 0 ! No heating
81 | gravity_power = 1.0d0 ! g ~ radius
82 | /
83 | &Transport_Namelist
84 | /
85 |
--------------------------------------------------------------------------------
/tests/chi_scalar/run_test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd tests/chi_scalar
4 |
5 | #cd bench
6 | #mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
7 | #cd ..
8 |
9 | # generate initial conditions
10 | ../../pre_processing/rayleigh_spectral_input.py -ar 0.35 -sd 1.0 -nt 64 -nr 48 -o bench_t_init \
11 | -e 'import numpy as np; x = 2*radius - rmin - rmax; rmax*rmin/radius - rmin + 210*0.1*(1 - 3*x*x + 3*(x**4) - x**6)*(np.sin(theta)**4)*np.cos(4*phi)/np.sqrt(17920*np.pi)'
12 |
13 | cd T
14 | mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
15 | cd ..
16 |
17 | cp -r T/Checkpoints T.check/.
18 |
19 | cd T.check
20 | mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
21 | cd ..
22 |
23 | cd chi
24 | mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
25 | cd ..
26 |
27 | cp -r chi/Checkpoints chi.check/.
28 |
29 | cd chi.check
30 | mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
31 | cd ..
32 |
33 | # after both versions have run, we test the output for errors
34 | PYTHONPATH=../../post_processing:../../pre_processing:$PYTHONPATH python3 test_output.py
35 |
36 |
--------------------------------------------------------------------------------
/tests/coupled_bcs/const/generate_input.py:
--------------------------------------------------------------------------------
1 | ### Use rayleigh_spectral_input.py to generate generic input.
2 |
3 | from rayleigh_spectral_input import *
4 |
5 | rmin = 0.5; rmax = 1.0
6 |
7 | si = SpectralInput(n_theta=1,n_r=48)
8 | si.transform_from_rtp_function(lambda radius: 2.0 - (rmax/radius)*(radius - rmin)/(rmax - rmin), rmin=rmin, rmax=rmax)
9 | si.write('radial_prof_init')
10 |
11 | si = SpectralInput()
12 | si.add_mode(0.0+0.j, 0, 0, 0)
13 | si.write('constant_init')
14 |
15 |
--------------------------------------------------------------------------------
/tests/coupled_bcs/const/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for two time-steps so that we can check the boundary conditions.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | rmin = 0.5
10 | rmax = 1.0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .false.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | n_active_scalars = 2
21 | /
22 | &temporal_controls_namelist
23 | max_time_step = 1.0d-4
24 | max_iterations = 2
25 | alpha_implicit = 0.50001d0
26 | checkpoint_interval = 500000
27 | quicksave_interval = 1000000
28 | num_quicksaves = -1
29 | cflmin = 0.4d0
30 | cflmax = 0.6d0
31 | /
32 | &io_controls_namelist
33 | /
34 | &output_namelist
35 | full3d_values = 501 507 10001 10004 10201 10204
36 | full3d_frequency = 2
37 |
38 | shellavg_values = 501 507 10001 10004 10201 10204
39 | shellavg_frequency = 2
40 | shellavg_nrec = 1
41 |
42 | shellslice_levels = 1,48
43 | shellslice_values = 501 507 10001 10004 10201 10204 ! T dTdr chi1 dchi1dr chi2 dchi2dr
44 | shellslice_frequency = 2
45 | shellslice_nrec = 1
46 | /
47 |
48 | &Boundary_Conditions_Namelist
49 | no_slip_boundaries = .true.
50 | strict_L_Conservation = .false.
51 | dTdr_Top = 32.31
52 | T_Bottom = 17.865
53 | couple_dtdr_top = .true.
54 | dTdr_chi_a_coeff_top(1) = 70.2
55 | couple_tvar_bottom = .true.
56 | T_chi_a_coeff_bottom(1) = 34.1
57 | T_dchidr_a_coeff_bottom(1) = -51.87
58 | chi_a_Top(1) = 1.0d0
59 | chi_a_Bottom(1) = 2.0d0
60 | fix_chivar_a_top(1) = .true.
61 | fix_chivar_a_bottom(1) = .true.
62 | chi_a_Top(2) = 1.0342d0
63 | dchidr_a_Bottom(2) = -27.6d0
64 | couple_chivar_a_top(2) = .true.
65 | chi_a_chi_a_coeff_top(2,1) = 107.01
66 | chi_a_dchidr_a_coeff_top(2,1) = 7.064
67 | couple_dchidr_a_bottom(2) = .true.
68 | dchidr_a_chi_a_coeff_bottom(2,1) = 9.872
69 | /
70 | &Initial_Conditions_Namelist
71 | init_type = 8 ! File init
72 | t_init_file = 'constant_init'
73 | chi_a_init_file(1) = 'radial_prof_init'
74 | chi_a_init_file(2) = 'constant_init'
75 | /
76 | &Test_Namelist
77 | /
78 | &Reference_Namelist
79 | Ekman_Number = 1.0d-3
80 | Rayleigh_Number = 0.0
81 | Prandtl_Number = 1.0d0
82 | Magnetic_Prandtl_Number = 5.0d0
83 | reference_type = 1
84 | heating_type = 0 ! No heating
85 | gravity_power = 1.0d0 ! g ~ radius
86 | /
87 | &Transport_Namelist
88 | /
89 |
--------------------------------------------------------------------------------
/tests/coupled_bcs/run_test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd tests/coupled_bcs
4 |
5 | # we run a const case, where the bcs on the field that everything is coupled to are just constant
6 | cd const
7 | PYTHONPATH=../../../pre_processing:$PYTHONPATH python3 generate_input.py
8 | mpirun -np 4 $RAYLEIGH_TEST_MPI_PARAMS ../../../bin/rayleigh.dbg
9 | cd ..
10 |
11 | # after running, we test the output for errors
12 | PYTHONPATH=../../post_processing:../../pre_processing:$PYTHONPATH python3 test_output.py
13 |
14 |
--------------------------------------------------------------------------------
/tests/custom_reference/augment/Benchmark_Reports/00000200:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | RAYLEIGH ACCURACY BENCHMARK SUMMARY
3 |
4 | Benchmark: Christensen et al. 2001 (Non-MHD, Case 0)
5 |
6 | Radial Resolution N_R = 48
7 | Angular Resolution N_theta = 64
8 |
9 | Averaging Interval (Viscous Diffusion Times) : 0.010000
10 |
11 | Beginning Iteration : 100
12 | Ending Iteration : 200
13 | Number of Samples : 2
14 | ----------------------------------------------------------------------------
15 | Observable | Measured | Suggested | % Difference | Std. Dev.
16 | ----------------------------------------------------------------------------
17 | Kinetic Energy : 29.100559 58.348000 -50.125867 10.770205
18 | Temperature : 0.469344 0.428120 9.629148 0.069833
19 | Vphi : -5.387204 -10.157100 -46.961199 1.845794
20 | Drift Frequency : 13.206574 0.182400 7140.446023 0.000000
21 |
--------------------------------------------------------------------------------
/tests/custom_reference/augment/augment.py:
--------------------------------------------------------------------------------
1 | import reference_tools as rt
2 | import numpy
3 | # Grid Parameters
4 | nr = 128 # Number of radial points
5 |
6 | #aspect ratio
7 | #beta=ri/ro
8 | beta = 0.35e0
9 |
10 |
11 | # shell depth
12 | d=1.e0
13 |
14 | #outer radial boundary
15 | ro=d/(1-beta)
16 |
17 | #inner radial boundary
18 | ri=beta*ro
19 |
20 | #radial grid
21 | radius=numpy.linspace(ri,ro,nr)
22 |
23 | # Initialize an equation_coefficients structure consistent with the case 0 benchmark test
24 | my_ref = rt.equation_coefficients(radius)
25 |
26 | ones = numpy.ones(nr,dtype='float64')
27 |
28 |
29 | gravity_power=1e0
30 | buoy = (radius/radius[nr-1])**gravity_power # buoyancy term calculation
31 | my_ref.set_function(buoy,2) # buoyancy term
32 | my_ref.set_function(ones,6) # heating function
33 |
34 | c10 = numpy.zeros(1,dtype='float64')
35 | c2 = numpy.zeros(1,dtype='float64')
36 |
37 |
38 | Qamp = numpy.zeros(1,dtype='float64')
39 | Ra = numpy.zeros(1,dtype='float64')
40 | Pr = numpy.zeros(1,dtype='float64')
41 |
42 | Qamp[0]=1e1
43 | Ra[0]=1.2e5
44 | Pr[0]=1
45 |
46 | c10 = Qamp
47 | c2 = Ra/Pr
48 |
49 | my_ref.set_constant(c10[0],10) # multiplies the Heating function
50 | my_ref.set_constant(c2[0],2) # multiplies the buoyancy
51 | my_ref.write('with_custom.dat') # Write the data file
52 |
53 |
54 |
--------------------------------------------------------------------------------
/tests/custom_reference/augment/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller and faster version of the
2 | ! input_examples/benchmark_diagnostics_input model. The output of the model is
3 | ! not yet in steady-state, but only used as a regression test. Whenever
4 | ! something changes the functionality of tthe code, it will hopefully affect
5 | ! the results of this benchmark.
6 |
7 | &problemsize_namelist
8 | n_r = 48
9 | n_theta = 64
10 | nprow = 2
11 | npcol = 2
12 | aspect_ratio = 0.35d0
13 | shell_depth = 1.0d0
14 | /
15 | &numerical_controls_namelist
16 | /
17 | &physical_controls_namelist
18 | benchmark_mode = 1
19 | benchmark_integration_interval = 100
20 | benchmark_report_interval = 200
21 | rotation = .True.
22 | magnetism = .false.
23 | viscous_heating = .false.
24 | ohmic_heating = .false.
25 | /
26 | &temporal_controls_namelist
27 | max_time_step = 1.0d-4
28 | max_iterations = 200
29 | checkpoint_interval = 100000
30 | cflmin = 0.4d0
31 | cflmax = 0.6d0
32 | /
33 | &io_controls_namelist
34 | /
35 | &output_namelist
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | dtdr_bottom = 0.0d0
42 | T_Top = 0.0d0
43 | T_Bottom = 1.0d0
44 | fix_tvar_top = .true.
45 | fix_tvar_bottom = .true.
46 | /
47 | &Initial_Conditions_Namelist
48 | init_type = 1 ! Benchmark init
49 | temp_amp = 1.0d1
50 | temp_w = 0.01d4
51 | restart_iter = -1
52 | /
53 | &Test_Namelist
54 | /
55 | &Reference_Namelist
56 | Ekman_Number = 1.0d-3
57 | Rayleigh_Number = 1.0d5
58 | Prandtl_Number = 1.0d0
59 | Magnetic_Prandtl_Number = 5.0d0
60 | reference_type = 1
61 | heating_type = 1 ! Internal heating (from reference file)
62 | gravity_power = 1.0d0 ! g ~ radius
63 | custom_reference_file='with_custom.dat'
64 | with_custom_reference=.true.
65 | with_custom_constants= 2 , 10
66 | with_custom_functions= 2 , 6
67 | /
68 | &Transport_Namelist
69 | /
70 |
--------------------------------------------------------------------------------
/tests/custom_reference/basic/Benchmark_Reports/00000200:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | RAYLEIGH ACCURACY BENCHMARK SUMMARY
3 |
4 | Benchmark: Christensen et al. 2001 (Non-MHD, Case 0)
5 |
6 | Radial Resolution N_R = 48
7 | Angular Resolution N_theta = 64
8 |
9 | Averaging Interval (Viscous Diffusion Times) : 0.010000
10 |
11 | Beginning Iteration : 100
12 | Ending Iteration : 200
13 | Number of Samples : 2
14 | ----------------------------------------------------------------------------
15 | Observable | Measured | Suggested | % Difference | Std. Dev.
16 | ----------------------------------------------------------------------------
17 | Kinetic Energy : 16.064123 58.348000 -72.468425 4.513346
18 | Temperature : 0.316280 0.428120 -26.123436 0.016443
19 | Vphi : -4.121698 -10.157100 -59.420519 1.295427
20 | Drift Frequency : 14.628113 0.182400 7919.799059 0.000000
21 |
--------------------------------------------------------------------------------
/tests/custom_reference/basic/gen_case0.py:
--------------------------------------------------------------------------------
1 | import reference_tools as rt
2 | import numpy
3 | # Grid Parameters
4 | nr = 128 # Number of radial points
5 |
6 | #aspect ratio
7 | #beta=ri/ro
8 | beta = 0.35e0
9 |
10 |
11 | # shell depth
12 | d=1.e0
13 |
14 | #outer radial boundary
15 | ro=d/(1-beta)
16 |
17 | #inner radial boundary
18 | ri=beta*ro
19 |
20 | #radial grid
21 | radius=numpy.linspace(ri,ro,nr)
22 |
23 | # Initialize an equation_coefficients structure consistent with the case 0 benchmark test
24 | my_ref = rt.equation_coefficients(radius)
25 |
26 | ones = numpy.ones(nr,dtype='float64')
27 | zeros = numpy.zeros(nr,dtype='float64')
28 |
29 |
30 |
31 |
32 | gravity_power=1e0
33 | buoy = (radius/radius[nr-1])**gravity_power # buoyancy term calculation
34 | my_ref.set_function(ones,1) # denisty rho
35 | my_ref.set_function(buoy,2) # buoyancy term
36 | my_ref.set_function(ones,3) # nu(r)
37 | my_ref.set_function(ones,4) # temperature T
38 | my_ref.set_function(ones,5) # kappa(r)
39 | my_ref.set_function(zeros,6) # heating function
40 |
41 | c1 = numpy.zeros(1,dtype='float64')
42 | c2 = numpy.zeros(1,dtype='float64')
43 | c3 = numpy.zeros(1,dtype='float64')
44 | c6 = numpy.zeros(1,dtype='float64')
45 |
46 | E = numpy.zeros(1,dtype='float64')
47 | Ra = numpy.zeros(1,dtype='float64')
48 | Pr = numpy.zeros(1,dtype='float64')
49 |
50 | E[0]=1e-3
51 | Ra[0]=1e5
52 | Pr[0]=1
53 |
54 | c1 = 2/E
55 | c2 = Ra/Pr
56 | c3 = 1/E
57 | c6 = 1/Pr
58 |
59 | my_ref.set_constant(c1[0],1) # multiplies the Coriolis term
60 | my_ref.set_constant(c2[0],2) # multiplies the buoyancy
61 | my_ref.set_constant(c3[0],3) # multiplies the pressure gradient
62 | my_ref.set_constant(1 ,5) # multiplies the viscosity
63 | my_ref.set_constant(c6[0],6) # multiplies kappa, here it is: E/Pr
64 | my_ref.set_constant(0,10) # multiplies the heating, here it is 0, since we have assumed that there is no heating function!
65 | my_ref.write('case0.dat') # Here we write our data file to be used to run our simulation
66 |
67 |
68 |
--------------------------------------------------------------------------------
/tests/custom_reference/basic/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | benchmark_mode = 1
13 | benchmark_integration_interval = 100
14 | benchmark_report_interval = 200
15 | rotation = .True.
16 | magnetism = .false.
17 | viscous_heating = .false.
18 | ohmic_heating = .false.
19 | advect_reference_state = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 200
24 | checkpoint_interval = 10000
25 | cflmin = 0.4d0
26 | cflmax = 0.6d0
27 | save_last_timestep = .false.
28 | /
29 | &io_controls_namelist
30 | /
31 | &output_namelist
32 |
33 |
34 | /
35 |
36 | &Boundary_Conditions_Namelist
37 | no_slip_boundaries = .true.
38 | strict_L_Conservation = .false.
39 | dtdr_bottom = 0.0d0
40 | T_Top = 0.0d0
41 | T_Bottom = 1.0d0
42 | fix_tvar_top = .true.
43 | fix_tvar_bottom = .true.
44 | /
45 | &Initial_Conditions_Namelist
46 | init_type = 1 ! Benchmark init
47 | temp_amp = 1.0d1
48 | temp_w = 0.01d4
49 | restart_iter = -1
50 | /
51 | &Test_Namelist
52 | /
53 | &Reference_Namelist
54 | reference_type = 4
55 | custom_reference_file='case0.dat'
56 | /
57 | &Transport_Namelist
58 | /
59 |
--------------------------------------------------------------------------------
/tests/custom_reference/run_test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd tests/custom_reference
4 |
5 | # Run a test where the full reference state is specified
6 | cd basic
7 | cp ../../../post_processing/reference_tools.py .
8 | python3 gen_case0.py
9 | mpirun -np 4 ../../../bin/rayleigh.dbg
10 |
11 |
12 | # Augment the usual case 0 with heating and higher Ra
13 | cd ..
14 | cd augment
15 | cp ../../../post_processing/reference_tools.py .
16 | python3 augment.py
17 | mpirun -np 4 ../../../bin/rayleigh.dbg
18 |
--------------------------------------------------------------------------------
/tests/generic_input/base/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for a single time-step so that we can check the initial condition.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | aspect_ratio = 0.35d0
10 | shell_depth = 1.0d0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .true.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 1
24 | alpha_implicit = 0.50001d0
25 | checkpoint_interval = 500000
26 | quicksave_interval = 1000000
27 | num_quicksaves = -1
28 | cflmin = 0.4d0
29 | cflmax = 0.6d0
30 | /
31 | &io_controls_namelist
32 | /
33 | &output_namelist
34 | full3d_values = 501,801,802,803
35 | full3d_frequency = 1
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | T_Top = 0.0d0
42 | T_Bottom = 1.0d0
43 | fix_tvar_top = .true.
44 | fix_tvar_bottom = .true.
45 | /
46 | &Initial_Conditions_Namelist
47 | init_type = 1 ! Benchmark init
48 | magnetic_init_type = 1 ! Benchmark init
49 | /
50 | &Test_Namelist
51 | /
52 | &Reference_Namelist
53 | Ekman_Number = 1.0d-3
54 | Rayleigh_Number = 1.0d5
55 | Prandtl_Number = 1.0d0
56 | Magnetic_Prandtl_Number = 5.0d0
57 | reference_type = 1
58 | heating_type = 0 ! No heating
59 | gravity_power = 1.0d0 ! g ~ radius
60 | /
61 | &Transport_Namelist
62 | /
63 |
--------------------------------------------------------------------------------
/tests/generic_input/bcs_base/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | rotation = .True.
13 | magnetism = .True.
14 | viscous_heating = .false.
15 | ohmic_heating = .false.
16 | /
17 | &temporal_controls_namelist
18 | max_time_step = 2.e-13
19 | min_time_step = 1.e-13
20 | max_iterations = 2
21 | checkpoint_interval = 10000
22 | cflmin = 0.4d0
23 | cflmax = 0.6d0
24 | /
25 | &io_controls_namelist
26 | /
27 | &output_namelist
28 | shellslice_levels = 1,48
29 | shellslice_values = 501,801,802,803
30 | shellslice_frequency = 2
31 | shellslice_nrec = 1
32 | /
33 |
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | fix_tvar_top = .true.
37 | fix_tvar_bottom = .true.
38 | T_top = -5.0
39 | T_bottom = 5.0
40 | impose_dipole_field = .true.
41 | dipole_tilt_degrees = 10.0
42 | br_bottom = 27.0
43 | /
44 | &Initial_Conditions_Namelist
45 | init_type = 8
46 | t_init_file = 'zero_init_vol'
47 | magnetic_init_type = 8
48 | c_init_file = 'zero_init_vol'
49 | a_init_file = 'zero_init_vol'
50 | /
51 | &Test_Namelist
52 | /
53 | &Reference_Namelist
54 | Ekman_Number = 1.0d-3
55 | Rayleigh_Number = 1.0d5
56 | Prandtl_Number = 1.0d0
57 | Magnetic_Prandtl_Number = 5.0d0
58 | reference_type = 1
59 | heating_type = 0 ! No heating
60 | gravity_power = 1.0d0 ! g ~ radius
61 | /
62 | &Transport_Namelist
63 | /
64 |
--------------------------------------------------------------------------------
/tests/generic_input/bcs_script/main_input:
--------------------------------------------------------------------------------
1 | &problemsize_namelist
2 | n_r = 48
3 | n_theta = 64
4 | nprow = 2
5 | npcol = 2
6 | aspect_ratio = 0.35d0
7 | shell_depth = 1.0d0
8 | /
9 | &numerical_controls_namelist
10 | /
11 | &physical_controls_namelist
12 | rotation = .True.
13 | magnetism = .True.
14 | viscous_heating = .false.
15 | ohmic_heating = .false.
16 | /
17 | &temporal_controls_namelist
18 | max_time_step = 2.e-13
19 | min_time_step = 1.e-13
20 | max_iterations = 2
21 | checkpoint_interval = 10000
22 | cflmin = 0.4d0
23 | cflmax = 0.6d0
24 | /
25 | &io_controls_namelist
26 | /
27 | &output_namelist
28 | shellslice_levels = 1,48
29 | shellslice_values = 501,801,802,803
30 | shellslice_frequency = 2
31 | shellslice_nrec = 1
32 | /
33 |
34 | &Boundary_Conditions_Namelist
35 | no_slip_boundaries = .true.
36 | fix_tvar_top = .true.
37 | fix_tvar_bottom = .true.
38 | T_top_file = 'mfive_init_bc'
39 | T_bottom_file = 'five_init_bc'
40 | fix_poloidalfield_top = .true.
41 | fix_poloidalfield_bottom = .true.
42 | C_top_file = 'ctop_init_bc'
43 | C_bottom_file = 'cbottom_init_bc'
44 | /
45 | &Initial_Conditions_Namelist
46 | init_type = 8
47 | t_init_file = 'zero_init_vol'
48 | magnetic_init_type = 8
49 | c_init_file = 'zero_init_vol'
50 | a_init_file = 'zero_init_vol'
51 | /
52 | &Test_Namelist
53 | /
54 | &Reference_Namelist
55 | Ekman_Number = 1.0d-3
56 | Rayleigh_Number = 1.0d5
57 | Prandtl_Number = 1.0d0
58 | Magnetic_Prandtl_Number = 5.0d0
59 | reference_type = 1
60 | heating_type = 0 ! No heating
61 | gravity_power = 1.0d0 ! g ~ radius
62 | /
63 | &Transport_Namelist
64 | /
65 |
--------------------------------------------------------------------------------
/tests/generic_input/radial_base/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for a single time-step so that we can check the initial condition.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | rmin = 0.5
10 | rmax = 1.0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .false.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 1
24 | alpha_implicit = 0.50001d0
25 | checkpoint_interval = 500000
26 | quicksave_interval = 1000000
27 | num_quicksaves = -1
28 | cflmin = 0.4d0
29 | cflmax = 0.6d0
30 | /
31 | &io_controls_namelist
32 | /
33 | &output_namelist
34 | full3d_values = 501
35 | full3d_frequency = 1
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | T_Top = 0.0d0
42 | T_Bottom = 1.0d0
43 | fix_tvar_top = .true.
44 | fix_tvar_bottom = .true.
45 | /
46 | &Initial_Conditions_Namelist
47 | init_type = 7 ! initialize a random thermal field
48 | temp_amp = 0 ! but with zero amplitude
49 | conductive_profile = .true. ! on top of a conductive profile
50 | /
51 | &Test_Namelist
52 | /
53 | &Reference_Namelist
54 | Ekman_Number = 1.0d-3
55 | Rayleigh_Number = 1.0d5
56 | Prandtl_Number = 1.0d0
57 | Magnetic_Prandtl_Number = 5.0d0
58 | reference_type = 1
59 | heating_type = 0 ! No heating
60 | gravity_power = 1.0d0 ! g ~ radius
61 | /
62 | &Transport_Namelist
63 | /
64 |
--------------------------------------------------------------------------------
/tests/generic_input/radial_dense/generate_input.py:
--------------------------------------------------------------------------------
1 | ### Use rayleigh_spectral_input.py to generate generic input.
2 | ### Christensen Benchmark case 1.
3 |
4 | from rayleigh_spectral_input import *
5 |
6 | rmin = 0.5; rmax = 1.0
7 |
8 | si = SpectralInput(n_theta=64,n_r=48)
9 | si.transform_from_rtp_function(lambda radius: 1.0 - (rmax/radius)*(radius - rmin)/(rmax - rmin), rmin=rmin, rmax=rmax)
10 | si.write('radial_t_init')
11 |
--------------------------------------------------------------------------------
/tests/generic_input/radial_dense/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for a single time-step so that we can check the initial condition.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | rmin = 0.5
10 | rmax = 1.0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .false.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 1
24 | alpha_implicit = 0.50001d0
25 | checkpoint_interval = 500000
26 | quicksave_interval = 1000000
27 | num_quicksaves = -1
28 | cflmin = 0.4d0
29 | cflmax = 0.6d0
30 | /
31 | &io_controls_namelist
32 | /
33 | &output_namelist
34 | full3d_values = 501
35 | full3d_frequency = 1
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | T_Top = 0.0d0
42 | T_Bottom = 1.0d0
43 | fix_tvar_top = .true.
44 | fix_tvar_bottom = .true.
45 | /
46 | &Initial_Conditions_Namelist
47 | init_type = 8 ! File init
48 | t_init_file = 'radial_t_init'
49 | /
50 | &Test_Namelist
51 | /
52 | &Reference_Namelist
53 | Ekman_Number = 1.0d-3
54 | Rayleigh_Number = 1.0d5
55 | Prandtl_Number = 1.0d0
56 | Magnetic_Prandtl_Number = 5.0d0
57 | reference_type = 1
58 | heating_type = 0 ! No heating
59 | gravity_power = 1.0d0 ! g ~ radius
60 | /
61 | &Transport_Namelist
62 | /
63 |
--------------------------------------------------------------------------------
/tests/generic_input/radial_sparse/generate_input.py:
--------------------------------------------------------------------------------
1 | ### Use rayleigh_spectral_input.py to generate generic input.
2 | ### Christensen Benchmark case 1.
3 |
4 | from rayleigh_spectral_input import *
5 |
6 | rmin = 0.5; rmax = 1.0
7 |
8 | si = SpectralInput(n_theta=1,n_r=48)
9 | si.transform_from_rtp_function(lambda radius: 1.0 - (rmax/radius)*(radius - rmin)/(rmax - rmin), rmin=rmin, rmax=rmax)
10 | si.write('radial_t_init')
11 |
--------------------------------------------------------------------------------
/tests/generic_input/radial_sparse/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for a single time-step so that we can check the initial condition.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | rmin = 0.5
10 | rmax = 1.0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .false.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 1
24 | alpha_implicit = 0.50001d0
25 | checkpoint_interval = 500000
26 | quicksave_interval = 1000000
27 | num_quicksaves = -1
28 | cflmin = 0.4d0
29 | cflmax = 0.6d0
30 | /
31 | &io_controls_namelist
32 | /
33 | &output_namelist
34 | full3d_values = 501
35 | full3d_frequency = 1
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | T_Top = 0.0d0
42 | T_Bottom = 1.0d0
43 | fix_tvar_top = .true.
44 | fix_tvar_bottom = .true.
45 | /
46 | &Initial_Conditions_Namelist
47 | init_type = 8 ! File init
48 | t_init_file = 'radial_t_init'
49 | /
50 | &Test_Namelist
51 | /
52 | &Reference_Namelist
53 | Ekman_Number = 1.0d-3
54 | Rayleigh_Number = 1.0d5
55 | Prandtl_Number = 1.0d0
56 | Magnetic_Prandtl_Number = 5.0d0
57 | reference_type = 1
58 | heating_type = 0 ! No heating
59 | gravity_power = 1.0d0 ! g ~ radius
60 | /
61 | &Transport_Namelist
62 | /
63 |
--------------------------------------------------------------------------------
/tests/generic_input/script/generate_magnetic_input.py:
--------------------------------------------------------------------------------
1 | ### Use rayleigh_spectral_input.py to generate generic input.
2 | ### Christensen Benchmark case 1.
3 |
4 | from rayleigh_spectral_input import *
5 |
6 | ar = 0.35; sd=1.0
7 | rmin, rmax = radial_extents(aspect_ratio=ar, shell_depth=sd)
8 |
9 | ### Poloidal magnetic potential BC.
10 | si_BC = SpectralInput(n_theta=64,n_r=48)
11 | def func_BC(theta,phi,radius):
12 | Br = 5./8*(8*rmax-6*radius-2*rmin**4/radius**3)*np.cos(theta)
13 | r2Br = radius**2*Br
14 | return r2Br
15 | si_BC.transform_from_rtp_function(func_BC, aspect_ratio=ar, shell_depth=sd)
16 | # si_BC now contains r**2*B_r, because this is only related to the horizontal gradient of C,
17 | # we need to scale by l*(l+1) to get the correct potential
18 | for ell in range(1,si_BC.coeffs.shape[1]):
19 | si_BC.coeffs[:,ell,:] = si_BC.coeffs[:,ell,:]/(ell*(ell+1))
20 | si_BC.write('bench_c_init')
21 |
22 | ### Toroidal magnetic potential BA.
23 | si_BA = SpectralInput(n_theta=64,n_r=48)
24 | def func_BA(theta,phi,radius):
25 | P20 = 0.5*(3*np.cos(theta)**2-1)
26 | rdotcurlB = 5*np.sin(np.pi*(radius-rmin))/radius*P20*4
27 | return radius**2*rdotcurlB
28 | si_BA.transform_from_rtp_function(func_BA, aspect_ratio=ar, shell_depth=sd)
29 | # si_BA now contains r**2*B_r, because this is only related to the horizontal gradient of A,
30 | # we need to scale by l*(l+1) to get the correct potential
31 | for ell in range(1,si_BA.coeffs.shape[1]):
32 | si_BA.coeffs[:,ell,:] = si_BA.coeffs[:,ell,:]/(ell*(ell+1))
33 | si_BA.write('bench_a_init')
34 |
--------------------------------------------------------------------------------
/tests/generic_input/script/main_input:
--------------------------------------------------------------------------------
1 | ! This is a smaller version of the input_examples/benchmark_diagnostics_input
2 | ! model that only runs for a single time-step so that we can check the initial condition.
3 |
4 | &problemsize_namelist
5 | n_r = 48
6 | n_theta = 64
7 | nprow = 2
8 | npcol = 2
9 | aspect_ratio = 0.35d0
10 | shell_depth = 1.0d0
11 | /
12 | &numerical_controls_namelist
13 | chebyshev = .true.
14 | /
15 | &physical_controls_namelist
16 | rotation = .True.
17 | magnetism = .true.
18 | viscous_heating = .false.
19 | ohmic_heating = .false.
20 | /
21 | &temporal_controls_namelist
22 | max_time_step = 1.0d-4
23 | max_iterations = 1
24 | alpha_implicit = 0.50001d0
25 | checkpoint_interval = 500000
26 | quicksave_interval = 1000000
27 | num_quicksaves = -1
28 | cflmin = 0.4d0
29 | cflmax = 0.6d0
30 | /
31 | &io_controls_namelist
32 | /
33 | &output_namelist
34 | full3d_values = 501,801,802,803
35 | full3d_frequency = 1
36 | /
37 |
38 | &Boundary_Conditions_Namelist
39 | no_slip_boundaries = .true.
40 | strict_L_Conservation = .false.
41 | T_Top = 0.0d0
42 | T_Bottom = 1.0d0
43 | fix_tvar_top = .true.
44 | fix_tvar_bottom = .true.
45 | /
46 | &Initial_Conditions_Namelist
47 | init_type = 8 ! File init
48 | t_init_file = 'bench_t_init'
49 | magnetic_init_type = 8 ! File init
50 | c_init_file = 'bench_c_init'
51 | a_init_file = 'bench_a_init'
52 | /
53 | &Test_Namelist
54 | /
55 | &Reference_Namelist
56 | Ekman_Number = 1.0d-3
57 | Rayleigh_Number = 1.0d5
58 | Prandtl_Number = 1.0d0
59 | Magnetic_Prandtl_Number = 5.0d0
60 | reference_type = 1
61 | heating_type = 0 ! No heating
62 | gravity_power = 1.0d0 ! g ~ radius
63 | /
64 | &Transport_Namelist
65 | /
66 |
--------------------------------------------------------------------------------
/tests/unit_tests/SHT/expected_output.out:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////
2 | Initializating Rayleigh...
3 |
4 | -- Initalizing MPI...
5 | ---- Specified parameters:
6 | ---- NCPU : 4
7 | ---- NPROW : 2
8 | ---- NPCOL : 2
9 | -- MPI initialized.
10 |
11 |
12 | -- Initializing Chebyshev Grid...
13 | ---- Specified parameters ----
14 | ---- N_R : 48
15 | ---- N_THETA : 64
16 | ---- Ell_MAX : 41
17 | ---- R_MIN : 5.38462E-01
18 | ---- R_MAX : 1.53846E+00
19 | ---- Chebyshev Domains : 1
20 |
21 | Domain 1
22 | Grid points : 48
23 | Dealiased Polynomials : 32
24 | Domain Lower Bound : 5.38462E-01
25 | Domain Upper Bound : 1.53846E+00
26 |
27 | -- Grid initialized.
28 |
29 | Initiating library function tests.
30 |
31 | ////////////////////////////////////////////////////////////
32 | Test Legendre Transform: single mode, forward/inverse LT
33 |
34 | Using tolerance = 1.0000000000000000E-010
35 |
36 | Spec -> Phys result = PASSING
37 | Spec -> Phys -> Spec result = PASSING
38 |
39 | ////////////////////////////////////////////////////////////
40 | Test Legendre Transform: single mode, loop over forward/inverse LT
41 |
42 | Using tolerance = 1.0000000000000000E-010
43 | Completed number of loops = 10
44 |
45 | Spec -> Phys -> Spec -> ... result = PASSING
46 |
47 | ////////////////////////////////////////////////////////////
48 | Test Legendre Transform: all modes unit amplitude, loop over forward/inverse LT
49 |
50 | Using tolerance = 1.0000000000000000E-010
51 | Completed number of loops = 10
52 |
53 | Spec -> Phys -> Spec -> ... result = PASSING
54 |
55 | ////////////////////////////////////////////////////////////
56 | Test Legendre Transforms, FFT, and transpose
57 |
58 | Using tolerance = 1.0000000000000000E-010
59 | Completed number of loops = 10
60 |
61 | LT/FFT/transpose result = PASSING
62 |
63 |
--------------------------------------------------------------------------------
/tests/unit_tests/SHT/main_input:
--------------------------------------------------------------------------------
1 |
2 | &problemsize_namelist
3 | n_r = 48
4 | n_theta = 64
5 | aspect_ratio = 0.35d0
6 | shell_depth = 1.0d0
7 | /
8 | &numerical_controls_namelist
9 | /
10 | &physical_controls_namelist
11 | /
12 | &temporal_controls_namelist
13 | /
14 | &io_controls_namelist
15 | /
16 | &output_namelist
17 | /
18 | &Boundary_Conditions_Namelist
19 | /
20 | &Initial_Conditions_Namelist
21 | /
22 | &Test_Namelist
23 | test_mode = .true.
24 | test_legendre = .true.
25 | test_full_sht = .true.
26 | ntest_transform_loops = 10
27 | /
28 | &Reference_Namelist
29 | /
30 | &Transport_Namelist
31 | /
32 |
--------------------------------------------------------------------------------