Electrical resistivity of materials is a basic property that is measured and used in a large variety of studies. In one type of study, electrical resistivity data are used to calculate thermal conductivity and interior heat flow of terrestrial-type bodies. The electrical resistivity of a sample is often obtained using the four-wire method as it reduces the contribution of the electrodes that is present in the two-wire method. The four-wire method is used in the cooling of industrial devices , soldering processes , electronic systems , temperature determination at depth , and simulations of physical properties of terrestrial-type bodies at high pressures and high temperatures. High pressure and high temperature measurements of electrical resistivity (ρ) in high pressure multi-anvil presses are used to calculate thermal conductivity (k) and the heat flow in the interiors of terrestrial-type bodies. Ezenwa and Secco  developed a four-wire method to solve the voltage bias, caused by passing a test current in a single direction, which previously resulted in erroneous analysis of ρ measurements due to parasitic voltages caused by the Seebeck effect or other sources. This polarity switching method allowed successful measurements of ρ of Zn , Nb , Ni , Co , Cu , Fe [10, 11], Ag , W , Re , Au , Fe-Si alloys [15, 16, 17], and Fe-S alloys . Three other papers from different research groups report using similar data collection practices, while several other papers use the four-wire method without a polarity switch . In these measurements, the sample is located in the middle of a high-pressure cell, between two metal discs which are each contacted by a thermocouple. The metal discs, ensuring contact between the thermocouples and the sample, are typically composed of W. The thermocouples are typically Type-C thermocouples (one leg is made of 95%W/5%Re and the other leg is made of 74%W/26%Re) where voltage (i.e., thermoelectric emf) is measured and then converted to temperature after the experiment. The voltage drop across the sample for resistivity measurement is made between a pair of wires on opposite sides of the sample (one wire leg from each thermocouple), and therefore includes the voltage contribution of the discs. Thus, the ρ of the sample is obtained by subtracting the disc contribution from the total measurement.
The four-wire method incorporates a polarity switch and a mode switch, and results in a pattern of alternating values of temperature (emf) and voltage in a single column when acquired by a single voltmeter. A complete measurement produces a pattern similar to the following: temperature emf before voltage measurement (Tb), positive voltage drop with polarity in one direction (V+), negative voltage drop with polarity in opposite direction (V), temperature emf after voltage measurement (Ta). The order of V+ and V– may be alternated depending on the position of the polarity switch. At the University of Western Ontario, in the High-Pressure High-Temperature Laboratory, a programmable Keysight B2961 power supply is used to provide a constant direct test current of 0.2 A while data are acquired by a programmable Keysight 34470A meter operating at 20 Hz and 1 µV resolution. The selection of temperature and voltage values is typically done manually, and, to our knowledge, no software available in the literature is capable of automatically processing the temperature and voltage signals.
The application Rho calculates the average of 10 data points for each temperature section and all available data points for each voltage section. It is expected that temperature remains stable during these 10 data points. At high temperatures, when the frequency of measurements is increased and the quantity of data points in each section is low (due to the rapid switching between each section), Rho selects all the available data for each section. The values in each selection are averaged. Then the V+ and V– selections are averaged to give the voltage drop (V), while Tb and Ta selections are averaged to give the temperature (T). The voltage drop and current (I) are then used to calculate the electrical resistance (R) of the sample using Ohm’s law:
The electrical resistivity is then calculated using Pouillet’s law:
where A is the sample’s cross-sectional area and l is the sample’s length which are both measured on the post-experiment recovered sample. Values of ρ are then used to calculate the electronic component of thermal conductivity (k) via the empirical Wiedemann-Franz law:
where T is temperature and Lo is the theoretical Sommerfeld value (Lo = 2.44∙10–8 W∙Ω∙K–2) of the Lorenz number. The error in temperature measurement corresponds to the standard deviation of the data points of each temperature section. The error in ρ is obtained by error propagation using the uncertainties in sample geometry and standard deviation of the voltage measurements. Similarly, the error in k corresponds to the propagation of the error in ρ.
The main page of Rho is displayed in Figure 1a. The application requires data to be imported in .xlsx, .csv, or .xls format, where the Tb, V+, V–, and Ta data alternate within the first column of the file (see Figure 1b). The first figure (see Figure 1a) that is generated when the file is loaded is of the raw data. Noise, or abrupt fluctuation in data, that are not representative of the measurements can be removed by selecting the starting and ending indices (x-axis) of the section. The application attributes NaN values to each data point of this section, which removes them from the future analysis. When ‘Plot Data’ is selected, Rho identifies the temperature and voltage sections based on deviations from the main increasing trend, which corresponds to the temperature increase with time.
First, the intervals of negative values are labelled as voltage measurements (Vtotal). This temporary selection is displayed in Figure 1 of the application (see Figure 2a below). In the first scenario, the pattern Tb V+ V– Ta is considered and Tb and Ta are temporarily identified. To satisfy this scenario, the difference between Tb and Vtotal must be smaller than the difference between Ta and Vtotal considering that the part of Vtotal closer to Tb would be V+ and that closer to Ta would be V– (and V– < V+). Rho uses a loop to evaluate this scenario at each deviation from the main increasing trend. Whenever the scenario is observed, V+ is temporarily defined as the first trend in Vtotal. In the second scenario, the pattern Tb V– V+ Ta is considered, and a similar loop is applied to identify the intervals where the difference between Tb and Vtotal is larger than that of Ta and Vtotal. Here, the part of Vtotal closer to Tb would be V– and that closer to Ta would be V+. Another analysis of the first scenario identifies the stable intervals on the main increasing trend right before V+ as Tb, and that right after V– as Ta. In other words, fluctuations, or noise, between temperature and voltage measurements are automatically ignored. A similar analysis of the second scenario identifies the stable intervals on the main increasing trend right before V– as Tb and that right after V+ as Ta. The corresponding indexes (x-axis) and data (y-axis) for each selection are combined into variables for Tb, V–, V+, and Ta. The ‘Outliers Degrees of Freedom’ parameter evaluates the differences between the trends of V– and V+ and identifies data points outside of these trends as outliers. A larger degree of freedom will include more data points in the final variables for V– and V+, while a smaller degree of freedom will ignore more data points. The value 20 seems to be the best fit for this parameter, although it can be adjusted by the user. In other words, fluctuations of 20 times and more are defined as outliers. The final selection is displayed in Figure 2 of the application (see Figure 2a and 2d). The contribution of the discs to the measured ρ is subtracted by fitting the ρ of the selected material. The ‘Discs’ dropdown menu contains options of W from 2–5 GPa , Re from 2–5 GPa  and Pt at 1 atm, 10 and 20 GPa . Supplementary options may be added to future updates of the application as data become available in the literature for different metals used for the discs. Temperature is automatically converted from emf to (K) using the selected thermocouple calibration equation. The ‘Thermocouple’ dropdown menu contains options for Type-C , Type-S at 1 atm  and Type-S from 1–5 GPa thermocouples . The input parameters are then used in equation (1), (2) and (3) to plot ρ in Figure 3 of the application and output values of T (K), ρ (µΩ·cm), error in ρ (µΩ·cm), k (Wm–1K–1) and error in k (Wm–1K–1) (see Figure 2b and 2c). The values are displayed in the ‘Output’ tab and can be copied and pasted on another platform for further analysis.
The script architecture is summarized in Figure 3 below.
Examples of running the software are displayed in Figure 2. After loaded the raw data file, Figure 1 of the application should automatically display the raw data. If the raw data file is in the incorrect format, an error will be set (cell2mat error on MatLab), and Figure 1 will not display the raw data. The users should confirm the temperature and voltage selections since similarity in these values might result in the incorrect identification of some data points. The computed ρ can be compared with that of Fe at 1 atm . Rho can successfully compute ρ of any material as long as the input file is in the correct format. Users may use example files of Au at 5 GPa , Fe-Ni-Si at 20 GPa , and Fe-Si at 9 GPa  available on the GitHub repository to get familiar with Rho and the format of the input file.
Users may choose to download Rho.exe file from FigShare or Rho.m from GitHub.
Rho.exe – Any system capable of running a .exe file.
Rho.m – Any system capable of running Matlab R2021a or higher.
Rho.mlapp – Any system capable of running AppDesigner R2021a of higher.
Tested in Matlab R2021a, likely to work in earlier versions also.
Rho.exe – 0.82 MB
Rho.m – 56 KB
Archive (e.g. institutional repository, general repository) (required – please see instructions on journal website for depositing archive copy of software in a suitable repository)
Persistent identifier: 10.6084/m9.figshare.19175432
Licence: GNU General Public License v3.0
Publisher: Meryem Berrada
Version published: 1.0
Date published: 15/02/22
Code repository (e.g. SourceForge, GitHub etc.) (required)
Licence: GNU General Public License v3.0
Date published: 02/02/22
The application Rho minimizes the data analysis time and uses signal processing to identify the temperature (emf) and voltage drop measurements from a single column of alternating measurements resulting from the four-wire method. The confirmation of the selection by the user remains required considering the limitations of the attributed thresholds for outliers. This software (Rho.exe) can be used to analyse electrical resistivity for applications to the cooling of industrial devices, soldering processes, electronic systems, temperature determination at depth, and simulations of physical properties of terrestrial-type bodies at high pressures and high temperatures. Rho can be used by any research group conducting alternate temperature (emf) and voltage measurements, such as the Mineral Physics groups at the University of Hawaii and University of Michigan, to obtain electrical resistivity at either ambient or extreme conditions. A user wishing to obtain real-time resistivity measurement would need to first connect their computer to the multimeter connected to the 4 electrodes. Then, Rho should be modified to continuously read the values from the multimeter and update the figures. Modifications to the software, such as changing the identification thresholds, adding TC types or disc materials, can be done through Rho.m via the MATLAB platform. The authors are continuously working to improve the software and implement more features.
We encourage the reader to download Rho via MATLAB  or through this article. Inquiries can be addressed to the corresponding author of this article, or through the contact information displayed in the software.
The application is designed on MATLAB App Designer. MATLAB is a registered trademark of The MathWorks, Inc.
This work was supported by funds to R.A.S. from the Natural Sciences and Engineering Research Council of Canada [grant number 2018-05021] and the Canada Foundation for Innovation [project number 11860].
The authors have no competing interests to declare.
Hapenciuc CL, Negut I, Borca-Tasciuc T, Mihailescu IN. A steady-state hot-wire method for thermal conductivity measurements of fluids. International Journal of Heat and Mass Transfer. 2019; 134: 993–1002. DOI: https://doi.org/10.1016/j.ijheatmasstransfer.2019.01.098
Tillmann W, Sievers N, Henning T, Jakimenko D. FEM study of analyzing the electrical resistance of brazed joint by the 4-wire technique for quality assurance. Measurement. 2017; 104: 43–49. DOI: https://doi.org/10.1016/j.measurement.2017.03.015
Krishnamurthy R, Bharatiraja C, Adedayo Y, Tariq M, Azeem A. Locating Wire Fault in Controller Area Network Based on Kelvin (Four-Wire) Resistance Approach. Paper presented at the Applications of Computing, Automation and Wireless Systems in Electrical Engineering. Singapore; 2019. DOI: https://doi.org/10.1007/978-981-13-6772-4_98
Erkan K, Akkoyunlu B, Balkan E, Tayanç M. A portable borehole temperature logging system using the four-wire resistance method. Journal of Geophysics and Engineering. 2017; 14(6): 1413–1419. DOI: https://doi.org/10.1088/1742-2140/aa7ffe
Ezenwa IC, Secco RA. Constant electrical resistivity of Zn along the melting boundary up to 5 GPa. High Pressure Research. 2017a; 37(3): 319–333. DOI: https://doi.org/10.1080/08957959.2017.1340473
Ezenwa IC, Secco RA. Electronic transition in solid Nb at high pressure and temperature. Journal of Applied Physics. 2017b; 121(22): 225903. DOI: https://doi.org/10.1063/1.4985548
Silber RE, Secco RA, Yong W. Constant electrical resistivity of Ni along the melting boundary up to 9 GPa. Journal of Geophysical Research: Solid Earth. 2017; 122(7): 5064–5081. DOI: https://doi.org/10.1002/2017JB014259
Ezenwa IC, Secco RA. Invariant electrical resistivity of Co along the melting boundary. Earth and Planetary Science Letters. 2017c; 474: 120–127. DOI: https://doi.org/10.1016/j.epsl.2017.06.032
Ezenwa IC, Secco RA, Yong W, Pozzo M, Alfè D. Electrical resistivity of solid and liquid Cu up to 5 GPa: Decrease along the melting boundary. Journal of Physics and Chemistry of Solids. 2017; 110: 386–393. DOI: https://doi.org/10.1016/j.jpcs.2017.06.030
Silber RE, Secco RA, Yong W, Littleton JAH. Electrical resistivity of liquid Fe to 12 GPa: Implications for heat flow in cores of terrestrial bodies. Scientific Reports. 2018; 8(1): 10758. DOI: https://doi.org/10.1038/s41598-018-28921-w
Yong W, Secco RA, Littleton JAH, Silber RE. The Iron Invariance: Implications for Thermal Convection in Earth’s Core. Geophysical Research Letters. 2019; 46(20): 11065–11070. DOI: https://doi.org/10.1029/2019GL084485
Littleton JAH, Secco RA, Yong W. Decreasing electrical resistivity of silver along the melting boundary up to 5 GPa. High Pressure Research. 2018; 38(2): 99–106. DOI: https://doi.org/10.1080/08957959.2018.1435786
Littleton JAH, Secco RA, Yong W, Berrada M. Electrical resistivity and thermal conductivity of W and Re up to 5 GPa and 2300 K. Journal of Applied Physics. 2019; 125(13): 135901. DOI: https://doi.org/10.1080/08957959.2018.1435786
Berrada M, Secco RA, Yong W. Decreasing electrical resistivity of gold along the melting boundary up to 5 GPa. High Pressure Research, 2018; 38(4): 367–376. DOI: https://doi.org/10.1080/08957959.2018.1493476
Silber RE, Secco RA, Yong W, Littleton JAH. Heat Flow in Earth’s Core From Invariant Electrical Resistivity of Fe-Si on the Melting Boundary to 9 GPa: Do Light Elements Matter? Journal of Geophysical Research: Solid Earth. 2019; 124(6): 5521–5543. DOI: https://doi.org/10.1029/2019JB017375
Berrada M, Secco RA, Yong W. Electrical resistivity measurements of Fe-Si with implications for the early lunar dynamo. Journal of Geophysical Research: Planets; 2020. DOI: https://doi.org/10.1029/2020JE006380
Berrada M, Secco RA, Yong W. Adiabatic Heat Flow in Mercury’s Core from Electrical Resistivity Measurements of Liquid Fe-8.5wt%Si to 24 GPa. Earth and Planetary Science Letters; 2021. DOI: https://doi.org/10.1016/j.epsl.2021.117053
Littleton JAH, Secco RA, Yong W. Electrical Resistivity of FeS at High Pressures and Temperatures: Implications of Thermal Transport in the Core of Ganymede. Journal of Geophysical Research: Planets. 2021; 126(5). DOI: https://doi.org/10.1029/2020JE006793
Berrada M, Secco RA. Review of Electrical Resistivity Measurements and Calculations of Fe and Fe-Alloys Relating to Planetary Cores. Frontiers in Earth Science. 2021; 9(802). Review. DOI: https://doi.org/10.3389/feart.2021.732289
Gomi H, Yoshino T. Resistivity, Seebeck coefficient, and thermal conductivity of platinum at high pressure and temperature. Physical Review B. 2019; 100(21): 214302. DOI: https://doi.org/10.1103/PhysRevB.100.214302
Getting IC, Kennedy GC. Effect of Pressure on the emf of Chromel-Alumel and Platinum-Platinum 10% Rhodium Thermocouples. Journal of Applied Physics, 1970; 41(11): 4552–4562. DOI: https://doi.org/10.1063/1.1658495
Berrada M, Secco RA, Yong W. Resistivity of solid and liquid Fe–Ni–Si with applications to the cores of Earth, Mercury and Venus. Sci Rep. 2022; 12: 9941. DOI: https://doi.org/10.1038/s41598-022-14130-z
Berrada, M. Rho (https://www.mathworks.com/matlabcentral/fileexchange/<…>), MATLAB Central File Exchange; 2022.