def __init__(self, name='Template', parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {'Template'}) - parent {[type]} -- [description] (default: {None}) """ # IMPORT THEORIES # Import theories specific to the Application e.g.: # from TheoryTemplate import TheoryA super().__init__(name, parent, nplot_max=1) # VIEWS # set the views that can be selected in the view combobox self.views['y(x)'] = View(name='y(x)', description='y as a function of x', x_label='x', y_label='y(x)', x_units='-', y_units='-', log_x=False, log_y=False, view_proc=self.viewyx, n=1, snames=['y(x)']) # set multiviews # default view order in multiplot views, set nplots=1 for single view self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationTemplate can open ftype = TXTColumnFile(name='content of files', extension='txt', description='description of the file type', col_names=['col1', 'col2'], basic_file_parameters=['param1', 'param2'], col_units=['units_col1', 'units_col2']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES # add the theories related to ApplicationTemplate to the dictionary, e.g.: # self.theories[TheoryA.thname] = TheoryA # self.theories[TheoryB.thname] = TheoryB self.add_common_theories() # Add basic theories to the application #set the current view self.set_views()
def __init__(self, name="LVE", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"LVE"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryMaxwellModes import TheoryMaxwellModesFrequency from TheoryLikhtmanMcLeish2002 import TheoryLikhtmanMcLeish2002 from TheoryDSMLinear import TheoryDSMLinear from TheoryTTS import TheoryWLFShift from TheoryCarreauYasuda import TheoryCarreauYasuda from TheoryRouse import TheoryRouseFrequency from TheoryDTDStars import TheoryDTDStarsFreq from TheoryBobLVE import TheoryBobLVE from TheoryRDPLVE import TheoryRDPLVE from TheoryStickyReptation import TheoryStickyReptation from TheoryShanbhagMaxwellModes import TheoryShanbhagMaxwellModesFrequency super().__init__(name, parent) # VIEWS self.views["log(G',G''(w))"] = View( name="log(G',G''(w))", description="log Storage,Loss moduli", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1G2, n=2, snames=["log(G'(w))", "log(G''(w))"]) self.views["G',G''(w)"] = View("G',G''(w)", "Storage,Loss moduli", "$\omega$", "G'($\omega$),G''($\omega$)", "rad/s", "Pa", True, True, self.viewG1G2, 2, ["G'(w)", "G''(w)"]) self.views["etastar"] = View("etastar", "Complex Viscosity", "$\omega$", "$|\eta^*(\omega)|$", "rad/s", "Pa.s", True, True, self.viewEtaStar, 1, ["eta*(w)"]) self.views["logetastar"] = View("logetastar", "log Complex Viscosity", "log($\omega$)", "log$|\eta^*(\omega)|$", "rad/s", "Pa.s", False, False, self.viewLogEtaStar, 1, ["log(eta*(w))"]) self.views["delta"] = View("delta", "delta", "$\omega$", "$\delta(\omega)$", "rad/s", "-", True, True, self.viewDelta, 1, ["delta(w)"]) self.views["tan(delta)"] = View("tan(delta)", "tan(delta)", "$\omega$", "tan($\delta$)", "rad/s", "-", True, True, self.viewTanDelta, 1, ["tan(delta((w))"]) self.views["log(tan(delta))"] = View( "log(tan(delta))", "log(tan(delta))", "log($\omega$)", "log(tan($\delta$))", "rad/s", "-", False, False, self.viewLogTanDelta, 1, ["log(tan(delta((w)))"]) self.views["log(G*)"] = View("log(G*)", "log(G*(omega))", "log($\omega$)", "log(G*($\omega$))", "rad/s", "Pa", False, False, self.viewLogGstar, 1, ["log(G*)"]) self.views["log(tan(delta),G*)"] = View( "log(tan(delta),G*)", "log(tan($\delta$))", "log(G*)", "log(tan($\delta$))", "Pa", "-", False, False, self.viewLogtandeltaGstar, 1, ["log(tan($\delta))"]) self.views["delta(G*)"] = View("delta(G*)", "$\delta$)", "log(G*)", "$\delta$)", "Pa", "deg", False, False, self.viewdeltatanGstar, 1, ["delta"]) self.views["J',J''(w)"] = View("J',J''(w)", "J moduli", "$\omega$", "J'($\omega$),J''($\omega$)", "rad/s", "$Pa^{-1}$", True, True, self.viewJ1J2, 2, ["J'(w)", "J''(w)"]) self.views["Cole-Cole"] = View("Cole-Cole", "Cole-Cole plot", "$\eta'$", "$\eta''$", "Pa.s", "Pa.s", False, False, self.viewColeCole, 1, ["$eta'$"]) self.views["log(G')"] = View(name="log(G')", description="log Storage modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1, n=1, snames=["log(G'(w))"]) self.views["G'"] = View("G'", "Storage modulus", "$\omega$", "G'($\omega$)", "rad/s", "Pa", True, True, self.viewG1, 1, ["G'(w)"]) self.views["log(G'')"] = View(name="log(G'')", description="log Loss modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG2, n=1, snames=["log(G''(w))"]) self.views["G''"] = View("G''", "Loss modulus", "$\omega$", "G''($\omega$)", "rad/s", "Pa", True, True, self.viewG2, 1, ["G''(w)"]) self.views["log(G',G''(w),tan(delta))"] = View( name="log(G',G''(w),tan(delta))", description="log Storage,Loss moduli, tan(delta)", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$),tan($\delta$))", x_units="rad/s", y_units="Pa,-", log_x=False, log_y=False, view_proc=self.viewLogG1G2tandelta, n=3, snames=["log(G'(w))", "log(G''(w)),log(tan(delta))"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("LVE files", "tts", "LVE files", ['w', 'G\'', 'G\'\''], ['Mw', 'T'], ['rad/s', 'Pa', 'Pa']) self.filetypes[ftype.extension] = ftype self.filetypes['osc'] = TXTColumnFile( "OSC files", "osc", "Small-angle oscillatory masurements from the Rheometer", ['w', 'G\'', 'G\'\''], ['Mw', 'T'], ['rad/s', 'Pa', 'Pa']) self.filetypes['xlsx'] = ExcelFile("Excel files", "xlsx", "Excel File", ['w', 'G\'', 'G\'\''], [], ['rad/s', 'Pa', 'Pa']) # THEORIES self.theories[ TheoryMaxwellModesFrequency.thname] = TheoryMaxwellModesFrequency self.theories[ TheoryLikhtmanMcLeish2002.thname] = TheoryLikhtmanMcLeish2002 self.theories[TheoryCarreauYasuda.thname] = TheoryCarreauYasuda self.theories[TheoryDSMLinear.thname] = TheoryDSMLinear #self.theories[TheoryWLFShift.thname]=TheoryWLFShift self.theories[TheoryRouseFrequency.thname] = TheoryRouseFrequency self.theories[TheoryDTDStarsFreq.thname] = TheoryDTDStarsFreq self.theories[TheoryBobLVE.thname] = TheoryBobLVE self.theories[TheoryRDPLVE.thname] = TheoryRDPLVE self.theories[TheoryStickyReptation.thname] = TheoryStickyReptation self.theories[TheoryShanbhagMaxwellModesFrequency. thname] = TheoryShanbhagMaxwellModesFrequency self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Creep", parent=None): """**Constructor**""" from RepTate.theories.TheoryRetardationModes import TheoryRetardationModesTime super().__init__(name, parent) # time range for view conversion to frequency domain self.eta = 10000 self.tmin_view = -np.inf self.tmax_view = np.inf # VIEWS self.views["log(gamma(t))"] = View( name="log(gamma(t))", description="log strain", x_label="log(t)", y_label="log($\gamma$)", x_units="s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogStraint, n=1, snames=["log(gamma)"], ) self.views["gamma(t)"] = View( name="gamma(t)", description="strain", x_label="t", y_label="$\gamma$", x_units="s", y_units="-", log_x=True, log_y=True, view_proc=self.viewStraint, n=1, snames=["gamma"], ) self.views["log(J(t))"] = View( name="log(J(t))", description="creep compliance", x_label="log(t)", y_label="log(J)", x_units="s", y_units="$\mathrm{Pa}^{-1}$", log_x=False, log_y=False, view_proc=self.viewLogJt, n=1, snames=["log(J)"], ) self.views["J(t)"] = View( name="J(t)", description="creep compliance", x_label="t", y_label="J", x_units="s", y_units="$\mathrm{Pa}^{-1}$", log_x=True, log_y=True, view_proc=self.viewJt, n=1, snames=["J"], ) self.views["t/J(t)"] = View( name="t/J(t)", description="t/creep compliance", x_label="t", y_label="t/J", x_units="s", y_units="Pa.s", log_x=True, log_y=True, view_proc=self.viewt_Jt, n=1, snames=["t/J"], ) self.views["i-Rheo G',G''"] = View( name="i-Rheo G',G''", description="G', G'' from i-Rheo transformation of J(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheo, n=2, snames=["G'", "G''"], ) self.views["i-Rheo-Over G',G''"] = View( name="i-Rheo-Over G',G''", description="G', G'' from i-Rheo transformation of J(t) with Oversampling", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheoOver, n=2, snames=["G'", "G''"], ) self.OVER = 100 # initial oversampling self.MIN_OVER = 1 # min oversampling self.MAX_OVER = 10000 # max oversampling # set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile( "Creep files", "creep", "Creep files", ["t", "strain"], ["stress", "Mw", "T"], ["s", "-", "Pa", "C"], ) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryRetardationModesTime.thname] = TheoryRetardationModesTime self.add_common_theories() # set the current view self.set_views()
def __init__(self, name="Universal Viewer", parent=None, inifile=None, nplot_max=1): """**Constructor**""" self.inifile = inifile self.config = configparser.ConfigParser() self.config.read_file(open(inifile)) super().__init__(name, parent, nplot_max=nplot_max) # FILES # set the type of files that ApplicationUniversalViewer can open ftype = TXTColumnFile( name=self.config.get("file1", "name"), extension=self.config.get("file1", "extension").split(".")[1], description=self.config.get("file1", "name"), col_names=self.config.get("file1", "Colnames").split(","), basic_file_parameters=self.config.get("file1", "Parameters").split(","), col_units=["units_col1", "units_col2"], ) self.filetypes[ftype.extension] = ftype # VIEWS # set the views that can be selected in the view combobox nv = 0 moreviews = True self.viewclasses = {} while moreviews: if "view%d" % (nv + 1) in self.config.sections(): nv += 1 xexpr = self.config.get("view%d" % nv, "xexpr").split(",") yexpr = self.config.get("view%d" % nv, "yexpr").split(",") name, x_label, y_label = self.config.get( "view%d" % nv, "name").split(",") x_units, y_units = self.config.get("view%d" % nv, "units", fallback="-,-").split(",") n = self.config.getint("view%d" % nv, "n", fallback=1) self.viewclasses[name] = ViewParseExpression( name, n, col_names=ftype.col_names, xexpr=xexpr, yexpr=yexpr, parent=self, ) log_x = self.config.getboolean("view%d" % nv, "logx", fallback=False) log_y = self.config.getboolean("view%d" % nv, "logy", fallback=False) snames = self.config.get("view%d" % nv, "snames", fallback=',,,,,,,,,,,,').split(",") self.views[name] = View( name=name, description=name, x_label=x_label, y_label=y_label, x_units=x_units, y_units=y_units, log_x=log_x, log_y=log_y, view_proc=self.viewclasses[name].view, n=n, snames=snames, ) else: moreviews = False # set multiviews # default view order in multiplot views, set nplots=1 for single view self.nplots = self.config.getint("application", "ncharts") self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # THEORIES self.add_common_theories() # Add basic theories to the application # set the current view self.set_views()
def __init__(self, name='React', parent=None, **kwargs): """**Constructor**""" from RepTate.theories.TheoryLDPEBatch import TheoryTobitaBatch from RepTate.theories.TheoryTobitaCSTR import TheoryTobitaCSTR from RepTate.theories.TheoryMultiMetCSTR import TheoryMultiMetCSTR from RepTate.theories.TheoryReactMix import TheoryReactMix from RepTate.theories.TheoryCreatePolyconf import TheoryCreatePolyconf from RepTate.theories.TheoryDieneCSTR import TheoryDieneCSTR super().__init__(name, parent) # VIEWS # set the views that can be selected in the view combobox self.views["w(M)"] = View( name="w(M)", description="Molecular weight distribution", x_label="M", y_label="w", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_wM, n=1, snames=["w"]) self.views["g(M)"] = View( name="g(M)", description="g(M)", x_label="M", y_label="g(M)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_gM, n=1, snames=["g(M)"]) self.views['br/1000C'] = View( name="br/1000C", description="br/1000C(M)", x_label="M", y_label="br/1000C", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_br_1000C, n=1, snames=["br/1000C"]) self.views["log(w(M))"] = View( name="log(w(M))", description="Molecular weight distribution", x_label="M", y_label="log(w)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_logwM, n=1, snames=["log(w)"]) self.views["log(g(M))"] = View( name="log(g(M))", description="log(g(M))", x_label="M", y_label="log(g)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_loggM, n=1, snames=["log(g)"]) self.views['p(mass br) log-lin'] = View( name="p(mass br) log-lin", description="Prob. dist. of mass segement b/w branch pt log-lin scale", x_label="M segment", y_label="p(M segment)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.thview_proba_mass_br, n=1, snames=["p(M segment)"], with_thline=False) self.views['p(br/molecule) log-lin'] = View( name="p(br/molecule) log-lin", description="Prob. dist. of num. branch pt per molecule log-lin scale", x_label="Num. br/molecule", y_label="p(br/molecule)", x_units="-", y_units="-", log_x=True, log_y=False, view_proc=self.thview_proba_num_br, n=1, snames=["p(M segment)"], with_thline=False) self.views['p(br/molecule) lin-lin'] = View( name="p(br/molecule) lin-lin", description="Prob. dist. of num. branch pt per molecule lin-lin scale", x_label="Num. br/molecule", y_label="p(br/molecule)", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_proba_num_br, n=1, snames=["p(M segment)"], with_thline=False) #### extra views for P&S: self.views['<senio(prio)> log-log'] = View( name="<senio(prio)> log-log", description="Average seniority vs priority log-log scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) self.views['<senio(prio)> lin-log'] = View( name="<senio(prio)> lin-log", description="Average seniority vs priority lin-log scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) self.views['<senio(prio)> lin-lin'] = View( name="<senio(prio)> lin-lin", description="Average seniority vs priority lin-lin scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) ##### self.views['<prio(senio)> log-log'] = View( name="<prio(senio)> log-log", description="Average priority vs seniority log-log scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) self.views['<prio(senio)> lin-log'] = View( name="<prio(senio)> lin-log", description="Average priority vs seniority lin-log scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) self.views['<prio(senio)> lin-lin'] = View( name="<prio(senio)> lin-lin", description="Average priority vs seniority lin-lin scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) ##### self.views['p(senio) log-log'] = View( name="p(senio) log-log", description="seniority prob. dist. log-log", x_label="Seniority", y_label="Probability", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_proba_senio, n=1, snames=["proba_senio"], with_thline=False) self.views['p(senio) lin-log'] = View( name="p(senio) lin-log", description="seniority prob. dist. lin-log scale", x_label="Seniority", y_label="Probability", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_proba_senio, n=1, snames=["proba_senio"], with_thline=False) ##### self.views['p(prio) log-log'] = View( name="p(prio) log-log", description="Priority prob. dist. log-log scale", x_label="Priority", y_label="Probability", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_proba_prio, n=1, snames=["proba_prio"], with_thline=False) self.views['p(prio) lin-log'] = View( name="p(prio) lin-log", description="Priority prob. dist. lin-log scale", x_label="Priority", y_label="Probability", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_proba_prio, n=1, snames=["proba_prio"], with_thline=False) #### self.views['<mass br(senio)> log-log'] = View( name="<mass br(senio)> log-log", description="Average mol. mass b/w branch pt vs seniority log-log scale", x_label="Seniority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=True, log_y=True, view_proc=self.thview_avarmlen_v_senio, n=1, snames=["av_strand_length"], with_thline=False) self.views['<mass br(senio)> lin-lin'] = View( name="<mass br(senio)> lin-lin", description="Average mol. mass b/w branch pt vs seniority lin-lin scale", x_label="Seniority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=False, log_y=False, view_proc=self.thview_avarmlen_v_senio, n=1, snames=["av_strand_length"], with_thline=False) #### self.views['<mass br(prio)> log-log'] = View( name="<mass br(prio)> log-log", description="Average mol. mass b/w branch pt vs priority log-log scale", x_label="Priority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=True, log_y=True, view_proc=self.thview_avarmlen_v_prio, n=1, snames=["av_strand_length"], with_thline=False) self.views['<mass br(prio)> lin-lin'] = View( name="<mass br(prio)> lin-lin", description="Average mol. mass b/w branch pt vs priority lin-lin scale", x_label="Priority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=False, log_y=False, view_proc=self.thview_avarmlen_v_prio, n=1, snames=["av_strand_length"], with_thline=False) self.extra_view_names = [ '<senio(prio)> log-log', '<senio(prio)> lin-log', '<senio(prio)> lin-lin', '<prio(senio)> log-log', '<prio(senio)> lin-log', '<prio(senio)> lin-lin', 'p(senio) log-log', 'p(senio) lin-log', 'p(prio) log-log', 'p(prio) lin-log', '<mass br(senio)> log-log', '<mass br(senio)> lin-lin', '<mass br(prio)> log-log', '<mass br(prio)> lin-lin' ] #set multiviews self.nplots = 3 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationReact can open ftype = TXTColumnFile( name='React files', extension='reac', description='Reatc file', col_names=['M', 'w(M)', 'g', 'br/1000C'], basic_file_parameters=[], col_units=['g/mol', '-', '-', '-']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES # add the theories related to ApplicationReact to the dictionary, e.g.: self.theories[TheoryTobitaBatch.thname] = TheoryTobitaBatch self.theories[TheoryTobitaCSTR.thname] = TheoryTobitaCSTR self.theories[TheoryMultiMetCSTR.thname] = TheoryMultiMetCSTR self.theories[TheoryReactMix.thname] = TheoryReactMix self.theories[TheoryCreatePolyconf.thname] = TheoryCreatePolyconf self.theories[TheoryDieneCSTR.thname] = TheoryDieneCSTR self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="TTSF", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"TTSFactors"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryWLF import TheoryWLF from TheoryArrhenius import TheoryArrhenius #from TheoryArrhenius import TheoryArrhenius super().__init__(name, parent) # VIEWS self.views["log(aT)"] = View(name="log(aT)", description="log Horizontal shift factor", x_label="T", y_label="$\log(a_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaT, n=1, snames=["log(aT)"]) self.views["aT"] = View(name="aT", description="Horizontal shift factor", x_label="T", y_label="$a_T$", x_units="°C", y_units="-", log_x=False, log_y=True, view_proc=self.viewaT, n=1, snames=["aT"]) self.views["log(bT)"] = View(name="log(bT)", description="log Vertical shift factor", x_label="T", y_label="$\log(b_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogbT, n=1, snames=["log(bT)"]) self.views["bT"] = View(name="bT", description="Vertical shift factor", x_label="T", y_label="$b_T$", x_units="°C", y_units="-", log_x=False, log_y=True, view_proc=self.viewbT, n=1, snames=["bT"]) self.views["log(aT, bT)"] = View( name="log(aT, bT)", description="log Horizontal and Vertical shift factors", x_label="T", y_label="$\log(a_T, b_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaTbT, n=2, snames=["log(aT)", "log(bT)"]) self.views["log(aT) vs 1/T"] = View( name="log(aT) vs 1/T", description="log Horizontal shift factors vs 1/T", x_label="1/T", y_label="$\log(a_T)$", x_units="K$^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaT_invT, n=1, snames=["log(aT)"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("TTS factors", "ttsf", "TTS shift factors", ['T', 'aT', 'bT'], ['Mw'], ['°C', '-', '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryWLF.thname] = TheoryWLF self.theories[TheoryArrhenius.thname] = TheoryArrhenius #self.theories[TheoryWLFShiftTest.thname] = TheoryWLFShiftTest self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Dielectric", parent=None): """**Constructor**""" from RepTate.theories.TheoryDebyeModes import TheoryDebyeModesFrequency from RepTate.theories.TheoryHavriliakNegamiModes import ( TheoryHavriliakNegamiModesFrequency, ) from RepTate.theories.TheoryKWWModes import TheoryKWWModesFrequency super().__init__(name, parent) # VIEWS self.views["log(e',e''(w))"] = View( name="log(e',e''(w))", description="log Relative permittivity, Dielectric Loss", x_label="log($\omega$)", y_label="log($\epsilon',\epsilon''$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE1E2, n=2, snames=["log(e')", "log(e'')"], ) self.views["semilog(e',e''(w))"] = View( name="semilog(e',e''(w))", description="semilog Relative permittivity, Dielectric Loss", x_label="log($\omega$)", y_label="$\epsilon',\epsilon''$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE1E2, n=2, snames=["e'(w)", "e''(w)"], ) self.views["e',e''(w)"] = View( "e',e''(w)", "Relative permittivity, Dielectric Loss", "$\omega$", "$\epsilon',\epsilon''$", "rad/s", "-", True, True, self.viewE1E2, 2, ["e'(w)", "e''(w)"], ) self.views["log(e')"] = View( name="log(e')", description="log Relative Permittivity", x_label="log($\omega$)", y_label="log($\epsilon'$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE1, n=1, snames=["log(e')"], ) self.views["semilog(e')"] = View( name="semilog(e')", description="log Relative Permittivity", x_label="log($\omega$)", y_label="$\epsilon'$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE1, n=1, snames=["e'"], ) self.views["e'"] = View( "e'", "Relative Permittivity", "$\omega$", "$\epsilon'$", "rad/s", "-", True, True, self.viewE1, 1, ["e'"], ) self.views["log(e'')"] = View( name="log(e'')", description="log Dielectric Loss", x_label="log($\omega$)", y_label="log($\epsilon''$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE2, n=1, snames=["log(e'')"], ) self.views["semilog(e'')"] = View( name="semilog(e'')", description="semilog Dielectric Loss", x_label="log($\omega$)", y_label="$\epsilon''$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE2, n=1, snames=["e''"], ) self.views["e''"] = View( "e''", "Dielectric Loss", "$\omega$", "$\epsilon''$", "rad/s", "-", True, True, self.viewE2, 1, ["e''"], ) self.views["Cole-Cole"] = View( "Cole-Cole", "Cole-Cole plot", "$\epsilon'$", "$\epsilon''$", "-", "-", False, False, self.viewColeCole, 1, ["e''"], ) # set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile( "Dielectric Spectroscopy files", "dls", "Dielectric Spectroscopy files", ["w", "e'", "e''"], ["Mw", "T"], ["rad/s", "-", "-"], ) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryDebyeModesFrequency.thname] = TheoryDebyeModesFrequency self.theories[ TheoryHavriliakNegamiModesFrequency.thname ] = TheoryHavriliakNegamiModesFrequency self.theories[TheoryKWWModesFrequency.thname] = TheoryKWWModesFrequency self.add_common_theories() # set the current view self.set_views()
def __init__(self, name="NLVE", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"LVE"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryRoliePoly import TheoryRoliePoly from TheoryUCM import TheoryUCM from TheoryGiesekus import TheoryGiesekus from TheoryPomPom import TheoryPomPom from TheoryRolieDoublePoly import TheoryRolieDoublePoly from TheoryBobNLVE import TheoryBobNLVE from TheoryPETS import TheoryPETS from TheorySCCR import TheorySCCR super().__init__(name, parent) # VIEWS self.views["log(eta(t))"] = View(name="log(eta(t))", description="log transient viscosity", x_label="log(t)", y_label="log($\eta^+$)", x_units="s", y_units="Pa$\cdot$s", log_x=False, log_y=False, view_proc=self.viewLogeta, n=1, snames=["log(eta)"]) self.views["eta(t)"] = View(name="eta(t)", description="transient viscosity", x_label="t", y_label="$\eta^+$", x_units="s", y_units="Pa$\cdot$s", log_x=True, log_y=True, view_proc=self.vieweta, n=1, snames=["eta"]) self.views["log(sigma(gamma))"] = View( name="log(sigma(gamma))", description="log transient shear stress vs gamma", x_label="log($\gamma$)", y_label="log($\sigma^+$)", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaGamma, n=1, snames=["log(sigma)"]) self.views["sigma(gamma)"] = View( name="sigma(gamma)", description="transient shear stress vs gamma", x_label="$\gamma$", y_label="$\sigma^+$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaGamma, n=1, snames=["sigma"]) self.views["log(sigma(t))"] = View( name="log(sigma(t))", description="log transient shear stress vs time", x_label="log(t)", y_label="log($\sigma^+$)", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaTime, n=1, snames=["log(sigma)"]) self.views["sigma(t)"] = View( name="sigma(t)", description="transient shear stress vs time", x_label="t", y_label="$\sigma^+$", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaTime, n=1, snames=["sigma"]) self.views["Flow Curve"] = View( name="Flow Curve", description="Steady state stress vs flow rate", x_label="Flow rate", y_label="$\sigma$", x_units="s$^{-1}$", y_units="Pa", log_x=True, log_y=True, view_proc=self.view_flowcurve, n=1, snames=["sigma"], with_thline=False, filled=True) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("Start-up of shear flow", "shear", "Shear flow files", ['t', 'sigma_xy'], ['gdot', 'T'], ['s', 'Pa$\cdot$s']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("Elongation flow", "uext", "Elongation flow files", ['t', 'N1'], ['gdot', 'T'], ['s', 'Pa$\cdot$s']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryRoliePoly.thname] = TheoryRoliePoly self.theories[TheoryUCM.thname] = TheoryUCM self.theories[TheoryGiesekus.thname] = TheoryGiesekus self.theories[TheoryPomPom.thname] = TheoryPomPom self.theories[TheoryRolieDoublePoly.thname] = TheoryRolieDoublePoly self.theories[TheoryBobNLVE.thname] = TheoryBobNLVE self.theories[TheoryPETS.thname] = TheoryPETS self.theories[TheorySCCR.thname] = TheorySCCR self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="SANS", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"SANS"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryDebye import TheoryDebye super().__init__(name, parent) # VIEWS self.views["log(I(q))"] = View(name="log(I(q))", description="log Intensity", x_label="log(q)", y_label="log(I)", x_units="$\mathrm{\AA}^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogSANS, n=1, snames=["log(I)"]) self.views["I(q)"] = View(name="I(q)", description="Intensity", x_label="q", y_label="I", x_units="$\mathrm{\AA}^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewSANS, n=1, snames=["I"]) self.views["Zimm"] = View(name="Zimm", description="Zimm plot (1/I(q) vs q^2)", x_label="$\mathrm{q}^2$", y_label="1/I", x_units="$\mathrm{\AA}^{-2}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewZimm, n=1, snames=["1/I"]) self.views["Kratky"] = View(name="Kratky", description="Kratky plot (q^2*I(q) vs q)", x_label="q", y_label="$\mathrm{q}^2\cdot \mathrm{I}$", x_units="$\mathrm{\AA}^{-1}$", y_units="$\mathrm{\AA}^{-2}$", log_x=False, log_y=False, view_proc=self.viewKratky, n=1, snames=["q2*I"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("SANS files", "sans", "SANS files", ['q', 'I(q)'], ['Mw', 'Phi'], ['1/A', '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryDebye.thname] = TheoryDebye self.add_common_theories() #set the current view self.set_views()
def __init__(self, name='LAOS', parent=None, **kwargs): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {'LAOS'}) - parent {[type]} -- [description] (default: {None}) """ # IMPORT THEORIES from TheoryRoliePoly import TheoryRoliePoly from TheoryUCM import TheoryUCM from TheoryGiesekus import TheoryGiesekus from TheoryPomPom import TheoryPomPom super().__init__(name, parent) # VIEWS # set the views that can be selected in the view combobox self.views['sigma,gamma(t)'] = View( name='sigma,gamma(t)', description='RAW Stress and RAW strain as a function of time', x_label='$t$', y_label='$\sigma^\mathrm{raw}(t),\gamma^\mathrm{raw}(t)$', x_units='s', y_units='Pa, -', log_x=False, log_y=False, view_proc=self.view_sigmatgammatRAW, n=2, snames=['$\sigma(t)^\mathrm{raw}$', '$\gamma(t)^\mathrm{raw}$']) self.views['sigma SCA,gamma(t)'] = View( name='sigma SCA,gamma(t)', description= 'RAW SCALED Stress and RAW strain as a function of time', x_label='$t$', y_label='$\sigma^\mathrm{raw,scaled}(t),\gamma^\mathrm{raw}(t)$', x_units='s', y_units='Pa, -', log_x=False, log_y=False, view_proc=self.view_sigmatgammatRAWSCALED, n=2, snames=[ '$\sigma(t)^\mathrm{raw,scaled}$', '$\gamma(t)^\mathrm{raw}$' ]) self.views['sigma(gamma)'] = View( name='sigma(gamma)', description='Stress as a function of strain - RAW', x_label='$\gamma(t)^\mathrm{raw}$', y_label='$\sigma(t)^\mathrm{raw}$', x_units='-', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagammaRAW, n=1, snames=['$\sigma^\mathrm{raw}(\gamma^\mathrm{raw})$']) self.views['sigma(gamma) FILT'] = View( name='sigma(gamma) FILT', description='Stress as a function of strain', x_label='$\gamma^\mathrm{filtered}(t)$', y_label='$\sigma^\mathrm{filtered}(t)$', x_units='-', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagammaFILTERED, n=1, snames=['$\sigma^\mathrm{filtered}(\gamma^\mathrm{filtered})$']) self.views['FFT spectrum'] = View( name='FFT spectrum', description='Full Fast Fourier Transform spectrum', x_label='$\omega$', y_label='$|\sigma^*_n|/|\sigma^*_1|$', x_units='rad.s$^{-1}$', y_units='-', log_x=False, log_y=True, view_proc=self.view_fftspectrum, n=1, snames=['FFT']) self.views['sigma(gdot) FILT'] = View( name='sigma(gdot) FILT', description='FILTERED Stress as a function of strain-rate', x_label='$\dot\gamma^\mathrm{filtered}(t)$', y_label='$\sigma^\mathrm{filtered}(t)$', x_units='s$^{-1}$', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagammadot, n=1, snames=['$\sigma(\dot\gamma)$']) self.views['sigma(gamma) ANLS'] = View( name='sigma(gamma) ANLS', description= 'FILTERED Stress as a function of strain - Analysis of contributions', x_label='$\gamma^\mathrm{filtered}(t)$', y_label='$\sigma^\mathrm{filtered}(t)$', x_units='s$^{-1}$', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagammaANLS, n=3, snames=[ '$\sigma^\mathrm{filtered}$', '$\sigma^\mathrm{elastic}$', '$\sigma^\mathrm{Chebyshev 1+3}$' ]) self.views['sigma(gdot) ANLS'] = View( name='sigma(gdot) ANLS', description= 'FILTERED Stress as a function of strain-rate - Analysis of contributions', x_label='$\dot\gamma^\mathrm{filtered}(t)$', y_label='$\sigma^\mathrm{filtered}(t)$', x_units='s$^{-1}$', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagammadotANLS, n=3, snames=[ '$\sigma^\mathrm{filtered}$', '$\sigma^\mathrm{elastic}$', '$\sigma^\mathrm{Chebyshev 1+3}$' ]) self.views['Cheb elastic'] = View( name='Cheb elastic', description='Chebyshev Coeff tau_elastic', x_label='Polynomial order, $n$', y_label='$e_n$', x_units='-', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_chebelastic, n=1, snames=['chebelastic'], viewmode_data=ViewMode.bar) self.views['Cheb viscous'] = View( name='Cheb viscous', description='Chebyshev Coeff tau_viscous', x_label='Polynomial order, $n$', y_label='$v_n$', x_units='-', y_units='Pa.s', log_x=False, log_y=False, view_proc=self.view_chebviscous, n=1, snames=['chebviscous']) self.views['sigma(t)'] = View( name='sigma(t)', description='Stress as a function of time - RAW', x_label='$t$', y_label='$\sigma(t)^\mathrm{raw}$', x_units='s', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmatRAW, n=1, snames=['$\sigma(t)^\mathrm{raw}$']) self.views['gamma(t)'] = View( name='gamma(t)', description='Strain as a function of time - RAW', x_label='$t$', y_label='$\gamma(t)^\mathrm{raw}$', x_units='s', y_units='-', log_x=False, log_y=False, view_proc=self.view_gammatRAW, n=1, snames=['$\gamma(t)^\mathrm{raw}$']) self.HHSR = 15 # Highest harmonic to consider in stress reconstruction self.PPQC = 50 # Points per quarter cycle in FT reconstruction (20-500) #set multiviews #default view order in multiplot views, set only one item for single view #if more than one item, modify the 'nplots' in the super().__init__ call self.nplots = 4 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationLAOS can open ftype = TXTColumnFile(name='Large-Angle Oscillatory Shear data', extension='laos', description='file containing laos data', col_names=['time', 'gamma', 'sigma'], basic_file_parameters=['omega', 'gamma'], col_units=['s', '-', 'Pa']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES self.theories[TheoryRoliePoly.thname] = TheoryRoliePoly self.theories[TheoryUCM.thname] = TheoryUCM self.theories[TheoryGiesekus.thname] = TheoryGiesekus self.theories[TheoryPomPom.thname] = TheoryPomPom self.add_common_theories() # Add basic theories to the application #set the current view self.set_views()
def __init__(self, name="TTS", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"TTS"}) - parent {[type]} -- [description] (default: {None}) """ from RepTate.theories.TheoryTTS import TheoryWLFShift from RepTate.theories.TheoryTTS_Automatic import TheoryTTSShiftAutomatic super().__init__(name, parent) # VIEWS self.views["log(G',G''(w))"] = View( name="log(G',G''(w))", description="log Storage,Loss moduli", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1G2, n=2, snames=["log(G'(w))", "log(G''(w))"]) self.views["G',G''(w)"] = View("G',G''(w)", "Storage,Loss moduli", "$\omega$", "G'($\omega$),G''($\omega$)", "rad/s", "Pa", True, True, self.viewG1G2, 2, ["G'(w)", "G''(w)"]) self.views["etastar"] = View("etastar", "Complex Viscosity", "$\omega$", "$|\eta^*(\omega)|$", "rad/s", "Pa.s", True, True, self.viewEtaStar, 1, ["eta*(w)"]) self.views["logetastar"] = View("logetastar", "log Complex Viscosity", "log($\omega$)", "log$|\eta^*(\omega)|$", "rad/s", "Pa.s", False, False, self.viewLogEtaStar, 1, ["log(eta*(w))"]) self.views["delta"] = View("delta", "delta", "$\omega$", "$\delta(\omega)$", "rad/s", "-", True, True, self.viewDelta, 1, ["delta(w)"]) self.views["tan(delta)"] = View("tan(delta)", "tan(delta)", "$\omega$", "tan($\delta$)", "rad/s", "-", True, True, self.viewTanDelta, 1, ["tan(delta((w))"]) self.views["log(tan(delta))"] = View( "log(tan(delta))", "log(tan(delta))", "log($\omega$)", "log(tan($\delta$))", "rad/s", "-", False, False, self.viewLogTanDelta, 1, ["log(tan(delta((w)))"]) self.views["log(G*)"] = View("log(G*)", "log(G*(omega))", "log($\omega$)", "log(G*($\omega$))", "rad/s", "Pa", False, False, self.viewLogGstar, 1, ["log(G*)"]) self.views["log(tan(delta),G*)"] = View( "log(tan(delta),G*)", "log(tan($\delta$))", "log(G*)", "log(tan($\delta$))", "Pa", "-", False, False, self.viewLogtandeltaGstar, 1, ["log(tan($\delta))"]) self.views["delta(G*)"] = View("delta(G*)", "$\delta$(G*))", "log(G*)", "$\delta$(G*))", "Pa", "deg", False, False, self.viewdeltatanGstar, 1, ["delta"]) self.views["J',J''(w)"] = View("J',J''(w)", "J moduli", "$\omega$", "J'($\omega$),J''($\omega$)", "rad/s", "$Pa^{-1}$", True, True, self.viewJ1J2, 2, ["J'(w)", "J''(w)"]) self.views["Cole-Cole"] = View("Cole-Cole", "Cole-Cole plot", "$\eta'$", "$\eta''$", "Pa.s", "Pa.s", False, False, self.viewColeCole, 1, ["$eta'$"]) self.views["log(G')"] = View(name="log(G')", description="log Storage modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1, n=1, snames=["log(G'(w))"]) self.views["G'"] = View("G'", "Storage modulus", "$\omega$", "G'($\omega$)", "rad/s", "Pa", True, True, self.viewG1, 1, ["G'(w)"]) self.views["log(G'')"] = View(name="log(G'')", description="log Loss modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG2, n=1, snames=["log(G''(w))"]) self.views["G''"] = View("G''", "Loss modulus", "$\omega$", "G''($\omega$)", "rad/s", "Pa", True, True, self.viewG2, 1, ["G''(w)"]) self.views["log(G',G''(w),tan(delta))"] = View( name="log(G',G''(w),tan(delta))", description="log Storage,Loss moduli, tan(delta)", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$),tan($\delta$))", x_units="rad/s", y_units="Pa,-", log_x=False, log_y=False, view_proc=self.viewLogG1G2tandelta, n=3, snames=["log(G'(w))", "log(G''(w)),log(tan(delta))"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile( "OSC files", "osc", "Small-angle oscillatory masurements from the Rheometer", ['w', 'G\'', 'G\'\''], ['Mw', 'T'], ['rad/s', 'Pa', 'Pa']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryTTSShiftAutomatic.thname] = TheoryTTSShiftAutomatic self.theories[TheoryWLFShift.thname] = TheoryWLFShift self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Crystal", parent=None): """**Constructor**""" from RepTate.theories.TheoryGoPolyStrand import TheoryGoPolyStrand from RepTate.theories.TheorySmoothPolyStrand import TheorySmoothPolyStrand super().__init__(name, parent) # VIEWS self.views["log(eta(t))"] = View( name="log(eta(t))", description="log transient viscosity", x_label="log(t)", y_label="log($\eta^+$)", x_units="s", y_units="Pa$\cdot$s", log_x=False, log_y=False, view_proc=self.viewLogeta, n=1, snames=["log(eta)"], ) self.views["Ndot(t) [log-log]"] = View( name="Ndot(t) [log-log]", description="Nucleation rate (log-log)", x_label="t", y_label="$\dot{N}$", x_units="s", y_units="s$^{-1}$m$^{-3}$", log_x=True, log_y=True, view_proc=self.viewNdot, n=1, snames=["Ndot"], ) self.views["N(t) [log-log]"] = View( name="N(t) [log-log]", description="Nucleation density (log-log)", x_label="t", y_label="N", x_units="s", y_units="m$^{-3}$", log_x=True, log_y=True, view_proc=self.viewNt, n=1, snames=["N"], ) self.views["phiX(t) [log-log]"] = View( name="phiX(t) [log-log]", description="Crystal fraction (log-log)", x_label="t", y_label="$\phi_X$", x_units="s", y_units="-", log_x=True, log_y=True, view_proc=self.viewphiX, n=1, snames=["phiX"], ) self.views["Ndot(t) [log-lin]"] = View( name="Ndot(t) [log-lin]", description="Nucleation rate (log-lin)", x_label="t", y_label="$\dot{N}$", x_units="s", y_units="s$^{-1}$m$^{-3}$", log_x=True, log_y=False, view_proc=self.viewNdot, n=1, snames=["Ndot"], ) self.views["N(t) [log-lin]"] = View( name="N(t) [log-lin]", description="Nucleation density (log-lin)", x_label="t", y_label="N", x_units="s", y_units="m$^{-3}$", log_x=True, log_y=False, view_proc=self.viewNt, n=1, snames=["N"], ) self.views["phiX(t) [log-lin]"] = View( name="phiX(t) [log-lin]", description="Crystal fraction (log-lin)", x_label="t", y_label="$\phi_X$", x_units="s", y_units="-", log_x=True, log_y=False, view_proc=self.viewphiX, n=1, snames=["phiX"], ) self.views["eta(t)"] = View( name="eta(t)", description="transient viscosity", x_label="t", y_label="$\eta^+$", x_units="s", y_units="Pa$\cdot$s", log_x=True, log_y=True, view_proc=self.vieweta, n=1, snames=["eta"], ) self.views["log(sigma(gamma))"] = View( name="log(sigma(gamma))", description="log transient shear stress vs gamma", x_label="log($\gamma$)", y_label="log($\sigma^+$)", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaGamma, n=1, snames=["log(sigma)"], ) self.views["sigma(gamma)"] = View( name="sigma(gamma)", description="transient shear stress vs gamma", x_label="$\gamma$", y_label="$\sigma^+$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaGamma, n=1, snames=["sigma"], ) self.views["log(sigma(t))"] = View( name="log(sigma(t))", description="log transient shear stress vs time", x_label="log(t)", y_label="log($\sigma^+$)", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaTime, n=1, snames=["log(sigma)"], ) self.views["sigma(t)"] = View( name="sigma(t)", description="transient shear stress vs time", x_label="t", y_label="$\sigma^+$", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaTime, n=1, snames=["sigma"], ) self.views["sigma(t) [log-lin]"] = View( name="sigma(t) [log-lin]", description="transient shear stress vs time (log-lin)", x_label="t", y_label="$\sigma^+$", x_units="s", y_units="Pa", log_x=True, log_y=False, view_proc=self.viewSigmaTime, n=1, snames=["sigma"], ) self.views["Flow Curve"] = View( name="Flow Curve", description="Steady state stress vs flow rate", x_label="Flow rate", y_label="$\sigma$", x_units="s$^{-1}$", y_units="Pa", log_x=True, log_y=True, view_proc=self.view_flowcurve, n=1, snames=["sigma"], with_thline=False, filled=True, ) self.views["Steady Nucleation"] = View( name="Steady Nucleation", description="Steady state nucleation rate vs flow rate", x_label="Flow rate", y_label="$\dot{N}$", x_units="s$^{-1}$", y_units="s$^{-1}$m$^{-3}$", log_x=True, log_y=True, view_proc=self.view_steadyNuc, n=1, snames=["Ndot"], with_thline=False, filled=True, ) # set multiviews self.nplots = 4 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile( "Start-up of shear flow with crystallisation", "shearxs", "Shear crystallisation files", ["t", "sigma_xy", "Ndot", "phi_X", "N"], ["gdot", "T", "tstop"], ["s", "Pa$\cdot$s", "s$^{-1}$m$^{-3}$", "-", "m$^{-3}$"], ) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile( "Elongation flow with crystallisation", "uextxs", "Elongation crystallisation files", ["t", "N1", "Ndot", "phi_X", "N"], ["gdot", "T", "tstop"], ["s", "Pa$\cdot$s", "s$^{-1}$m$^{-3}$", "-", "m$^{-3}$"], ) # THEORIES self.theories[TheoryGoPolyStrand.thname] = TheoryGoPolyStrand self.theories[TheorySmoothPolyStrand.thname] = TheorySmoothPolyStrand self.add_common_theories() # set the current view self.set_views()
def __init__(self, name="MWD", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"MWD"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryDiscrMWD import TheoryDiscrMWD from TheoryGEX import TheoryGEX from TheoryLogNormal import TheoryLogNormal super().__init__(name, parent, nplot_max=3) # VIEWS self.views["log-lin"] = View(name="log-lin", description="MWD lin W vs log M", x_label="M", y_label="dW/dlogM", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_WM, n=1, snames=["W"]) self.views["log-log"] = View(name="log-log", description="MWD log W vs log M", x_label="log(M)", y_label="log(dW/dlogM)", x_units="g/mol", y_units="-", log_x=False, log_y=False, view_proc=self.view_logWM, n=1, snames=["log(W)"]) self.views["lin-lin"] = View(name="lin-lin", description="MWD lin W vs lin M", x_label="M", y_label="dW/dlogM", x_units="g/mol", y_units="-", log_x=False, log_y=False, view_proc=self.view_WM, n=1, snames=["W"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("GPC Files", "gpc", "Molecular Weight Distribution", ['M', 'W(logM)'], ['Mn', 'Mw', 'PDI'], ["g/mol", '-']) #ftype=TXTColumnFile("GPC Files", "gpc", "Molecular Weight Distribution", ['M','W(logM)'], [], ['kDa', '-']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("React Files", "reac", "Relaxation modulus", ['M', 'W(logM)', 'g', 'br/1000C'], ['Mn', 'Mw', 'PDI'], ["g/mol", '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryDiscrMWD.thname] = TheoryDiscrMWD self.theories[TheoryGEX.thname] = TheoryGEX self.theories[TheoryLogNormal.thname] = TheoryLogNormal self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="LAOS", parent=None, **kwargs): """**Constructor**""" # IMPORT THEORIES from RepTate.theories.TheoryRoliePoly import TheoryRoliePoly from RepTate.theories.TheoryUCM import TheoryUCM from RepTate.theories.TheoryGiesekus import TheoryGiesekus from RepTate.theories.TheoryPomPom import TheoryPomPom super().__init__(name, parent) # VIEWS # set the views that can be selected in the view combobox self.views["sigma,gamma(t)"] = View( name="sigma,gamma(t)", description="RAW Stress and RAW strain as a function of time", x_label="$t$", y_label="$\sigma^\mathrm{raw}(t),\gamma^\mathrm{raw}(t)$", x_units="s", y_units="Pa, -", log_x=False, log_y=False, view_proc=self.view_sigmatgammatRAW, n=2, snames=["$\sigma(t)^\mathrm{raw}$", "$\gamma(t)^\mathrm{raw}$"], ) self.views["sigma SCA,gamma(t)"] = View( name="sigma SCA,gamma(t)", description="RAW SCALED Stress and RAW strain as a function of time", x_label="$t$", y_label="$\sigma^\mathrm{raw,scaled}(t),\gamma^\mathrm{raw}(t)$", x_units="s", y_units="Pa, -", log_x=False, log_y=False, view_proc=self.view_sigmatgammatRAWSCALED, n=2, snames=["$\sigma(t)^\mathrm{raw,scaled}$", "$\gamma(t)^\mathrm{raw}$"], ) self.views["sigma(gamma)"] = View( name="sigma(gamma)", description="Stress as a function of strain - RAW", x_label="$\gamma(t)^\mathrm{raw}$", y_label="$\sigma(t)^\mathrm{raw}$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmagammaRAW, n=1, snames=["$\sigma^\mathrm{raw}(\gamma^\mathrm{raw})$"], ) self.views["sigma(gamma) FILT"] = View( name="sigma(gamma) FILT", description="Stress as a function of strain", x_label="$\gamma^\mathrm{filtered}(t)$", y_label="$\sigma^\mathrm{filtered}(t)$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmagammaFILTERED, n=1, snames=["$\sigma^\mathrm{filtered}(\gamma^\mathrm{filtered})$"], ) self.views["FFT spectrum"] = View( name="FFT spectrum", description="Full Fast Fourier Transform spectrum", x_label="$\omega$", y_label="$|\sigma^*_n|/|\sigma^*_1|$", x_units="rad.s$^{-1}$", y_units="-", log_x=False, log_y=True, view_proc=self.view_fftspectrum, n=1, snames=["FFT"], ) self.views["sigma(gdot) FILT"] = View( name="sigma(gdot) FILT", description="FILTERED Stress as a function of strain-rate", x_label="$\dot\gamma^\mathrm{filtered}(t)$", y_label="$\sigma^\mathrm{filtered}(t)$", x_units="s$^{-1}$", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmagammadot, n=1, snames=["$\sigma(\dot\gamma)$"], ) self.views["sigma(gamma) ANLS"] = View( name="sigma(gamma) ANLS", description="FILTERED Stress as a function of strain - Analysis of contributions", x_label="$\gamma^\mathrm{filtered}(t)$", y_label="$\sigma^\mathrm{filtered}(t)$", x_units="s$^{-1}$", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmagammaANLS, n=3, snames=[ "$\sigma^\mathrm{filtered}$", "$\sigma^\mathrm{elastic}$", "$\sigma^\mathrm{Chebyshev 1+3}$", ], ) self.views["sigma(gdot) ANLS"] = View( name="sigma(gdot) ANLS", description="FILTERED Stress as a function of strain-rate - Analysis of contributions", x_label="$\dot\gamma^\mathrm{filtered}(t)$", y_label="$\sigma^\mathrm{filtered}(t)$", x_units="s$^{-1}$", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmagammadotANLS, n=3, snames=[ "$\sigma^\mathrm{filtered}$", "$\sigma^\mathrm{elastic}$", "$\sigma^\mathrm{Chebyshev 1+3}$", ], ) self.views["Cheb elastic"] = View( name="Cheb elastic", description="Chebyshev Coeff tau_elastic", x_label="Polynomial order, $n$", y_label="$e_n$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_chebelastic, n=1, snames=["chebelastic"], ) self.views["Cheb viscous"] = View( name="Cheb viscous", description="Chebyshev Coeff tau_viscous", x_label="Polynomial order, $n$", y_label="$v_n$", x_units="-", y_units="Pa.s", log_x=False, log_y=False, view_proc=self.view_chebviscous, n=1, snames=["chebviscous"], ) self.views["sigma(t)"] = View( name="sigma(t)", description="Stress as a function of time - RAW", x_label="$t$", y_label="$\sigma(t)^\mathrm{raw}$", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.view_sigmatRAW, n=1, snames=["$\sigma(t)^\mathrm{raw}$"], ) self.views["gamma(t)"] = View( name="gamma(t)", description="Strain as a function of time - RAW", x_label="$t$", y_label="$\gamma(t)^\mathrm{raw}$", x_units="s", y_units="-", log_x=False, log_y=False, view_proc=self.view_gammatRAW, n=1, snames=["$\gamma(t)^\mathrm{raw}$"], ) self.HHSR = 15 # Highest harmonic to consider in stress reconstruction self.PPQC = 50 # Points per quarter cycle in FT reconstruction (20-500) # set multiviews # default view order in multiplot views, set only one item for single view # if more than one item, modify the 'nplots' in the super().__init__ call self.nplots = 4 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationLAOS can open ftype = TXTColumnFile( name="Large-Angle Oscillatory Shear data", extension="laos", description="file containing laos data", col_names=["time", "gamma", "sigma"], basic_file_parameters=["omega", "gamma"], col_units=["s", "-", "Pa"], ) self.filetypes[ftype.extension] = ftype # add each the file type to dictionary # THEORIES self.theories[TheoryRoliePoly.thname] = TheoryRoliePoly self.theories[TheoryUCM.thname] = TheoryUCM self.theories[TheoryGiesekus.thname] = TheoryGiesekus self.theories[TheoryPomPom.thname] = TheoryPomPom self.add_common_theories() # Add basic theories to the application # set the current view self.set_views()
def __init__(self, name="Gt", parent=None): """**Constructor**""" from RepTate.theories.TheoryMaxwellModes import TheoryMaxwellModesTime from RepTate.theories.TheoryRouse import TheoryRouseTime from RepTate.theories.TheoryDTDStars import TheoryDTDStarsTime from RepTate.theories.TheoryShanbhagMaxwellModes import ( TheoryShanbhagMaxwellModesTime, ) super().__init__(name, parent) # time range for view conversion to frequency domain self.tmin_view = -np.inf self.tmax_view = np.inf # VIEWS self.views["log(G(t))"] = View( name="log(G(t))", description="log Relaxation modulus", x_label="log(t)", y_label="log(G)", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogGt, n=1, snames=["log(G)"], ) self.views["i-Rheo G',G''"] = View( name="i-Rheo G',G''", description="G', G'' from i-Rheo transformation of G(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheo, n=2, snames=["G'", "G''"], ) self.views["i-Rheo-Over G',G''"] = View( name="i-Rheo-Over G',G''", description="G', G'' from i-Rheo transformation of G(t) with Oversampling", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheoOver, n=2, snames=["G'", "G''"], ) self.views["Schwarzl G',G''"] = View( name="Schwarzl G',G''", description="G', G'' from Schwarzl transformation of G(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewSchwarzl_Gt, n=2, snames=["G'", "G''"], ) self.views["G(t)"] = View( name="G(t)", description="Relaxation modulus", x_label="t", y_label="G", x_units="s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewGt, n=1, snames=["G"], ) self.OVER = 100 # initial oversampling self.MIN_OVER = 1 # min oversampling self.MAX_OVER = 10000 # max oversampling # set multiviews self.multiviews = [ self.views["log(G(t))"], self.views["i-Rheo G',G''"], ] # default view order in multiplot views, set only one item for single view self.nplots = len(self.multiviews) # set multiviews self.nplots = 2 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile( "G(t) files", "gt", "Relaxation modulus", ["t", "Gt"], ["Mw", "gamma"], ["s", "Pa"], ) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryMaxwellModesTime.thname] = TheoryMaxwellModesTime self.theories[TheoryRouseTime.thname] = TheoryRouseTime self.theories[TheoryDTDStarsTime.thname] = TheoryDTDStarsTime self.theories[ TheoryShanbhagMaxwellModesTime.thname ] = TheoryShanbhagMaxwellModesTime self.add_common_theories() # set the current view self.set_views()