modelConditionalComponents
Conditional components
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
Description
This examples demonstrates the application of a conditional inductor, dependent on the parameter useInductor.
Plot the following variable(s)
resistor.i: current of circuit; investigateuseInductor = trueanduseInductor = false
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Resistance | R | 10 | Resistance |
| Modelica.Units.SI.Inductance | L | 2 | Inductance |
| Modelica.Units.SI.Voltage | v | 10 | DC voltage |
| Boolean | useInductor | true | Use inductor if true |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Modelica.Electrical.Analog.Basic.Resistor | resistor | ||
| Modelica.Electrical.Analog.Basic.Inductor | inductor | ||
| Modelica.Electrical.Analog.Ideal.Short | short | ||
| Modelica.Electrical.Analog.Sources.ConstantVoltage | constantVoltage | ||
| Modelica.Electrical.Analog.Ideal.IdealClosingSwitch | switch | ||
| Modelica.Blocks.Sources.BooleanStep | booleanStep |