Performance Optimization and MALA_1200 and GSSI_1500 Compatibility in gprMax v3.1.7

45 views
Skip to first unread message

杨天宏

unread,
Jul 27, 2025, 1:06:46 PMJul 27
to gprMax-users
  Hello,

Hope you are well and thanks for providing this great software. I have two questions:

1. Performance Optimization with GPU:
Despite using a GPU (GTX 1660) for simulation, the generation speed remains slow for large datasets (e.g., 5000 simulations). For instance, a single simulation with 76 A-scans takes approximately one hour. One contributing factor is the extremely high temporal resolution: gprMax generates around 15,000 time samples per A-scan, which is much finer than typical real-world GPR systems (usually 256–1024 samples). 
Question: Without upgrading the GPU, are there effective strategies to accelerate simulations while preserving sufficient time window (to maintain adequate penetration depth)? Specifically, can I safely reduce the number of time samples by adjusting parameters such as dt (time step) or time_window, and if so, what are the recommended practices to ensure simulation validity?

#title: Road_Model_Distress
#domain: 4 1.8 0.001
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 15000
#time_step_stability_factor: 0.99
#waveform: ricker 1 500e6 my_pulse
#hertzian_dipole: z 0.1 1.7 0 my_pulse
#rx: 0.2 1.7 0
#src_steps: 0.01 0.000 0.000
#rx_steps: 0.01 0.000 0.000
#geometry_objects_read: 0 0 0 crack_model_1_h5file.h5 crack_model_1_materials.txt
geometry_view: 0 0 0 4 1.8 0.001 0.001 0.001 0.001 Road_Model n

or

#title: Road_Model_Distress
#domain: 4 1.8 0.001
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 30e-9
#waveform: ricker 1 500e6 my_pulse
#hertzian_dipole: z 0.1 1.7 0 my_pulse
#rx: 0.2 1.7 0
#src_steps: 0.01 0.000 0.000
#rx_steps: 0.01 0.000 0.000
#geometry_objects_read: 0 0 0 crack_model_1_h5file.h5 crack_model_1_materials.txt
geometry_view: 0 0 0 4 1.8 0.001 0.001 0.001 0.001 Road_Model n



2. Antenna Model Compatibility (MALA_1200 and GSSI_1500):
When using built-in antenna models such as  MALA_1200 or GSSI_1500, is there a minimum domain size requirement? Specifically, must the "#domain" dimensions be larger than the physical size (casesize) of these antenna models? 
I used the "crack_model_1_input_MALA_1200.in" and encountered the following error:

Traceback (most recent call last):
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\__main__.py", line 6, in <module>
    gprMax.gprMax.main()
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\gprMax.py", line 69, in main
    run_main(args)
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\gprMax.py", line 191, in run_main
    run_std_sim(args, inputfile, usernamespace)
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\gprMax.py", line 232, in run_std_sim
    run_model(args, currentmodelrun, modelend - 1, numbermodelruns, inputfile, modelusernamespace)
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\model_build_run.py", line 166, in run_model
    process_multicmds(multicmds, G)
  File "f:\MySoftware\Anaconda\anaconda3\envs\gprMax\lib\site-packages\gprmax-3.1.7-py3.10-win-amd64.egg\gprMax\input_cmds_multiuse.py", line 105, in process_multicmds
    raise CmdInputError("'" + cmdname + ': ' + ' '.join(tmp) + "'" + ' polarisation must be z in 2D TMz mode')
gprMax.exceptions.CmdInputError: '#voltage_source: y 1.971 1.4475 0.008 1000 myGaussian' polarisation must be z in 2D TMz mode

"crack_model_1_input_MALA_1200.in" 
#title: Road_Model_Distress_with_MALA_1200_Antenna
#domain: 4 1.5 0.001
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 15000
#time_step_stability_factor: 0.99
#python:
from user_libs.antennas.MALA import antenna_like_MALA_1200
antenna_like_MALA_1200(2.0, 1.45, 0.002, 0.001)
#end_python:
#geometry_objects_read: 0 0 0 crack_model_1_h5file.h5 crack_model_1_materials.txt
geometry_view: 0 0 0 4 1.5 0.001 0.001 0.001 0.001 Road_Model n 


I would appreciate it if you could guide me on that.

Thanks,
Yang

crack_model_1_materials.txt
crack_model_1_h5file.h5

Craig Warren

unread,
Nov 21, 2025, 4:39:03 PM (12 days ago) Nov 21
to gprMax-users
Hi Yang,

In answer to 1, the size of your model (number of cells) and number of time-steps should be chosen following the principles of the Finite-Difference Time Domain (FDTD) method that gprMax uses - you can find introductory guidance in our docs on this. The time step is linked to the spatial resolution by the CFL condition, so cannot (typically) be set abitarily. The time window is set in the same way as you would for a real GPR system, i.e. depends on your depth to interested targets/features. Thus the number of time steps in a simulation is governed by these two parameters.

In answer to 2, yes if you want to use the antenna model correctly the domain needs to be big enough to enclose it. In your example, your model is 2D and you are trying to insert a 3D antenna model which is causing your error.

Kind regards,
Craig

Reply all
Reply to author
Forward
0 new messages