If-Equation

1 Electrical units



2 Electrical Connectors


3 Electrical Components

TwoPin is a partial class, which means that it is not possible to make instances of it but it can be extended.



4 Diode

Conditional expressions or equations describe discontinuous and conditional models. When writing conditional expressions no end if is needed. If the condition has more than two options then it is not enough with an else-statement to express this, so we have to add one or more elseif-statements.




Load the Modelica Standard Library in order to be able to import as below.




We construct a circuit with a diode.



4.1 Simulation of circuit