Skip to content

Custom set of TRNSYS Types that perform arithmetic operations and output the results

License

Notifications You must be signed in to change notification settings

allachance/TRNSYS-ArithmeticOperators-Type3814-3825

Repository files navigation

Type3814–3825

Custom set of TRNSYS Types that perform arithmetic operations and output the results.

Purpose

Type3814-3825 allows simulating arithmetic operations within TRNSYS models. These Types process inputs using arithmetic operators (K,+, -, *, /, **, MOD,MIN, MAX, ABS, NEG & INV ) and output the resulting numerical value. This enables mathematical calculations, signal processing, and data manipulation directly within your simulations.

Note

TRNSYS already provides arithmetic operations within the Calculator Type, which are generally more optimized for simulation speed.
The advantage of this set of Types is that they do not require creating custom inputs or outputs within the Calculator, making them easier to integrate and more visually intuitive compared to code-based implementations.

Requirement

  • TRNSYS v.18

Installation

  1. Clone the repo or download the source files:

    git clone https://github.com/allachance/TRNSYS-ArithmeticOperators-Type3814-3824.git
  2. Copy the folders into your TRNSYS 18 installation directory, e.g., C:\TRNSYS18

Configuration

Inputs

Name Description Options
Input-n Input value(s) for the arithmetic operation
Number of Inputs Total number of input value(s) Minimum: 1 or 2 / Maximum: 100

Output

Name Description Options
Output-(n) Returns the result of the operation

Usage

  1. Add the Component in TRNSYS Studio
    • Insert the desired operation into your simulation workspace:

      • Type3814: Constant (K)
      • Type3815: Addition (+)
      • Type3816: Subtraction (-)
      • Type3817: Multiplication (*)
      • Type3818: Division (/)
      • Type3819: Power (**)
      • Type3820: Modulo (%)
      • Type3821: Minimum (MIN)
      • Type3822: Maximum (MAX)
      • Type3823: Absolute (|x|)
      • Type3824: Negation (-x)
      • Type3825: Reciprocal (1/x)

About

Custom set of TRNSYS Types that perform arithmetic operations and output the results

Topics

Resources

License

Stars

Watchers

Forks