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 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 14  
15 15  
16 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 73 ! so that we can work out the is_shield flag properly in all circumstances.
74 74 ! 18/10/2017 CJS: include 8b. Copy the cable based conductor labels to the bundle structure
75 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 80 SUBROUTINE create_global_domain_structure(bundle)
... ... @@ -110,7 +111,7 @@ USE maths
110 111 integer :: local_cable_conductor,local_domain_conductor
111 112 integer :: local_n_domains,local_domain
112 113 integer :: first_external_domain
113   - integer :: reference_conductor
  114 + integer :: reference_conductor,global_reference_conductor
114 115 integer :: first_external_conductor
115 116  
116 117 ! variables for looking at overshields and determining which domain cables are in
... ... @@ -354,7 +355,7 @@ USE maths
354 355 overshield_domain(overshield)=tot_n_domains
355 356  
356 357 global_domain_reference_conductor(tot_n_domains)=overshield_reference_terminal_conductor(overshield)
357   -
  358 +
358 359 end if ! this overshield domain is unallocated
359 360  
360 361 cable_reference_domain(cable)=overshield_domain(overshield)
... ... @@ -623,10 +624,13 @@ USE maths
623 624 ! 5c. Set the global_domain_conductor_to_terminal_conductor from terminal_conductor_to_global_domain_conductor
624 625  
625 626 if (verbose) then
  627 +
626 628 write(*,*)'conductor,terminal_conductor_to_global_domain_conductor(conductor)'
  629 +
627 630 do conductor=1,tot_n_conductors
628 631 write(*,*)conductor,terminal_conductor_to_global_domain_conductor(conductor)
629 632 end do
  633 +
630 634 end if
631 635  
632 636 ! loop over terminal conductors
... ... @@ -634,7 +638,33 @@ USE maths
634 638 global_domain_conductor_to_terminal_conductor(terminal_conductor_to_global_domain_conductor(conductor))=conductor
635 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 669 conductor=0 ! this is the external conductor number
640 670  
... ... @@ -669,13 +699,20 @@ USE maths
669 699 domain=terminal_conductor_to_global_domain(conductor)
670 700 ! 16/5/2016 this should be the global not the local number... global_domain_reference_conductor(domain)=reference_conductor
671 701 global_domain_reference_conductor(domain)=bundle%cable(cable)%global_domain_conductor(reference_conductor)
672   -
  702 +
673 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 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 713 terminal_conductor_to_reference_global_domain_conductor(conductor)= &
678 714 terminal_conductor_to_global_domain_conductor(reference_conductor)
  715 +
679 716 reference_conductor=0
680 717  
681 718 end if
... ... @@ -1287,17 +1324,23 @@ USE maths
1287 1324 ! apart from the shielded twisted pair differential mode exception
1288 1325 ! so record this hence set out the inner domain number for shields
1289 1326  
  1327 +write(*,*)'****************************************************************'
  1328 +
1290 1329 do domain=1,bundle%tot_n_domains-1 ! note we exclude the exterior domain here
1291 1330  
1292 1331 reference_conductor=global_domain_reference_conductor(domain)
1293 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 1336 if (.NOT.domain_is_TP_differential_mode(domain)) then
1296 1337 bundle%terminal_conductor_is_shield_flag(terminal_conductor)=.TRUE.
1297 1338 bundle%terminal_conductor_to_inner_domain(terminal_conductor)=domain
1298 1339 end if
1299 1340  
1300 1341 end do ! next conductor
  1342 +
  1343 +write(*,*)'****************************************************************'
1301 1344  
1302 1345 ! work out the outer domain for each conductor and the associated reference conductor
1303 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"
... ...