Skip to content

Commit 3b606b2

Browse files
authored
Merge pull request #193 from OpenSEMBA/feature/new_terminations
Feature/new terminations
2 parents 9a55ee1 + c984a21 commit 3b606b2

File tree

7 files changed

+196
-113
lines changed

7 files changed

+196
-113
lines changed

doc/smbjson.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,17 @@ Each entry in `terminations` is specified by a `type`
453453

454454
+ `short` if the wire is short-circuited with another wire or with any surface which might be present.
455455
+ `open` if the wire does not end in an ohmic contact with any other structure.
456-
+ Different configurations of passive circuit elements R, L, and C can be defined with `series` (for RLC series circuits), `LCpRs` (LC parallel in series with a resistance) and `RLsCp` (for series RL in parallel with C). The are defined as follows:
456+
+ Different configurations of passive circuit elements R, L, and C can be defined:
457+
+ `series` (for RLC series circuits),
458+
+ `parallel` (for RLC parallel circuits),
459+
+ `RsLCp` (LC parallel in series with R),
460+
+ `RLsCp` (RL series in parallel with C),
461+
+ `LsRCp` (RC parallel in series with L),
462+
+ `CsLRp` (LR parallel in parallel with C),
463+
+ `RCsLp` (RC series in parallel with L), and
464+
+ `LCsRp` (LC series in parallel with R).
465+
466+
The values are defined defined as follows:
457467
+ `[resistance]` which defaults to `0.0`,
458468
+ `[inductance]` which defaults to `0.0`,
459469
+ `[capacitance]` which defaults to `1e22`.

src_json_parser/smbjson.F90

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,8 +2754,18 @@ function readTerminationType(termination) result(res)
27542754
res = TERMINATION_SHORT
27552755
else if (type == J_MAT_TERM_TYPE_SERIES) then
27562756
res = TERMINATION_SERIES
2757-
else if (type == J_MAT_TERM_TYPE_LCpRs) then
2758-
res = TERMINATION_LCpRs
2757+
else if (type == J_MAT_TERM_TYPE_PARALLEL) then
2758+
res = TERMINATION_PARALLEL
2759+
else if (type == J_MAT_TERM_TYPE_RsLCp) then
2760+
res = TERMINATION_RsLCp
2761+
else if (type == J_MAT_TERM_TYPE_LsRCp) then
2762+
res = TERMINATION_LsRCp
2763+
else if (type == J_MAT_TERM_TYPE_CsLRp) then
2764+
res = TERMINATION_CsLRp
2765+
else if (type == J_MAT_TERM_TYPE_RCsLp) then
2766+
res = TERMINATION_RCsLp
2767+
else if (type == J_MAT_TERM_TYPE_LCsRp) then
2768+
res = TERMINATION_LCsRp
27592769
else if (type == J_MAT_TERM_TYPE_RLsCp) then
27602770
res = TERMINATION_RLsCp
27612771
else if (type == J_MAT_TERM_TYPE_CIRCUIT) then

src_json_parser/smbjson_labels.F90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ module smbjson_labels_mod
6363
character (len=*), parameter :: J_MAT_TERM_TYPE_OPEN = "open"
6464
character (len=*), parameter :: J_MAT_TERM_TYPE_SHORT = "short"
6565
character (len=*), parameter :: J_MAT_TERM_TYPE_SERIES = "series"
66-
character (len=*), parameter :: J_MAT_TERM_TYPE_LCpRs = "LCpRs"
66+
character (len=*), parameter :: J_MAT_TERM_TYPE_PARALLEL = "parallel"
67+
character (len=*), parameter :: J_MAT_TERM_TYPE_LsRCp = "LsRCp"
68+
character (len=*), parameter :: J_MAT_TERM_TYPE_CsLRp = "CsLRp"
69+
character (len=*), parameter :: J_MAT_TERM_TYPE_RCsLp = "RCsLp"
70+
character (len=*), parameter :: J_MAT_TERM_TYPE_LCsRp = "LCsRp"
71+
72+
character (len=*), parameter :: J_MAT_TERM_TYPE_RsLCp = "RsLCp"
6773
character (len=*), parameter :: J_MAT_TERM_TYPE_RLsCp = "RLsCp"
6874
character (len=*), parameter :: J_MAT_TERM_TYPE_CIRCUIT = "circuit"
6975

src_mtln/mtln_types.F90

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ module mtln_types_mod
66
integer, parameter :: TERMINATION_SHORT = 1
77
integer, parameter :: TERMINATION_OPEN = 2
88
integer, parameter :: TERMINATION_SERIES = 3
9-
integer, parameter :: TERMINATION_LCpRs = 4
10-
integer, parameter :: TERMINATION_RLsCp = 5
11-
integer, parameter :: TERMINATION_CIRCUIT = 6
9+
integer, parameter :: TERMINATION_PARALLEL = 4
10+
integer, parameter :: TERMINATION_RsLCp = 5
11+
integer, parameter :: TERMINATION_RLsCp = 6
12+
integer, parameter :: TERMINATION_LsRCp = 7
13+
integer, parameter :: TERMINATION_CsLRp = 8
14+
integer, parameter :: TERMINATION_RCsLp = 9
15+
integer, parameter :: TERMINATION_LCsRp = 10
16+
integer, parameter :: TERMINATION_CIRCUIT = 11
1217

1318
integer, parameter :: TERMINAL_NODE_SIDE_UNDEFINED = -1
1419
integer, parameter :: TERMINAL_NODE_SIDE_INI = 1

0 commit comments

Comments
 (0)