Development of a mathematical model of a transformer-type corrosion meter for pipelines

The article is devoted to the substantiation of a technical solution to the problem of monitoring corrosion changes in the walls of oil and gas pipelines using the electromagnetic method of non-destructive testing. To conduct a machine experiment on the qualitative and quantitative assessment of the characteristics of the magnetic field of solenoids with different geometric characteristics, a model has been developed that allows determining the magnetic induction and vector potential of the magnetic field of the solenoid and to visualize individual projections of vectors. The dependence of the vector magnetic potential of the field induced in the transformer and the role of the magnetic circuit in which the control object performs on the geometric and electromagnetic properties of the control object is determined.


Introduction
The modern oil and gas industry around the world pays more and more attention to the safety of oil and gas production, transportation and storage, both for humans and the environment. At the same time, despite the development of methods and means of ensuring industrial safety of oil and gas facilities and the successes achieved, the number of accidents and incidents at oil and gas pipelines, as well as the environmental problems associated with this, remain [1].
A significant proportion of accidents due to pipe corrosion makes research in the field of anticorrosive protection [2,3] and the creation of corrosion control means for main pipelines [4][5][6][7][8] relevant. The ability to determine the moment of reaching a critical level of corrosion changes on the basis of instrumental-analytical forecast [9] enables not only timely replacement of pipeline sections, but also justification for the use of specialized electric, chemical or combined anti-corrosion agents.

Materials and Methods
The main problem of monitoring corrosion changes in pipelines is the difficulty of measuring the thickness of ferromagnetic conductive pipes directly during their operation. Primary information collection devices should provide continuous (periodic) automatic control of corrosion wear of the pipeline wall without the use of in-line flaw detectors and pitting. Such an intelligent sensor can be represented by a corrosion monitoring device for trunk pipelines [10].
The essence of the technical implementation of the device lies in the fact that on the main pipeline, in the area of the most severe corrosion changes, exciting and measuring inductance coils covering the pipeline are mounted. The pipe acts as a magnetic circuit of the transformer eddy current transducer and EMF induced in the measuring coil will depend on the parameters of the pipe, including its thickness. Periodic measurement of EMF, the accumulation of measured values in the memory of a digital computer and comparison with calculated values allows determining the residual resource of the metal wall of the pipeline and to predict the moment of thinning of the wall to an emergency state.

