Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PML bug when using magnetic materials #435

Open
ThomasRigoni7 opened this issue Mar 28, 2024 · 2 comments
Open

PML bug when using magnetic materials #435

ThomasRigoni7 opened this issue Mar 28, 2024 · 2 comments

Comments

@ThomasRigoni7
Copy link
Contributor

ThomasRigoni7 commented Mar 28, 2024

I noticed a severe bug in the PML when using steel boxes that makes it reflect the EM waves. The bug happens consistently when using the same geometry, but not all geometries using the material show the bug, in my tests it happens almost half of the times. The steel is implemented as #material: 1.0 1400000.0 1000.0 0.0 steel_sleepers. The reflections seem to be stronger when a Peplinski soil is also present in the geometry, didn't try with other materials.

Some field snapshots:

With steel boxes and a Peplinski soil:
sleepers_pss

Only steel boxes:
sleepers

This bug makes entire B-scans completely wrong:

With bug:
185_bscan

Similar geometry without bug:
3_bscan

Code to reproduce:

## General commands:
#title: scan_00185 
#domain: 1.5 1.7 0.002 
#dx_dy_dz: 0.002 0.002 0.002 
#time_window: 2.5e-08 
#output_dir: pml_bug
#messages: n 

## Source and receiver:
#waveform: ricker 1 1000000000.0 source_wave 
#hertzian_dipole: z 0.65 1.5 0.001 source_wave 
#rx: 0.85 1.5 0.001 
#src_steps: 0.005 0.0 0.0 
#rx_steps: 0.005 0.0 0.0 

## PSS:
#soil_peplinski: 0.42592250416541744 0.13647460641294687 2.3 2.65 0.06364996446113151 0.06494363641117931 pss 
#fractal_box: 0 0.4814529318664053 0 1.5 0.7935274720150615 0.002 1.5 1 1 1 15 pss pss_fractal_box 921236401 
#add_surface_roughness: 0 0.7935274720150615 0 1.5 0.7935274720150615 0.002 1.5 1 1 0.7835274720150615 0.7935274720150615 pss_fractal_box 2626582198 

## Sleepers:
#material: 1.0 1400000.0 1000.0 0.0 steel_sleepers 
#box: 0.0 0.9349999999999999 0.0 0.28 1.035 0.002 steel_sleepers 
#box: 0.61 0.9349999999999999 0.0 0.9299999999999999 1.035 0.002 steel_sleepers 
#box: 1.26 0.9349999999999999 0.0 1.5 1.035 0.002 steel_sleepers 

## Snapshots:
#python:
snapshot_times = [i*1e-10 for i in range(1, 50)]
for t in snapshot_times:
    print(f"#snapshot: 0 0 0 1.5 1.7 0.002 0.002 0.002 0.002 {t} {'pml_bug_' + str(t)}")
#end_python:
@craig-warren
Copy link
Member

@ThomasRigoni7 there are a few points to unpick with your model but I don't think any of them are bugs with the code:

  1. Why are you trying to implement the steel for your sleepers using your stated material properties? It would be much simpler to use a perfectly electric conductor (PEC) unless you have a specific reason not to.
  2. If you do need to have a magnetic permeability then you need to consider the spatial resolution of your model with respect to mu_r = 1000, i.e. to avoid potential numerical dispersion you need to consider a much smaller spatial step to properly resolve those wavelengths - note your model is excited at 1GHz so you could have up to ~3.5GHz max. freq to consider.
  3. There is currently (to our knowledge) no PML that has been formulated to deal with fractal distributions of properties within it. Our current PML may work to a degree if the variations of properties created by the fractals are not too strong within the PML. Thicker PMLs and/or tuning the PML parameters for specific models may help, but the latter is a research project in itself.

@ThomasRigoni7
Copy link
Contributor Author

@craig-warren the reason for using the stated material is that we tried to implement realistic properties for steel, these values were found in the literature. Based on my limited knowledge on this topic it is my understanding that, although still a conductor, steel is not a PEC, so the idea was to have a better approximation of the real material.

I was not aware of the additional impact of mu_r on numerical dispersion and consequently on the required spatial resolution of the model. No errors/warnings are raised by gprMax when running the input above, so I assumed the discretization was OK in that regard, since a numerical dispersion check is already implemented in the library. An extension of the checks for this case might be considered if not already implemented?

About your third point, it is my understanding that the main problem with this design is the presence of the steel material (which has very different properties than the other materials) inside the PML region. This in turn causes the PML to not perfectly absorb the EM waves that pass through it, is this correct?
If so, I think some additional checks on the material properties in the PML region should be implemented, especially since this problem causes outputs to be completely wrong, with no warning.

Thanks again 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants