torax.sources package
Subpackages
- torax.sources.impurity_radiation_heat_sink package
- Submodules
- torax.sources.impurity_radiation_heat_sink.impurity_radiation_constant_fraction module
DynamicRuntimeParamsImpurityRadiationHeatSinkConstantFractionConfigImpurityRadiationHeatSinkConstantFractionConfig.fraction_of_total_power_densityImpurityRadiationHeatSinkConstantFractionConfig.build_dynamic_params()ImpurityRadiationHeatSinkConstantFractionConfig.build_source()ImpurityRadiationHeatSinkConstantFractionConfig.model_configImpurityRadiationHeatSinkConstantFractionConfig.model_func
radially_constant_fraction_of_Pin()
- torax.sources.impurity_radiation_heat_sink.impurity_radiation_heat_sink module
- torax.sources.impurity_radiation_heat_sink.impurity_radiation_mavrin_fit module
- Module contents
- torax.sources.tests package
- Submodules
- torax.sources.tests.bootstrap_current_source_test module
- torax.sources.tests.bremsstrahlung_heat_sink_test module
- torax.sources.tests.constant_fraction_impurity_radiation_heat_sink_test module
- torax.sources.tests.cyclotron_radiation_heat_sink_test module
CyclotronRadiationHeatSinkTestCyclotronRadiationHeatSinkTest.test_alpha_closed_form0()CyclotronRadiationHeatSinkTest.test_alpha_closed_form1()CyclotronRadiationHeatSinkTest.test_alpha_closed_form10()CyclotronRadiationHeatSinkTest.test_alpha_closed_form100()CyclotronRadiationHeatSinkTest.test_alpha_closed_form101()CyclotronRadiationHeatSinkTest.test_alpha_closed_form102()CyclotronRadiationHeatSinkTest.test_alpha_closed_form103()CyclotronRadiationHeatSinkTest.test_alpha_closed_form104()CyclotronRadiationHeatSinkTest.test_alpha_closed_form105()CyclotronRadiationHeatSinkTest.test_alpha_closed_form106()CyclotronRadiationHeatSinkTest.test_alpha_closed_form107()CyclotronRadiationHeatSinkTest.test_alpha_closed_form108()CyclotronRadiationHeatSinkTest.test_alpha_closed_form109()CyclotronRadiationHeatSinkTest.test_alpha_closed_form11()CyclotronRadiationHeatSinkTest.test_alpha_closed_form110()CyclotronRadiationHeatSinkTest.test_alpha_closed_form111()CyclotronRadiationHeatSinkTest.test_alpha_closed_form112()CyclotronRadiationHeatSinkTest.test_alpha_closed_form113()CyclotronRadiationHeatSinkTest.test_alpha_closed_form114()CyclotronRadiationHeatSinkTest.test_alpha_closed_form115()CyclotronRadiationHeatSinkTest.test_alpha_closed_form116()CyclotronRadiationHeatSinkTest.test_alpha_closed_form117()CyclotronRadiationHeatSinkTest.test_alpha_closed_form118()CyclotronRadiationHeatSinkTest.test_alpha_closed_form119()CyclotronRadiationHeatSinkTest.test_alpha_closed_form12()CyclotronRadiationHeatSinkTest.test_alpha_closed_form120()CyclotronRadiationHeatSinkTest.test_alpha_closed_form121()CyclotronRadiationHeatSinkTest.test_alpha_closed_form122()CyclotronRadiationHeatSinkTest.test_alpha_closed_form123()CyclotronRadiationHeatSinkTest.test_alpha_closed_form124()CyclotronRadiationHeatSinkTest.test_alpha_closed_form125()CyclotronRadiationHeatSinkTest.test_alpha_closed_form126()CyclotronRadiationHeatSinkTest.test_alpha_closed_form127()CyclotronRadiationHeatSinkTest.test_alpha_closed_form128()CyclotronRadiationHeatSinkTest.test_alpha_closed_form129()CyclotronRadiationHeatSinkTest.test_alpha_closed_form13()CyclotronRadiationHeatSinkTest.test_alpha_closed_form130()CyclotronRadiationHeatSinkTest.test_alpha_closed_form131()CyclotronRadiationHeatSinkTest.test_alpha_closed_form132()CyclotronRadiationHeatSinkTest.test_alpha_closed_form133()CyclotronRadiationHeatSinkTest.test_alpha_closed_form134()CyclotronRadiationHeatSinkTest.test_alpha_closed_form135()CyclotronRadiationHeatSinkTest.test_alpha_closed_form136()CyclotronRadiationHeatSinkTest.test_alpha_closed_form137()CyclotronRadiationHeatSinkTest.test_alpha_closed_form138()CyclotronRadiationHeatSinkTest.test_alpha_closed_form139()CyclotronRadiationHeatSinkTest.test_alpha_closed_form14()CyclotronRadiationHeatSinkTest.test_alpha_closed_form140()CyclotronRadiationHeatSinkTest.test_alpha_closed_form141()CyclotronRadiationHeatSinkTest.test_alpha_closed_form142()CyclotronRadiationHeatSinkTest.test_alpha_closed_form143()CyclotronRadiationHeatSinkTest.test_alpha_closed_form15()CyclotronRadiationHeatSinkTest.test_alpha_closed_form16()CyclotronRadiationHeatSinkTest.test_alpha_closed_form17()CyclotronRadiationHeatSinkTest.test_alpha_closed_form18()CyclotronRadiationHeatSinkTest.test_alpha_closed_form19()CyclotronRadiationHeatSinkTest.test_alpha_closed_form2()CyclotronRadiationHeatSinkTest.test_alpha_closed_form20()CyclotronRadiationHeatSinkTest.test_alpha_closed_form21()CyclotronRadiationHeatSinkTest.test_alpha_closed_form22()CyclotronRadiationHeatSinkTest.test_alpha_closed_form23()CyclotronRadiationHeatSinkTest.test_alpha_closed_form24()CyclotronRadiationHeatSinkTest.test_alpha_closed_form25()CyclotronRadiationHeatSinkTest.test_alpha_closed_form26()CyclotronRadiationHeatSinkTest.test_alpha_closed_form27()CyclotronRadiationHeatSinkTest.test_alpha_closed_form28()CyclotronRadiationHeatSinkTest.test_alpha_closed_form29()CyclotronRadiationHeatSinkTest.test_alpha_closed_form3()CyclotronRadiationHeatSinkTest.test_alpha_closed_form30()CyclotronRadiationHeatSinkTest.test_alpha_closed_form31()CyclotronRadiationHeatSinkTest.test_alpha_closed_form32()CyclotronRadiationHeatSinkTest.test_alpha_closed_form33()CyclotronRadiationHeatSinkTest.test_alpha_closed_form34()CyclotronRadiationHeatSinkTest.test_alpha_closed_form35()CyclotronRadiationHeatSinkTest.test_alpha_closed_form36()CyclotronRadiationHeatSinkTest.test_alpha_closed_form37()CyclotronRadiationHeatSinkTest.test_alpha_closed_form38()CyclotronRadiationHeatSinkTest.test_alpha_closed_form39()CyclotronRadiationHeatSinkTest.test_alpha_closed_form4()CyclotronRadiationHeatSinkTest.test_alpha_closed_form40()CyclotronRadiationHeatSinkTest.test_alpha_closed_form41()CyclotronRadiationHeatSinkTest.test_alpha_closed_form42()CyclotronRadiationHeatSinkTest.test_alpha_closed_form43()CyclotronRadiationHeatSinkTest.test_alpha_closed_form44()CyclotronRadiationHeatSinkTest.test_alpha_closed_form45()CyclotronRadiationHeatSinkTest.test_alpha_closed_form46()CyclotronRadiationHeatSinkTest.test_alpha_closed_form47()CyclotronRadiationHeatSinkTest.test_alpha_closed_form48()CyclotronRadiationHeatSinkTest.test_alpha_closed_form49()CyclotronRadiationHeatSinkTest.test_alpha_closed_form5()CyclotronRadiationHeatSinkTest.test_alpha_closed_form50()CyclotronRadiationHeatSinkTest.test_alpha_closed_form51()CyclotronRadiationHeatSinkTest.test_alpha_closed_form52()CyclotronRadiationHeatSinkTest.test_alpha_closed_form53()CyclotronRadiationHeatSinkTest.test_alpha_closed_form54()CyclotronRadiationHeatSinkTest.test_alpha_closed_form55()CyclotronRadiationHeatSinkTest.test_alpha_closed_form56()CyclotronRadiationHeatSinkTest.test_alpha_closed_form57()CyclotronRadiationHeatSinkTest.test_alpha_closed_form58()CyclotronRadiationHeatSinkTest.test_alpha_closed_form59()CyclotronRadiationHeatSinkTest.test_alpha_closed_form6()CyclotronRadiationHeatSinkTest.test_alpha_closed_form60()CyclotronRadiationHeatSinkTest.test_alpha_closed_form61()CyclotronRadiationHeatSinkTest.test_alpha_closed_form62()CyclotronRadiationHeatSinkTest.test_alpha_closed_form63()CyclotronRadiationHeatSinkTest.test_alpha_closed_form64()CyclotronRadiationHeatSinkTest.test_alpha_closed_form65()CyclotronRadiationHeatSinkTest.test_alpha_closed_form66()CyclotronRadiationHeatSinkTest.test_alpha_closed_form67()CyclotronRadiationHeatSinkTest.test_alpha_closed_form68()CyclotronRadiationHeatSinkTest.test_alpha_closed_form69()CyclotronRadiationHeatSinkTest.test_alpha_closed_form7()CyclotronRadiationHeatSinkTest.test_alpha_closed_form70()CyclotronRadiationHeatSinkTest.test_alpha_closed_form71()CyclotronRadiationHeatSinkTest.test_alpha_closed_form72()CyclotronRadiationHeatSinkTest.test_alpha_closed_form73()CyclotronRadiationHeatSinkTest.test_alpha_closed_form74()CyclotronRadiationHeatSinkTest.test_alpha_closed_form75()CyclotronRadiationHeatSinkTest.test_alpha_closed_form76()CyclotronRadiationHeatSinkTest.test_alpha_closed_form77()CyclotronRadiationHeatSinkTest.test_alpha_closed_form78()CyclotronRadiationHeatSinkTest.test_alpha_closed_form79()CyclotronRadiationHeatSinkTest.test_alpha_closed_form8()CyclotronRadiationHeatSinkTest.test_alpha_closed_form80()CyclotronRadiationHeatSinkTest.test_alpha_closed_form81()CyclotronRadiationHeatSinkTest.test_alpha_closed_form82()CyclotronRadiationHeatSinkTest.test_alpha_closed_form83()CyclotronRadiationHeatSinkTest.test_alpha_closed_form84()CyclotronRadiationHeatSinkTest.test_alpha_closed_form85()CyclotronRadiationHeatSinkTest.test_alpha_closed_form86()CyclotronRadiationHeatSinkTest.test_alpha_closed_form87()CyclotronRadiationHeatSinkTest.test_alpha_closed_form88()CyclotronRadiationHeatSinkTest.test_alpha_closed_form89()CyclotronRadiationHeatSinkTest.test_alpha_closed_form9()CyclotronRadiationHeatSinkTest.test_alpha_closed_form90()CyclotronRadiationHeatSinkTest.test_alpha_closed_form91()CyclotronRadiationHeatSinkTest.test_alpha_closed_form92()CyclotronRadiationHeatSinkTest.test_alpha_closed_form93()CyclotronRadiationHeatSinkTest.test_alpha_closed_form94()CyclotronRadiationHeatSinkTest.test_alpha_closed_form95()CyclotronRadiationHeatSinkTest.test_alpha_closed_form96()CyclotronRadiationHeatSinkTest.test_alpha_closed_form97()CyclotronRadiationHeatSinkTest.test_alpha_closed_form98()CyclotronRadiationHeatSinkTest.test_alpha_closed_form99()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search0()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search1()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search10()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search100()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search101()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search102()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search103()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search104()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search105()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search106()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search107()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search108()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search109()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search11()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search110()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search111()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search112()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search113()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search114()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search115()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search116()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search117()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search118()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search119()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search12()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search120()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search121()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search122()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search123()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search124()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search125()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search126()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search127()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search128()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search129()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search13()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search130()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search131()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search132()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search133()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search134()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search135()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search136()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search137()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search138()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search139()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search14()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search140()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search141()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search142()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search143()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search144()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search145()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search146()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search147()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search148()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search149()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search15()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search150()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search151()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search152()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search153()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search154()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search155()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search156()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search157()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search158()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search159()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search16()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search160()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search161()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search162()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search163()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search164()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search165()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search166()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search167()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search168()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search169()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search17()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search170()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search171()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search172()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search173()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search174()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search175()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search176()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search177()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search178()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search179()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search18()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search180()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search181()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search182()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search183()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search184()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search185()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search186()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search187()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search188()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search189()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search19()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search190()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search191()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search192()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search193()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search194()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search195()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search196()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search197()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search198()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search199()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search2()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search20()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search200()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search201()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search202()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search203()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search204()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search205()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search206()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search207()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search208()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search209()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search21()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search210()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search211()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search212()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search213()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search214()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search215()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search216()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search217()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search218()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search219()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search22()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search220()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search221()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search222()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search223()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search224()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search225()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search226()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search227()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search228()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search229()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search23()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search230()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search231()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search232()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search233()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search234()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search235()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search236()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search237()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search238()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search239()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search24()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search240()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search241()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search242()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search243()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search244()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search245()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search246()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search247()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search248()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search249()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search25()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search250()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search251()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search252()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search253()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search254()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search255()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search256()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search257()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search258()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search259()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search26()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search260()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search261()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search262()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search263()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search264()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search265()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search266()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search267()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search268()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search269()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search27()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search270()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search271()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search272()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search273()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search274()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search275()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search276()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search277()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search278()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search279()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search28()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search280()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search281()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search282()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search283()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search284()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search285()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search286()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search287()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search29()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search3()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search30()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search31()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search32()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search33()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search34()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search35()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search36()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search37()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search38()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search39()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search4()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search40()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search41()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search42()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search43()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search44()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search45()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search46()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search47()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search48()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search49()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search5()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search50()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search51()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search52()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search53()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search54()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search55()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search56()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search57()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search58()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search59()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search6()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search60()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search61()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search62()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search63()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search64()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search65()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search66()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search67()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search68()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search69()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search7()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search70()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search71()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search72()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search73()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search74()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search75()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search76()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search77()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search78()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search79()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search8()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search80()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search81()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search82()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search83()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search84()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search85()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search86()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search87()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search88()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search89()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search9()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search90()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search91()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search92()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search93()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search94()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search95()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search96()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search97()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search98()CyclotronRadiationHeatSinkTest.test_solve_alpha_t_beta_t_grid_search99()
- torax.sources.tests.electron_cyclotron_source_test module
- torax.sources.tests.fusion_heat_source_test module
- torax.sources.tests.gas_puff_source_test module
- torax.sources.tests.generic_current_source_test module
- torax.sources.tests.generic_ion_el_heat_source_test module
- torax.sources.tests.generic_particle_source_test module
- torax.sources.tests.ion_cyclotron_source_test module
- torax.sources.tests.mavrin_impurity_radiation_heat_sink_test module
MarvinImpurityRadiationHeatSinkTestMarvinImpurityRadiationHeatSinkTest.setUp()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Argon()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Beryllium()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Carbon()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Krypton()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Lithium()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Mixture()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Neon()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Nitrogen()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Oxygen()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Tungsten()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_Xenon()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity0()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity1()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity10()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity11()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity12()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity13()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity14()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity15()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity16()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity17()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity18()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity19()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity2()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity20()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity21()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity22()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity23()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity24()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity25()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity26()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity27()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity28()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity29()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity3()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity30()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity31()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity4()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity5()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity6()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity7()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity8()MarvinImpurityRadiationHeatSinkTest.test_calculate_total_impurity_radiation_sanity9()MarvinImpurityRadiationHeatSinkTest.test_temperature_clipping_Te_high_input()MarvinImpurityRadiationHeatSinkTest.test_temperature_clipping_Te_low_input()
- torax.sources.tests.ohmic_heat_source_test module
- torax.sources.tests.pellet_source_test module
- torax.sources.tests.pydantic_model_test module
- torax.sources.tests.qei_source_test module
- torax.sources.tests.source_profile_builders_test module
SourceModelsTestSourceModelsTest.setUp()SourceModelsTest.test_build_standard_source_profiles_calculate_anyway0()SourceModelsTest.test_build_standard_source_profiles_calculate_anyway1()SourceModelsTest.test_build_standard_source_profiles_calculate_anyway2()SourceModelsTest.test_build_standard_source_profiles_calculate_anyway3()SourceModelsTest.test_computing_source_profiles_works_with_all_defaults()
- torax.sources.tests.source_profiles_test module
- torax.sources.tests.source_test module
- torax.sources.tests.test_lib module
- Module contents
Submodules
torax.sources.base module
Base model for source pydantic configs.
- class torax.sources.base.SourceModelBase(**data)[source]
Bases:
BaseModelFrozen,ABCBase model holding parameters common to all source models.
Subclasses should define the model_function_name attribute as a Literal string. This string should match the name of the function that calculates the source profile. This is used as an identifier for the model function in the source config for Pydantic to “discriminate” against. This should be given a unique value for each source model function implementation.
- mode
Defines how the source values are computed (from a model, from a file, etc.)
- is_explicit
Defines whether this is an explicit or implicit source. Explicit sources are calculated based on the simulation state at the beginning of a time step, or do not have any dependence on state. Implicit sources depend on updated states as our iterative solvers evolve the state through the course of a time step. NOTE: Not all source types can be implicit or explicit. For example, file-based sources are always explicit. If an incorrect combination of source type and is_explicit is passed in, an error will be thrown when running the simulation.
- prescribed_values
Tuple of prescribed values for the source, one for each affected core profile. Used only when the source is fully prescribed (i.e. source.mode == Mode.PRESCRIBED). The default here is a vector of all zeros along for all rho and time, and the output vector is along the cell grid.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- abstract property model_func: SourceProfileFunction
Returns the model function for the source.
torax.sources.bootstrap_current_source module
bootstrap current source profile.
- class torax.sources.bootstrap_current_source.BootstrapCurrentSource(*, model_func=None)[source]
Bases:
SourceBootstrap current density source profile.
Unlike other sources within TORAX, the BootstrapCurrentSource provides more than just the bootstrap current. It uses a neoclassical physics model to also determine the neoclassical conductivity. Outputs are as follows:
sigmaneo: neoclassical conductivity
bootstrap current (on cell and face grids)
total integrated bootstrap current
- Parameters:
model_func (
Optional[SourceProfileFunction])
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- get_value(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, calculated_source_profiles)[source]
Returns the cell grid profile for this source during one time step.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Slice of the general TORAX config that can be used as input for this time step.geo (
Geometry) – Geometry of the torus.core_profiles (
CoreProfiles) – Core plasma profiles. May be the profiles at the start of the time step or a “live” set of core profiles being actively updated depending on whether this source is explicit or implicit. Explicit sources get the core profiles at the start of the time step, implicit sources get the “live” profiles that is updated through the course of the time step as the solver converges.calculated_source_profiles (
SourceProfiles|None) – The source profiles which have already been calculated for this time step if they exist. This is used to avoid recalculating profiles that are used as inputs to other sources. These profiles will only exist for Source instances that are implicit. i.e. explicit sources cannot depend on other calculated source profiles. In addition, different source types will have different availability of specific calculated_source_profiles since the calculation order matters. See source_profile_builders.py for more details.
- Return type:
- Returns:
A tuple of arrays of shape (cell grid length,) with one array per affected core profile.
- class torax.sources.bootstrap_current_source.BootstrapCurrentSourceConfig(**data)[source]
Bases:
SourceModelBaseBootstrap current density source profile.
- bootstrap_mult
Multiplication factor for bootstrap current.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class torax.sources.bootstrap_current_source.DynamicRuntimeParams(prescribed_values, bootstrap_mult)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- torax.sources.bootstrap_current_source.calc_sauter_model(*, bootstrap_multiplier, nref, Zeff_face, Zi_face, ne, ni, temp_el, temp_ion, psi, q_face, geo)[source]
Calculates sigmaneo, j_bootstrap, and I_bootstrap.
- Parameters:
bootstrap_multiplier (
float)nref (
float)ne (
CellVariable)ni (
CellVariable)temp_el (
CellVariable)temp_ion (
CellVariable)psi (
CellVariable)geo (
Geometry)
- Return type:
torax.sources.bremsstrahlung_heat_sink module
Bremsstrahlung heat sink for electron heat equation..
- class torax.sources.bremsstrahlung_heat_sink.BremsstrahlungHeatSink(*, model_func=<function bremsstrahlung_model_func>)[source]
Bases:
SourceBrehmsstrahlung heat sink for electron heat equation.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)
Model function for the Bremsstrahlung heat sink.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.bremsstrahlung_heat_sink.BremsstrahlungHeatSinkConfig(**data)[source]
Bases:
SourceModelBaseBremsstrahlung heat sink for electron heat equation.
- use_relativistic_correction
Whether to use relativistic correction.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- class torax.sources.bremsstrahlung_heat_sink.DynamicRuntimeParams(prescribed_values, use_relativistic_correction)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- torax.sources.bremsstrahlung_heat_sink.bremsstrahlung_model_func(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)[source]
Model function for the Bremsstrahlung heat sink.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- torax.sources.bremsstrahlung_heat_sink.calc_bremsstrahlung(core_profiles, geo, Zeff_face, nref, use_relativistic_correction=False)[source]
Calculate the Bremsstrahlung radiation power profile.
Uses the model from Wesson, John, and David J. Campbell. Tokamaks. Vol. 149. An optional correction for relativistic effects from Stott PPCF 2005 can be enabled with the flag “use_relativistic_correction”.
- Parameters:
core_profiles (state.CoreProfiles) – core plasma profiles.
geo (geometry.Geometry) – geometry object.
Zeff_face (float) – effective charge number on face grid.
nref (float) – reference density.
use_relativistic_correction (bool, optional) – Set to true to include the relativistic correction from Stott. Defaults to False.
- Returns:
total bremsstrahlung radiation power [MW] jax.Array: bremsstrahlung radiation power profile [W/m^3]
- Return type:
jax.Array
torax.sources.cyclotron_radiation_heat_sink module
Cyclotron radiation heat sink for electron heat equation..
- class torax.sources.cyclotron_radiation_heat_sink.CyclotronRadiationHeatSink(*, model_func=<function cyclotron_radiation_albajar>)[source]
Bases:
SourceCyclotron radiation heat sink for electron heat equation.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)
Calculates the cyclotron radiation heat sink contribution to the electron heat equation.
Total cyclotron radiation is from: F. Albajar et al 2001 Nucl. Fusion 41 665 https://doi.org/10.1088/0029-5515/41/6/301
Radial profile of the cyclotron radiation is from: J.F. Artaud et al 2018 Nucl. Fusion 58 105001 https://doi.org/10.1088/1741-4326/aad5b1
The alpha_n, alpha_T and beta_T parameters are calculated from best fits of the following electron density and temperature parameterization to the actual plasma data.
ne = ne(0)*(1 - rhonorm**2)**alpha_n Te = (Te(0)-Te(a))*(1 - rhonorm**beta_T)**alpha_T + Te(a)
Where we take a=0.9 in rhonorm space, and perform the best fit between 0<rhonorm<0.9, to avoid pedestal effects.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – A slice of static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – A slice of dynamic runtime parameters.geo (
Geometry) – The geometry object.source_name (
str) – The name of the source.core_profiles (
CoreProfiles) – The core profiles object.unused_calculated_source_profiles (
SourceProfiles|None) – Unused.
- Return type:
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...]- Returns:
The cyclotron radiation heat sink contribution to the electron heat equation.
- class torax.sources.cyclotron_radiation_heat_sink.CyclotronRadiationHeatSinkConfig(**data)[source]
Bases:
SourceModelBaseCyclotron radiation heat sink for electron heat equation.
- wall_reflection_coeff
The wall reflection coefficient is a machine-dependent dimensionless parameter corresponding to the fraction of cyclotron radiation reflected off the wall and back into the plasma where it is re-absorbed. The default value is a typical value.
- beta_min
The minimum value of the beta parameter used in the parameterized function for the temperature fit.
- beta_max
The maximum value of the beta parameter used in the parameterized function for the temperature fit.
- beta_grid_size
The number of points to use in the grid search for the best fit of the temperature function.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- class torax.sources.cyclotron_radiation_heat_sink.DynamicRuntimeParams(prescribed_values, wall_reflection_coeff)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.cyclotron_radiation_heat_sink.StaticRuntimeParams(mode, is_explicit, beta_min, beta_max, beta_grid_size)[source]
Bases:
StaticRuntimeParams,Mapping- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- torax.sources.cyclotron_radiation_heat_sink.cyclotron_radiation_albajar(static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)[source]
Calculates the cyclotron radiation heat sink contribution to the electron heat equation.
Total cyclotron radiation is from: F. Albajar et al 2001 Nucl. Fusion 41 665 https://doi.org/10.1088/0029-5515/41/6/301
Radial profile of the cyclotron radiation is from: J.F. Artaud et al 2018 Nucl. Fusion 58 105001 https://doi.org/10.1088/1741-4326/aad5b1
The alpha_n, alpha_T and beta_T parameters are calculated from best fits of the following electron density and temperature parameterization to the actual plasma data.
ne = ne(0)*(1 - rhonorm**2)**alpha_n Te = (Te(0)-Te(a))*(1 - rhonorm**beta_T)**alpha_T + Te(a)
Where we take a=0.9 in rhonorm space, and perform the best fit between 0<rhonorm<0.9, to avoid pedestal effects.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – A slice of static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – A slice of dynamic runtime parameters.geo (
Geometry) – The geometry object.source_name (
str) – The name of the source.core_profiles (
CoreProfiles) – The core profiles object.unused_calculated_source_profiles (
SourceProfiles|None) – Unused.
- Return type:
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...]- Returns:
The cyclotron radiation heat sink contribution to the electron heat equation.
torax.sources.electron_cyclotron_source module
Electron cyclotron heating (prescribed Gaussian) and current drive (Lin-Liu model).
- class torax.sources.electron_cyclotron_source.DynamicRuntimeParams(prescribed_values, cd_efficiency, manual_ec_power_density, gaussian_ec_power_density_width, gaussian_ec_power_density_location, gaussian_ec_total_power)[source]
Bases:
DynamicRuntimeParams,MappingRuntime parameters for the electron-cyclotron source for a given time and geometry.
- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])cd_efficiency (
Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']])manual_ec_power_density (
Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']])gaussian_ec_power_density_width (
Union[Float[Array, ''],Float[ndarray, ''],number,float])gaussian_ec_power_density_location (
Union[Float[Array, ''],Float[ndarray, ''],number,float])gaussian_ec_total_power (
Union[Float[Array, ''],Float[ndarray, ''],number,float])
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.electron_cyclotron_source.ElectronCyclotronSource(*, model_func=<function calc_heating_and_current>)[source]
Bases:
SourceElectron cyclotron source for the Te and Psi equations.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)
Model function for the electron-cyclotron source.
Based on Lin-Liu, Y. R., Chan, V. S., & Prater, R. (2003). See https://torax.readthedocs.io/en/latest/electron-cyclotron-derivation.html
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Global runtime parametersgeo (
Geometry) – Magnetic geometry.source_name (
str) – Name of the source.core_profiles (
CoreProfiles) – CoreProfiles component of the state.unused_calculated_source_profiles (
SourceProfiles|None) – Unused.
- Return type:
- Returns:
2D array of electron cyclotron heating power density and current density.
- class torax.sources.electron_cyclotron_source.ElectronCyclotronSourceConfig(**data)[source]
Bases:
SourceModelBaseConfig for the electron-cyclotron source.
- cd_efficiency
Local dimensionless current drive efficiency. Zeta from Lin-Liu, Chan, and Prater, 2003, eq 44
- manual_ec_power_density
Manual EC power density profile on the rho grid
- gaussian_ec_power_density_width
Gaussian EC power density profile width
- gaussian_ec_power_density_location
Gaussian EC power density profile location
- gaussian_ec_total_power
Gaussian EC total power
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.electron_cyclotron_source.calc_heating_and_current(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles)[source]
Model function for the electron-cyclotron source.
Based on Lin-Liu, Y. R., Chan, V. S., & Prater, R. (2003). See https://torax.readthedocs.io/en/latest/electron-cyclotron-derivation.html
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Global runtime parametersgeo (
Geometry) – Magnetic geometry.source_name (
str) – Name of the source.core_profiles (
CoreProfiles) – CoreProfiles component of the state.unused_calculated_source_profiles (
SourceProfiles|None) – Unused.
- Return type:
- Returns:
2D array of electron cyclotron heating power density and current density.
torax.sources.formulas module
Prescribed formulas for computing source profiles.
- torax.sources.formulas.exponential_profile(geo, *, decay_start, width, total)[source]
Returns an exponential profile on the cell grid.
The profile is parameterized by (decay_start, width, total) like so:
profile = C * exp(-(decay_start - r) / width)
Where C is a calculated prefactor to ensure the volume integral of the profile equals total.
- Parameters:
- Return type:
Array- Returns:
Exponential profile on the cell grid.
- torax.sources.formulas.gaussian_profile(geo, *, center, width, total)[source]
Returns a gaussian profile on the cell grid.
The profile is parameterized by (center, width, total) like so:
profile = C * exp(-( (r - center)**2 / (2 * width**2) ))
Where C is a calculated prefactor to ensure the volume integral of the profile equals total.
- Parameters:
- Return type:
Array- Returns:
Gaussian profile on the cell grid.
torax.sources.fusion_heat_source module
Fusion heat source for both ion and electron heat equations.
- class torax.sources.fusion_heat_source.FusionHeatSource(*, model_func=<function fusion_heat_model_func>)[source]
Bases:
SourceFusion heat source for both ion and electron heat.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, unused_source_name, core_profiles, unused_calculated_source_profiles)
Model function for fusion heating.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)unused_source_name (
str)core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.fusion_heat_source.FusionHeatSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the FusionHeatSource.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.fusion_heat_source.calc_fusion(geo, core_profiles, static_runtime_params_slice, dynamic_runtime_params_slice)[source]
Computes DT fusion power with the Bosch-Hale parameterization NF 1992.
- Parameters:
geo (
Geometry) – Magnetic geometry.core_profiles (
CoreProfiles) – Core plasma profiles.static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime params, used to determine the existence of deuterium and tritium.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Dynamic runtime params, used to extract nref and the D and T densities.
- Returns:
- total fusion power in MW, ion and electron
fusion power densities in W/m^3.
- Return type:
Tuple of Ptot, Pfus_i, Pfus_e
- torax.sources.fusion_heat_source.fusion_heat_model_func(static_runtime_params_slice, dynamic_runtime_params_slice, geo, unused_source_name, core_profiles, unused_calculated_source_profiles)[source]
Model function for fusion heating.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)unused_source_name (
str)core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.gas_puff_source module
Gas puff source for the ne equation.
- class torax.sources.gas_puff_source.DynamicGasPuffRuntimeParams(prescribed_values, puff_decay_length, S_puff_tot)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.gas_puff_source.GasPuffSource(*, model_func=<function calc_puff_source>)[source]
Bases:
SourceGas puff source for the ne equation.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)
Calculates external source term for n from puffs.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.gas_puff_source.GasPuffSourceConfig(**data)[source]
Bases:
SourceModelBaseGas puff source for the ne equation.
- source_name
Name of the source, hardcoded to ‘gas_puff_source’
- puff_decay_length
exponential decay length of gas puff ionization [normalized radial coord]
- S_puff_tot
total gas puff particles/s
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.gas_puff_source.calc_puff_source(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)[source]
Calculates external source term for n from puffs.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.generic_current_source module
External current source profile.
- class torax.sources.generic_current_source.DynamicRuntimeParams(prescribed_values, Iext, fext, wext, rext, use_absolute_current)[source]
Bases:
DynamicRuntimeParams,MappingDynamic runtime parameters for the external current source.
- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])Iext (
Union[Float[Array, ''],Float[ndarray, ''],number,float])fext (
Union[Float[Array, ''],Float[ndarray, ''],number,float])wext (
Union[Float[Array, ''],Float[ndarray, ''],number,float])rext (
Union[Float[Array, ''],Float[ndarray, ''],number,float])use_absolute_current (
bool)
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.generic_current_source.GenericCurrentSource(*, model_func=<function calculate_generic_current>)[source]
Bases:
SourceA generic current density source profile.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)
Calculates the external current density profiles on the cell grid.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.generic_current_source.GenericCurrentSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the GenericCurrentSource.
- Iext
total “external” current in MA. Used if use_absolute_current=True.
- fext
total “external” current fraction. Used if use_absolute_current=False.
- wext
width of “external” Gaussian current profile
- rext
normalized radius of “external” Gaussian current profile
- use_absolute_current
Toggles if external current is provided absolutely or as a fraction of Ip.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.generic_current_source.calculate_generic_current(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)[source]
Calculates the external current density profiles on the cell grid.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.generic_ion_el_heat_source module
Generic heat source for both ion and electron heat.
- class torax.sources.generic_ion_el_heat_source.DynamicRuntimeParams(prescribed_values, w, rsource, Ptot, el_heat_fraction, absorption_fraction)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])w (
Union[Float[Array, ''],Float[ndarray, ''],number,float])rsource (
Union[Float[Array, ''],Float[ndarray, ''],number,float])Ptot (
Union[Float[Array, ''],Float[ndarray, ''],number,float])el_heat_fraction (
Union[Float[Array, ''],Float[ndarray, ''],number,float])absorption_fraction (
Union[Float[Array, ''],Float[ndarray, ''],number,float])
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.generic_ion_el_heat_source.GenericIonElHeatSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the GenericIonElHeatSource.
- w
Gaussian width in normalized radial coordinate
- rsource
Source Gaussian central location (in normalized r)
- Ptot
Total heating: high default based on total ITER power including alphas
- el_heat_fraction
Electron heating fraction
- absorption_fraction
Fraction of absorbed power
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- class torax.sources.generic_ion_el_heat_source.GenericIonElectronHeatSource(*, model_func=<function default_formula>)[source]
Bases:
SourceGeneric heat source for both ion and electron heat.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, unused_core_profiles, unused_calculated_source_profiles)
Returns the default formula-based ion/electron heat source profile.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- torax.sources.generic_ion_el_heat_source.calc_generic_heat_source(geo, rsource, w, Ptot, el_heat_fraction, absorption_fraction)[source]
Computes ion/electron heat source terms.
Flexible prescribed heat source term.
- Parameters:
- Returns:
source term for ions. source_el: source term for electrons.
- Return type:
source_ion
- torax.sources.generic_ion_el_heat_source.default_formula(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, unused_core_profiles, unused_calculated_source_profiles)[source]
Returns the default formula-based ion/electron heat source profile.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.generic_particle_source module
Generic particle source for the ne equation.
- class torax.sources.generic_particle_source.DynamicParticleRuntimeParams(prescribed_values, particle_width, deposition_location, S_tot)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])particle_width (
Union[Float[Array, ''],Float[ndarray, ''],number,float])deposition_location (
Union[Float[Array, ''],Float[ndarray, ''],number,float])S_tot (
Union[Float[Array, ''],Float[ndarray, ''],number,float])
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.generic_particle_source.GenericParticleSource(*, model_func=<function calc_generic_particle_source>)[source]
Bases:
SourceNeutral-beam injection source for the ne equation.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)
Calculates external source term for n from SBI.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.generic_particle_source.GenericParticleSourceConfig(**data)[source]
Bases:
SourceModelBaseGeneric particle source for the ne equation.
- particle_width
particle source Gaussian width in normalized radial coord
- deposition_location
particle source Gaussian center in normalized radial coord
- S_tot
total particle source particles/s
- mode
Defines how the source values are computed (from a model, from a file, etc.)
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.generic_particle_source.calc_generic_particle_source(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)[source]
Calculates external source term for n from SBI.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.ion_cyclotron_source module
Surrogate model for ion-cyclotron resonance heating (ICRH) model.
- class torax.sources.ion_cyclotron_source.DynamicRuntimeParams(prescribed_values, frequency, minority_concentration, Ptot, absorption_fraction, wall_inner, wall_outer)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])frequency (
Union[Float[Array, ''],Float[ndarray, ''],number,float])minority_concentration (
Union[Float[Array, ''],Float[ndarray, ''],number,float])Ptot (
Union[Float[Array, ''],Float[ndarray, ''],number,float])absorption_fraction (
Union[Float[Array, ''],Float[ndarray, ''],number,float])wall_inner (
float)wall_outer (
float)
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.ion_cyclotron_source.IonCyclotronSource(*, model_func=None)[source]
Bases:
SourceIon cyclotron source with surrogate model.
- Parameters:
model_func (
Optional[SourceProfileFunction])
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- class torax.sources.ion_cyclotron_source.IonCyclotronSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the IonCyclotronSource.
- wall_inner
Inner radial location of first wall at plasma midplane level [m].
- wall_outer
Outer radial location of first wall at plasma midplane level [m].
- frequency
ICRF wave frequency [Hz].
- minority_concentration
He3 minority concentration relative to the electron density in %.
- Ptot
Total heating power [W].
- absorption_fraction
Fraction of absorbed power.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- class torax.sources.ion_cyclotron_source.ToricNNInputs(frequency, volume_average_temperature, volume_average_density, minority_concentration, gap_inner, gap_outer, z0, temperature_peaking_factor, density_peaking_factor, B0)[source]
Bases:
MappingInputs to the ToricNN model.
- Parameters:
frequency (
Union[Float[Array, ''],Float[ndarray, ''],number,float])volume_average_temperature (
Union[Float[Array, ''],Float[ndarray, ''],number,float])volume_average_density (
Union[Float[Array, ''],Float[ndarray, ''],number,float])minority_concentration (
Union[Float[Array, ''],Float[ndarray, ''],number,float])gap_inner (
Union[Float[Array, ''],Float[ndarray, ''],number,float])gap_outer (
Union[Float[Array, ''],Float[ndarray, ''],number,float])z0 (
Union[Float[Array, ''],Float[ndarray, ''],number,float])temperature_peaking_factor (
Union[Float[Array, ''],Float[ndarray, ''],number,float])density_peaking_factor (
Union[Float[Array, ''],Float[ndarray, ''],number,float])B0 (
Union[Float[Array, ''],Float[ndarray, ''],number,float])
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.ion_cyclotron_source.ToricNNOutputs(power_deposition_He3, power_deposition_2T, power_deposition_e)[source]
Bases:
MappingOutputs from the ToricNN model.
- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.ion_cyclotron_source.ToricNNWrapper(path=None)[source]
Bases:
objectWrapper for the Toric NN model.
This wrapper is currently for a SPARC-specific ion cyclotron resosonanc heating scheme.
TODO(b/378072116): Make the wrapper more general to work with other ICRH schemes and surrogate models.
This wrapper is the main interface for interacting with the Toric NN model. for making predictions of heating power deposition profiles given ToricNNInputs.
The wrapper constructs 3 separate instances of the _ToricNN class, one for each simulated output (Helium-3, 2nd-harmonic tritium and electrons).
- torax.sources.ion_cyclotron_source.icrh_model_func(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, core_profiles, unused_calculated_source_profiles, toric_nn)[source]
Compute ion/electron heat source terms.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)core_profiles (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)toric_nn (
ToricNNWrapper)
- Return type:
torax.sources.ohmic_heat_source module
Ohmic heat source.
- class torax.sources.ohmic_heat_source.OhmicHeatSource(*, model_func=<function ohmic_model_func>)[source]
Bases:
SourceOhmic heat source for electron heat equation.
Pohm = jtor * psidot /(2*pi*Rmaj), related to electric power formula P = IV.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, unused_source_name, core_profiles, calculated_source_profiles)
Returns the Ohmic source for electron heat equation.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)unused_source_name (
str)core_profiles (
CoreProfiles)calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.ohmic_heat_source.OhmicHeatSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the OhmicHeatSource.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.ohmic_heat_source.ohmic_model_func(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, unused_source_name, core_profiles, calculated_source_profiles)[source]
Returns the Ohmic source for electron heat equation.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)unused_source_name (
str)core_profiles (
CoreProfiles)calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.pellet_source module
Pellet source for the ne equation.
- class torax.sources.pellet_source.DynamicPelletRuntimeParams(prescribed_values, pellet_width, pellet_deposition_location, S_pellet_tot)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
prescribed_values (
tuple[Union[Float[Array, 'rhon'],Float[ndarray, 'rhon']],...])pellet_width (
Union[Float[Array, ''],Float[ndarray, ''],number,float])pellet_deposition_location (
Union[Float[Array, ''],Float[ndarray, ''],number,float])S_pellet_tot (
Union[Float[Array, ''],Float[ndarray, ''],number,float])
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.pellet_source.PelletSource(*, model_func=<function calc_pellet_source>)[source]
Bases:
SourcePellet source for the ne equation.
- Parameters:
model_func (
SourceProfileFunction)
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- model_func(dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)
Calculates external source term for n from pellets.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
- class torax.sources.pellet_source.PelletSourceConfig(**data)[source]
Bases:
SourceModelBasePellet source for the ne equation.
- pellet_width
Gaussian width of pellet deposition [normalized radial coord]
- pellet_deposition_location
Gaussian center of pellet deposition [normalized radial coord]
- S_pellet_tot
total pellet particles/s
- mode
Defines how the source values are computed (from a model, from a file, etc.)
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property model_func: SourceProfileFunction
Returns the model function for the source.
- torax.sources.pellet_source.calc_pellet_source(unused_static_runtime_params_slice, dynamic_runtime_params_slice, geo, source_name, unused_state, unused_calculated_source_profiles)[source]
Calculates external source term for n from pellets.
- Parameters:
unused_static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)source_name (
str)unused_state (
CoreProfiles)unused_calculated_source_profiles (
SourceProfiles|None)
- Return type:
torax.sources.pydantic_model module
Pydantic config for source models.
- class torax.sources.pydantic_model.Sources(**data)[source]
Bases:
BaseModelFrozenConfig for source models.
The from_dict method of constructing this class supports the config described in: https://torax.readthedocs.io/en/latest/configuration.html
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- validate_radiation_models()[source]
Validate that bremsstrahlung and Mavrin models are not both active at the same time.
This prevents double counting radiation losses.
- Return type:
Self- Returns:
Self for method chaining.
- Raises:
ValueError – If both bremsstrahlung and Mavrin models are active.
torax.sources.qei_source module
Collisional ion-electron heat source.
- class torax.sources.qei_source.DynamicRuntimeParams(prescribed_values, Qei_mult)[source]
Bases:
DynamicRuntimeParams,Mapping- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.qei_source.QeiSource(*, model_func=None)[source]
Bases:
SourceCollisional ion-electron heat source.
This is a special-case source because it can provide both implicit and explicit terms in our solver. See sim.py for how this is used.
- Parameters:
model_func (
Optional[SourceProfileFunction])
- property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- get_qei(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles)[source]
Computes the value of the source.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)core_profiles (
CoreProfiles)
- Return type:
- get_value(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, calculated_source_profiles)[source]
Returns the cell grid profile for this source during one time step.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Slice of the general TORAX config that can be used as input for this time step.geo (
Geometry) – Geometry of the torus.core_profiles (
CoreProfiles) – Core plasma profiles. May be the profiles at the start of the time step or a “live” set of core profiles being actively updated depending on whether this source is explicit or implicit. Explicit sources get the core profiles at the start of the time step, implicit sources get the “live” profiles that is updated through the course of the time step as the solver converges.calculated_source_profiles (
SourceProfiles|None) – The source profiles which have already been calculated for this time step if they exist. This is used to avoid recalculating profiles that are used as inputs to other sources. These profiles will only exist for Source instances that are implicit. i.e. explicit sources cannot depend on other calculated source profiles. In addition, different source types will have different availability of specific calculated_source_profiles since the calculation order matters. See source_profile_builders.py for more details.
- Return type:
- Returns:
A tuple of arrays of shape (cell grid length,) with one array per affected core profile.
- class torax.sources.qei_source.QeiSourceConfig(**data)[source]
Bases:
SourceModelBaseConfiguration for the QeiSource.
- Qei_mult
multiplier for ion-electron heat exchange term for sensitivity testing
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
torax.sources.runtime_params module
Configuration for all the sources/sinks modelled in Torax.
- class torax.sources.runtime_params.DynamicRuntimeParams(prescribed_values)[source]
Bases:
MappingDynamic params for a single TORAX source.
These params can be changed without triggering a recompile. TORAX sources are stateless, so these params are their inputs to determine their output profiles.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.runtime_params.Mode(value)[source]
Bases:
EnumDefines how to compute the source terms for this source/sink.
torax.sources.source module
Module for a single source/sink term.
This module contains all the base classes for defining source terms. Other files in this folder use these classes to define specific types of sources/sinks.
See Source class docstring for more details on what a TORAX source is and how to use it.
- class torax.sources.source.AffectedCoreProfile(value)[source]
Bases:
IntEnumDefines which part of the core profiles the source helps evolve.
The profiles of each source/sink are terms included in equations evolving different core profiles. This enum maps a source to those equations.
- class torax.sources.source.Source(*, model_func=None)[source]
Bases:
ABCBase class for a single source/sink term.
Sources are used to compute source profiles (see source_profiles.py), which are in turn used to compute coeffs in sim.py.
- SOURCE_NAME
The name of the source.
- runtime_params
Input dataclass containing all the source-specific runtime parameters. At runtime, the parameters here are interpolated to a specific time t and then passed to the model_func, depending on the mode this source is running in.
- affected_core_profiles
Core profiles affected by this source’s profile(s). This attribute defines which equations the source profiles are terms for. By default, the number of affected core profiles should equal the rank of the output shape returned by output_shape.
- model_func
The function used when the the runtime type is set to “MODEL_BASED”. If not provided, then it defaults to returning zeros.
- affected_core_profiles_ints
Derived property from the affected_core_profiles. Integer values of those enums.
- Parameters:
model_func (
Optional[SourceProfileFunction])
- abstract property affected_core_profiles: tuple[AffectedCoreProfile, ...]
Returns the core profiles affected by this source.
- get_value(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, calculated_source_profiles)[source]
Returns the cell grid profile for this source during one time step.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – Static runtime parameters.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Slice of the general TORAX config that can be used as input for this time step.geo (
Geometry) – Geometry of the torus.core_profiles (
CoreProfiles) – Core plasma profiles. May be the profiles at the start of the time step or a “live” set of core profiles being actively updated depending on whether this source is explicit or implicit. Explicit sources get the core profiles at the start of the time step, implicit sources get the “live” profiles that is updated through the course of the time step as the solver converges.calculated_source_profiles (
SourceProfiles|None) – The source profiles which have already been calculated for this time step if they exist. This is used to avoid recalculating profiles that are used as inputs to other sources. These profiles will only exist for Source instances that are implicit. i.e. explicit sources cannot depend on other calculated source profiles. In addition, different source types will have different availability of specific calculated_source_profiles since the calculation order matters. See source_profile_builders.py for more details.
- Return type:
- Returns:
A tuple of arrays of shape (cell grid length,) with one array per affected core profile.
torax.sources.source_models module
Functions for building source profiles in TORAX.
- class torax.sources.source_models.SourceModels(sources)[source]
Bases:
objectSource/sink models for the different equations being evolved in Torax.
Each source/sink (all called sources as the difference is only a sign change) can be explicit or implicit and signal to our solver on how to handle these terms. Their values are provided via model, file, prescribed function, etc. The specific approach used depends on how the source is initialized and what runtime configuration inputs are provided.
You can both override the default set of sources in TORAX as well as define new custom sources inline when constructing this object. The example below shows how to define a new custom electron-density source.
# Define an electron-density source with a time-dependent Gaussian profile. gas_puff_source = register_source.get_registered_source('gas_puff_source') gas_puff_source_builder = source_lib.make_source_builder( gas_puff_source.source_class, runtime_params_type=gas_puff_source.model_functions['calc_puff_source'].runtime_params_class, model_func=gas_puff_source.model_functions['calc_puff_source'].source_profile_function, ) # Define the collection of sources here, which in this example only includes # one source. all_torax_sources = SourceModels( sources={'gas_puff_source': gas_puff_source_builder} )
See runtime_params.py for more details on how to configure all the source/sink terms.
- Parameters:
sources (
Mapping[str,SourceModelBase])
torax.sources.source_profile_builders module
Functions for building source profiles in TORAX.
- torax.sources.source_profile_builders.build_all_zero_profiles(geo)[source]
Returns a SourceProfiles object with all zero profiles.
- Parameters:
geo (
Geometry)- Return type:
- torax.sources.source_profile_builders.build_source_profiles(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, source_models, explicit, explicit_source_profiles=None)[source]
Builds explicit profiles or the union of explicit and implicit profiles.
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – Input config. Cannot change from time step to time step.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Input config for this time step. Can change from time step to time step.geo (
Geometry) – Geometry of the torus.core_profiles (
CoreProfiles) – Core plasma profiles, either at the start of the time step (if explicit) or the live profiles being evolved during the time step (if implicit).source_models (
SourceModels) – Functions computing profiles for all TORAX sources/sinks.explicit (
bool) – If True, this function will only return profiles for explicit sources. If False, then the explicit_source_profiles argument must be provided and the returned profiles will be the union of the explicit profiles in explicit_source_profiles and the implicit profiles computed here. Note that for the special-case sources (bootstrap and qei), the explicit argument will be used to determine whether to return a profile or all zeros.explicit_source_profiles (
Optional[SourceProfiles]) – If explicit is False, this argument must be provided. It will be used to compute the union of the explicit profiles and the implicit profiles computed here.
- Return type:
- Returns:
SourceProfiles caclulated from the source models. If explicit is True, then only explicit profiles will be returned. If explicit is False, then the union of the explicit profiles in explicit_source_profiles and the implicit profiles computed here will be returned.
- torax.sources.source_profile_builders.build_standard_source_profiles(*, calculated_source_profiles, static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, source_models, explicit=True, calculate_anyway=False, psi_only=False)[source]
Updates calculated_source_profiles with standard source profiles.
- Parameters:
calculated_source_profiles (
SourceProfiles)static_runtime_params_slice (
StaticRuntimeParamsSlice)dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice)geo (
Geometry)core_profiles (
CoreProfiles)source_models (
SourceModels)explicit (
bool)calculate_anyway (
bool)psi_only (
bool)
- torax.sources.source_profile_builders.get_initial_source_profiles(static_runtime_params_slice, dynamic_runtime_params_slice, geo, core_profiles, source_models)[source]
Returns the source profiles for the initial state in run_simulation().
- Parameters:
static_runtime_params_slice (
StaticRuntimeParamsSlice) – Runtime parameters which, when they change, trigger recompilations. They should not change within a single run of the sim.dynamic_runtime_params_slice (
DynamicRuntimeParamsSlice) – Runtime parameters which may change from time step to time step without triggering recompilations.geo (
Geometry) – The geometry of the torus during this time step of the simulation.core_profiles (
CoreProfiles) – Core profiles that may evolve throughout the course of a simulation. These values here are, of course, only the original states.source_models (
SourceModels) – Source models used to compute core source profiles.
- Return type:
- Returns:
Implicit and explicit SourceProfiles from source models based on the core profiles from the starting state.
torax.sources.source_profiles module
Source/sink profiles for all the sources in TORAX.
- class torax.sources.source_profiles.BootstrapCurrentProfile(sigma, sigma_face, j_bootstrap, j_bootstrap_face, I_bootstrap)[source]
Bases:
MappingBootstrap current profile.
- sigma
plasma conductivity with neoclassical corrections on cell grid.
- sigma_face
plasma conductivity with neoclassical corrections on face grid.
- j_bootstrap
Bootstrap current density (Amps / m^2)
- j_bootstrap_face
Bootstrap current density (Amps / m^2) on face grid
- I_bootstrap
Total bootstrap current. Used primarily for diagnostic purposes.
- Parameters:
sigma (
Array)sigma_face (
Array)j_bootstrap (
Array)j_bootstrap_face (
Array)I_bootstrap (
Array)
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.source_profiles.QeiInfo(qei_coef, implicit_ii, explicit_i, implicit_ee, explicit_e, implicit_ie, implicit_ei)[source]
Bases:
MappingRepresents the source values coming from a QeiSource.
- Parameters:
qei_coef (
Array)implicit_ii (
Array)explicit_i (
Array)implicit_ee (
Array)explicit_e (
Array)implicit_ie (
Array)implicit_ei (
Array)
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- values() an object providing a view on D's values
- class torax.sources.source_profiles.SourceProfiles(j_bootstrap, qei, temp_el=<factory>, temp_ion=<factory>, ne=<factory>, psi=<factory>)[source]
Bases:
MappingCollection of profiles for all sources in TORAX.
Most profiles are stored in the attributes relating to the core profile they affect, but special-case profiles j_bootstrap and qei are pulled out into their own attributes as these sources need to be treated differently (though they could still be set to zero using appropriate runtime params).
This dataclass is inspired by the IMAS core_sources IDS. It is not a 1:1 mapping to that schema, but it contains similar profiles as you’d expect in that IDS.
- Parameters:
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- classmethod merge(explicit_source_profiles, implicit_source_profiles)[source]
Returns a SourceProfiles that merges the input profiles.
Sources can either be explicit or implicit. The explicit_source_profiles contain the profiles for all source models that are set to explicit, and it contains profiles with all zeros for any implicit source. The opposite holds for the implicit_source_profiles.
This function adds the two dictionaries of profiles and returns a single SourceProfiles that includes both.
- Parameters:
explicit_source_profiles (
Self) – Profiles from explicit source models. This SourceProfiles dict will include keys for both the explicit and implicit sources, but only the explicit sources will have non-zero profiles. See source.py and runtime_params.py for more info on explicit vs. implicit.implicit_source_profiles (
Self) – Profiles from implicit source models. This SourceProfiles dict will include keys for both the explicit and implicit sources, but only the implicit sources will have non-zero profiles. See source.py and runtime_params.py for more info on explicit vs. implicit.
- Return type:
Self- Returns:
A SourceProfiles with non-zero profiles for all sources, both explicit and implicit (assuming the source model outputted a non-zero profile).
- values() an object providing a view on D's values
Module contents
Sources.
This module contains functionality related to setting up TORAX heat, particle, and current sources.