ndtatbristol / arim

A Python library for array imaging in ultrasonic testing.
MIT License
23 stars 13 forks source link

Large transmission coefficients beyond critical angle #20

Open RichardP1234 opened 2 weeks ago

RichardP1234 commented 2 weeks ago

Theory currently used to calculate fluid_solid transmission coefficients produces large magnitudes beyond critical angles. It is possible that these are meaningful, as they relate to head waves. However, these head waves would travel along paths not currently modelled by arim, and I think should be accompanied by different descriptions of beam spread, attenuation etc.

Here is an example to plot the coefficients:

import matplotlib.pyplot as plt
import arim
from arim.model import transmission_at_interface
from arim.io import material_from_conf
import numpy as np

conf_name = 'probe_conf/conf_5MHz_waterwedge.yaml'
conf = arim.io.load_conf_file(conf_name)

materials = [material_from_conf(conf['couplant_material']),material_from_conf(conf['block_material'])]
interface = arim.InterfaceKind.fluid_solid

m1 = arim.Mode(0)
angles_inc = np.arange(0,np.pi/2,np.pi/100)

plt.figure()
for m2 in [arim.Mode(0),arim.Mode(1)]:

    params = dict(

        interface_kind=interface,
        material_inc=materials[0],
        material_out = materials[1],
        mode_inc=m1,
        mode_out=m2,
        angles_inc=angles_inc,
        force_complex=True,
        unit='displacement',
    )

    trans = transmission_at_interface(**params)

    plt.plot(angles_inc*180/np.pi,abs(trans)); plt.xlabel('Angle in'); plt.ylabel('Absolute transmission coeff')

plt.legend(['Fluid - Solid,L','Fluid - Solid,T'])

image

With model.fluid_solid as it is, forward modelling of rays beyond critical angle produces large amplitudes where they shouldn't be, this results in non-physical artefacts turning up in FMC/TFM.

A fix (though arguably not the most satisfying) is to zero transmission coefficients beyond the critical angle in model.fluid_solid:

transmission_l = 2.0 * cos_2_alpha_t / N
transmission_l[alpha_fluid>theta_l] = 0
transmission_t = -2.0 * ct_cl2 * sin(2 * alpha_l) / N
transmission_t[alpha_fluid>theta_t] = 0

This then produces: image

Here is an example of TFM imaging of five point scatterers using a) an FE simulated FMC, b) an arim (current) simulated FMC and c) an arim (with above change) simulated FMC:

image

Note the artefacts in b) around the two leftmost scatterers, not present in FE.

Sidenote: this is using Matt C's branch to handle the curved surface geometry.

RichardP1234 commented 4 days ago

Addition: model.solid_t_fluid and model.solid_l_fluid need similar treatment: zero-ing transmission (and reflection?) past critical angles.