Skip to content

Commit 7bb8990

Browse files
authored
Merge pull request #202 from OpenSEMBA/dev
Propagation of fix/fhash_buckets from dev to main
2 parents c46dbe1 + 2eed9f7 commit 7bb8990

File tree

101 files changed

+20068
-16734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+20068
-16734
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ tmp_cases/
6666
testData/outputs/paul/paul_8.6_square.txt
6767
testing_hdf5_writing_and_reading.h5
6868
build
69+
fort.17

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ endif()
241241

242242
if(SEMBA_FDTD_MAIN_LIB)
243243
add_library(semba-main
244+
"src_main_pub/semba_fdtd.F90"
244245
"src_main_pub/calc_constants.F90"
245246
"src_main_pub/nfde_rotate.F90"
246247
"src_main_pub/EpsMuTimeScale.F90"
@@ -262,13 +263,14 @@ endif()
262263

263264
if (SEMBA_FDTD_EXECUTABLE)
264265
add_executable(semba-fdtd
265-
"src_main_pub/semba_fdtd.F90"
266+
"src_main_pub/launcher.F90"
266267
)
267268
target_link_libraries(semba-fdtd semba-main semba-reports)
268269
target_link_libraries(semba-fdtd ${MPI_Fortran_LIBRARIES})
269270
endif()
270271

271272

273+
272274
include_directories(${CMAKE_BINARY_DIR}/mod)
273275
include_directories(${HDF5_INCLUDE_DIRS})
274276
include_directories(${FHASH_INCLUDES})

doc/smbjson.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -395,24 +395,19 @@ A single wire might be surrounded by a dielectric material. In that case, the ra
395395
```
396396
If the `dielectric` field is present but any of `radius` or `relativePermittivity` is absent, the parsing of the dielectric will fail.
397397

398-
### `multiwire`
398+
### `shieldedMultiwire`
399399

400-
A `multiwire`, models $N+1$ electrical wires inside a bundled. The voltages and currents on these wires are solved by a multiconductor transmission lines (MTLN) solver described in:
400+
A `shieldedMultiwire`, models $N+1$ electrical wires inside a bundled. The voltages and currents on these wires are solved by a multiconductor transmission lines (MTLN) solver described in:
401401

402402
Paul, C. R. (2007). Analysis of multiconductor transmission lines. John Wiley & Sons.
403403

404-
`multiwire` materials are assumed to be contained within a `wire` or another `multiwire` which is the external domain and is used as voltage reference.
404+
`shieldedMultiwire` materials are assumed to be contained within a `wire` or another `shieldedMultiwire` which is the external domain and is used as voltage reference.
405405
They must contain the following entries:
406406

407-
+ `<inductancePerMeter>` and `<capacitancePerMeter>` which must be matrices with a size $N \times N$.
408-
+ `[resistancePerMeter]` and `[conductancePerMeter]` which must be arrays of size $N$. Defaults to zero.
407+
+ `<inductancePerMeter>` and `<capacitancePerMeter>` which must be matrices with a size $N \times N$. If the number of wires is equal to $1$, this property must be a $1 \times 1$ matrix, e.g `[[1e-7]]`
408+
+ `[resistancePerMeter]` and `[conductancePerMeter]` which must be arrays of size $N$. Defaults to zero. If the number of wires is equal to $1$, must be an array of size $1$, e.g. `[50]`.
409409
+ `[transferImpedancePerMeter]` which represents the coupling with the external domain, described below. If not present, it defaults to zero, i.e. perfect shielding.
410410

411-
If the number of wires of the `multiwire` is equal to 1, none of the properties above are scalars:
412-
413-
+ `<inductancePerMeter>` and `<capacitancePerMeter>` will be a $1 \times 1$ matrix, i.e `[[1e-7]]`
414-
+ `[resistancePerMeter]` and `[conductancePerMeter]` will be arrays of size $1$, i.e `[50]`
415-
416411
`transferImpedancePerMeter` can contain:
417412

418413
+ `[resistiveTerm]` defined by a real representing transfer impedance resistance. Defaults to `0.0`
@@ -425,7 +420,7 @@ If the number of wires of the `multiwire` is equal to 1, none of the properties
425420
{
426421
"name": "Bundle_2_level_2",
427422
"id": 62,
428-
"type": "multiwire",
423+
"type": "shieldedMultiwire",
429424
"resistancePerMeter" : [62.0e-3,62.0e-3],
430425
"inductancePerMeter": [
431426
[2.4382084E-07, 4.7377505E-08],
@@ -442,12 +437,41 @@ If the number of wires of the `multiwire` is equal to 1, none of the properties
442437
}
443438
```
444439

440+
### `unshieldedMultiwire`
441+
442+
A `unshieldedMultiwire`, models a bundle of $N$ electrical wires. The charges and currents on these wires are solved using the model described in:
443+
444+
Berenger, J. P. A Multiwire formalism for the FDTD Method. IEEE Transactions on Electromagnetic Compatability. August, 2000.
445+
446+
They must contain the following entries:
447+
448+
+ `<inCellParameters>` which can be defined in two ways:
449+
- By fixed values defined in `inductancePerMeter` and `capacitancePerMeter` which must be matrices with a size $N \times N$. If the number of wires is equal to $1$, this property must be a $1 \times 1$ matrix, e.g `[[1e-7]]`.
450+
- By a `multipolarExpansion` object which allows to calculate the in-cell inductances and capacitances. This object can be obtained using the [_opensemba/pulmtln_ ](https://github.com/OpenSEMBA/pulmtln) tool containing:
451+
- An `<innerRegionBox>` object, containing two pairs of real numbers, named `min` and `max` which describe a cross sectional bounding box. This box must contain all the conductors and dielectrics which form the bundle cross section. It also must be smaller or equal than the minimum side of the FDTD dual cells which are crossed by the bundle.
452+
- Two arrays, `<electric>` and `<magnetic>` in which each contain a [field reconstruction object](#field-reconstruction) described below. They must contain a $N$ multipolar expansions, one for each conductor. Each entry assumes that the $n$-th conductor has a prescribed potential of $1 \, \text{V}$ and the rest are floating.
453+
+ `[resistancePerMeter]` and `[conductancePerMeter]` which must be arrays of size $N$. Defaults to zero. If the number of wires is equal to $1$, must be an array of size $1$, e.g. `[50]`.
454+
455+
#### Field reconstruction
456+
457+
The field reconstruction objects contains information necessary to calculate the in-cell parameters for an `unshieldedMultiwire` with $N$ conductors. The `electric` and `magnetic`potentials are used to compute the in-cell capacitances and in-cell inductances, respectively. Each contains information to perform a multipolar expansion based on
458+
459+
Tsogtgerel Gantumur. Multipole Expansions in the plane. 2016, lecture notes.
460+
461+
and which must contain
462+
463+
+ `<conductorPotentials>` is an array of size $N$ indicating the potentials for each conductor. The $n$-th entry of this array should be equal to $1$, for the active conductor, and less than one for the rest (floating conductors).
464+
+ `<ab>` which is an array of $P$ pairs of real numbers $(a_p, b_p)$, which are the pole coefficients of the field expansion when the $n$-th conductor is active.
465+
+ `<expansionCenter>` is an pair of real numbers indicating the place in which the dipole moment is zero, a concept similar to the _center of charge_.
466+
+ `<innerRegionAveragePotential>` is the potential averaged within the `innerRegionBox`. The multipolar expansion only valid outside the inner region.
467+
468+
445469
### `terminal`
446470

447-
A `terminal` models a lumped circuit which is assumed to located at one end of a `wire` or `multiwire`. Terminals are assumed to be assigned on points and therefore have zero dimension.
471+
A `terminal` models a lumped circuit which is assumed to located at one end of a `wire`, `shieldedMultiwire` or `unshieldedMultiwire`. Terminals are assumed to be assigned on points and therefore have zero dimension.
448472

449-
+ If the terminal is associated with a `wire`, the `terminations` array must contain a single `termination`.
450-
+ In the case it is associated with a $N+1$ conductors `multiwire`, the `terminations` array must contain $N$ entries.
473+
+ If the terminal is associated with a `wire` or `unshieldedMultiwire`, the `terminations` array must contain a `termination` for each conductor.
474+
+ In the case it is associated with a $N+1$ conductors `shieldedMultiwire`, the `terminations` array must contain $N$ entries.
451475

452476
Each entry in `terminations` is specified by a `type`
453477

@@ -502,11 +526,11 @@ As with the rest of terminations, SPICE terminations have to be equivalents to 2
502526

503527
### `connector`
504528

505-
The `connector` represents the physical connection of a bundle to a structure. `connector` assigns properties to the initial or last segment of a `wire` or a `multiwire`.
529+
The `connector` represents the physical connection of a bundle to a structure. `connector` assigns properties to the initial or last segment of a `wire`, a `shieldedMultiwire` or an `unshieldedMultiwire`.
506530
This `wire` can be either a single wire or the outermost conductor of a `cable` bundle. The `conector` can have the following properties:
507531

508-
+ `[resistances]`, an array of $N$ real numbers which will be converted to resistances per unit length and will replace the resistancePerMeter of that segment of the multiwire
509-
+ `[transferImpedancePerMeter]`, described in the same way as explained in the [multiwire](#multiwire) section. Only valid in a `connector` associated with `multiwire`.
532+
+ `[resistances]`, an array of $N$ real numbers which will be converted to resistances per unit length and will replace the resistancePerMeter of that segment.
533+
+ `[transferImpedancePerMeter]`, described in the same way as explained in the [shieldedMultiwire](#shieldedMultiwire) section. Only valid in a `connector` associated with `shieldedMultiwire`.
510534

511535

512536

@@ -547,7 +571,7 @@ Associations with cables can contain the following inputs:
547571

548572
+ `<initialTerminalId>` and `<endTerminalId>` which must be present within the `materials` list of type. These entries indicate the lumped circuits connected at the ends of the cable.
549573
+ `[initialConnectorId]` and `[endConnectorId]` entries which must point to materials of type `connector` and are assigned to the last segments of the corresponding ends of the cable.
550-
+ Its `materialId` must point to a [`wire`](#wire) or a [`multiwire`](#multiwire) material. If it points to a `multiwire`, it must also contain an entry named `<containedWithinElementId>` which indicates the `polyline` in which this `multiwire` is embedded.
574+
+ Its `materialId` must point to a [`wire`](#wire), a [`shieldedMultiwire`](#shieldedMultiwire) or an [`unshieldedMultiwire`](#unshieldedMultiwire) material. If it points to a `shieldedMultiwire`, it must also contain an entry named `<containedWithinElementId>` which indicates the `polyline` in which this `shieldedMultiwire` is embedded.
551575

552576
**Example:**
553577

@@ -816,7 +840,7 @@ A `generator` source must be located on a single `node` whose `coordinateId` is
816840
}
817841
```
818842

819-
In case the generator is located at the junction (connection point) of two of more lines, the `node` shared by the lines will share the same `coordinateId`. If more than two lines are connected together, it is necessary to know to which of the lines the generator is connected to. The entry `[attachedToLineId]` is an integer which refers to the `elemId` of the `polyline` the source is connected to.
843+
In case the generator is located at the junction (connection point) of two of more lines, the `node` shared by the lines will share the same `coordinateId`. If more than two lines are connected together, it is necessary to know to which of the lines the generator is connected to. The entry `[attachedToLineId]` is an integer which refers to the `elementId` of the `polyline` the source is connected to.
820844

821845
**Example:**
822846

src_json_parser/parser_tools.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ module parser_tools_mod
2424
type(coordinate_t) :: relPos
2525
end type
2626

27-
type :: cable_ptr_t
28-
type(cable_t), pointer :: p
29-
end type
27+
! type :: cable_ptr_t
28+
! type(cable_t), pointer :: p
29+
! end type
3030
#endif
3131

3232
contains

0 commit comments

Comments
 (0)