Mathematica and Wolfram SystemModeler tips and issues Note pages

Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
Visit also: Mathematica zone
Title Keywords Note kind
Mathematica: TIP: Protecting against computations breaking verbosely because of Null, None, Undefined. And about using Undefined as a return policy. Wolfram, Wolfram Language, Mathematica, Mathematica::Null, Mathematica::None, Mathematica::Undefined CONVENTION, PATTERN, POLICY, TIP
Mathematica: TIP: Maintain a Package library of variables for convenient units using a naming convention unit$[unitSymbol] Wolfram, Mathematica, SI unit, quantity, units CONVENTION, NAMING, PATTERN, STYLE, TIP
Mathematica: Use of UnitConvert (or even just multiplication or division by a unit Quantity) MASSIVELY slows the calculations down! Wolfram, Mathematica, Mathematica:Compile, compilation, performance, SI unit, quantity, units ISSUE, LIMITATION
Mathematica: Compile won't work with a Quantity with units Wolfram, Mathematica, Mathematica:Compile, compilation, performance, quantity, SI unit, units ISSUE, LIMITATION
CoolProp: HOWTO reproduce a pressure vs specific enthalpy chart in Mathematica. Example: R32 refrigerant. CoolProp, equation-of-state, EoS, thermodynamics, chemistry, chemical properties, enthalpy, specific enthalpy, Wolfram, Mathematica, R32, refrigerant CAVEAT, GOTCHA, ISSUE, LIMITATION, WARNING
Mathematica: TIP: The ThermodynamicData function of Mathematica uses NIST's RefProp under the hood. Wolfram, Mathematica, thermodynamics, HVAC&R, RefProp TIP
Mathematica: CoolProp wrappers don't seem to be maintained past CoolProp 5.1.1 (and the PhaseSI and 2-args Props1SI functions do not work) Mathematica, Wolfram ISSUE, LIMITATION
Mathematica: MTools: Argument pattern matching does not respect inheritance (undermines design-by-contract and heaps of Design Patterns) Wolfram, Mathematica, Mathematica:MTools, inheritance, object-oriented ANTI-PATTERN, GOTCHA, ISSUE, LIMITATION, WARNING
Webel + Mathematica + MTools + SysML Wolfram, Mathematica, Mathematica:MTools, Wolfram Language, Systems Modeling Language, MD SysML, CATIA Magic:v2021xR1, MagicDraw SysML, MagicDraw, Cameo Systems Modeler PATTERN, TIP, TOOL
Mathematica: LINKS: Manipulating Strings and using RegularExpression Wolfram, Mathematica, String, regex, regular expression TIP
Mathematica: GOTCHA: Null is tricky! Wolfram, Wolfram Language, Mathematica GOTCHA, TIP
Mathematica: Wolfram Workbench: Basic variable name refactoring is not supported. Webel:WISHLIST, Mathematica, Wolfram Workbench, Wolfram FEATURE, ISSUE, LIMITATION, WISHLIST
Mathematica: Objectica 3rd-party commercial package for OO in Mathematica. Earth calling Objectica, do you still exist? Mathematica, Wolfram, object-oriented QUESTION
Mathematica: Wolfram Workbench: Sometimes the Outline view gets completely out of sync with the .m or .wl Package code Mathematica, Wolfram Workbench, Wolfram Language, Wolfram, Eclipse IDE ISSUE, TOOL
Mathematica: Wolfram Workbench: Sometimes the code syntax checking goes haywire (with red nearly everywhere) for no good reason (even when the code load and runs fine in Mathematica). WORKAROUND: Just restart Eclipse. Mathematica, Wolfram Workbench, Wolfram Language, Wolfram, Eclipse IDE ISSUE, TOOL, WORKAROUND
Webel vs Mathematica: The Very Good, The Bad, and The Ugly Mathematica, Wolfram, Wolfram Language, Mathematica:Dataset FEATURE, TIP, TOOL
Mathematica: TIP: Try //Dataset on just about anything and be amazed! Click on nearly anything to navigate through nearly anything in impressively interactive human-readable format. Mathematica, Wolfram, Wolfram Language, Mathematica:Dataset FEATURE, TIP, TOOL
Mathematica: How mimic pattern matching of arguments for Boolean? Wolfram, Mathematica, Wolfram Language GOTCHA, LIMITATION, TIP
Mathematica: The awesome Quantity system for values with units is everything the SysMLv1.x Quantity/Unit system should have been (and hopefully SysMLv2 will be) Mathematica, Mathematica:Quantity, Wolfram, Wolfram Language, quantity, scientific unit system, SI unit, deep value ASSERTION, TIP
Mathematica: TIPS for living with the user-contributed MTools for Object-Orientation (until a vendor-supported OO solution is eventually provided) Mathematica, Mathematica:MTools, object-oriented, Wolfram, Wolfram Workbench TIP
Wolfram Workbench for Mathematica: Limitation: Using more than one '$' sign within function names blocks navigation on function usages. Mathematica, Wolfram Workbench, Wolfram, Eclipse IDE GOTCHA, ISSUE, LIMITATION, TOOL
Mathematica: GOTCHA: EntityFunction can only return a scalar (although its the 3rd decade of the 21st century) Wolfram, Mathematica, object-oriented, OOP GOTCHA, ISSUE, LIMITATION, MODELLING, WARNING, WISHLIST
Mathematica: The slightly less painful ultimate list of links on Object-Orientation (or the lack thereof) and a public plea to Wolfram Research Wolfram, Mathematica, object-oriented, OOP ISSUE, LIMITATION, MODELLING, TOOL
Mathematica: The Entity system: useful links Mathematica, Wolfram, Mathematica:Entity TIP
Mathematica: TIP: How to change a value within an Association inline within a Module (like pass by reference) Mathematica, Wolfram Language, Wolfram TIP
Mathematica: GOTCHA: Package usages (Needs) are not transitive Wolfram, Wolfram Language, Mathematica GOTCHA, TIP, WARNING
Mathematica: HOWTO Find the value of a symbol in all contexts Wolfram, Wolfram Language, Mathematica TIP
Mathematica: TIPS: Filename chooser dialogs Wolfram, Mathematica TOOL
GOTCHA/BUG: Cameo Simulation Toolkit v2021xR1 + Mathematica: Delegation to Mathematica from ConstraintBlocks FAILS if any of the input or output parameters are larger than 99999 because they get interpreted as 1.0e5 and that trips something! Aarrrggggh! SysML, MD SysML, Mathematica, Wolfram, Cameo Systems Modeler, SysML Parametrics, calculation, CATIA Magic:v2021xR1 GOTCHA, ISSUE, TOOL
LINKS: Wolfram Workbench for Mathematica Wolfram, Wolfram Workbench, Wolfram Language, Mathematica, coding, code formatting, documentation TOOL
HOWTO access custom (user-defined) Mathematica functions using Mathematica v12.3.1.0 as an external maths engine for SysML Parametrics (ConstraintBlocks) in Magic Model Analyst (Cameo Simulation Toolkit) version 2021x or 2021xR1 Wolfram, JLink, Mathematica, MagicDraw SysML, SysML, MD SysML, SysML Parametrics, mathematics, CATIA Magic, Magic Model Analyst [Cameo Simulation Toolkit], CATIA Magic:v2021x, CATIA Magic:v2021xR1, JDK, Java Development Kit, Java, ParaMagic QUESTION, TIP, TOOL
Mathematica: HOWTO Autoload the simplest possible .m or .wl Package file with a few custom functions Wolfram, Mathematica NAMING, PATTERN, TIP
Mathematica + Magic Model Analyst (Cameo Simulation Toolkit) for SysML Parametrics: GOTCHA: You must use a regular '=' on the SysML side, not the Mathematica '==' (or it will be intepreted as a constraint condition to test, not an equation to solve). Wolfram, JLink, Mathematica, MagicDraw SysML, SysML, MD SysML, SysML Parametrics, mathematics, CATIA Magic, Magic Model Analyst [Cameo Simulation Toolkit], CATIA Magic:v2021x, CATIA Magic:v2021xR1, JDK, Java Development Kit, Java GOTCHA, TOOL, WARNING
HOWTO use Mathematica v12.3.1.0 as an external maths engine for SysML Parametrics (ConstraintBlocks) in Magic Model Analyst (Cameo Simulation Toolkit) version 2021x or 2021xR1 Wolfram, JLink, Mathematica, MagicDraw SysML, SysML, MD SysML, SysML Parametrics, mathematics, CATIA Magic, Magic Model Analyst [Cameo Simulation Toolkit], CATIA Magic:v2021x, CATIA Magic:v2021xR1, JDK, Java Development Kit, Java TIP, TOOL
Mathematica: TIP: Package Editor mode: Use cell division between every function in .wl library files to make them more readable (and to make it easier to apply at least some degree automated code formatting per function). Wolfram, Mathematica CAPABILITY, FEATURE, TIP, TOOL
Webel: Mathematica is functional programming on steroids (and has nearly everything else, except for decent in-built OO support). Mathematica, Wolfram, functional programming, functional ASSERTION, TIP
Webel: Mathematica: WISHLIST: Support for EXTRACTABLE structured documentation for individual arguments to functions RIGHT IN/NEAR THE CODE. Yes it is needed. Really it is. Wolfram, Mathematica, Webel:WISHLIST LIMITATION, TOOL, WISHLIST
Webel: Mathematica: WISHLIST: Support for decent vendor-supported, built-in, IDE-aware object-orientation (OO)! Wolfram, Mathematica, Webel:WISHLIST, inheritance, object-oriented, OOP, OO TOOL, WISHLIST
Mathematica: Webel: You CAN/MAY use $ in variable names and function names - just not as the first character before a Capital - and it's extremely useful. You won't get sent to Azkaban prison if do you use a $ character! Wolfram, Mathematica, Mathematica:Entity, Wolfram Language, notation NAMING, OPTION, PATTERN, TIP
Mathematica: Having trouble clearing a variable with complex formatting? Try =. Wolfram, Mathematica TIP
Mathematica: HOWTO Manage test data for functions using rules across multiple functions (and about the Webel '$0' variable suffix convention for substitution targets). Wolfram, Mathematica TIP
Mathematica: HOWTO: Strip an option from an OptionsPattern[] sequence before passing down (propagating) to a function with fewer options Wolfram, Mathematica TIP
Mathematica: Nasser M. Abbasi's cheat sheet Wolfram, Mathematica TIP, TOOL
Mathematica: HOWTO Convert a list into a Sequence of arguments to a function (where each of the arguments to the function corresponds to a list item) Wolfram, Mathematica
Mathematica: HOWTO Create collapsible control groups in Manipulate GUIs Wolfram, Mathematica DISPLAY, FEATURE, TIP, TOOL
Mathematica: TIP: OverDot: Type CTRL & and then . to enter an OverDot directly Mathematica, Wolfram, notation FEATURE, TIP, TOOL
Mathematica: TIP: OverBar: Type CTRL & and then _ to enter an OverBar directly Mathematica, Wolfram, notation FEATURE, TIP, TOOL
Mathematica: v12.3.1.0: How to obtain values of physical constants Mathematica, physical quantity, quantity, magnitude, units, Wolfram TIP
Mathematica: GOTCHA: MMA distinguishes between Kelvins and KelvinsDifference Mathematica, quantity, units, physical quantity, temperature, Kelvins, celsius, Wolfram GOTCHA, WARNING
Wolfram SystemModeler: Not clear how to draw a connect that already exists in the Modelica code Modelica, Wolfram SystemModeler, Wolfram ISSUE, TOOL
Wolfram SystemModeler: On Mac the Unit Conversions dialog is under SystemModeler -> Preferences -> Global -> Unit Conversion (rather than under Tools -> Options) Modelica, Wolfram SystemModeler, units, unit conversion, macOS, Wolfram GOTCHA, TIP, WARNING
Wolfram SystemModeler: GOTCHA: The conversion dialog will not offer the Add Unit Conversion button unless there is not already an existing conversion in BOTH directions. Modelica, Wolfram SystemModeler, units, unit conversion, Wolfram GOTCHA, TIP, WARNING