-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ProjectTorreyPines/touchups
Touchups
- Loading branch information
Showing
19 changed files
with
311 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
margin = 180 | ||
always_for_in = true | ||
for_in_replacement = "in" | ||
annotate_untyped_fields_with_any = false | ||
whitespace_in_kwargs = false | ||
always_use_return = true | ||
format_docstrings = true | ||
remove_extra_newlines = false | ||
trailing_comma = false | ||
join_lines_based_on_source = true | ||
separate_kwargs_with_semicolon = true | ||
whitespace_ops_in_indices = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: CompatHelper | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
CompatHelper: | ||
uses: ProjectTorreyPines/GitHubActionsWorkflows/.github/workflows/compat_helper.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: TagBot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: | ||
inputs: | ||
lookback: | ||
default: "3" | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: write | ||
deployments: read | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
pull-requests: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
jobs: | ||
TagBot: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JuliaRegistries/TagBot@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key | ||
ssh: ${{ secrets.DOCUMENTER_KEY }} | ||
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Make Docs | ||
|
||
on: | ||
pull_request: | ||
branches: ["master"] | ||
push: | ||
branches: | ||
- master | ||
tags: '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
make_docs: | ||
uses: ProjectTorreyPines/GitHubActionsWorkflows/.github/workflows/make_docs.yml@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,37 @@ | ||
# Files generated by invoking Julia with --code-coverage | ||
*.jl.cov | ||
*.jl.*.cov | ||
|
||
# Files generated by invoking Julia with --track-allocation | ||
*.jl.mem | ||
|
||
# System-specific files and directories generated by the BinaryProvider and BinDeps packages | ||
# They contain absolute paths specific to the host computer, and so should not be committed | ||
deps/deps.jl | ||
deps/build.log | ||
deps/downloads/ | ||
deps/usr/ | ||
deps/src/ | ||
|
||
# Build artifacts for creating documentation generated by the Documenter package | ||
docs/build/ | ||
docs/site/ | ||
docs/src/api.md | ||
|
||
# PackageCompiler | ||
build/ | ||
|
||
# File generated by Pkg, the package manager, based on a corresponding Project.toml | ||
# It records a fixed state of all packages used by the project. As such, it should not be | ||
# committed for packages, but should be committed for applications that require a static | ||
# environment. | ||
Manifest.toml | ||
|
||
# editors | ||
/.vscode/* | ||
.ipynb_checkpoints | ||
.DS_Store | ||
|
||
# temp/test files | ||
test.json | ||
asd.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# BalanceOfPlantSurrogate.jl Notice | ||
|
||
The purpose of this NOTICE file is to provide legal notices and acknowledgments that must be displayed to users in any derivative works or distributions. This file does not alter the terms of the Apache 2.0 license that governs the use and distribution of the BalanceOfPlantSurrogate.jl package. | ||
|
||
## Development Attribution | ||
|
||
BalanceOfPlantSurrogate.jl was originally developed under the FUSE project by the Magnetic Fusion Energy group at General Atomics. | ||
|
||
## Citation | ||
|
||
If this software contributes to an academic publication, please cite it as follows: | ||
|
||
@article{meneghini2024fuse, | ||
author = {Meneghini, O. and Slendebroek, T. and Lyons, B.C. and McLaughlin, K. and McClenaghan, J. and Stagner, L. and Harvey, J. and Neiser, T.F. and Ghiozzi, A. and Dose, G. and Guterl, J. and Zalzali, A. and Cote, T. and Shi, N. and Weisberg, D. and Smith, S.P. and Grierson, B.A. and Candy, J.}, | ||
doi = {10.48550/arXiv.2409.05894}, | ||
journal = {arXiv}, | ||
title = {{FUSE (Fusion Synthesis Engine): A Next Generation Framework for Integrated Design of Fusion Pilot Plants}}, | ||
year = {2024} | ||
} | ||
|
||
## Trademark Notice | ||
|
||
The names "General Atomics", and any associated logos or images, are trademarks of General Atomics. Use of these trademarks without prior written consent from General Atomics is strictly prohibited. Users cannot imply endorsement by General Atomics or contributors to the project simply because the project is part of their work. | ||
|
||
## Copyright | ||
|
||
Copyright (c) 2024 General Atomics | ||
|
||
## Version | ||
|
||
**Version: v2.1** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# BalanceOfPlantSurrogate | ||
# BalanceOfPlantSurrogate.jl | ||
|
||
The BalanceOfPlantSurrogate is a surogate model to the FUSE.ActorBalanceOfPlant actor in FUSE, this is done by simple interpolate/extrapolate of a hypercube | ||
The BalanceOfPlantSurrogate is a surogate model to the FUSE.ActorBalanceOfPlant actor in FUSE, this is done by simple interpolate/extrapolate of a hypercube. | ||
|
||
The data generation is done inside the ```BalanceOfPlantSurrogate/src/data``` folder , checkout the notebook in that folder! | ||
|
||
To run the surogate model:: | ||
To run the surogate model: | ||
|
||
```julia | ||
using BalanceOfPlantSurrogate | ||
|
||
bop_sur = BalanceOfPlantSurrogate.BOPSurogate(:rankine) | ||
total_heat_load = 5e8 | ||
breeder_heat_load = 4e8 | ||
divertor_heat_load = 0.5e8 | ||
plant_efficiency = BalanceOfPlantSurrogate.predict_thermal_efficiency(bop_sur, total_heat_load, breeder_heat_load/total_heat_load, divertor_heat_load / (total_heat_load - breeder_heat_load)) | ||
BOP = BalanceOfPlantSurrogate.BOPSurogate(:rankine) # :rankine or :brayton | ||
breeder_heat_load = 5e8 | ||
divertor_heat_load = 4e8 | ||
wall_heat_load = 0.5e8 | ||
plant_efficiency = BOP(breeder_heat_load, divertor_heat_load, wall_heat_load) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[deps] | ||
BalanceOfPlantSurrogate = "001e48cb-5a1e-4e3c-a5d4-cdc3aa14f3de" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Documenter, BalanceOfPlantSurrogate | ||
|
||
# Call functions | ||
open(joinpath(@__DIR__, "src/api.md"), "w") do f | ||
println(f, "# API Reference\n") | ||
for page in keys(BalanceOfPlantSurrogate.document) | ||
if page == :Expressions | ||
continue | ||
end | ||
println(f, "## $page\n") | ||
println(f, "```@docs") | ||
for item in BalanceOfPlantSurrogate.document[page] | ||
println(f, "$item") | ||
end | ||
println(f, "```") | ||
end | ||
end | ||
|
||
makedocs(; | ||
modules=[BalanceOfPlantSurrogate], | ||
format=Documenter.HTML(), | ||
sitename="BalanceOfPlantSurrogate", | ||
checkdocs=:none, | ||
pages=["index.md", "api.md", "License" => "license.md", "Notice" => "notice.md"] | ||
) | ||
|
||
# Deploy docs | ||
# This function deploys the documentation to the gh-pages branch of the repository. | ||
# The main documentation that will be hosted on | ||
# https://projecttorreypines.github.io/BalanceOfPlantSurrogate.jl/stable | ||
# will be built from latest release tagged with a version number. | ||
# The development documentation that will be hosted on | ||
# https://projecttorreypines.github.io/BalanceOfPlantSurrogate.jl/dev | ||
# will be built from the latest commit on the chosen devbranch argument below. | ||
# For testing purposes, the devbranch argument can be set to WIP branch like "docs". | ||
# While merging with master, the devbranch argument should be set to "master". | ||
deploydocs(; | ||
repo="github.com/ProjectTorreyPines/BalanceOfPlantSurrogate.jl.git", | ||
target="build", | ||
branch="gh-pages", | ||
devbranch="master", | ||
versions=["stable" => "v^", "v#.#"] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../NOTICE.md |
Oops, something went wrong.