From 477df3d4a76198b76d03a3ed6558e257b79d1e1c Mon Sep 17 00:00:00 2001 From: chris.smartt Date: Thu, 21 Dec 2023 11:14:35 +0000 Subject: [PATCH] Fix error with twisted pair cable condcutor internal impedance --- SRC/CABLE_MODULES/twisted_pair.F90 | 3 ++- SRC/cable_bundle_model_builder.F90 | 14 ++++++++++++++ TEST_CASES/generate_spice_cable_bundle_model | 0 clean_project | 0 4 files changed, 16 insertions(+), 1 deletion(-) mode change 100644 => 100755 TEST_CASES/generate_spice_cable_bundle_model mode change 100644 => 100755 clean_project diff --git a/SRC/CABLE_MODULES/twisted_pair.F90 b/SRC/CABLE_MODULES/twisted_pair.F90 index 778cd2f..30751ca 100644 --- a/SRC/CABLE_MODULES/twisted_pair.F90 +++ b/SRC/CABLE_MODULES/twisted_pair.F90 @@ -46,6 +46,7 @@ ! ! started 12/4/201 CJS ! 16/11/2017 CJS Include network synthesis process to replace s-domain transfer functions +! 21/12/2023: fix error on cable%conductor_impedance(2)%Resistance_multiplication_factor ! ! SUBROUTINE twisted_pair_set_parameters(cable) @@ -288,7 +289,7 @@ IMPLICIT NONE cable%conductor_impedance(2)%impedance_model_type=impedance_model_type_cylindrical_with_conductivity cable%conductor_impedance(2)%radius=rw cable%conductor_impedance(2)%conductivity=sigma - cable%conductor_impedance(2)%Resistance_multiplication_factor=1.5d0 + cable%conductor_impedance(2)%Resistance_multiplication_factor=0.5d0 CALL deallocate_Sfilter(epsr) diff --git a/SRC/cable_bundle_model_builder.F90 b/SRC/cable_bundle_model_builder.F90 index 7ebdb8b..ff76eac 100644 --- a/SRC/cable_bundle_model_builder.F90 +++ b/SRC/cable_bundle_model_builder.F90 @@ -77,6 +77,7 @@ ! 24/2/2017 CJS Allow the input name to include a path i.e. the _spec file does not need to be local. ! 13/3/2018 CJS Add flag for direct/ iterative matrix solver in Laplace solution and inf/finite ground plane ! 19/6/2018 CJS Add flag for Neumann/ Asymptotic boundary condition in Laplace solver. Default is Neumann +! 21/12/2023: Trap the special case of a tristed pair in free space which needs a special process... ! PROGRAM cable_bundle_model_builder @@ -404,6 +405,19 @@ logical :: must_use_laplace end do ! read the next cable file in the bundle +! 21/12/2023: Check for the special case of a tristed pair in free space which needs +! a special process... + + if (bundle_spec%n_cables.Eq.1) then + cable=1 + if (bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_twisted_pair) then + run_status='ERROR: twisted pair cable in free space with no other conductors. Model this using two cylindrical wires' + CALL write_program_status() + STOP 1 + end if + end if + + ! Check whether Laplace solver must be used if (must_use_laplace.AND.(.NOT.use_Laplace)) then diff --git a/TEST_CASES/generate_spice_cable_bundle_model b/TEST_CASES/generate_spice_cable_bundle_model old mode 100644 new mode 100755 index daec3d8..daec3d8 --- a/TEST_CASES/generate_spice_cable_bundle_model +++ b/TEST_CASES/generate_spice_cable_bundle_model diff --git a/clean_project b/clean_project old mode 100644 new mode 100755 index 133c744..133c744 --- a/clean_project +++ b/clean_project -- libgit2 0.21.2