{"action":"created","comment":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/221774425","pull_request_review_id":160507037,"id":221774425,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTc3NDQyNQ==","diff_hunk":"@@ -0,0 +1,207 @@\n+// Distributed under the MIT License.\n+// See LICENSE.txt for details.\n+\n+#pragma once\n+\n+#include <limits>\n+\n+#include \"DataStructures/DataBox/DataBoxTag.hpp\"\n+#include \"DataStructures/DataBox/Prefixes.hpp\"\n+#include \"DataStructures/Tensor/TypeAliases.hpp\"\n+#include \"NumericalAlgorithms/Interpolation/BarycentricRational.hpp\"\n+#include \"Options/Options.hpp\"\n+#include \"PointwiseFunctions/Hydro/Tags.hpp\"  // IWYU pragma: keep\n+#include \"Utilities/MakeArray.hpp\"            // IWYU pragma: keep\n+#include \"Utilities/TMPL.hpp\"\n+#include \"Utilities/TaggedTuple.hpp\"\n+\n+/// \\cond\n+namespace PUP {\n+class er;\n+}  // namespace PUP\n+/// \\endcond\n+\n+namespace grmhd {\n+namespace Solutions {\n+\n+/*!\n+ * \\brief Bondi-Michel accretion with superposed magnetic field in Schwarzchild\n+ * spacetime.\n+ *\n+ * Modulo the magnetic field, an analytic solution to the 3-D GrMhd system.\n+ * The user specifies the sonic radius \\f$r_c\\f$ and sonic rest mass density\n+ * \\f$\\rho_c\\f$, which are the radius and rest mass density at the sonic point,\n+ * the radius at which the fluid's eulerian velocity as seen by a distant\n+ * observer overtakes its sound speed. These quantities can be related to the\n+ * sound speed at infinity. In the case of the interstellar medium, the sound\n+ * speed is \\f$\\approx 10^{-4}\\f$, which results in a sonic radius of\n+ * \\f$\\approx 10^8 M\\f$ for \\f$\\Gamma \\neq 5/3\\f$ (Rezzola and Zanotti, 2013).\n+ *\n+ * The user also specifies the max radius, which is useful if one does not want\n+ * to extend the domain up to the remote sonic point. Additionally specified by\n+ * the user are the adiabatic exponent \\f$\\Gamma\\f$, and the magnitude of the\n+ * magnetic field \\f$B\\f$.\n+ * In Schwarschild-Cartesian coordinates \\f$(x, y, z)\\f$, where\n+ * \\f$ r = \\sqrt{x^2 + y^2 + z^2}\\f$, the superposed magnetic field is\n+ *\n+ * \\f{align*}\n+ * B_x(\\vec{x},t) &= \\frac{B x}{r^3 \\sqrt{1 + 2/r}} \\\\\n+ * B_y(\\vec{x},t) &= \\frac{B y}{r^3 \\sqrt{1 + 2/r}} \\\\\n+ * B_z(\\vec{x},t) &= \\frac{B z}{r^2 \\sqrt{1 + 2/r}}\n+ * \\f}","path":"src/PointwiseFunctions/AnalyticSolutions/GrMhd/BondiMichelMHD.hpp","position":51,"original_position":51,"commit_id":"4b33d1361658f4d33c6f6ac8de8b8b8a273206f9","original_commit_id":"4b33d1361658f4d33c6f6ac8de8b8b8a273206f9","user":{"login":"ffoucart","id":5659042,"node_id":"MDQ6VXNlcjU2NTkwNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/5659042?v=4","gravatar_id":"","url":"https://api.github.com/users/ffoucart","html_url":"https://github.com/ffoucart","followers_url":"https://api.github.com/users/ffoucart/followers","following_url":"https://api.github.com/users/ffoucart/following{/other_user}","gists_url":"https://api.github.com/users/ffoucart/gists{/gist_id}","starred_url":"https://api.github.com/users/ffoucart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffoucart/subscriptions","organizations_url":"https://api.github.com/users/ffoucart/orgs","repos_url":"https://api.github.com/users/ffoucart/repos","events_url":"https://api.github.com/users/ffoucart/events{/privacy}","received_events_url":"https://api.github.com/users/ffoucart/received_events","type":"User","site_admin":false},"body":"The magnetic field has to satisfy two conditions:\r\n\r\n(1) It is radial, so that it does not modify the steady-state solution for pure hydro accretion\r\n(2) It satisfies div(B)=0.\r\n\r\nThat leads to the solution\r\n\r\n* \\f{align*}\r\n * B^x(\\vec{x},t) &= \\frac{B0*x}{r^3 \\sqrt{1 + 2/r}} \\\\\r\n * B^y(\\vec{x},t) &= \\frac{B0*y}{r^3 \\sqrt{1 + 2/r}} \\\\\r\n * B^z(\\vec{x},t) &= \\frac{B0*z}{r^3 \\sqrt{1 + 2/r}}\r\n * \\f}\r\n\r\nas in lines 257-264 of the bitbucket code, which is slightly different from the one in your comments. B0 is a free parameter setting the strenght of the B-field.\r\n[The metric terms will be coordinate dependent, so this assumes that you use the same setup as in the bitbucket code... otherwise, just make sure that div(B)=0 ]","created_at":"2018-10-01T22:17:22Z","updated_at":"2018-10-01T22:17:22Z","html_url":"https://github.com/sxs-collaboration/spectre/pull/1010#discussion_r221774425","pull_request_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/221774425"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/1010#discussion_r221774425"},"pull_request":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010"}},"in_reply_to_id":221697134},"pull_request":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010","id":219277084,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Mjc3MDg0","html_url":"https://github.com/sxs-collaboration/spectre/pull/1010","diff_url":"https://github.com/sxs-collaboration/spectre/pull/1010.diff","patch_url":"https://github.com/sxs-collaboration/spectre/pull/1010.patch","issue_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1010","number":1010,"state":"open","locked":false,"title":"Add Bondi-Michel MHD solution","user":{"login":"gsb76","id":27026354,"node_id":"MDQ6VXNlcjI3MDI2MzU0","avatar_url":"https://avatars3.githubusercontent.com/u/27026354?v=4","gravatar_id":"","url":"https://api.github.com/users/gsb76","html_url":"https://github.com/gsb76","followers_url":"https://api.github.com/users/gsb76/followers","following_url":"https://api.github.com/users/gsb76/following{/other_user}","gists_url":"https://api.github.com/users/gsb76/gists{/gist_id}","starred_url":"https://api.github.com/users/gsb76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsb76/subscriptions","organizations_url":"https://api.github.com/users/gsb76/orgs","repos_url":"https://api.github.com/users/gsb76/repos","events_url":"https://api.github.com/users/gsb76/events{/privacy}","received_events_url":"https://api.github.com/users/gsb76/received_events","type":"User","site_admin":false},"body":"## Proposed changes\r\n\r\nBondi-Michel solution with a superposed radial magnetic field.\r\nAdapted from section 11.4 in Rezzola's text, as well as from [the bitbucket code](https://bitbucket.org/lawrence_kidder/dg-charm/src/2cfdadab6a86d1369698597280f895a0e1292f92/EvolutionSystems/RelativisticMHD/RelativisticMHDSolutions/BondiAccretionMHD.cpp?at=feature%2Frelativistic_euler).\r\n\r\n### Types of changes:\r\n\r\n- [ ] Bugfix\r\n- [ ] New feature\r\n\r\n### Component:\r\n\r\n- [ ] Code\r\n- [ ] Documentation\r\n- [ ] Build system\r\n- [ ] Continuous integration\r\n\r\n### Code review checklist\r\n\r\n- [ ] The PR passes all checks, including unit tests, `clang-tidy` and `IWYU`. For\r\n  instructions on how to perform the CI checks locally refer to the [Dev guide\r\n  on the Travis CI](https://spectre-code.org/travis_guide.html).\r\n- [ ] The code is documented and the documentation renders correctly. Run `make doc`\r\n  to generate the documentation locally into `BUILD_DIR/docs/html`. Then open\r\n  `index.html`.\r\n- [ ] The code follows the stylistic and code quality guidelines listed in the\r\n  [code review guide](https://spectre-code.org/code_review_guide.html).\r\n\r\n### Further comments\r\n\r\n<!--\r\nIf this is a relatively large or complex change, kick off the discussion by\r\nexplaining why you chose the solution you did and what alternatives you\r\nconsidered, etc...\r\n-->\r\n","created_at":"2018-10-01T07:03:54Z","updated_at":"2018-10-01T22:17:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78d88330d32e1e7f591e4d1a2517099f390f096f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010/commits","review_comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010/comments","review_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1010/comments","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/4b33d1361658f4d33c6f6ac8de8b8b8a273206f9","head":{"label":"gsb76:gab_add_bondi-michel_accretion","ref":"gab_add_bondi-michel_accretion","sha":"4b33d1361658f4d33c6f6ac8de8b8b8a273206f9","user":{"login":"gsb76","id":27026354,"node_id":"MDQ6VXNlcjI3MDI2MzU0","avatar_url":"https://avatars3.githubusercontent.com/u/27026354?v=4","gravatar_id":"","url":"https://api.github.com/users/gsb76","html_url":"https://github.com/gsb76","followers_url":"https://api.github.com/users/gsb76/followers","following_url":"https://api.github.com/users/gsb76/following{/other_user}","gists_url":"https://api.github.com/users/gsb76/gists{/gist_id}","starred_url":"https://api.github.com/users/gsb76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsb76/subscriptions","organizations_url":"https://api.github.com/users/gsb76/orgs","repos_url":"https://api.github.com/users/gsb76/repos","events_url":"https://api.github.com/users/gsb76/events{/privacy}","received_events_url":"https://api.github.com/users/gsb76/received_events","type":"User","site_admin":false},"repo":{"id":94911327,"node_id":"MDEwOlJlcG9zaXRvcnk5NDkxMTMyNw==","name":"spectre","full_name":"gsb76/spectre","private":false,"owner":{"login":"gsb76","id":27026354,"node_id":"MDQ6VXNlcjI3MDI2MzU0","avatar_url":"https://avatars3.githubusercontent.com/u/27026354?v=4","gravatar_id":"","url":"https://api.github.com/users/gsb76","html_url":"https://github.com/gsb76","followers_url":"https://api.github.com/users/gsb76/followers","following_url":"https://api.github.com/users/gsb76/following{/other_user}","gists_url":"https://api.github.com/users/gsb76/gists{/gist_id}","starred_url":"https://api.github.com/users/gsb76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsb76/subscriptions","organizations_url":"https://api.github.com/users/gsb76/orgs","repos_url":"https://api.github.com/users/gsb76/repos","events_url":"https://api.github.com/users/gsb76/events{/privacy}","received_events_url":"https://api.github.com/users/gsb76/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gsb76/spectre","description":null,"fork":true,"url":"https://api.github.com/repos/gsb76/spectre","forks_url":"https://api.github.com/repos/gsb76/spectre/forks","keys_url":"https://api.github.com/repos/gsb76/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsb76/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsb76/spectre/teams","hooks_url":"https://api.github.com/repos/gsb76/spectre/hooks","issue_events_url":"https://api.github.com/repos/gsb76/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/gsb76/spectre/events","assignees_url":"https://api.github.com/repos/gsb76/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/gsb76/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/gsb76/spectre/tags","blobs_url":"https://api.github.com/repos/gsb76/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsb76/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsb76/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsb76/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsb76/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/gsb76/spectre/languages","stargazers_url":"https://api.github.com/repos/gsb76/spectre/stargazers","contributors_url":"https://api.github.com/repos/gsb76/spectre/contributors","subscribers_url":"https://api.github.com/repos/gsb76/spectre/subscribers","subscription_url":"https://api.github.com/repos/gsb76/spectre/subscription","commits_url":"https://api.github.com/repos/gsb76/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsb76/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsb76/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsb76/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsb76/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/gsb76/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsb76/spectre/merges","archive_url":"https://api.github.com/repos/gsb76/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsb76/spectre/downloads","issues_url":"https://api.github.com/repos/gsb76/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/gsb76/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/gsb76/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/gsb76/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsb76/spectre/labels{/name}","releases_url":"https://api.github.com/repos/gsb76/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/gsb76/spectre/deployments","created_at":"2017-06-20T16:16:01Z","updated_at":"2017-06-20T16:16:03Z","pushed_at":"2018-10-01T06:56:53Z","git_url":"git://github.com/gsb76/spectre.git","ssh_url":"git@github.com:gsb76/spectre.git","clone_url":"https://github.com/gsb76/spectre.git","svn_url":"https://github.com/gsb76/spectre","homepage":null,"size":9332,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"sxs-collaboration:develop","ref":"develop","sha":"d9b17f202ac3c271bd3ee87d83f1198ee74bff4e","user":{"login":"sxs-collaboration","id":26882595,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODgyNTk1","avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"repo":{"id":87570510,"node_id":"MDEwOlJlcG9zaXRvcnk4NzU3MDUxMA==","name":"spectre","full_name":"sxs-collaboration/spectre","private":false,"owner":{"login":"sxs-collaboration","id":26882595,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODgyNTk1","avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/sxs-collaboration/spectre","description":"SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.","fork":false,"url":"https://api.github.com/repos/sxs-collaboration/spectre","forks_url":"https://api.github.com/repos/sxs-collaboration/spectre/forks","keys_url":"https://api.github.com/repos/sxs-collaboration/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sxs-collaboration/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sxs-collaboration/spectre/teams","hooks_url":"https://api.github.com/repos/sxs-collaboration/spectre/hooks","issue_events_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/sxs-collaboration/spectre/events","assignees_url":"https://api.github.com/repos/sxs-collaboration/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/sxs-collaboration/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/tags","blobs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/sxs-collaboration/spectre/languages","stargazers_url":"https://api.github.com/repos/sxs-collaboration/spectre/stargazers","contributors_url":"https://api.github.com/repos/sxs-collaboration/spectre/contributors","subscribers_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscribers","subscription_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscription","commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/sxs-collaboration/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/sxs-collaboration/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sxs-collaboration/spectre/merges","archive_url":"https://api.github.com/repos/sxs-collaboration/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sxs-collaboration/spectre/downloads","issues_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/sxs-collaboration/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/sxs-collaboration/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sxs-collaboration/spectre/labels{/name}","releases_url":"https://api.github.com/repos/sxs-collaboration/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/sxs-collaboration/spectre/deployments","created_at":"2017-04-07T17:28:20Z","updated_at":"2018-10-01T20:25:01Z","pushed_at":"2018-10-01T21:57:48Z","git_url":"git://github.com/sxs-collaboration/spectre.git","ssh_url":"git@github.com:sxs-collaboration/spectre.git","clone_url":"https://github.com/sxs-collaboration/spectre.git","svn_url":"https://github.com/sxs-collaboration/spectre","homepage":"","size":11220,"stargazers_count":28,"watchers_count":28,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":29,"mirror_url":null,"archived":false,"open_issues_count":147,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":29,"open_issues":147,"watchers":28,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/1010"},"issue":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1010"},"comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1010/comments"},"review_comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010/comments"},"review_comment":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1010/commits"},"statuses":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/4b33d1361658f4d33c6f6ac8de8b8b8a273206f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ffoucart"}}