Introduced object primitives #ellipsoid and #cone.

The #ellipsoid works with regular semi-axes
along x, y,m and z
The #cone works similar to the cylinder
Introduced two new mixing models for using them with
a fractal box. #material_range and #material_list
The #material_range allows materials to be constructed
using ranges of permittivity, conductivity, magnetic
permeability and magentic loss.
The #material_list creates a list of predefined materials that
can be used with a fractal box. The order of the listed
materials reflects the order of the bins they are allocated to
in a fractal box.
The fractal box and associtated mixing models have been updated
to use a list of material IDs and do not rely on the assumption
that are generated sequentially. This gives greater flexibility and
adds little computation burden on the creation of the fractal
volume.
Bug fixes for mixing anisotropic vlumetric materials where "mr" was
used instead of "ms"
Bug fixes on objects that use integer coordinates for centres but
where passed floats instead.
这个提交包含在:
Antonis Giannopoulos
2023-04-21 15:37:51 +01:00
父节点 bec20bbd52
当前提交 577aa6445a
共有 5 个文件被更改,包括 79 次插入21 次删除

58
examples/API_test.py 普通文件
查看文件

@@ -0,0 +1,58 @@
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 = []
scans = 2
for i in range(1, scans):
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=scans, geometry_only=False, outputfile=fn, gpu=None)

二进制文件未显示。

查看文件

@@ -21,14 +21,14 @@ cylinder: 0.03 0.03 0.03 0.08 0.08 0.08 0.03 sand
cone: 0.02 0.075 0.075 0.08 0.075 0.075 0.03 0.0 sand
cone: 0.075 0.02 0.075 0.075 0.08 0.075 0.03 0.0 sand
cone: 0.075 0.075 0.02 0.075 0.075 0.08 0.03 0.0 sand
cone: 0.03 0.03 0.03 0.08 0.08 0.08 0.028 0.005 free_space
cone: 0.03 0.03 0.03 0.08 0.08 0.08 0.028 0.005 sand2
#material_list: sand pec sand2 asphalt my_water my_list
#material_range: 2 6 0.1 0.001 1.0 1.0 0.0 0.0 test
soil_peplinski: 0.5 0.5 2.0 2.66 0.001 0.25 my_soil
#fractal_box: 0 0 0 0.15 0.15 0.1 1.5 1 1 1 5 test my_soil_box
#material_list: sand pec sand2 asphalt my_water sand my_list
#material_range: 2 6 0.0 0 1.0 1.0 0.0 0.0 test
#soil_peplinski: 0.5 0.5 2.0 2.66 0.001 0.25 my_soil
#fractal_box: 0 0 0 0.15 0.15 0.1 1.5 1 1 1 10 test my_soil_box
add_surface_roughness: 0 0 0.070 0.15 0.15 0.070 1.5 1 1 0.065 0.080 my_soil_box
#geometry_view: 0 0 0 0.15 0.15 0.15 0.001 0.001 0.001 heterogeneous_soil_v2 n

二进制文件未显示。