Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Ip, Bt configuration ods jsons added #120

Merged
merged 3 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions examples/actors/CHEASE_COCOS_test.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "d59dd298-b8cd-4f93-bb48-4648997c8797",
"metadata": {},
"outputs": [],
"source": [
"using Revise\n",
"using FUSE\n",
"using Plots; gr();\n",
"global_logger(FUSE.logger);"
]
},
{
"cell_type": "markdown",
"id": "2595dce7-2a22-4622-8c46-145df30dc095",
"metadata": {},
"source": [
"### Runnning CHEASE on all configurations of the signs of Ip and Bt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5a022356-6927-4497-811f-a36a2b7dc3a7",
"metadata": {},
"outputs": [],
"source": [
"sample_dir = abspath(joinpath(@__DIR__,\"../../sample\"))\n",
"files = [joinpath(sample_dir,file) for file in readdir(sample_dir) if startswith(file,\"g\") && endswith(file,\".json\")]\n",
"act = FUSE.ParametersAllActors()\n",
"\n",
"for file in files\n",
" dd = IMAS.json2imas(file)\n",
" plot(dd.equilibrium,label=\"$(split(split(file,\"/\")[end],\".\")[1]) EQ\")\n",
" FUSE.ActorCHEASE(dd,act)\n",
" label = \"CHEASE EQ Bt = $(round(@ddtime(dd.equilibrium.vacuum_toroidal_field.b0),digits=2)) [T], Ip = $(round(dd.equilibrium.time_slice[].global_quantities.ip/1e6,digits=2)) [MA]\"\n",
" display(plot!(dd.equilibrium, label=label))\n",
"end"
]
}
],
"metadata": {
"@webio": {
"lastCommId": "d491c46a-d94c-4f3f-8b5c-22bdfc4639fb",
"lastKernelId": "989c4e44-7056-48f5-8ebb-993967a01c6b"
},
"kernelspec": {
"display_name": "Julia 1.7.3",
"language": "julia",
"name": "julia-1.7"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading