{"id":13288266,"url":"https://github.com/tboudreaux/PolytropicStellarModel","last_synced_at":"2025-03-10T05:32:21.129Z","repository":{"id":77731622,"uuid":"235449984","full_name":"tboudreaux/PolytropicStellarModel","owner":"tboudreaux","description":"Simple Polytropic Stellar Model","archived":false,"fork":false,"pushed_at":"2022-09-23T15:23:58.000Z","size":6858,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-13T14:22:25.748Z","etag":null,"topics":["astrophysics","numerical-integration","stellar"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tboudreaux.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSES","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-21T21:59:18.000Z","updated_at":"2023-06-23T17:59:40.000Z","dependencies_parsed_at":"2023-03-01T14:46:25.758Z","dependency_job_id":null,"html_url":"https://github.com/tboudreaux/PolytropicStellarModel","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tboudreaux%2FPolytropicStellarModel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tboudreaux%2FPolytropicStellarModel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tboudreaux%2FPolytropicStellarModel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tboudreaux%2FPolytropicStellarModel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tboudreaux","download_url":"https://codeload.github.com/tboudreaux/PolytropicStellarModel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242798358,"owners_count":20186882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrophysics","numerical-integration","stellar"],"created_at":"2024-07-29T16:56:17.352Z","updated_at":"2025-03-10T05:32:21.123Z","avatar_url":"https://github.com/tboudreaux.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"Polytrope Project Numerical Integrator\nThomas M. Boudreaux\n===================\n\nCompilation Instructions:\n\t- To compile $ make\n\t- There are two compile time arguemnts which may be set\n\t\t- DATADIR will set where that data files are written to (will make the folder to)\n\t\t- PSTANOT will determine if the output is also written to standard output\n\t\t\t- This is in addition to dumping to a dat file which will always happen\n\t\t\t- 0 to supress standard output\n\t\t\t- 1 to print to standard output\n\t\t- Examples of use\n\t\t\t- $ make PSTANOT=1 DATADIR=results\n\t\t\t\t- this will print to standard out and save binaries in a folder called results\n\t\t\t- $ make\n\t\t\t\t- this will use the default values of PSTANOT=0 and DATADIR=data\n\nRun Time Instructions:\n\t- there are two executable files, integrate-nonDegenerate and integrate-degenerate\n\t\t- running the nonDegenerate file with integrate a polytrope\n\t\t- running the degenerate model will integrate a white dwarf model\n\t- To run $ ./integrate-[non][d/D]generate [n/theta_c] [h] [xi0] [xif] [itr]\n  \t\t    n/theta_c[float]       - polytroic index(non degenerate case)/central density (degenerate case)\n  \t\t    h[float]       - integration step size\n  \t \t    xi0[float]     - initial value of xi to start at\n  \t  \t    xif[float]     - value of xi to integrate too\n  \t\t    [itr[int]]       - number of terms in power serise to use to approximation theta(xi=Xi0) only used in non degenerate case\n\nData File Format Specs:\n\t- After running either executable a file will be saved to whatever data director was spesificed at compile\n\t  time, by default this is a directory called \"data\"\n\t\t- That file will have the input polytropic index in it along with the either being degenerate or non degenerate\n\t\t- The file has a header and a body\n\t\t\t- The header is an set of ASCII key value pairs\n\t\t\t- The body is a byte stream of c++ type doubles\n\t\t\t- The file starts with \"\u003e\u003e HEADER\"\n\t\t\t- The header continues until the line \"\u003e\u003e BODY\"\n\t\t\t\t- After this line the next line is the byte stream\n\nData View Instructions:\n\t- To generate graphs of the data:\n\t\t- Use the included script \u003cpyUtils/ViewCOutput.py\u003e\n\t\t\t- $ python pyUtils/ViewCOutput.py \u003cpath/to/fileA\u003e \u003cpath/to/fileB\u003e\n\t\t\t- the script can plot either one data file or multiple\n\t\t\t\t- If plotting multiple the script can place them all on one figure\n\t\t\t\t  or break them out into seperate figures\n\t\t\t- Command line options can be shown by running\n\t\t\t\t- $ python pyUtils.py --help\n\t- To Get the value of Xi1\n\t\t- Use the uncluded script \u003cpyUtils/getXi1.py\u003e\n\t\t\t- $ python getXi1.py \u003cpath/to/file\u003e\n\t\t- Command line options can be shown by running\n\t\t\t- $ python getXi1.py --help\n\n\t- If you want to generate the figures of all the dataruns on seperate plots use something like from the pyUtils directory\n\t\t- $ ls data/*.dat | awk '{split($0,a,\"/\"); print a[2]}' | xargs -I{} ./ViewCOutput.py data/{} -o Figures/Multi_{}.pdf\n\nPhysical Scaling quantities:\n\t- To generate the physical scalings from xi, theta, and dtheta use the python script \u003cpyUtils/convertToPhysical.py\u003e\n\t\t- $ python pyUtils/convertToPhysical.py \u003cpath/to/dat/file\u003e\n\t\t\t- use --help to see command line options\n\t- To plot the physical quantities use the python script \u003cpyUtils/plotPhysical.py\u003e\n\t\t- $ python pyUtils/plotPhysical.py \u003cpath/to/physically/scaled/data/file\u003e --output \u003cpath/to/save/figure\u003e\n\t\t\t- use --help to see command line options\n\nTests:\n\t- To test the code use the script \u003ctests/testLaneEmden.sh\u003e\n\t\t- To do this you have to have compiled the integrator and had DATADIR=data (or change the path in the python file in tests)\n\t\t- This script will integrate a polytrope of n=1 from 0.00001 to 4 xi with a step size of 0.00001 \n\t\t- It will then use an the resultant xi array from that integration to compute the exact solution in the n=1 case\n\t\t\t- sin(xi)/xi\n\t\t- Finally it will take the arithmatic mean of the differences\n\t\t\t- Smaller values of the this imply that the integrator is returning a solution close to the exact solution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftboudreaux%2FPolytropicStellarModel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftboudreaux%2FPolytropicStellarModel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftboudreaux%2FPolytropicStellarModel/lists"}