diff --git a/docs/source/comparisons_numerical.rst b/docs/source/comparisons_numerical.rst index ce89e4db..109f305a 100644 --- a/docs/source/comparisons_numerical.rst +++ b/docs/source/comparisons_numerical.rst @@ -20,7 +20,7 @@ FDTD model :download:`antenna_bowtie_fs.py <../../testing/other_codes/vs_MoM_MATLAB/antenna_bowtie_fs/antenna_bowtie_fs.py>` .. literalinclude:: ../../testing/other_codes/vs_MoM_MATLAB/antenna_bowtie_fs/antenna_bowtie_fs.py - :language: none + :language: python :linenos: A Gaussian waveform with a centre frequency of 1.5GHz was used to excite the antenna, which was fed by a transmission line with a characteristic impedance of 50 Ohms. diff --git a/docs/source/examples_advanced.rst b/docs/source/examples_advanced.rst index f4f7f7a2..f567ae54 100644 --- a/docs/source/examples_advanced.rst +++ b/docs/source/examples_advanced.rst @@ -55,9 +55,11 @@ High dielectric example This example is a basic demonstration of how to use subgrids. The geometry is 3D (required for any use of subgrids) and is of a water-filled (high dielectric constant) cylindrical object in freespace. The subgrid encloses the cylindrical object using a fine spatial discretisation (1mm), and a courser spatial discretisation (5mm) is used in the rest of the model (main grid). A simple Hertzian dipole source is used with a waveform shaped as the first derivative of a gaussian. .. literalinclude:: ../../examples/subgrids/cylinder_fs.py - :language: none + :language: python :linenos: +Much of the functionality demonstrated in this example is standard use of our :ref:`Python API `, so mainly the parts that relate to the subgrid will be described here. Lines 20-25 specify the spatial discretisation of the course main grid (5mm) and fine subgrid (1mm). + Antenna modelling example ------------------------- @@ -67,7 +69,23 @@ Antenna modelling example This example.... .. literalinclude:: ../../examples/subgrids/gssi_400_over_fractal_subsurface.py - :language: none + :language: python + :linenos: + + +Customising the PMLs +==================== + +Through our :ref:`Python API ` there is the ability to :ref:`customise and adjust the formulation and properties used for the Perfectly Matched Layer (PML) absorbing boundaries `. + +.. note:: + + * If you just want to adjust the thickness of the PMLs and not use our Python API, that can be achieved using the ``#pml_cells`` command. + +This example... + +.. literalinclude:: ../../testinig/models_pmls/pml_3D_pec_plate/pml_3D_pec_plate.py + :language: python :linenos: @@ -76,3 +94,6 @@ This example.... + + + diff --git a/docs/source/examples_antennas.rst b/docs/source/examples_antennas.rst index d6bf2a89..0e5511f4 100644 --- a/docs/source/examples_antennas.rst +++ b/docs/source/examples_antennas.rst @@ -14,7 +14,7 @@ Wire dipole antenna model This example demonstrates a model of a half-wavelength wire dipole antenna in free space. It is a balanced antenna and it's characteristics are well known from theory [BAL2005]_. The length of the dipole is 150mm with a 1mm gap between the arms. .. literalinclude:: ../../examples/antenna_wire_dipole_fs.py - :language: none + :language: python :linenos: The wire is modelled using an edge which specifies the properties of the edge of the Yee cell. The antenna is fed using a transmission line The one-dimensional transmission line model virtually attaches to the dipole at the gap between the arms. The antenna has an input resistance :math:`Z_{in} = 73~\Omega` specified in the transmissions, and uses a Gaussian waveform with a centre frequency of 1GHz. A time window of 60ns is used: firstly, to give enough time for the response to decay down to zero; and secondly, to allow a reasonable resolution (17MHz) for calculating antenna parameters that involve taking an FFT (:math:`\Delta f=1/T` where :math:`\Delta f` is the frequency bin spacing and :math:`T` is the time window). @@ -73,7 +73,7 @@ Bowtie antenna model 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.py - :language: none + :language: python :linenos: .. figure:: ../../images_shared/antenna_like_MALA_1200.png @@ -110,7 +110,7 @@ B-scan with a bowtie antenna model 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.py - :language: none + :language: python :linenos: .. figure:: ../../images_shared/cylinder_Bscan_GSSI_1500.png diff --git a/docs/source/input_api.rst b/docs/source/input_api.rst index f450798a..4e5beea7 100644 --- a/docs/source/input_api.rst +++ b/docs/source/input_api.rst @@ -28,7 +28,7 @@ Example This example is used to give an introduction to the gprMax Python API. .. literalinclude:: ../../examples/antenna_wire_dipole_fs.py - :language: none + :language: python :linenos: 1. Import the gprMax module. @@ -243,6 +243,8 @@ Subgrid .. autoclass:: gprMax.subgrids.user_objects.SubGridHSG +.. _pml-tuning: + PML functions =============