{"id":25004995,"url":"https://github.com/projecttorreypines/fusionmaterials.jl","last_synced_at":"2026-01-21T11:07:45.620Z","repository":{"id":254167528,"uuid":"442613153","full_name":"ProjectTorreyPines/FusionMaterials.jl","owner":"ProjectTorreyPines","description":"Library of materials used in fusion applications","archived":false,"fork":false,"pushed_at":"2025-04-02T19:26:47.000Z","size":717,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-07T10:24:05.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://projecttorreypines.github.io/FusionMaterials.jl/dev","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProjectTorreyPines.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-12-28T23:56:27.000Z","updated_at":"2025-04-21T08:09:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"84f27f11-7b64-4e39-8ef7-7097269387b8","html_url":"https://github.com/ProjectTorreyPines/FusionMaterials.jl","commit_stats":null,"previous_names":["projecttorreypines/fusionmaterials.jl"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ProjectTorreyPines/FusionMaterials.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectTorreyPines%2FFusionMaterials.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectTorreyPines%2FFusionMaterials.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectTorreyPines%2FFusionMaterials.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectTorreyPines%2FFusionMaterials.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProjectTorreyPines","download_url":"https://codeload.github.com/ProjectTorreyPines/FusionMaterials.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProjectTorreyPines%2FFusionMaterials.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269502567,"owners_count":24427790,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-05T00:09:41.267Z","updated_at":"2026-01-21T11:07:45.565Z","avatar_url":"https://github.com/ProjectTorreyPines.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FusionMaterials.jl\n\nThis is a pure-Julia interface to the data from the neutronics_material_maker Python package\nhttps://github.com/fusion-energy/neutronics_material_maker\n\n## Add a new material \n\nProperties of each material can be accessed by calling the `Material()` function with the material name **as a symbol** passed as the function argument. \n\nTo add a new material, first add a function to `src/materials.jl` called Material with the function argument being your material's name. In the body of the function, assign the material's name (as a string, all lowercase, and with any spaces filled by underscores), type (as a list containing each possible IMAS BuildLayerType the material could be assigned to), density (in `kg/m^3`) and unit cost (in US dollars per kilogram). Include a comment providing a link to the source from which the unit cost was taken. \n\nBelow is an example of a complete Material function for a non-superconductor material (more about superconductor materials below): \n\n```julia \nfunction Material(::Type{Val{:graphite}};)\n\tmat = Material()\n\tmat.name = \"graphite\" # string with no spaces\n\tmat.type = [IMAS._wall_] # list of allowable layer types for this material\n\tmat.density = 1.7e3 # in kg/m^3\n\tmat.unit_cost = 1.3 # in US$/kg, include source as a comment # source: https://businessanalytiq.com/procurementanalytics/index/graphite-price-index/\n\treturn mat\nend\n```\n\nIf the material is a superconductor that is meant to be assigned to magnet-type layers, additional characteristics need to be defined. First, add the relevant critical current density scaling for the chosen superconductor material as a function in `FusionMaterials/src/jcrit.jl`. Then, assign the technology parameters for the material (temperature, steel fraction, void fraction, and ratio of superconductor to copper) to their respective fields in coil_tech within the coil_technology function in `FUSE/src/technology.jl`. Finally, call the critical current density scaling function within the newly written Material function in `materials.jl` and assign the output critical current density and critical magnetic field to the material object. The coil_tech object should be passed as an argument to the Material function, along with the external B field, and used to calculate the critical current density and critical magnetic field. \n\nBelow is an example of a complete superconductor Material function: \n\n```julia \nfunction Material(::Type{Val{:rebco}}; coil_tech::Union{Missing, IMAS.build__pf_active__technology, IMAS.build__oh__technology, IMAS.build__tf__technology} = missing, Bext::Union{Real, Missing} = missing)\n\tmat = Material()\n\tmat.name = \"rebco\"\n\tmat.type = [IMAS._tf_, IMAS._oh_]\n\tmat.density = 6.3\n\tmat.unit_cost = 7000\n\n\tif !ismissing(coil_tech)\n\t\tJcrit_SC, Bext_Bcrit_ratio = ReBCO_Jcrit(Bext, coil_tech.thermal_strain + coil_tech.JxB_strain, coil_tech.temperature) # A/m^2\n\t\tfc = fraction_conductor(coil_tech)\n\t\tmat.critical_current_density = Jcrit_SC * fc\n\t\tmat.critical_magnetic_field = Bext / Bext_Bcrit_ratio\n\tend\n\n\treturn mat\nend\n```\n\nThe function `ReBCO_Jcrit` is the critical current density function for this material. \n\nYou can then access the parameters of your material by calling the function you've created. For example, access the material's density anywhere in FUSE by calling: \n\n```julia\nmy_mat_density = Material(:my_mat).density\n```\n\n## Online documentation\nFor more details, see the [online documentation](https://projecttorreypines.github.io/FusionMaterials.jl/dev).\n\n![Docs](https://github.com/ProjectTorreyPines/FusionMaterials.jl/actions/workflows/make_docs.yml/badge.svg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojecttorreypines%2Ffusionmaterials.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojecttorreypines%2Ffusionmaterials.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojecttorreypines%2Ffusionmaterials.jl/lists"}