cherab / solps

Other
6 stars 5 forks source link

Fix loading of total radiated power from raw files #42

Closed jacklovell closed 3 years ago

jacklovell commented 3 years ago

Load Eirene total radiated power in W/m3, where positive values correspond to emission of radiation. Add line emission and Bremsstrahlung from the plasma solution using the b2fplasmf file: without this a significant fraction of the radiation is omitted. This does mean a b2fplasmf file is required: if this is not available then no value is assigned to SOLPSSimulation.total_radiation, as using the Eirene neutral data alone would be misleading.

With this change, the SOLPSSimulation.total_radiation quantity is comparable for simulations loaded from raw files, MDSplus or a balance.nc file.

Fixes #28

vsnever commented 3 years ago

Great that you added the parsing of b2fplasmf file. I tried to convert the binary b2plasma files from SOLPS-ITER SDK examples to the formatted b2plasmf files using the b2uf utility, with no success. Did you manage to get b2uf working, or do you have the b2fplasmf files from someone else's SOLPS runs?

jacklovell commented 3 years ago

I did manage to get b2uf working, but on some other users' runs rather than the examples. These runs had the binary b2plasma file but not b2plasmf. I had to use tcsh (couldn't get ksh to work) as follows:

cd <path to SOLPS code repository>
source setup.csh
cd <path to run>
b2run b2uf

I did find that in some cases it would run the entire simulation again, but they didn't take too long.

jacklovell commented 3 years ago

Since there have been no objections, I'll merge this.