Commit 0cd31073b1b4cffa1ad8f53efa4bdcc3741410fe

Authored by Chris Smartt
1 parent 47cbb42e

Fix numbering error for overshields if overshield is not the last defined cable. Update to V4.1.0

SOFTWARE_NOTES/known_problems.txt
1 Record of known problems in SACAMOS 1 Record of known problems in SACAMOS
  2 +
  3 +21/10/2019: A problem has been reported when using overshields. If the overshield is
  4 + not the last cable to be defined then the numbering of reference conductors
  5 + (shields) in the bundle can be incorrect. Fixed 22/10/2019 CJS.
  6 +
SOFTWARE_NOTES/work_log.txt
@@ -14,3 +14,7 @@ @@ -14,3 +14,7 @@
14 14
15 15
16 13th July CJS fix error in creaating circuit symbols: incident field nodes were missing... 16 13th July CJS fix error in creaating circuit symbols: incident field nodes were missing...
  17 +
  18 +22/10/2019 CJS. Fix numbering error for overshields following a reported error.
  19 + Successfully re-run all the automatic test cases and upload the update
  20 + to the repository.
SRC/BUNDLE_DOMAIN_CREATION/create_global_domain_structure.F90
@@ -73,7 +73,8 @@ @@ -73,7 +73,8 @@
73 ! so that we can work out the is_shield flag properly in all circumstances. 73 ! so that we can work out the is_shield flag properly in all circumstances.
74 ! 18/10/2017 CJS: include 8b. Copy the cable based conductor labels to the bundle structure 74 ! 18/10/2017 CJS: include 8b. Copy the cable based conductor labels to the bundle structure
75 ! 16/11/2017 CJS Include network synthesis process to replace s-domain transfer functions 75 ! 16/11/2017 CJS Include network synthesis process to replace s-domain transfer functions
76 -! 16/3/2018 CJS add y offset for ML_flex_cable 76 +! 16/3/2018 CJS add y offset for ML_flex_cable
  77 +! 22/10/2019 CJS Fix bug with numbering here: overshields were numbered using terminal conductor number not global domain number
77 ! 78 !
78 79
79 SUBROUTINE create_global_domain_structure(bundle) 80 SUBROUTINE create_global_domain_structure(bundle)
@@ -110,7 +111,7 @@ USE maths @@ -110,7 +111,7 @@ USE maths
110 integer :: local_cable_conductor,local_domain_conductor 111 integer :: local_cable_conductor,local_domain_conductor
111 integer :: local_n_domains,local_domain 112 integer :: local_n_domains,local_domain
112 integer :: first_external_domain 113 integer :: first_external_domain
113 - integer :: reference_conductor 114 + integer :: reference_conductor,global_reference_conductor
114 integer :: first_external_conductor 115 integer :: first_external_conductor
115 116
116 ! variables for looking at overshields and determining which domain cables are in 117 ! variables for looking at overshields and determining which domain cables are in
@@ -354,7 +355,7 @@ USE maths @@ -354,7 +355,7 @@ USE maths
354 overshield_domain(overshield)=tot_n_domains 355 overshield_domain(overshield)=tot_n_domains
355 356
356 global_domain_reference_conductor(tot_n_domains)=overshield_reference_terminal_conductor(overshield) 357 global_domain_reference_conductor(tot_n_domains)=overshield_reference_terminal_conductor(overshield)
357 - 358 +
358 end if ! this overshield domain is unallocated 359 end if ! this overshield domain is unallocated
359 360
360 cable_reference_domain(cable)=overshield_domain(overshield) 361 cable_reference_domain(cable)=overshield_domain(overshield)
@@ -623,10 +624,13 @@ USE maths @@ -623,10 +624,13 @@ USE maths
623 ! 5c. Set the global_domain_conductor_to_terminal_conductor from terminal_conductor_to_global_domain_conductor 624 ! 5c. Set the global_domain_conductor_to_terminal_conductor from terminal_conductor_to_global_domain_conductor
624 625
625 if (verbose) then 626 if (verbose) then
  627 +
626 write(*,*)'conductor,terminal_conductor_to_global_domain_conductor(conductor)' 628 write(*,*)'conductor,terminal_conductor_to_global_domain_conductor(conductor)'
  629 +
627 do conductor=1,tot_n_conductors 630 do conductor=1,tot_n_conductors
628 write(*,*)conductor,terminal_conductor_to_global_domain_conductor(conductor) 631 write(*,*)conductor,terminal_conductor_to_global_domain_conductor(conductor)
629 end do 632 end do
  633 +
