你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Small updates to text for antenna models
这个提交包含在:
@@ -68,11 +68,11 @@ You can view the results (see :ref:`output` section and README.rst for the ``too
|
|||||||
Bowtie antenna model
|
Bowtie antenna model
|
||||||
====================
|
====================
|
||||||
|
|
||||||
:download:`antenna_like_MALA_1200_fs.in <../../examples/antenna_like_MALA_1200_fs.in>`
|
:download:`antenna_like_MALA_1200_fs.in <../../examples/antenna_like_MALA_1200_fs.py>`
|
||||||
|
|
||||||
This example demonstrates how to use one of the built-in antenna models in a simulation. Using a model of an antenna rather than a simple source, such as a Hertzian dipole, can improve the accuracy of the results of a simulation for many situations. It is especially important when the target is in the near-field of the antenna and there are complex interactions between the antenna and the environment. The simulation uses the model of an antenna similar to a MALA 1.2GHz antenna.
|
This example demonstrates how to use one of the built-in antenna models in a simulation. Using a model of an antenna rather than a simple source, such as a Hertzian dipole, can improve the accuracy of the results of a simulation for many situations. It is especially important when the target is in the near-field of the antenna and there are complex interactions between the antenna and the environment. The simulation uses the model of an antenna similar to a MALA 1.2GHz antenna.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/antenna_like_MALA_1200_fs.in
|
.. literalinclude:: ../../examples/antenna_like_MALA_1200_fs.py
|
||||||
:language: none
|
:language: none
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
@@ -81,12 +81,12 @@ This example demonstrates how to use one of the built-in antenna models in a sim
|
|||||||
|
|
||||||
FDTD geometry mesh showing an antenna model similar to a MALA 1.2GHz antenna (skid removed for illustrative purposes).
|
FDTD geometry mesh showing an antenna model similar to a MALA 1.2GHz antenna (skid removed for illustrative purposes).
|
||||||
|
|
||||||
The antenna model is loaded from a Python module and inserted into the input file just like another geometry command. The arguments for the ``antenna_like_MALA_1200`` function specify its (x, y, z) location as 0.132m, 0.095m, 0.100m using a 1mm spatial resolution. In this example the antenna is the only object in the model, i.e. the antenna is in free space. More information on using the built-in antenna models can be found in the ``toolboxes\GPRAntennaModels`` package.
|
The antenna model is loaded from a Python module and the objects from the antenna model are added to the scene. The arguments for the ``antenna_like_MALA_1200`` function specify its (x, y, z) location as 0.132m, 0.095m, 0.100m using a 1mm spatial resolution. In this example the antenna is the only object in the model, i.e. the antenna is in free space. More information on using the built-in antenna models can be found in the ``toolboxes/GPRAntennaModels`` package.
|
||||||
|
|
||||||
Results
|
Results
|
||||||
-------
|
-------
|
||||||
|
|
||||||
When the simulation is run two geometry files for the antenna are produced along with an output file which contains a single receiver (the antenna output). You can view the results (see :ref:`output` section and README.rst for the ``toolboxes\Plotting`` package) using the command:
|
When the simulation is run two geometry files for the antenna are produced along with an output file which contains a single receiver (the antenna output). You can view the results (see :ref:`output` section and README.rst for the ``toolboxes/Plotting`` package) using the command:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -105,11 +105,11 @@ When the simulation is run two geometry files for the antenna are produced along
|
|||||||
B-scan with a bowtie antenna model
|
B-scan with a bowtie antenna model
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
:download:`cylinder_Bscan_GSSI_1500.in <../../examples/cylinder_Bscan_GSSI_1500.in>`
|
:download:`cylinder_Bscan_GSSI_1500.py <../../examples/cylinder_Bscan_GSSI_1500.py>`
|
||||||
|
|
||||||
This example demonstrates how to create a B-scan with an antenna model. The scenario is purposely simple to illustrate the method. A metal cylinder of diameter 20mm is buried in a dielectric half-space which has a relative permittivity of six. The simulation uses the model of an antenna similar to a GSSI 1.5GHz antenna.
|
This example demonstrates how to create a B-scan with an antenna model. The scenario is purposely simple to illustrate the method. A metal cylinder of diameter 20mm is buried in a dielectric half-space which has a relative permittivity of six. The simulation uses the model of an antenna similar to a GSSI 1.5GHz antenna.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cylinder_Bscan_GSSI_1500.in
|
.. literalinclude:: ../../examples/cylinder_Bscan_GSSI_1500.py
|
||||||
:language: none
|
:language: none
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
@@ -118,13 +118,11 @@ This example demonstrates how to create a B-scan with an antenna model. The scen
|
|||||||
|
|
||||||
FDTD geometry mesh showing a metal cylinder buried in a half-space and an antenna model similar to a GSSI 1.5GHz antenna.
|
FDTD geometry mesh showing a metal cylinder buried in a half-space and an antenna model similar to a GSSI 1.5GHz antenna.
|
||||||
|
|
||||||
The antenna must be moved to a new position for every single A-scan (trace) in the B-scan. In this example the B-scan distance will be 270mm with a trace every 5mm, so 54 model runs will be required.
|
The antenna must be moved to a new position for every single A-scan (trace) in the B-scan. This is done using a for loop and creating a new scene (with new antenna position) for each A-scan. In this example the B-scan distance will be 270mm with a trace every 5mm, so 54 model runs will be required.
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
python -m gprMax cylinder_Bscan_GSSI_1500.in -n 54
|
gprMax.run(scenes=scenes, n=54, geometry_only=False, outputfile=fn, gpu=None)
|
||||||
|
|
||||||
The total number of runs for a model as well as the number of the current run of the model are stored and can be accessed in Python as ``number_model_runs`` and ``current_model_run``. The ``current_model_run`` can be used to move the position of the antenna for every run of the model as shown in Line 13. The antenna will be moved 5mm in the x direction for every new run of the model.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@ ant_pos = (0.125, 0.094, 0.100)
|
|||||||
gssi_objects = antenna_like_GSSI_1500(ant_pos[0], ant_pos[1], ant_pos[2],
|
gssi_objects = antenna_like_GSSI_1500(ant_pos[0], ant_pos[1], ant_pos[2],
|
||||||
resolution=dl)
|
resolution=dl)
|
||||||
for obj in gssi_objects:
|
for obj in gssi_objects:
|
||||||
obj.rotate('z', 90, origin=(ant_pos[0], ant_pos[1], ant_pos[2]))
|
#obj.rotate('z', 90, origin=(ant_pos[0], ant_pos[1], ant_pos[2]))
|
||||||
scene.add(obj)
|
scene.add(obj)
|
||||||
|
|
||||||
gv1 = gprMax.GeometryView(p1=(0, 0, 0), p2=(x, y, z),
|
gv1 = gprMax.GeometryView(p1=(0, 0, 0), p2=(x, y, z),
|
||||||
|
@@ -0,0 +1,37 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import gprMax
|
||||||
|
from toolboxes.GPRAntennaModels.MALA import antenna_like_MALA_1200
|
||||||
|
|
||||||
|
# File path for output
|
||||||
|
fn = Path(__file__)
|
||||||
|
|
||||||
|
# Discretisation
|
||||||
|
dl = 0.001
|
||||||
|
|
||||||
|
# Domain
|
||||||
|
x = 0.264
|
||||||
|
y = 0.189
|
||||||
|
z = 0.220
|
||||||
|
|
||||||
|
scene = gprMax.Scene()
|
||||||
|
|
||||||
|
title = gprMax.Title(name=fn.with_suffix('').name)
|
||||||
|
domain = gprMax.Domain(p1=(x, y, z))
|
||||||
|
dxdydz = gprMax.Discretisation(p1=(dl, dl, dl))
|
||||||
|
time_window = gprMax.TimeWindow(time=6e-9)
|
||||||
|
|
||||||
|
scene.add(title)
|
||||||
|
scene.add(domain)
|
||||||
|
scene.add(dxdydz)
|
||||||
|
scene.add(time_window)
|
||||||
|
|
||||||
|
# Import antenna model and add to model
|
||||||
|
ant_pos = (0.132, 0.095, 0.100)
|
||||||
|
mala_objects = antenna_like_MALA_1200(ant_pos[0], ant_pos[1], ant_pos[2],
|
||||||
|
resolution=dl)
|
||||||
|
for obj in mala_objects:
|
||||||
|
scene.add(obj)
|
||||||
|
|
||||||
|
# Run model
|
||||||
|
gprMax.run(scenes=[scene], geometry_only=False, outputfile=fn, gpu=None)
|
@@ -0,0 +1,54 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import gprMax
|
||||||
|
from toolboxes.GPRAntennaModels.GSSI import antenna_like_GSSI_1500
|
||||||
|
|
||||||
|
# File path for output
|
||||||
|
fn = Path(__file__)
|
||||||
|
|
||||||
|
# Discretisation
|
||||||
|
dl = 0.001
|
||||||
|
|
||||||
|
# Domain
|
||||||
|
x = 0.480
|
||||||
|
y = 0.148
|
||||||
|
z = 0.235
|
||||||
|
|
||||||
|
# Create list of scenes (A-scans) that comprise B-scan:
|
||||||
|
scenes = []
|
||||||
|
|
||||||
|
for i in range(1, 55):
|
||||||
|
scene = gprMax.Scene()
|
||||||
|
|
||||||
|
title = gprMax.Title(name=fn.with_suffix('').name)
|
||||||
|
domain = gprMax.Domain(p1=(x, y, z))
|
||||||
|
dxdydz = gprMax.Discretisation(p1=(dl, dl, dl))
|
||||||
|
time_window = gprMax.TimeWindow(time=6e-9)
|
||||||
|
|
||||||
|
scene.add(title)
|
||||||
|
scene.add(domain)
|
||||||
|
scene.add(dxdydz)
|
||||||
|
scene.add(time_window)
|
||||||
|
|
||||||
|
mat = gprMax.Material(er=6, se=0, mr=1, sm=0, id='half_space')
|
||||||
|
c1 = gprMax.Cylinder(p1=(0.240, 0, 0.080), p2=(0.240, 0.148, 0.080), r=0.010,
|
||||||
|
material_id='pec')
|
||||||
|
scene.add(mat)
|
||||||
|
scene.add(c1)
|
||||||
|
|
||||||
|
# Import antenna model and add to model
|
||||||
|
ant_pos = (0.125, 0.094, 0.100)
|
||||||
|
gssi_objects = antenna_like_GSSI_1500(0.105 + i * 0.005, 0.074, 0.170,
|
||||||
|
resolution=dl)
|
||||||
|
for obj in gssi_objects:
|
||||||
|
scene.add(obj)
|
||||||
|
|
||||||
|
gv1 = gprMax.GeometryView(p1=(0, 0, 0), p2=(x, y, z), dl=(dl, dl, dl),
|
||||||
|
filename=fn.with_suffix('').name,
|
||||||
|
output_type='n')
|
||||||
|
# scene.add(gv1)
|
||||||
|
|
||||||
|
scenes.append(scene)
|
||||||
|
|
||||||
|
# Run model
|
||||||
|
gprMax.run(scenes=scenes, n=54, geometry_only=False, outputfile=fn, gpu=None)
|
@@ -476,6 +476,6 @@ def antenna_like_MALA_1200(x, y, z, resolution=0.001, **kwargs):
|
|||||||
gv2 = gprMax.GeometryView(p1=(x, y, z), p2=(x + casesize[0], y + casesize[1], z + 0.010),
|
gv2 = gprMax.GeometryView(p1=(x, y, z), p2=(x + casesize[0], y + casesize[1], z + 0.010),
|
||||||
dl=(dx, dy, dz), filename='antenna_like_MALA_1200_pcb',
|
dl=(dx, dy, dz), filename='antenna_like_MALA_1200_pcb',
|
||||||
output_type='f')
|
output_type='f')
|
||||||
scene_objects.extend((gv1, gv2))
|
# scene_objects.extend((gv1, gv2))
|
||||||
|
|
||||||
return scene_objects
|
return scene_objects
|
||||||
|
在新工单中引用
屏蔽一个用户