DOI: 10.11583/dtu.28067213.v1
title: Data set for "The magnetic scalar potential and demagnetization vector for a cylinder tile"

description: The is the data set for the paper [Bjørk, R., The magnetic scalar potential and demagnetization vector for a cylinder tile, Journal of Magnetism and Magnetic Materials, 632, 173519, 2025]. The DOI for the publication is 10.1016/j.jmmm.2025.173519 .These data are located on the repository at data.dtu.dk, with DOI:10.11583/DTU.28067213 and URL: https://doi.org/10.11583/DTU.28067213 .<br>The folder "Validation_potential_cylinder" contains the finite element validation data for the full cylinder. The folder contains the following files: The file Cylinder_potential.mph is a COMSOL model (version 6.3) that computes the magnetic scalar potential for a fixed geometry using a finite element approach, to compare with the analytical solution. In order to reduce file size, the mesh and solution are removed from the file, and these thus needs to be recomputed. The file Line01.txt to Line17.txt are text files that contains in the first column the arc length (length along the line) for the specific line chosen (there are 17 different lines), and in the next 11 columns contains the magnetic scalar potential for the 11 different magnetization specified in the Matlab file.<br>The folder "Validation_potential_cylinder_slice" contains the finite element validation data for the cylinder slice. The folder contains the following files: The file Cylinder_slice_potential_1.mph is a COMSOL model (version 6.3) that computes the magnetic scalar potential for a fixed geometry (geometry 1) using a finite element approach, to compare with the analytical solution. In order to reduce file size, the mesh and solution are removed from the file, and these thus needs to be recomputed. The files Cylinder_slice_potential_2.mph to Cylinder_slice_potential_6.mph are similar files to Cylinder_slice_potential_1.mph except for different cylinder slice geometries. The files Line01_1.txt to Line17_1.txt are text files with results for geometry 1 from the Comsol simulations (Cylinder_slice_potential_1.mph) that contains in the first column the arc length (length along the line) for the specific line chosen (there are 17 different lines), and in the next 11 columns contains the magnetic scalar potential for the 11 different magnetization specified in the Matlab file. The files Line01_2.txt to Line17_2.txt are similar files for geometry 2, and so on up to "_6".<br>The file MagTense_Validation_cylinder_and_cylindrical_slice_potential.m contains the analytical expressions for the scalar magnetic potential for a cylinder and a cylindrical slice. Its arguments and how to call it can be seen from the two example files Cylinder_potential_specific_line_plot.m and Cylinder_potential_specific_surface_plot.m.The file Cylinder_potential_specific_line_plot.m is a Matlab file that plot Figs. 3 and 5 from the publication by evaluating the scalar potential along the specific lines specified in the publication.The file Cylinder_potential_specific_surface_plot.m is a Matlab file that calculates the scalar potential for a specific geometry and magnetization and saves this for plotting.The file Plot_specific_surface_plot.m is a Matlab file that plot Figs. 2 and 4 from the publication by loading in the scalar potential data saved in the files Full_8_0.01_z_0.2.mat and Slice_4_0.01_z_0.mat and plotting these.The file Full_8_0.01_z_0.2.mat is a Matlab data file containing the magnetic scalar potential for geometry 1 and magnetization direction 8 in the slice z=0.2 m.The file Slice_4_0.01_z_0.mat is a Matlab data file containing the magnetic scalar potential for geometry 1 and magnetization direction 4 in the slice z=0 m.The file ds2nfu.m is a Matlab file that is used to determine coordinates in figures, to plot labels etc.The folder elliptic-master is the Matlab/Octave implementation of Elliptic integrals of three types from Moiseev I., Elliptic functions for Matlab and Octave, (2008), GitHub repository, DOI: http://dx.doi.org/10.5281/zenodo.48264 .All functions are also provided in the MagTense framework, found at www.magtense.org .