cfs-energy / cfspopcon

POPCONs (Plasma OPerating CONtours)
https://cfspopcon.readthedocs.io/en/latest/
MIT License
22 stars 14 forks source link

Implement model to calculate edge impurity concentration #7

Closed tbody-cfs closed 8 months ago

tbody-cfs commented 11 months ago

This merge request adds in the "Lengyel model", as described in

Nucl. Fusion 61 (2021) 046029 (21pp) https://doi.org/10.1088/1741-4326/abe4b2
"Comparison between SOLPS-4.3 and the Lengyel Model for ITER baseline neon-seeded plasmas"
D. Moulton, P.C. Stangeby, X. Bonnin and R.A. Pitts

The Lengyel model was originally presented in a 1981 IPP report "Analysis of Radiating Plasma Boundary Layers" by L. L. Lengyel, report number 1/191

The model gives the concentration of a radiating impurity required to achieve a requested radiative power dissipation fraction in the SOL. Usually, the calculated concentration can be related to the concentration from a higher-fidelity model such as SOLPS (see Moulton paper) via a constant factor, which we call the lengyel_overestimation_factor.

tbody-cfs commented 9 months ago

For the variables previously killing the pipeline, this shows the absolute difference (ref - test) and relative difference (1 - ref/test). rtol of 1e-5 (default for xr.testing.assert_allclose is large enough that the test passes, while 1E-6 doesn't. Still don't have a good idea why these differences are here, but they might be related to machine architecture image image image

nelsonand commented 7 months ago

@tbody-cfs What is the extent of this update? Does it help already to solve https://github.com/cfs-energy-internal/POPSIM/issues/28?