630 end if 634 end if
631 635
632 ! loop over terminal conductors 636 ! loop over terminal conductors
@@ -634,7 +638,33 @@ USE maths @@ -634,7 +638,33 @@ USE maths
634 global_domain_conductor_to_terminal_conductor(terminal_conductor_to_global_domain_conductor(conductor))=conductor 638 global_domain_conductor_to_terminal_conductor(terminal_conductor_to_global_domain_conductor(conductor))=conductor
635 end do 639 end do
636 640
637 -! 5d. Set the global_domain_reference_conductor information, also flag all the reference conductors in internal domains 641 + if (verbose) then
  642 +
  643 + write(*,*)'conductor,global_domain_conductor_to_terminal_conductor(conductor)'
  644 +
  645 + do conductor=1,tot_n_conductors
  646 + write(*,*)conductor,global_domain_conductor_to_terminal_conductor(conductor)
  647 + end do
  648 +
  649 + end if
  650 +
  651 +! 22/10/2019 CJS Fix bug with numbering here: overshields were numbered using terminal conductor number
  652 +! not global domain conductor as it should be at this stage
  653 +! 5d. Renumber the reference conductors for overshield domains. At the moment these are terminal conductors
  654 +! not global domain conductors
  655 +
  656 + do overshield=1,tot_n_overshields
  657 +
  658 + domain=overshield_domain(overshield)
  659 +
  660 + reference_conductor=global_domain_reference_conductor(domain)
  661 +
  662 + global_reference_conductor=terminal_conductor_to_global_domain_conductor(reference_conductor)
  663 + global_domain_reference_conductor(domain)=global_reference_conductor
  664 +
  665 + end do ! next overshield
  666 +
  667 +! 5e. Set the global_domain_reference_conductor information, also flag all the reference conductors in internal domains
638 668
639 conductor=0 ! this is the external conductor number 669 conductor=0 ! this is the external conductor number
640 670
@@ -669,13 +699,20 @@ USE maths @@ -669,13 +699,20 @@ USE maths
669 domain=terminal_conductor_to_global_domain(conductor) 699 domain=terminal_conductor_to_global_domain(conductor)
670 ! 16/5/2016 this should be the global not the local number... global_domain_reference_conductor(domain)=reference_conductor 700 ! 16/5/2016 this should be the global not the local number... global_domain_reference_conductor(domain)=reference_conductor
671 global_domain_reference_conductor(domain)=bundle%cable(cable)%global_domain_conductor(reference_conductor) 701 global_domain_reference_conductor(domain)=bundle%cable(cable)%global_domain_conductor(reference_conductor)
672 - 702 +
673 else 703 else
674 -! the reference conductor is defined in terms of the reference domain of the cable 704 +
  705 +! the reference conductor is defined in terms of the reference domain of the cable
  706 +
675 domain=cable_reference_domain(cable) 707 domain=cable_reference_domain(cable)
676 - reference_conductor=global_domain_reference_conductor(domain) 708 +
  709 + global_reference_conductor=global_domain_reference_conductor(domain)
  710 +
  711 + reference_conductor=global_domain_conductor_to_terminal_conductor(global_reference_conductor)
  712 +
677 terminal_conductor_to_reference_global_domain_conductor(conductor)= & 713 terminal_conductor_to_reference_global_domain_conductor(conductor)= &
678 terminal_conductor_to_global_domain_conductor(reference_conductor) 714 terminal_conductor_to_global_domain_conductor(reference_conductor)
  715 +
679 reference_conductor=0 716 reference_conductor=0
680 717
681 end if 718 end if
@@ -1287,17 +1324,23 @@ USE maths @@ -1287,17 +1324,23 @@ USE maths
1287 ! apart from the shielded twisted pair differential mode exception 1324 ! apart from the shielded twisted pair differential mode exception
1288 ! so record this hence set out the inner domain number for shields 1325 ! so record this hence set out the inner domain number for shields
1289 1326
  1327 +write(*,*)'****************************************************************'
  1328 +
1290 do domain=1,bundle%tot_n_domains-1 ! note we exclude the exterior domain here 1329 do domain=1,bundle%tot_n_domains-1 ! note we exclude the exterior domain here
1291 1330
1292 reference_conductor=global_domain_reference_conductor(domain) 1331 reference_conductor=global_domain_reference_conductor(domain)
1293 terminal_conductor=global_domain_conductor_to_terminal_conductor(reference_conductor) 1332 terminal_conductor=global_domain_conductor_to_terminal_conductor(reference_conductor)
1294 1333
  1334 + write(*,*)'domain=',domain,' reference_conductor=',reference_conductor,' terminal_conductor=',terminal_conductor
  1335 +
1295 if (.NOT.domain_is_TP_differential_mode(domain)) then 1336 if (.NOT.domain_is_TP_differential_mode(domain)) then
1296 bundle%terminal_conductor_is_shield_flag(terminal_conductor)=.TRUE. 1337 bundle%terminal_conductor_is_shield_flag(terminal_conductor)=.TRUE.
1297 bundle%terminal_conductor_to_inner_domain(terminal_conductor)=domain 1338 bundle%terminal_conductor_to_inner_domain(terminal_conductor)=domain
1298 end if 1339 end if
1299 1340
1300 end do ! next conductor 1341 end do ! next conductor
  1342 +
  1343 +write(*,*)'****************************************************************'
1301 1344
1302 ! work out the outer domain for each conductor and the associated reference conductor 1345 ! work out the outer domain for each conductor and the associated reference conductor
1303 do conductor=1,bundle%tot_n_conductors 1346 do conductor=1,bundle%tot_n_conductors
version_information.inc
1 -SPICE_CABLE_MODEL_BUILDER_version="v4.0.0"  
2 -SPICE_CABLE_MODEL_BUILDER_date="6th October 2018" 1 +SPICE_CABLE_MODEL_BUILDER_version="v4.1.0"
  2 +SPICE_CABLE_MODEL_BUILDER_date="22nd October 2019"