diff options
author | Fahim | 2016-03-02 15:34:16 +0530 |
---|---|---|
committer | Fahim | 2016-03-02 15:34:16 +0530 |
commit | 35415e97a4a39aa18aeeda9d89abe2f48ff9f146 (patch) | |
tree | 016773213500e14609f8afb248bd4f516def5fd0 /src/kicadtoNgspice/Convert.py | |
parent | 0b0949cb657b07341c9cb17a9bce5c7e1aee09f4 (diff) | |
download | eSim-35415e97a4a39aa18aeeda9d89abe2f48ff9f146.tar.gz eSim-35415e97a4a39aa18aeeda9d89abe2f48ff9f146.tar.bz2 eSim-35415e97a4a39aa18aeeda9d89abe2f48ff9f146.zip |
Added default value to Tranformer model
Diffstat (limited to 'src/kicadtoNgspice/Convert.py')
-rw-r--r-- | src/kicadtoNgspice/Convert.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py index 0a38b28e..0454e1a5 100644 --- a/src/kicadtoNgspice/Convert.py +++ b/src/kicadtoNgspice/Convert.py @@ -204,13 +204,13 @@ class Convert: try: start=line[7] end=line[8] - num_turns=str(self.obj_track.model_entry_var[start].text()) + num_turns=str(self.obj_track.model_entry_var[start+1].text()) if num_turns=="": num_turns="310" h_array= "H_array = [ " b_array = "B_array = [ " - h1=str(self.obj_track.model_entry_var[start+1].text()) - b1=str(self.obj_track.model_entry_var[start+2].text()) + h1=str(self.obj_track.model_entry_var[start].text()) + b1=str(self.obj_track.model_entry_var[start+5].text()) if len(h1)!=0 and len(b1)!=0: h_array=h_array+h1+" " @@ -218,11 +218,11 @@ class Convert: bh_array = h_array+" ] " + b_array+" ]" else: bh_array = "H_array = [-1000 -500 -375 -250 -188 -125 -63 0 63 125 188 250 375 500 1000] B_array = [-3.13e-3 -2.63e-3 -2.33e-3 -1.93e-3 -1.5e-3 -6.25e-4 -2.5e-4 0 2.5e-4 6.25e-4 1.5e-3 1.93e-3 2.33e-3 2.63e-3 3.13e-3]" - area=str(self.obj_track.model_entry_var[start+3].text()) + area=str(self.obj_track.model_entry_var[start+2].text()) length=str(self.obj_track.model_entry_var[start+4].text()) if area=="": area="1" if length=="":length="0.01" - num_turns2=str(self.obj_track.model_entry_var[start+5].text()) + num_turns2=str(self.obj_track.model_entry_var[start+3].text()) if num_turns2=="": num_turns2="620" addmodelLine=".model "+line[3]+"_primary lcouple (num_turns= "+num_turns+")" modelParamValue.append([line[0],addmodelLine,"*primary lcouple"]) |