MCycle Defaults¶
Attributes¶
-
mcycle.defaults.TOLATTR¶ str : FlowState attribute for checking convergence of component and cycle functions. Defaults to ‘h’.
-
mcycle.defaults.TOLABS¶ double : General absolute tolerance used for convergence of component and cycle functions. Defaults to 1e-7.
-
mcycle.defaults.TOLREL¶ double : General relative tolerance used for convergence of component and cycle functions. Defaults to 1e-7.
-
mcycle.defaults.DIV_T¶ double : Increment of temperature for unitisation processes [K]; lower value = higher accuracy. Defaults to 5 K.
-
mcycle.defaults.DIV_X¶ double : Increment of quality for unitisation processes [-]; lower value = higher accuracy. Defaults to 0.1.
-
mcycle.defaults.MAXITER_CYCLE¶ int : Maximum iterations for convergence of run and size methods of Cycle objects. Defaults to 50.
-
mcycle.defaults.MAXITER_COMPONENT¶ int : Maximum iterations for convergence of run and size methods of Component objects. Defaults to 50.
-
mcycle.defaults.MAX_WALLS¶ int : Maximum number of walls for a Component (eg; heat exchangers). Defaults to 200.
-
mcycle.defaults.TRY_BUILD_PHASE_ENVELOPE¶ bool : Get CoolProp to try to build the phase envelope for FlowState mixtures during construction. If CoolProp fails to do so the
_canBuildPhaseEnvelopeattribute is set toFalsewhich overridesTRY_BUILD_PHASE_ENVELOPEto prevent wasting computation time on repeated failures. Defaults to True.
-
mcycle.defaults.GRAVITY¶ double : Vertical cceleration due to gravity. Defaults to 9.80665 m/s^2.
-
mcycle.defaults.COOLPROP_EOS¶ str : CoolProp Equation of State backend. Must be ‘HEOS’ or ‘REFPROP’, depending on whether RefProp backend has been configured (see using RefProp, primary backends). Defaults to ‘HEOS’.
-
mcycle.defaults.MPL_BACKEND¶ str : Matplotlib backend (see documentation). Defaults to ‘TkAgg’.
-
mcycle.defaults.PLOT_DIR¶ str : Directory to save plots in. Will be created if it doesn’t already exist. Defaults to ‘plots’.
-
mcycle.defaults.PLOT_DPI¶ int : DPI of plots (see explanation). Defaults to 600.
-
mcycle.defaults.PLOT_FORMAT¶ str : File format for plots. Must be ‘png’ or ‘jpg’. Defaults to ‘png’.
-
mcycle.defaults.PLOT_COLOR¶ list of str : List of plot colours for distinguishing plotlines. Can be set to a list of the same colour if not required. See link to tutorial for more info. Defaults to
['C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'].
-
mcycle.defaults.PLOT_LINESTYLE¶ list : List of linestyles for distinguishing plotlines. See link to documentation for more info on defining linestyles.
-
mcycle.defaults.PLOT_MARKER¶ list of str : List of markers for distinguishing plotlines. Set to [‘’] if you do not require markers. See link to documentation for more info.
-
mcycle.defaults.UNITS_SEPARATOR_NUMERATOR¶ str : Separator style for the numerator of units; ie: ‘W.h’ compared to ‘W-h’, or ‘W h’. Defaults to
'.'.
-
mcycle.defaults.UNITS_SEPARATOR_DENOMINATOR¶ str : Separator style for the denominator of units; ie: ‘J/kg.K’ compared to ‘J/kg-K’, or ‘J/kg/K’.Defaults to ‘.’.
-
mcycle.defaults.UNITS_FORMAT¶ str : Style of spacing between value and units. Must be ‘’, ‘parentheses’, ‘brackets’, ‘braces’ or ‘comma’, with or without suffix ‘-nospace’. Eg, ‘comma’ would produce
1.0, m^3/kg, ‘comma-nospace’ would produce1.0,m^3/kg, ‘braces’ would produce1.0 {m^3/kg}. Defaults to ‘comma’.
-
mcycle.defaults.PRINT_FORMAT_FLOAT¶ str : Format for printing floats, used with Python strings’ format() method (see documentation). Defaults to
'{: .4e}'.
-
mcycle.defaults.RST_HEADINGS¶ list : Characters used for successive levels of reStructuredText headings. Defaults to [‘=’, ‘-’, ‘^’, ‘”’].
-
mcycle.defaults.CONFIG¶ Config : Default
Configinstance used in classes with aconfigattribute. When constructing, setconfig=Noneto use this default instance. This promotes sharing of a singleConfiginstance throughout a script, as opposed to each individual component/class having its own. Defaults toNonewhich is then set toConfig()bycheck()during importation of MCycle.
-
mcycle.defaults.METHODS¶ dict : Dictionary of methods set to
Config.methodsattribute.
-
mcycle.defaults.DIMENSIONS¶ dict : Dictionary of attribute dimensions looked up by
summarymethods. Each dictionary value is another dictionary containing a default value under the''key, and class-specific values where necessary. Eg, for attribute'h', the value is the dictionary:'h': { '': 'power/area-temperature', 'GeomHxPlateFinStraight': 'length', 'GeomHxPlateFinOffset': 'length', 'FlowState': 'energy/mass', 'FlowStatePoly': 'energy/mass' },
So if the class of the object that has called summary is FlowState the dimension returned is 'energy/mass' (enthalpy), if the object is not listed in the above dictionary the dimension returned is 'power/area-temperature' (heat transfer coefficient for heat exchangers).