Skip to Content.
Sympa Menu

opal - RE: [Opal] OPAL - central region

opal AT

Subject: The OPAL Discussion Forum

List archive

RE: [Opal] OPAL - central region

Chronological Thread 
  • From: Daniel Winklehner <winklehn AT>
  • To: "Snuverink Jochem (PSI)" <jochem.snuverink AT>, Sébastien Toussaint <sebastien.toussaint AT>
  • Cc: opal <opal AT>
  • Subject: RE: [Opal] OPAL - central region
  • Date: Fri, 24 Jul 2020 16:31:57 +0000
  • Accept-language: en-US

Hi Sébastien,


I am using a python script (attached) to convert from COMSOL to h5. It’s a bit barebones right now, but you can see the format that OPAL expects in the h5 file. It assumes that you export from COMSOL in spreadsheet format using a grid and no header lines. But you can easily change the script to skip header lines or even extract the length and field units from the COMSOL header if you like.






Daniel Winklehner

Research Scientist

Massachusetts Institute of Technology

Laboratory for Nuclear Science

Phone: +1 617 715 4280 

Email: winklehn AT



From: opal-request AT <opal-request AT> On Behalf Of Snuverink Jochem (PSI)
Sent: Friday, July 24, 2020 11:17
To: Sébastien Toussaint <sebastien.toussaint AT>
Cc: opal <opal AT>
Subject: RE: [Opal] OPAL - central region


Dear Sébastien Toussaint,


Thanks for your mail, I would recommend to subscribe to the OPAL mailing list at


Attached is a C-program that converts an ASCII output to the h5 format, it can also be found in the repository under tools/BandRF. You might need to adapt it to your use case as it was written for ANSYS output files.


Best regards,



From: Christof Metzger-Kraus <christof.j.kraus AT>
Sent: Freitag, 24. Juli 2020 17:01
To: Sébastien Toussaint <sebastien.toussaint AT>
Cc: Snuverink Jochem (PSI) <jochem.snuverink AT>; Frey Matthias (PSI) <matthias.frey AT>
Subject: Re: OPAL - central region


Dear Mr. Toussaint,


I'm not the expert on OPAL-cycl but the two other developers I've added in CC are. I'm sure one of them can answer your question. 


Best regards 

Christof Metzger-Kraus 


Sébastien Toussaint <sebastien.toussaint AT> schrieb am Fr., 24. Juli 2020, 16:35:

Dear Dr. Kraus,


Sorry if there exists a more suitable way to contact you or the OPAL development team.


Last year, after the talk of Prof. Adelmann at CYC2019 (cape town), We started to use OPAL-cycl to simulate orbits in a cyclotron. Our goal would now be to include the RF field to simulate accurately what is happening in the central region. The electrostatic simulations were realized with COMSOL.


The BANDRF option of opal requires a .h5 format that I am unable to export from COMSOL. After a lot of unfruitful attempts, I contact you to know if you have a clue to guide us going from a txt file exported from comsol (Basically x,y,z, Ex,Ey,Ez) to a .h5 format ?


Any advice as to how we could proceed is welcome.


Best regards,


Sébastien Toussaint


Archive powered by MHonArc 2.6.19.

Top of Page