Diagnostics

There are a few diagnostic options that can be enabled with the Settings_FSL component. The parameters are located under the Diagnostics tab in the parameter dialog. By default, the warnings are enabled, but can be disabled by setting diagnose = false

The available diagnostics are:

  1. Pipe Length Check
    • The parameter diagnosePipeLengthVsPos enables a warning that is given if the specified pipe length doesn't fit within an accepted range. The parameters minRelLength and maxRelLength define ratios in comparison to the length determined by positions to create the range in which the length is checked.
    • Example warning: "Actual pipe length of [Instance Name] ([length_param] m) is more than [Settings_FSL.maxRelLength] times the geometrical distance between flanges ([length_pos] m). Check position and length parameterization!"
    • The warning message identifies the component where the warning is coming from, the value of the parametric length, the value of the geometric length based on connected component positions, and whether the length_param is less or more than a minRelLength or maxRelLength times length_pos respectively. To mitigate this warning, either correct the parameteric length, or check that the positioning of the components are correct.
  2. Tank Ports Check
    • The parameter diagnoseBadTankConnections enables a warning that is given if a port is connected more than once. The tank ports are vectorized and must be the correct size to support multiple connections.
    • Example warning: "[Instance Name].portL[#] is connected more than once. This is not allowed (not even for sensors), and may results in degraded model performance."
    • The warning message identifies the tank and the port index that has more than one connection. To address this warning, check that that the connections to the identified port. Make sure all indices of the port are connected, increase the port vector size if required.
  3. Fast Time Constants Check
    • The parameter diagnoseTimeConstants enables a warning that is given if time constants used for components are too small. Very fast time constants introduces unnecessary stiffness that slows down simulation speed. The parameter duration specifies the order of magnitude of the simulation time and minTimeConstantToDuration is the minimal time constant for a one second simulation time. The options are 'Fast time constant threshold' = (1e-4) and 'Very fast time constant threshold' = (1e-5).
    • Example warning: "In [InstanceName] the time constant is [timeConstant], which is [timeConstant/Settings_FSL.duration*100.0]% of given duration of [Settings_FSL.duration/60] min. Check simulation duration defined in Settings_FSL, and consider reducing stiffness by adapting this time constant!"
    • This warning message identifies the component, the time constant variable and its ratio to the order of magnitude of the simulation time. To address the warning it suggests checking that the duration parameter value makes sense and increasing it.