-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEMP: Initial attempts at getting Vloop BC working
This includes a hack to support outputting different BCs in the output file. Previously, the simulation could only use one type of BC for the whole run (ie either grad or value constraint). By wrapping the output in a jnp.array(), BCs that are None get turned into NaN, which is compatible with tree_map. Hence, this change allows you to have `grad_constraint = [XXX, None, None, ...]` and `value_constraint = [None, XXX, YYY, ...]` which is useful for testing the Vloop BC.
- Loading branch information
1 parent
017044b
commit 3b7f33c
Showing
3 changed files
with
118 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
CONFIG = { | ||
"runtime_params": { | ||
"profile_conditions": { | ||
'Ip_tot': 15.0, | ||
"Vloop_bound_right": 0.0, | ||
"psi": dict( | ||
zip( | ||
[ | ||
0.02, | ||
0.06, | ||
0.1, | ||
0.14, | ||
0.18, | ||
0.22, | ||
0.26, | ||
0.3, | ||
0.34, | ||
0.38, | ||
0.42, | ||
0.46, | ||
0.5, | ||
0.54, | ||
0.58, | ||
0.62, | ||
0.66, | ||
0.7, | ||
0.74, | ||
0.78, | ||
0.82, | ||
0.86, | ||
0.9, | ||
0.94, | ||
0.98, | ||
], | ||
[ | ||
4.27722812e-02, | ||
3.94379591e-01, | ||
1.09263271e00, | ||
2.10681692e00, | ||
3.41030703e00, | ||
4.97594319e00, | ||
6.77607994e00, | ||
8.79231633e00, | ||
1.10530604e01, | ||
1.36745883e01, | ||
1.67709665e01, | ||
2.02615760e01, | ||
2.39018070e01, | ||
2.74979635e01, | ||
3.09738348e01, | ||
3.43088066e01, | ||
3.74947223e01, | ||
4.05261312e01, | ||
4.33998473e01, | ||
4.61154118e01, | ||
4.86753469e01, | ||
5.10851399e01, | ||
5.33529513e01, | ||
5.54890272e01, | ||
5.75047356e01, | ||
], | ||
) | ||
), | ||
"set_pedestal": False, | ||
} | ||
}, | ||
"geometry": { | ||
"geometry_type": "circular", | ||
}, | ||
"sources": { | ||
"j_bootstrap": {}, | ||
"generic_current_source": {}, | ||
"generic_particle_source": {}, | ||
"gas_puff_source": {}, | ||
"pellet_source": {}, | ||
"generic_ion_el_heat_source": {}, | ||
"fusion_heat_source": {}, | ||
"qei_source": {}, | ||
"ohmic_heat_source": {}, | ||
}, | ||
"transport": { | ||
"transport_model": "constant", | ||
}, | ||
"stepper": { | ||
"stepper_type": "linear", | ||
}, | ||
"time_step_calculator": { | ||
"calculator_type": "chi", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters