@@ -684,7 +684,7 @@ def getTimeSeries(self, which=["ke"], batchSize=None):
684684 series ["keV" ].append (keV .ravel ())
685685
686686 for key , val in series .items ():
687- series [key ] = np .array (val ). ravel ( )
687+ series [key ] = np .hstack (val )
688688
689689 # Save in postData
690690 self .setPostData ("series" , series )
@@ -1226,30 +1226,33 @@ def fun(coeffs):
12261226 import matplotlib .pyplot as plt
12271227
12281228 # dirName = "run_3D_A4_M0.5_R1_Ra1e6"
1229- dirName = "run_3D_A4_M1_R1_Ra1.5e5 "
1229+ dirName = "run_3D_A4_M1_R2_Ra1e6 "
12301230 # dirName = "run_M4_R2"
12311231 # dirName = "test_M4_R2"
12321232 OutputFiles .VERBOSE = True
12331233 output = OutputFiles (dirName )
12341234
1235+ start = 20
1236+ stop = None
1237+ batchSize = 10
1238+
12351239 if True :
1236- series = output .getTimeSeries (which = ["ke" , "keH" , "keV" , "NuV" ])
1240+ series = output .getTimeSeries (
1241+ which = ["ke" , "keH" , "keV" , "NuV" ], batchSize = batchSize )
12371242
12381243 plt .figure ("series" )
12391244 plt .plot (output .times , series ["NuV" ], label = f"NuV ({ dirName } )" )
12401245 plt .legend ()
12411246 plt .xlabel ("Time" )
12421247 plt .tight_layout ()
12431248
1244- start = 20
1245-
12461249 if True :
12471250 which = ["bRMS" , "uRMS" , "uMean" ]
12481251
12491252 Nu = series ["NuV" ][start :].mean ()
12501253
12511254 profiles = output .getProfiles (
1252- which , start = start , stop = 51 , batchSize = None )
1255+ which , start = start , stop = stop , batchSize = batchSize )
12531256 deltas = output .getBoundaryLayers (which , profiles = profiles )
12541257
12551258 for name , p in profiles .items ():
@@ -1297,13 +1300,13 @@ def fun(coeffs):
12971300 if True :
12981301 spectrum = output .getSpectrum (
12991302 which = "all" , zVal = "all" ,
1300- start = start , stop = 51 , batchSize = None )
1303+ start = start , stop = stop , batchSize = batchSize )
13011304
13021305 kappa = output .kappa
13031306 plt .figure ("spectrum" )
13041307 for name in ["u" ]:
13051308 vals = spectrum [name ]
1306- check = checkDNS (vals , kappa )
1309+ check = checkDNS (vals , kappa , sRatio = 3 )
13071310 a , b , c = check ["coeffs" ]
13081311 c2 = float (a )
13091312 print (f"DNS (on { name } ): { check ['DNS' ]} ({ c2 = } )" )
0 commit comments