diff --git a/conf/coupled/electroMechConPDE.conf b/conf/coupled/electroMechConPDE.conf index 8aaa4d4ffefca0b58f3f78b0475dd211396e5559..0eca732970b8a7db2ba5be635946d20aacd6cce8 100644 --- a/conf/coupled/electroMechConPDE.conf +++ b/conf/coupled/electroMechConPDE.conf @@ -31,7 +31,7 @@ ProblemDimension = 3 ProblemGeometry = Tet #Aublasen am Anfang und Druck ist an -WithPrestress =true#true false +WithPrestress =false#true false PrestressSteps = 10 PressureIterations = 20 PressureDepth = 0 @@ -68,8 +68,8 @@ RossiViscosity = 500 RossiForce = 10 #RossiForce = 7 -ElphyLevel = 1 #1 -MechLevel = 1 #1 +ElphyLevel = 0 #1 +MechLevel = 0 #1 MechPolynomialDegree = 1 ElphyPolynomialDegree = 1 @@ -89,6 +89,7 @@ EndTime = 0.8 AdaptiveTimeStepForMech=true #maxgammaInf MaximalGammaInf=0.3 +FactorMaximalGammaInf=0.8 MechDeltaTime = 0.0016 #0.004# 0.001 ElphyDeltaTime = 0.0001 # 0.001 #0.000001 @@ -157,8 +158,6 @@ QuasiCompressiblePenalty = Ciarlet #None, Ciarlet, Mixed VolumetricPenalty = 1000 # ? PermeabilityPenalty = 0 #1000 # ? -#entscheidet über adaptivität -AdaptiveTimeStepForMech=true ###################### #Elphy ########################### @@ -270,8 +269,8 @@ ParallelPlotting=False Compression=ascii # = Plot Verbose = -ElphyVTK = 0 # 0 Disables all plots from Electrophysiology -MechVTK = -1 # 0 Disables all plots from Elasticity +ElphyVTK = 1 # 0 Disables all plots from Electrophysiology +MechVTK = 1 # 0 Disables all plots from Elasticity # = Plot Verbose = PressureSolverVTK = 0 @@ -279,4 +278,4 @@ DynamicSolverVTK = -10 ElphySolverVTK = 10 CoupledSolverVTK = -10 PlotCalcium=0 -PlotVTK = -1 \ No newline at end of file +PlotVTK = 1 \ No newline at end of file diff --git a/tools/evaluation/thesisBiventricle.py b/tools/evaluation/thesisBiventricle.py index b4209a642fdc73444d87cc5490a9fa999b43af59..4f5fb3ba1eb36c17d6e13bbcead8c80ada289369 100644 --- a/tools/evaluation/thesisBiventricle.py +++ b/tools/evaluation/thesisBiventricle.py @@ -113,7 +113,18 @@ def plotSchwinger(): for p in listEvaluationPoints: plot.Unterschwinger(fL,nL,threshold,p,j,savePath) plot.Oberschwinger(fL,nL,threshold,p,j,savePath) - +def plotOnePotential(): + lL=[5] + tL=[0] + sdt=0.0004 + endTime=0.65 + #read.writeDataInFile(fGS,[5],[4],1) + listEvaluationPoints=[1] + plot=Plot(lL,tL,sdt,endTime,1,listEvaluationPoints) + resize=10 + for p in listEvaluationPoints: + plot.plotSpaceForPointp(fSIOC,p,0,1,resize,'AktionspotentialtTP','') + def plotPotential(): lL=[2,3,4,5] tL=[0,1,2,3]#,3] @@ -125,8 +136,8 @@ def plotPotential(): plot=Plot(lL,tL,sdt,endTime,1,listEvaluationPoints) resize=10 for p in listEvaluationPoints: - plot.plotSpaceForPointp(fSIOC,p,3,1,resize,'SpaceV','') - plot.plotTimeForPointp(fSIOC,p,5,1,resize,'TimeV','') + plot.plotSpaceForPointp(fSIOC,p,3,1,resize,'VortragSpaceV','') + plot.plotTimeForPointp(fSIOC,p,5,1,resize,'VortragTimeV','') #plot.plotSpaceForPointp(fSISVI,p,3,1,resize,'SVISpaceV','') #resize=1 #plot.plotTimeForPointp(fSISVI,p,5,1,resize,'SVITimeV','') @@ -239,7 +250,8 @@ def WorkPrecisonDiagram(case): if __name__=="__main__": language='d' - plotPotential() + plotOnePotential() + #plotPotential() diffcase ='tact' #DifferencePerPointTabs(diffcase) diff --git a/tools/evaluation/thesisCoupled.py b/tools/evaluation/thesisCoupled.py index 969e58016eec309eb618795816fa915e59d0f263..309aba13458ebbd6534e50614cf9651bd1a7ce55 100644 --- a/tools/evaluation/thesisCoupled.py +++ b/tools/evaluation/thesisCoupled.py @@ -235,18 +235,18 @@ def MechTimeStepTestTable(): fL=[fSISVI,fMech0008,fMech0016,fMechAdaptive16,fMechAdaptive32] numberofAdaptive=2 - #read.writeVolumeDataInFile(fMechAdaptive16,lL,[2],1) - #read.writeVolumeDataInFile(fMechAdaptive32,lL,[2],1) + #read.writeVolumeDataInFile(fMechAdaptive16,lL,[0,1,2],1) + #read.writeVolumeDataInFile(fMechAdaptive32,lL,[0,1,2],1) - #read.writeDataInFile(fMechAdaptive16,lL,[2],1) - #read.writeDataInFile(fMechAdaptive32,lL,[2],1) + #read.writeDataInFile(fMechAdaptive16,lL,[0,1,2],1) + #read.writeDataInFile(fMechAdaptive32,lL,[0,1,2],1) - #read.writeCaDataInFile(fMech0032,lL,[2],1,len(listEvaluationPoints),True) - #read.writeCaDataInFile(fMechAdaptive16,lL,[2],1,len(listEvaluationPoints),True) - #read.writeCaDataInFile(fMechAdaptive32,lL,[2],1,len(listEvaluationPoints),True) + #read.writeCaDataInFile(fMech0032,lL,[0,1,2],1,len(listEvaluationPoints),True) + #read.writeCaDataInFile(fMechAdaptive16,lL,[0,1,2],1,len(listEvaluationPoints),True) + #read.writeCaDataInFile(fMechAdaptive32,lL,[0,1,2],1,len(listEvaluationPoints),True) - #read.writeGammaDataInFile(fMechAdaptive16,lL,[2],1,len(listEvaluationPoints),True) - #read.writeGammaDataInFile(fMechAdaptive32,lL,[2],1,len(listEvaluationPoints),True) + #read.writeGammaDataInFile(fMechAdaptive16,lL,[0,1,2],1,len(listEvaluationPoints),True) + #read.writeGammaDataInFile(fMechAdaptive32,lL,[0,1,2],1,len(listEvaluationPoints),True) l=2 savePath='../../../thesis-lindner/thesis/tables/erstmal/coupled/' @@ -508,7 +508,7 @@ if __name__=="__main__": ######################### #Volumes ######################## - #plotVolumen() + plotVolumen() #DifferencePerPointTabs('Volumes') #ErrorExtra('Volumes') @@ -518,7 +518,7 @@ if __name__=="__main__": #MechTimeStep listEvaluationPoints ################################## #MechTimeStepTestTable() - PlottingForAdaptive(fMechAdaptive16,'${\\vartriangle}t^{\\mathrm{m,beg}}=1.6\,$ms') + #PlottingForAdaptive(fMechAdaptive16,'${\\vartriangle}t^{\\mathrm{m,beg}}=1.6\,$ms') #PlottingForAdaptive(fMechAdaptive32,'A 32') diff --git a/tools/evaluation/utility/plotting.py b/tools/evaluation/utility/plotting.py index 18de045563ee2e89f84339b2b2fe15f62ce13164..ed8f92a41a7c64f8a7fd427ab799dadb3308d57d 100644 --- a/tools/evaluation/utility/plotting.py +++ b/tools/evaluation/utility/plotting.py @@ -157,9 +157,9 @@ class Plot: elif fnfix=='Gamma': plt.legend(loc='lower right') elif fnfix=='': - plt.legend(bbox_to_anchor=(1.05,1.0), loc="upper left") + plt.legend(bbox_to_anchor=(1.01,1.0), loc="upper left") elif fnfix=='Volumes': - plt.legend(bbox_to_anchor=(1.05,1.0), loc="upper left") + plt.legend(bbox_to_anchor=(1.01,1.0), loc="upper left") def plotVIntRef(self,fnfix,resize,p,path): th=-50.0 @@ -213,22 +213,40 @@ class Plot: #(tact1,id_tact1)=comp.getActivaitionTimeFromVWithID(time,V,-50.0) #id_dur1=self.getTimeID(id_tact1,j) (time,V)=self.resizeData(time,V,n,len(time)) + if 'Vortrag' in name: + for index in range(len(time)): + if time[index]>=0.5: + time=time[:index] + V=V[:index] + break labelname = '$\\ell='+str(l)+'$' #for i in range(len(time)): #time[i]-=tact1 #plt.plot(time[id_tact1:id_dur1],V[id_tact1:id_dur1], label = labelname,linewidth=2.5,color=self.colorList[l-self.lL[0]]) - plt.plot(time,V, label = labelname,linewidth=2.5,color=self.colorList[l-self.lL[0]]) + lw=2.5 + if 'Vortrag' in name: + lw=3.5 + #for index in range(len(time)): + #if time[index]>=0.45: + #time=time[:index] + #V=V[:index] + #break + #for index in range(len(time)): + #time[index]=1000.0*time[index] + #lw=3.5 + plt.plot(time,V, label = labelname,linewidth=lw)#,color=self.colorList[l-self.lL[0]]) if 'GS0004' in path and 'SimpleExcitation' in path: self.plotVIntRef(fnfix,n,p,'../../../data/biventricleTT/SimpleExcitation/GerachDiffusion/SIOC0004/') elif 'GS0004' in path and 'Kopplung' in path: self.plotVIntRef(fnfix,n,p,'../../../data/Kopplung/SIOC0004/') else: + #print('test') self.plotVIntRef(fnfix,n,p,path) plotname =name+ 'j'+str(j)+'m'+str(m)+'P'+str(p) self.plotDataDeutsch(False,fnfix) - self.definePositionOfLegendByPrefix(fnfix) + #self.definePositionOfLegendByPrefix(fnfix) plt.title('$j='+str(j)+'$') #plt.show() self.saveTikz(path+'/tex/', plotname) @@ -247,12 +265,22 @@ class Plot: (tact1,id_tact1)=comp.getActivaitionTimeFromVWithID(time,V,-50.0) id_dur1=self.getTimeID(id_tact1,j) (time,V)=self.resizeData(time,V,n,len(time)) + if 'Vortrag' in name: + for index in range(len(time)): + if time[index]>=0.5: + time=time[:index] + V=V[:index] + break + labelname = '$j='+str(j)+'$' #print(len(time),len(V)) #for i in range(len(time)): #time[i]-=tact1 #plt.plot(time[id_tact1:id_dur1],V[id_tact1:id_dur1], label = labelname,linewidth=2.5,color=self.colorList[j-self.tL[0]]) - plt.plot(time,V, label = labelname,linewidth=2.5,color=self.colorList[j-self.tL[0]]) + lw=2.5 + if 'Vortrag' in name: + lw=3.5 + plt.plot(time,V, label = labelname,linewidth=lw,color=self.colorList[j-self.tL[0]]) #if 'GS0004' in path and 'SimpleExcitation' in path: self.plotVIntRef(fnfix,n,p,'../../../data/biventricleTT/SimpleExcitation/GerachDiffusion/SIOC0004/') #elif 'GS0004' in path and 'Kopplung' in path: @@ -1129,7 +1157,7 @@ class Plot: def plotDataDeutsch(self,inMS=False,fnfix=''): - xmin, xmax, ymin, ymax = 0.0, self.T+0.05, -100.0,70.0 + xmin, xmax, ymin, ymax = 0.0, self.T+0.05, -105.0,50.0 if inMS: plt.xlabel('Zeit (ms)') else: