MCNSI 4th meeting, 27-28 September 2005 Minutes by Kim Lefmann, DRAFT version 190106 A) Public meeting, 27 September 2005 0. Participants: ILL: Klaus Liuetenant (KLi) Emmanuel Farhi (EF) PSI: Uwe Filges (UF) Heinz Heer (HH) NPI: Jan Saroun (JS) ISIS: Dickon Champion (DC) Risø: Peter Willendrup (PW) Kim Lefmann (KLe) Guests: Phil Bentley, HMI Alexander Ioffe, Jülich (AI) E. Jocha ??, ?? Rob Dalgliesh, ISIS M. Ackers ??, ?? R. McGreevy, NMI3 1. VITESS developments KLi presented the VITESS 2.6 release from July 2005 under open source licence. An important new feature is the "instrument digest" functionality, which can be used to initialize module parameters for a complete simulation. Future development will contain more sample components, 3D graphics, and reorganization of visualization tools. After the break-up of the HMI VITESS group, the development of VITESS has been divided between 7 persons, each working part time on the project. The development is now located at 4 centres: PSI, ILL, HMI, and Dubna. AI represented the Jülich view that it is important to keep the packages alive, and he was worried for the dismounting of the VITESS group. Especially due to the VITESS ability to handle polarization. AI suggested to associate S. Mahoshin (Dubna, former HMI) to MCNSI. AI mentioned that there is a need for polarized simulations, support for FRM-2 instrumentation, elliptic guide modules, and better visualization. There were specific requests for features to input field distributions. AI further suggested to enhance the collaboration between networks. 2. McStas developments PW presented the McStas release 1.9 to appear November 2005. The focus of this update has been on component validation and documentation. A thorough series of tests is running, and all bugs are reported to a central bug-handling system. PW presented the results of virtual experiments on powder diffraction (DMC at PSI). Relative line intensities and line widths agree perfectly with measured data, while absolute intensities are a factor of 10 wrong. It was requested from RD that more frequent updates of McStas developments were communicated, e.g. monthly. PB suggested to calculate the B-field line integrals analytically to avoid large computation times. 3. RESTRAX developments JS presented the developments at the NPI packages. SIMRES is used for instrument optimization of triple-axis-type machines. SIMRES has recently been improved with phase space visualization and tools for numerical optimization. Here, a figure-of-merit is defined, and the simulation typically detect 1000-10000 events pr second. This allows for a 4-parameter optimization within one hour. As an example was shown the optimization of lobster-eye optics for spatial focusing at IN-14, ILL. The two parameters to be optimized were the guide curvature and exit width. This two parameter space was firstly mapped out completely for comparison, then the automatic optimization was performed to find the minimum in less than 10 iterations. The resulting gain factor was 3 at 4 Å wavelength. RESTRAX is used for data analysis. The resolution function is represented by approx. 1000 Monte Carlo points in (q,w) space. This is then used for a convolution of the model S(q,w) to get the resolution corrected data, to be used for fitting. An example was shown for the planned flat-cone option at IN20, ILL. 4. Developments at ISIS DC presented the simulation developments at ISIS, both in connection with existing instruments and with the design of TS-2 instruments. HET: The simulation of the Fermi chopper has been checked versus analytical calculations and experiments. The agreement is good except for a few cases. OSIRIS: VITESS simulations have been compared with experiments, with good agreement. However, absolute intensities deviate (Gold foil 2.7E7; VITESS 5.8E7). (Performed by Mark Telling, Mark Adams) WISH: The elliptical tapered guide for WISH has been optimized. RD har written McStas components for polarization: - Polarization mirror - double bounce mirror DC presented the ISIS effort to perform grid simulations. The idea is to break up jobs, send them out to different nodes, and then collect the results. This could be used to cut a single simulation into pieces or to perform a parameter scan. Both methods are demonstrated to work, but the implementation is platform dependent. 5. General sample simulation EF presented the developments in the isotropic general S(q,w) sample component in McStas. There is a possibility to input S(q,w) from Molecular Dynamics simulations, including both coherent and incoherent scattering, elastic and inelastic processes. Further, the component allows for multiple scattering events. The algorithm in the component begins by selecting the scattering process. Then, the energy transfer, w, is selected from a precompiled density-of-states lookup table, before selecting q between the allowed q's for that w. Finally, the neutron weight is adjusted according to probabilities and absorption. RMG suggested to use an analytical S(q,w) for a start to avoid polluting the simulation effects with effects of Molecular Dynamics. RMG saw this tool as a potential for RMC. 6. Intercomparison between codes and real experiments UF presented a common simulation on the TOF instrument FOCUS (PSI), using both McStas and VITESS. These first parts of the simulations concerned only the part up to the monochromator. The guide system consists of 4 sections: straight-curved-straight-focusing, and the wavelengths simulated were 0.1-20 Å, while the typical working range of the instrument is from 2 to 6 Å. The guide simulations are consistent up to 39 m (deviation less than 5%). at 69.9 m, the deviations are around 20%. This discrepancy was discussed and it could be attributed to an error in the curved guide McStas component. It was suggested to use a piecewise curved series of straight sections in stead. At the sample position after the monochromator, real measured values were compared with the McStas simulation. The discrepancies were wavelength dependend, ranging from 0 to 15%. VITESS simulations are still to be performed. In absolute flux values at 54.17 m position, McStas is 6% higher than gold foil measurements, while VITESS is 25% lower. KLi mentioned that another set of FOCUS intercomparisons are underways with an improved focus on agreement between instrument descriptions. EF mentioned that IN12 and IN14 would be good candidates for future intercomparison. ---------------------------------------------- B) Private meeting, 28 September 2005 0. Participants: ILL: Klaus Liuetenant (KLi) Emmanuel Farhi (EF) PSI: Uwe Filges (UF) Heinz Heer (HH) NPI: Jan Saroun (JS) ISIS: Dickon Champion (DC) Risø: Peter Willendrup (PW) Kim Lefmann (KLe) 1. Administrative matters 2 of the 3 partners recieving budget was reporting on the money spending. In general, things are well at Risø and NPI, whereas the lack of activity af HMI is a cause of worry. This will be sorted out. The manpower situation at Risø is improving in 2006, as a new post doc will be hired, and a student has signed up. ILL is taking in trainees to work on Grid simulations. The milestones were discussed. Everything about administration and packages seem to be OK, while intercomparisons are lacking somewhat behind. Especially we need to activate of the US package responsibles. Virtual experiments is ahead of schedule, but it is a cause of worry that the IN12 guide simulations by all 3 packages deviate strongly (factor 3-4) from experiments (while the simulations agree nicely). KLe will discuss with C. Hradil at FRM-2 about intercomparison simulations of PANDA. The next meeting will be held at Risø, spring 2006. 2. Virtual powder diffraction experiments PW presented the virtual powder experiment at DMC (PSI). The new PowderN component in McStas provides a complete diffraction pattern that agrees well with exp., except that simulations are a factor of 10 too high. 3. Control of virtual experiments at PSI UF presented the integration of McStas into the PSI control software SICS: MCSICS. The output from McStas would be cast into the XML format EF suggested to have a "view instrument" command in SICS, using the McStas graphical output. 4. Use of virtual experiments in teaching KLe continued the presentation from last meeting about the Univ. Copenhagen course in neutron scattering, where McStas simulations and virtual experiments were used as a teaching tool. The students had reached a high level of practical understanding of neutron scattering, when reaching the final week of practicals at RITA-2, PSI. 5. The instrument optimization algorithm in SIMRES JS gave more details about the SIMRES optimization. The Levenberg-Marquardt method is used, since it is tolerant to errors from the simulations. However, the method needs to calculate the second dericatives of the figure-of-merit. Here, an upper and a lower limit to the stepsize is needed to avoid divergence of the optimization. It thus becomes an algorithm that needs user interaction; not a black box. KLi mentioned that the same problems were present in the VITESS optimization scheme. EF suggested to use other methods, e.g. Monte Carlo optimization (!) to find the maximal figure-of-merit. He suggested a common code for the control of this simulation type, to share between all packages. 6. Intercomparison problems UF presented simulation problems encountered during his intercomparison efforts. - The McStas Source-Gen component gives wrong intensities in some modes. (This has been resolved and corrected leter in 2005.) - The same component has incorrect valocity values at high divergences. - The simulated intensity is a factor of 7 higher as the measured intensity at the guide entry (1.7 m position). Up to now it is not clear where the problem is. In addition one major problem is that the measurement at position 1.7 m can not be repeated because the access is not given. A measurement failure can not be excluded. - Measurements of I(lambda) exist only at the sample position. Directly at the cold neutron source, only calculated values are available. UF reported the McStas simulations to be faster as VITESS at long wavelengths: Equal speed at 2 Å, 1.27 times faster at 6Å, and 2.05 times faster for the full 0.1-20 Å interval. 7. Transfer of components between VITESS and McStas KLi presented the McStas-VITESS agreement to share code. He emphasized that this code share had the risk that errors would be duplicated and not found; so code shared in this way should be clearly marked. One way to implement this is to use the very same code, as has been done with Fermi Chopper (using #ifdef's). Another way is a thorough intercomparison between code pieces inside packages. The direct transfer of codes only makes sense for complex components.