Skip to content

Commit

Permalink
Merge pull request #120 from ProjectTorreyPines/chease_cocos_test_added
Browse files Browse the repository at this point in the history
All Ip, Bt configuration ods jsons added
  • Loading branch information
orso82 authored Sep 15, 2022
2 parents abc4824 + 059f12b commit 19488ec
Show file tree
Hide file tree
Showing 5 changed files with 364,023 additions and 0 deletions.
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

0 comments on commit 19488ec

Please sign in to comment.