CSSP Diffraction Simulator Version 3.3 Shareware software tool for generating diffraction patterns for ultrasonic probes. By: Philippe Rubbers June 2004 Philippe.Rubbers@eskom.co.za TABLE OF CONTENTS 1 2 3 4 5 6 7 8 9 10 INTRODUCTION: SOFTWARE CAPABILITIES: QUICK INSTRUCTIONS ON USING THE SOFTWARE APPLICATION LAYOUT 4.1 DIMENSION SETTINGS 4.2 SETUP TAB 4.3 DIFFRACTION PATTERN 4.4 MAIN CONTROL 4.5 DISPLAY SETTINGS FILE FORMAT MATHEMATICAL TECHNIQUES AND ASSUMPTIONS. 6.1 GEOMETRIC EQUATIONS 6.2 DIFFRACTION EQUATIONS: SOLID – SOLID (THIN LIQUID LAYER). 6.3 DIFFRACTION EQUATIONS: LIQUID – SOLID. 6.4 DIFFRACTION EQUATIONS: SOLID - LIQUID. 6.5 DIFFRACTION AND ATTENUATION. 6.6 BASIC FLOW CHART OF ALGORITHM: SOFTWARE LIMITATIONS: CHANGES AND BUGS FIXED (SINCE VERSION 3) REFERENCES ACKNOWLEDGEMENTS: 3 3 3 4 4 5 9 10 10 11 11 11 12 12 12 13 14 15 15 15 15 1 INTRODUCTION: A number of excellent ultrasonic simulation tools currently exist, in the form of commercial applications or development toolkits. This application is very specific in nature, and only calculates diffraction patterns for various simple configurations. In addition to the features available in other packages, this application can display both the amplitude and the phase of a diffraction pattern. Once diffraction patterns have been calculated using CSSP_Diff_Sim, it is possible to display the propagation of a wave front into the material under test by using CSSP_Pulse_Sim. These shareware products are a means of demonstrating the capabilities of CSSP (Complex plane Split Spectrum Processing) for improving signal to noise ratios. 2 SOFTWARE CAPABILITIES: The software generates the diffraction pattern for selected probe, material and viewing cross section settings. Diffraction patters are calculated for a range of frequencies, and the user can select the currently displayed diffraction pattern frequency. Calculated diffraction patterns can be exported and imported using the File menu. For ease of use, default settings are included, and by pressing the ‘ReProcess’ button, default diffraction patterns are calculated. The user can view either diffraction amplitude or diffraction phase. 3 QUICK INSTRUCTIONS ON USING THE SOFTWARE 1) Select the material (or material properties) properties of the block being tested. Three properties are required: Long wave velocity (cl), Transverse wave velocity (ct), and relative density 2) Select the material of the shoe being used. If no shoe is used, set the material to be the same as the block being tested. 3) Select the probe parameters, such as crystal size, and the number of elements used to simulate the crystal. Note that as the number of elements is increased, the accuracy of the simulation will increase, but at a high cost to both speed and memory requirements. 4) Select the cross section viewing area, including depth and width of the required pattern. 5) Select the viewing parameters, such as selection of Longitudinal or Transverse wave. 6) Set the maximum probe frequency (20dB drop off preferred). 7) Press the Re-Process button and wait while the diffraction patterns are calculated. 8) Once calculated, the diffraction patterns for the various frequencies can be viewed by selecting the display frequency. If required, the data can now be exported to disk using the file menu (top left of screen). 4 APPLICATION LAYOUT The application display has five main components: Dimension settings Main control Diffraction pattern Setup tab Display settings Figure 1: Display layout 4.1 DIMENSION SETTINGS The user can set the following basic dimensions in the ‘Dimension Layout’ section: Depth: Maximum depth of the calculated diffraction pattern Width1: The width of the diffraction pattern before the probe exit point. Width2: The width of the diffraction pattern after the probe exit point. Note that for Phased array probes, the nominal exit point determines the exit point Angle: This is the probe angle as specified by the manufacturer (or nominal probe angle for Phased Array probes) Probe length: This is displayed here for convenience, however it must be changed in the ‘Settings tab’ Height: Height of centre of probe. Depending on the angles etc, this value may be automatically corrected if it results in a portion of the probe being inside the block. 4.2 SETUP TAB The setup tab controls all the finer parameters and is divided into four tabs: 4.2.1 MATERIAL PARAMETERS: Sets the material properties of the block, as well as the probe shoe. Figure 2: Setup tab: Material parameters Default materials can be selected from the drop down lists. User defined materials can also be created by selecting the ‘user defined shoe’ and/or ‘user defined block’. The available settings include: cl: Velocity of longitudinal waves in the material in m/s ct: Velocity of transverse waves in the material in m/s (zero for most liquids) g: Material density in kg/m3 attn: Attenuation of the material in dB/m The attenuation is not required for calculating the diffraction patterns. No attenuation is used unless the check boxes are crossed. The attenuation is assumed to be proportional to frequency squared where it is defined for 1MHz. Note that the attenuation is approximate, and is based on the distance from the centre of the probe and beam entry point. Errors will be evident at very high values of attenuation, and for very large probes. These settings are required to determine the coefficients for mode conversions. Mode conversion equations from Krautkramer & Krautkramer (German 5th Ed.) were used for this software. The material velocity for which the diffraction pattern will be generated is also displayed in this tab. 4.2.2 PROBE PARAMETERS: The diffraction patterns are generated using Huygens principal, and are therefore simulated by an array of point sources. Figure 3: Setup tab: Probe parameters, with Display settings. The location of these point sources can be selected to model one of three types of probes: Single crystal rectangular Single crystal circular Rectangular Phased Array probe. In this tab, the user must also specify the probe’s designed wave mode. For example, if you are using a 60degree Transverse wave probe, specify transverse in this tab. Note that it is assumed that the probe is made of a crystal which creates L waves (standard crystal). The use must also select the highest frequency that needs to be evaluated. This should be approximately the –20dB point of the probe. This frequency defines the display resolution. For each of these probe types, a number of settings are available as listed below: Rectangular: Sources: The number of point sources. The more sources, the better the simulation. Length: Crystal length in the major axis as shown in the ‘Dimension layout’ Width: Crystal width in the minor axis, or into the screen in the ‘Dimension layout’ Circular: Sources: Diameter: The number of point sources. The more sources, the better the simulation. Crystal diameter, which will be displayed as length in the ‘Dimension layout’. Phase Array: Only rectangular Phased Array probes can be simulated at this stage, with all elements active, and the point sources distributed randomly in the element area. Sources: The number of point sources. The more sources, the better the simulation. Note that the actual number of sources may be changed automatically to ensure that each element in the Phased Array probe has an equal number of elements. Length: Crystal length in the major axis as shown in the ‘Dimension layout’ Width: Crystal width in the minor axis, or into the screen in the ‘Dimension layout’ Elements: The number of elements in the Phased Array probe. Pitch ratio: The ratio between the width of the elements and the distance between adjacent elements. Since elements cannot overlap, this value ranges between 0.01 and 1. Focus depth: The depth for which the Phased Array delay laws are set. Focus angle: The angle for with the Phased Array delay laws is set. Note that this is the final angle, with the shoe included. This may range from –89 degrees to 89 degrees. For a sector scan, an array of diffraction patterns will be required, one for each angle. When any of the settings are changed, the source locations will be changed in the ‘Sources’ display. Figure 4: Setup tab: Probe parameters for Phased array probes, with Display settings. 4.2.3 DISPLAY PARAMETERS The display parameters refer to the diffraction display as well as additional settings for the calculations: Figure 5:Setup tab: Display parameters Diffraction type: This is not the same as the probe wave mode (see ‘Probe parameter settings’), but refer to the display mode. For example, a 60-degree Long wave probe also generated transverse wave components. If the transverse wave diffraction patterns are required, the diffraction type must be set to Transverse. PRF: This defines the maximum propagation distance. For most users, the default settings will be ideal. For advanced users, using CSSP_Pulse_Sim and combining transverse and longitudinal waves on a single display, the PRF can be set manually (usually such that the propagation distance for transverse waves is larger than the display size). 4.2.4 ADVANCED Level: Basic or Advanced. Do not select the advanced tab unless you have already used the software extensively, since most settings are counter intuitive. An ‘available memory’ indicator has been included in this tab. This is the available RAM as when the program was launched. If a simulation requires more than the available RAM, disk swapping will be required, reducing performance by a factor of 100. In Advanced mode, additional options become available: Modification of PRF (Display parameters tab) Modification of probe apodisation. Change of Z axis (slice of material at different locations in the Z plane) Change of display units (Pressure, Displacement and Intensity, with absolute values as well). Figure 6: Setup tab: Advanced Apodisation The apodisation options of a probe depend on the probe type. For a rectangular probe, apodisation of the length and width is possible. For a circular probe, apodisation refers to the diameter of the probe. For Phased array probes, only width apodisation is possible. Apodisation can be changed by dragging the yellow or red cursors on the apodisation display. Note that the display will be normalized before it is implemented. A rough color guide is used in the sources display to show the effect of the apodisation. Display units. All diffraction patterns usually refer to pressure ratios (Amplitude). However it is sometimes desirable to view the displacement or Intensity of the diffraction pattern. These can be displayed as ratios, or in absolute values. Ratio displays refer the amplitude to the amplitude at 1mm from a point source. Note that strictly speaking this point source doesn’t (a fact made obvious by the use of multiple point sources when representing the probe). Absolute displays refer to the pressure, displacement or intensity when a crystal is capable of generating 1Watt of power. i.e. 1Watt of power at the current display frequency, assuming continuous excitation. This is equivalent to a flux of 1/4pi Watts/mm^2 at a distance of 1mm from a point source. Note once again that the probe is composed of multiple point sources. When displaying the absolute value, the amplitude at 1mm from each point source is also displayed. The total amplitude would therefore be (number of sources*amplitude) for a singular point source. Due to the required distribution of elements, the selected number of elements may not always be possible. The actual number of source units used (as per the distribution image) is therefore also displayed in the advanced settings. 4.3 DIFFRACTION PATTERN The results of the simulation are displayed in this surface plot. Depending on the main control settings, either the amplitude or the phase can be displayed. When displaying amplitude, the color scale (amplitude) can be changed to show Pressure, Displacement or Intensity: see Advanced settings in section 4.2.4. Figure 7: Diffraction pattern: Amplitude and phase When displaying amplitude, the color scale can be changed from linear to logarithmic scale as required by clicking on the ‘Log’ check box. Right clicking on the color scale and selecting the required options can add markers and change display colors. Instead of using a color scale, it is possible to use isobars: This is done by right clicking on the surface plot and toggling the ‘Interpolate color’ menu. Note that when displaying phase, the color scale is in radians, and can only be displayed with a linear scale. Surface plot Amplitude scale Linear/logarithmic amplitude mode Zoom out button Cursor mode selection Zoom Cross hair Pan Cursor cross hairs Cross hair position and amplitude reading Figure 8: Surface plot options A cross hair cursor is available on the surface plot which gives the value for the selected point. This cursor (yellow cross hairs in Figure 8) can be dragging with a mouse. The current X and Y coordinates are displayed below the surface plot, as well as the Amplitude value. By changing the cursor mode (click on cursor mode selection button) a zoom cursor can be selected. The zoom cursor can then be used to create a zoom window with a mouse. To return to the full image, simply click on the ‘Zoom out’ button. Note that you need to change back to the cross hair cursor to move the cross hair. 4.4 MAIN CONTROL Once all the settings have been entered, the user may press the ’Re-Process’ button. The computer will then calculate the diffraction patterns as required. The diffraction pattern can be displayed in either an amplitude mode or phase mode as selected by pressing the ‘Amplitude/Phase’ button (see section 4.3). You can stop a simulation by pressing the Quit button, however the current array calculation must be completed first, possibly resulting in a long delay. When not performing calculations, the Quit button will close the program. The required processing time in minutes is estimated, as well as the required RAM for processing to be performed without disk swapping. If disk swapping is required, processing speed decreases dramatically, possibly 100 times slower than estimated. 4.5 DISPLAY SETTINGS The simulation software calculates diffraction patterns for a number of frequencies simultaneously. Using the ‘Image Frequency’ horizontal slide the user can select the currently displayed frequency. Parameters for the current image frequency are also displayed, including the near field depth and the current propagation velocity. Note that the ‘Near field*’ value is a theoretical value for circular probes, with no delay line, no apodisation and no diffraction. Clearly this value can only be used as a reference point. Figure 9: Display settings To obtain images without the effects of diffraction (i.e. no thin coupling layer) for L waves, use ct=0 for the 1st material and ct=1 for the 2nd material. 5 FILE FORMAT The file format will be made available shortly. Note that the file format is incompatible to version 3 due to all the additions that have been made. 6 MATHEMATICAL TECHNIQUES AND ASSUMPTIONS. Formulas for reflection and transmission coefficients were obtained from Krautkramer & Krautkramer[1]. The selection of the three possible formulas depends on the material properties. If transverse waves are supported, it is assumed that the probe and block are solid media, and the sound is coupled between the media by a thin liquid layer. If either of the media have zero transverse wave velocity, it is assumed that the media is a liquid, and liquid to solid and solid to liquid equations are used. If both media cannot support transverse waves, a warning message is displayed, and the processing is stopped (Liquid-Liquid interface not supported). The equations above are only valid for plane waves on plane boundaries, and do not take energy loss in the form of surface waves into account. A number of assumptions are therefore made: 1) Only L waves exist in the shoe. 2) Edge effects (mostly T waves) do not contribute to the diffraction patterns. 3) The materials are isotropic. 4) Surface waves are not taken into account. 5) The probe shoe has infinite size (no echoes in the shoe or water bath) 6) No interaction (resulting from radial vibration of an element or from second diffraction phenomena caused by significant curvature of the radiating surface) takes place between two source points. 7) All source points vibrate with the same time dependence. If a probe shoe is well designed, reflections within the shoe can be minimised, and therefore assumption 5 becomes valid. Note that the calculations are performed using an array of point sources, as specified by the user. If the number of point sources is too low, diffraction grating patterns will result. To reduce this effect, the pseudo random location of point sources can be used, however the user should confirm that changes in the number of sources (step size for numerical integration over the surface area of the probe) is sufficiently small for their requirements. 6.1 GEOMETRIC EQUATIONS : material density : angle c : material velocity Subscript ‘1’ refers to the first material (the probe shoe). Subscript ‘2’ refers to the second material (the block). Subscript ‘t’ refers to the transverse wave. Subscript ‘l’ refers to the longitudinal wave. Angles are calculated using Snells law: c1t c 2t c1l c 2l sin1l sin 2l sin1t sin 2t Equation 1 6.2 DIFFRACTION EQUATIONS: SOLID – SOLID (THIN LIQUID LAYER). D2l is the relative amplitude of the diffracted longitudinal wave in the second material. D2t is the relative amplitude of the diffracted transverse wave in the second material. The equations assume that the incident wave in material 1 is a longitudinal wave. i.e. the probe crystal generates L waves only. N 2 cot1t cos2 21t 2 sin4 1t tan1l 2 2c 24t 1c14t cot 2t 2 cos2 2 2t tan 2l 2 1 sin4 1t Equation 2 D2 l 2 cos 2 1t cos 2 2t tan 2t 1 N sin 4 1t Equation 3 D2t 2 2c 22t cos 21t 1c12t N sin2 1t Equation 4 6.3 DIFFRACTION EQUATIONS: LIQUID – SOLID. c N 2t c 2l D2l 2 cos 2 2t N D2t 6.4 2 c 2t N c 2l Equation 5 Equation 6 2 sin 2 2l Equation 7 DIFFRACTION EQUATIONS: SOLID - LIQUID. c N 1t c1l D2l 2 c cos 2l sin 2 2l sin 2 2t cos2 2 2t 1 1l 2c21l cos1l 2 c cos1l sin 21l sin 21t cos2 21t 2 2l 1c1l cos 2l 2 2c 2 cos 1l cos 21t N 1c1 cos 2l D2l 0 Equation 8 Equation 9 Equation 10 6.5 DIFFRACTION AND ATTENUATION. For the diffraction equations from a point source we have: P2 D * P1 For the attenuation with distance (inverse square law) we have: r P2 1 P1 r2 Combining these effects we obtain: r P2 D 1 P1 r2 Equation 11 But Pn n c n n An Equation 12 1 1 Pn2 n c n n An2 2 2 n cn In Equation 13 Using ratios with r1= 1mm, and r2 in mm we obtain: P2 D P1 r2 A2 D W A1 r2 Equation 14 2 I2 D W I1 r2 where W 1c1 2c 2 For absolute values, we use a 1Watt source. I1 1 1 4 .r12 n P1 2 1c1I1 A1 2I1 1c112 Equation 15 6.6 BASIC FLOW CHART OF ALGORITHM: The user specifies the material properties The position of each source element is determined The position of each display pixel is determined The software determines the shortest acoustic path between these two points. From the shortest acoustic path, the angles and distances travelled in each material are calculated using Equation 1. From the material properties, the required equations (3 off of Equation 2 to Equation 10) are selected. If the transverse velocity is zero, the medium is defined as a liquid. The pressure contribution of each source element for each display pixel is calculated. From the distances the relative phases are calculated. For each display pixel, the amplitudes and phase (complex number) of each source element are added to give the resultant pixel amplitude. Substituting r1=1mm we obtain absolute values at 1mm, and multiply the ratios with the absolute values to get the display values. For the attenuation due to absorption, accurate values can be obtained by modifying the above equations accordingly. Do to the large processing requirements, this calculation has been approximated in the software using a single point source representing the probe and index point. This allows the user the capability of changing the attenuation without having to re-process the images. 7 SOFTWARE LIMITATIONS: Requires extensive processing power as well as memory capacity. Beware; check the 'Required Processing time' before processing. If this value is too large, reduce some of the parameters. Further development expected: Selection of reflection environment to be user selectable (currently only supports ‘air’) More complex reflectors (curved surfaces) ACAD linkage (geometry to be specified using ACAD files) B-Scan generator. Please e-mail me on Philippe.Rubbers@eskom.co.za if you come across any bugs. 8 CHANGES AND BUGS FIXED (SINCE VERSION 3) 9 [1] Errors at large angles corrected (mostly apparent in transverse display). Apodisation added. Liquid solid and solid liquid equations added. PRF is used to control propagation depth (for merging files in CSSP_Pulse_Sim) Attenuation added. Displacement, Intensity and absolute values added. Default material properties added. Z slice added. Importing and exporting data added. Saving and loading settings added. Basic geometrical reflectors added. REFERENCES Krautkramer & Krautkramer The Ultrasonic testing of materials 5th German edition 10 ACKNOWLEDGEMENTS: Thank you to Eskom Resources and Strategy for support funding. Thank you to Ed Ginzel for assistance in mode conversion calculations. Thank you to Konrad Hartmann, Hugh Neeson, Manfred Johannes and Arthur Every for our many discussions and for their insight, which has enabled this software to get this far. Thank you to Heintz-Josef Hilger for excellent suggestions and great support. Thank you to Rolf Diederichs for his support, as well as all the NDT.net users who have made valuable suggestions and constructive criticism.