Numerical modeling
Depending on the mutual arrangement of the coils and the surface of the monitored product, two types of eddy current transducers (ECTs) are distinguished: strap-on ECTs and pass-through ECP [2]. Common to both methods is the use of transformers with two windings: exciting and measuring ones the magnetic field of which is closed through the control object. To simulate a transformer, one must first create a model of a solenoid (coil without a core) and then consider the influence of the shape and material of the core on the parameters of the magnetic field.
Thus, it is necessary to determine the dependence of the vector magnetic potential of the field induced in the transformer, the role of the magnetic circuit in which the control object performs, on the geometric and electromagnetic properties of the object of control.
To determine the vector potential of an ECT, it is necessary to consider the magnetic field structure of a single-layer solenoid and a single-layer cylindrical coil with a long core and a large magnetic gap. Remaining within the framework of the electron theory, we consider the current in the wire as a sequence of charges moving at a constant speed. Obviously, winding the wire does not change the velocity of the charge carriers along the wire v 0 (i.e., the absolute value of the speed), however, components of the velocity of the charge carriers appear along the coordinate axes. In this case, the motion of the charge carriers along the 0Z axis will be motion with a constant speed v z , in the X0Y plane, they will move with a constant speed v ⊥ in a circular way.
We express the velocity data through the radius of the helix a and the pitch of the helix h, for which we consider one unfolded coil of the helix in the X0Z plane. Considering that the helix pitch h is expressed in terms of the length of the solenoid s L and the number of coils N as h = Ls/N, and passing to the currents, we obtain where N e is the linear density of electrons in the solenoid (the number of electrons in the wire wound around the solenoid, related to the length of the solenoid), e is the electron charge. In addition, the winding of the wire leads to an increase in the length of the wire with current L, which is expressed in terms of the number of turns and the winding pitch An analysis of expressions (1), (2) shows that the solenoid field with single-layer winding is a superposition of the fields of two currents, one of which is circular, the second is longitudinal. An increase in the number of turns leads, on the one hand, to a decrease in the pitch of the helix and, consequently, to a decrease in the magnitude of the longitudinal current (see expressions (1), (3)), and, on the other hand, to an increase in the length of the wire wound around the solenoid, which increases in the number of charge carriers moving in the solenoid, i.e., to an increase in the linear charge density. Evidently from expressions (1) and (2), the amount of electricity moving in the direction of the 0Z axis per unit time remains unchanged with an increase in the number of turns of the solenoid. Thus, for any number of turns (any winding pitch), the amount of electricity moving in the direction of the longitudinal axis of the solenoid per unit time is equal to the amount of electricity in the straight wire. Therefore, a solenoid with a single-layer winding must have an axially symmetric magnetic field in a plane perpendicular to the longitudinal axis of the solenoid, similar to a direct current field. Given the analogy with the direct current magnetic field, it is natural to call it the transverse field in the future. With a large number of turns, the solenoid can be considered as a conducting cylinder of finite dimensions along which a longitudinal current flows; therefore, we can expect the difference between the transverse magnetic field of the solenoid and the magnetic field of the direct current, which should appear with an increase in the number of turns. To verify the reasoning given above, we obtain an analytical expression for the magnetic field strength of the solenoid based on the Biot-Savart-Laplace Law law and the principle of superposition.
It is well known that the position of any point in a helix is completely determined by setting a unit vector n directed along the axis of the helix (axis 0Z) and a vector a marking the position of the point of the helix in the plane perpendicular to the vector n. Then the position of any point of the helix is determined by the radius vector R, which depends on one parameter-the angle of rotation  : Current component is expressed through vector t ̅ (φ), that is tangent to the helix, as where To calculate the integral (7), we pass to the coordinate record. Noting that in the chosen coordinate system the vectors , , [ × ] in (5)   ).
Substituting (8)-(10) in (7) we obtain for the components of the magnetic field strength of the solenoid along the corresponding coordinate axes:  Due to the fact that the solenoid has a cylindrical shape, it seems appropriate to write the field components in a cylindrical coordinate system. For this, we will characterize the position of the observation point in the plane perpendicular to the longitudinal axis of the solenoid, with the radius vector 0 and the angle of rotation 0 . position relative to the longitudinal solenoid-coordinate 0 . Then the expressions for the field component strength in the cylindrical coordinate system are found by the corresponding change of variables and the transition from the Cartesian to the cylindrical coordinate system, determined by the rotation matrix relative to the 0Z axis [10]: The change of variables described above and expression (14) make it easy to obtain the final expressions for the components of the magnetic field in a cylindrical coordinate system.
Note that expressions (11)-(13) are obtained without using any approximations and allow carrying out calculations for solenoids with arbitrary parameters (length, cross section, and number of turns). Their analysis shows that the integrals in (11)-(13) are always nonzero. Therefore, a single-layer solenoid has a transverse magnetic field similar to a direct current field.
Since the integrals (11)-(13) are not taken in elementary functions, it is advisable, having set the specific parameters of the winding (step, number of turns and the radius of the cross section), to carry out a numerical calculation of the components of the magnetic field strength vector and visualize it. Figure 1 shows the results of calculations of the magnetic induction vector, performed according to formulas (11)-(13).

Figure 1 Projections of the magnetic induction vector
For a higher degree of visibility, instead of the vectors tangent to the lines of force, the magnetic field lines themselves are used. Image acquisition of magnetic field lines is possible using the vector potential of the magnetic field associated with the magnetic induction vector by the relation = . To do this, let us calculate the values of the vector potential ( , , ) at the nodes of the coordinate grid: where , are the vectors defined by (4), (5), 0 is the radius vector of the observation point, and construct a map of equipotential surfaces of the function | ( , , )|.
Substituting (4)-(5) in (15), we obtain the expressions of the components of the vector potential of the magnetic field of the solenoid along the corresponding coordinate axes:

4.Conclusions
Thus, the graphs of the magnetic field lines of the magnetic field of the solenoid obtained on the basis of mathematical expressions (16)-(18) accurately reflect the physical picture. To conduct a machine experiment on the qualitative and quantitative assessment of the magnetic field characteristics of solenoids with different geometric characteristics, a software model was developed using the graphical user interface of the Matlab package. The working window of the program model is shown in Figure 4. The model allows determining the magnetic induction and vector potential of the magnetic field of the solenoid and to visualize individual projections of vectors. The parameters of the solenoid, as well as the parameters of the graphic window can be changed interactively.