Closed jacklovell closed 2 years ago
@vsnever: You've already mentioned in https://github.com/cherab/core/issues/211#issuecomment-620186781 that the output files from the SOLPS4.3 simulation being used for core aren't in a format compatible with cherab-solps. But is it possible to do a SOLPS-ITER run with the same input files to produce the output in the SOLPS5 formats required by this package? Or are those input files no longer available, or completely incompatible with SOLPS-ITER?
@vsnever: You've already mentioned in cherab/core#211 (comment) that the output files from the SOLPS4.3 simulation being used for core aren't in a format compatible with cherab-solps. But is it possible to do a SOLPS-ITER run with the same input files to produce the output in the SOLPS5 formats required by this package? Or are those input files no longer available, or completely incompatible with SOLPS-ITER?
I wrote to Andrey about the input files and their compatibility with SOLPS-ITER. Also, it might be worth asking the SOLPS-ITER developers if they have a tool to convert SOLPS 4.3 output to SOLPS 5 format.
@jacklovell: Got a response from Andrey. He says that there is actually a conversion tool that can convert SOLPS 4.3 output to SOLPS 5 format, however it may be buggy. Andrey provided me with a complete output for one of his simulations for exactly the same mesh geometry as in https://github.com/cherab/core/issues/211#issuecomment-647182272. Here is the file. So, I suggest we write to Xavier because he already used this conversion tool and ask if he can convert this output to SOLPS 5 format or redirect us to someone who can. If you agree, I'll email him and put you and @mattngc in CC.
That would be great. Yes, please do contact Xavier.
It turned out that converting these simulation results to SOLPS 5 format was not a piece of cake. The simulation was done in SOLPS 4.3.3, and the SOLPS-ITER converting tool b2sxdr
works only with ITER's version of SOLPS 4.3.2. Xavier was not able to convert the files as he does not have the SOLPS 4.3.3 source, so I had to do it myself. Xavier provided me with access to ITER SOLPS repositories and instructions on how to use b2sxdr
. After manually applying the changes from ITER's SOLPS 4.3.2 to SOLPS 4.3.3 (I got the source code from Andrey Pshenov) required for compatibility with SOLPS-ITER, I built b2sxdr
tool for SOLPS 4.3.3 and successfully converted the data. Here are the files, cherab_generomak.zip. However, some changes to Cherab-SOLPS code are required before it can read the files.
First, this simulation is for hydrogen plasma and the hydrogen is not in _popular_species
and _species_symbol_map
dicts. As a hotfix, just add hydrogen to these dicts. I suggest using cherab.core.atomic.elements
instead of these dicts in the future, but I'll raise a separate issue on this.
Second, as @jacklovell correctly noticed in issue:#31, the EIRENE neutral density must be used, not the B2 one. As a hotfix, just add
sim._b2_neutral_densities = np.zeros((nx, ny, eirene.da.shape[2]))
sim._b2_neutral_densities[1:nx - 1, 1:ny - 1, :] = eirene.da
to the end of load_solps_from_raw_output()
.
After looking at the Cherab-SOLPS code, I have some suggestions on how to improve it. I'll raise the issues on these improvements shortly.
Brilliant, thanks for doing this. Yes, all suggestions for improvement are very welcome.
We need a demo of the functionality of this module which doesn't depend on any external sources. This will require the output of a SOLPS5 simulation, as SOLPS4.3 produces files in the wrong (and undocumented) format. Or we need a way to convert SOLPS4.3 files into the SOLPS5 format.