@@ -10,11 +10,6 @@ PostOperation Get_global UsingPost MagDyn_a {
1010 //Print [ SoF [ DomainC ], OnGlobal , Format TimeTable , File > Sprintf ("results/SF_Core.dat" )] ; // TODO : Complex power
1111 //Print [ j2F [ Winding ~{1 } ], OnGlobal , Format TimeTable , File > StrCat [DirResVals , "j2F_1.dat" ]] ;
1212
13- For n In {1 :n_windings }
14- Print [ j2F [ Winding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals , "j2F_%g.dat" ], n ]] ;
15- EndFor
16-
17-
1813
1914 //Print [ j2F [ Winding3 ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"j2F_3.dat" ]] ;
2015 // Stranded
@@ -24,10 +19,41 @@ PostOperation Get_global UsingPost MagDyn_a {
2419 //Print [ j2H [ StrandedWinding ~{1 } ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"j2H_1.dat" ] ] ;
2520 //Print [ j2H [ StrandedWinding1 ], OnGlobal , Format Table ];
2621
27- For n In {1 :n_windings }
28- Print [ j2H [ StrandedWinding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"j2H_%g.dat" ], n ]] ;
29- EndFor
30-
22+ // This code is to prevent printing both if one of them is not exist
23+ If (Flag_Stream_Visualization )
24+ // initialize
25+ solid_exist = 0 ;
26+ litz_exist = 0 ;
27+
28+ For n In {1 :n_windings }
29+ If (!Flag_HomogenisedModel ~{n })
30+ solid_exist = 1 ; // found a solid conductor
31+ Else
32+ litz_exist = 1 ; // found a litz conductor
33+ EndIf
34+ EndFor
35+ If (solid_exist )
36+ For n In {1 :n_windings }
37+ Print [ j2F [ Winding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals , "j2F_%g.dat" ], n ],
38+ SendToServer Sprintf [StrCat [po ,"12winding_%g_losses [J]" ], n ], Color "LightYellow" ] ;
39+ EndFor
40+ EndIf
41+ If (litz_exist )
42+ For n In {1 :n_windings }
43+ Print [ j2H [ StrandedWinding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"j2H_%g.dat" ], n ],
44+ SendToServer Sprintf [StrCat [po ,"13winding_%g_losses [J]" ], n ], Color "LightYellow" ] ;
45+ EndFor
46+ EndIf
47+ Else
48+ For n In {1 :n_windings }
49+ Print [ j2F [ Winding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals , "j2F_%g.dat" ], n ],
50+ SendToServer Sprintf [StrCat [po ,"12winding_%g_losses [J]" ], n ], Color "LightYellow" ] ;
51+ EndFor
52+ For n In {1 :n_windings }
53+ Print [ j2H [ StrandedWinding ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"j2H_%g.dat" ], n ],
54+ SendToServer Sprintf [StrCat [po ,"13winding_%g_losses [J]" ], n ], Color "LightYellow" ] ;
55+ EndFor
56+ EndIf
3157
3258 //Print [ j2H [ StrandedWinding2 ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"j2H_2.dat" ] ] ;
3359 //Print [ j2H [ StrandedWinding3 ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"j2H_3.dat" ] ] ;
@@ -54,13 +80,15 @@ PostOperation Get_global UsingPost MagDyn_a {
5480 // Core
5581
5682 // Eddy Current Losses according to sigma in Core
57- Print [ j2F [ Core ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"CoreEddyCurrentLosses.dat" ]] ;
83+ Print [ j2F [ Core ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"CoreEddyCurrentLosses.dat" ], SendToServer StrCat [ po , "15core_eddy_losses[J]" ], Color "LightYellow" ] ;
5884
5985 // Hysteresis Losses according to complex permeability in Core
6086 Print [ p_hyst [ Core ], OnGlobal , Format TimeTable , File > StrCat [DirResVals ,"p_hyst.dat" ]] ;// Core losses
6187 For n In {1 :nCoreParts }
62- Print [ p_hyst [ CorePart ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResValsCore , "p_hyst_%g.dat" ], n ]] ;
63- Print [ j2F [ CorePart ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResValsCore , "CoreEddyCurrentLosses_%g.dat" ], n ]] ;
88+ Print [ p_hyst [ CorePart ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResValsCore , "p_hyst_%g.dat" ], n ],
89+ SendToServer StrCat [po ,"16hyst_losses[J]" ], Color "LightYellow" ] ;
90+ Print [ j2F [ CorePart ~{n } ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResValsCore , "CoreEddyCurrentLosses_%g.dat" ], n ],
91+ SendToServer Sprintf [StrCat [po ,"17core_part_%g_eddy_losses [J]" ], n ], Color "LightYellow" ] ;
6492 EndFor
6593
6694
@@ -76,14 +104,16 @@ PostOperation Get_global UsingPost MagDyn_a {
76104 // Print [ Flux_Linkage_1 [DomainCond1 ], OnGlobal , Format Table ];
77105
78106 For n In {1 :n_windings }
79- Print [ Flux_Linkage ~{n }[DomainCond ~{n }], OnGlobal , Format Table , File > Sprintf [StrCat [DirResVals ,"Flux_Linkage_%g.dat" ], n ]];
107+ Print [ Flux_Linkage ~{n }[DomainCond ~{n }], OnGlobal , Format Table , File > Sprintf [StrCat [DirResVals ,"Flux_Linkage_%g.dat" ], n ],
108+ SendToServer Sprintf [StrCat [po ,"18Flux_%g [Wb]" ], n ], Color "LightYellow" ];
80109 //Print [ Flux_Linkage ~{n }[DomainCond ~{n }], OnGlobal , Format Table ];
81110 EndFor
82111
83112 // Inductances
84113 For n In {1 :n_windings }
85114 If (Val_EE ~{n }!=0 )
86- Print [ L ~{n }~{n }[DomainCond ~{n }], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"L_%g_%g.dat" ], n , n ]] ;
115+ Print [ L ~{n }~{n }[DomainCond ~{n }], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"L_%g_%g.dat" ], n , n ],
116+ SendToServer Sprintf [StrCat [po ,"19L_%g_%g [Wb]" ], n , n ], Color "LightYellow" ] ;
87117 Print [ LFromMagEnergy ~{n }~{n }[Domain ], OnGlobal , Format TimeTable , File > Sprintf [StrCat [DirResVals ,"LFromMagEnergy_%g_%g.dat" ], n , n ]] ;
88118 EndIf
89119 EndFor
@@ -100,16 +130,20 @@ PostOperation Get_global UsingPost MagDyn_a {
100130 If (!Flag_Circuit )
101131 For n In {1 :n_windings }
102132 If (!Flag_HomogenisedModel ~{n })
103- Print [ I , OnRegion Winding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"I_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ];
104- Print [ U , OnRegion Winding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"U_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ];
133+ Print [ I , OnRegion Winding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"I_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ,
134+ SendToServer Sprintf [StrCat [po ,"10I_%g [A]" ], n ], Color "LightYellow" ];
135+ Print [ U , OnRegion Winding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"U_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ,
136+ SendToServer Sprintf [StrCat [po ,"11V_%g [V]" ], n ], Color "LightYellow" ];
105137 Else
106- Print [ I , OnRegion StrandedWinding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"I_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ];
107- Print [ U , OnRegion StrandedWinding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"U_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ];
138+ Print [ I , OnRegion StrandedWinding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"I_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ,
139+ SendToServer Sprintf [StrCat [po ,"10I_%g [A]" ], n ], Color "LightYellow" ];
140+ Print [ U , OnRegion StrandedWinding ~{n }, Format TimeTable , File > Sprintf [StrCat [DirResCirc ,"U_%g_f%g.dat" ], n , Freq ] , LastTimeStepOnly ,
141+ SendToServer Sprintf [StrCat [po ,"11V_%g [V]" ], n ], Color "LightYellow" ];
108142 EndIf
109143 EndFor
110144 Else
111- Print [ I , OnRegion Input , Format TimeTable , File >Sprintf ("results/I_f%g.dat" , Freq ), LastTimeStepOnly ];
112- Print [ U , OnRegion Input , Format TimeTable , File >Sprintf ("results/U_f%g.dat" , Freq ), LastTimeStepOnly ];
145+ Print [ I , OnRegion Input , Format TimeTable , File >Sprintf ("results/I_f%g.dat" , Freq ), LastTimeStepOnly , SendToServer Sprintf [ StrCat [ po , "20I_%g [A]" ], n ], Color "LightYellow" ];
146+ Print [ U , OnRegion Input , Format TimeTable , File >Sprintf ("results/U_f%g.dat" , Freq ), LastTimeStepOnly , SendToServer Sprintf [ StrCat [ po , "21V_%g [V]" ], n ], Color "LightYellow" ];
113147 EndIf
114148
115149}
0 commit comments