Lemonergy · Studio block

Math function

Applies a selected square root, exponential, logarithm, square, reciprocal or absolute-value function.

Implementation ID
native-math-function
Reviewed
2026-10-27

Behavior

y = sqrt(u), exp(u), ln(u), u², 1/u, or |u|. The worked example connects this operation to signals in Lemonergy Studio.

Interface

Math function interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Math functionStudio blockin0out0
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input1Values; real 2 array.
out0output1Result; real 2 array.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Function
params[0]
100 square root; 1 exponential; 2 natural logarithm; 3 square; 4 reciprocal; 5 absolute value.

Equations and rules

  • y = sqrt(u), exp(u), ln(u), u², 1/u, or |u|

Worked example

Math function — worked example

Values = [4,9]. Result at 0 s = [2,3].

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Result
out0
0[2, 3]11e-08

Explore the recorded outputs

Math function recorded example

Math function [1]
Math function [1] against timeRecorded synthetic simulation values. Time in seconds; output in —.1.501.750.2520.52.250.752.51—Time (s)
Math function [1]: 2 — at 0 s

2 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.

Download the recorded samples (JSON) · Open this Studio example after release

Use in a workflow

Math function — worked example

Applies a selected square root, exponential, logarithm, square, reciprocal or absolute-value function.

  1. Math function: y = sqrt(u), exp(u), ln(u), u², 1/u, or |u|. The worked example connects this operation to signals in Lemonergy Studio.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Real sqrt, exp, ln, square, reciprocal and abs; unsupported operations and domain failures are refused.
  • Shapes and element types are explicit. Values must be finite; automatic reshaping and unit conversion are not performed.

Reference basis

This software operation and its numerical conventions are defined by the public contract and worked example; no external research result is claimed.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)