VariableCapacitor

Ideal linear electrical capacitor with variable capacitance

    VariableCapacitor

Library

Electrical/Analog/Basic

Description

The linear capacitor connects the branch voltage v with the branch current i by
i = dQ/dt with Q = C * v.
The capacitance C is given as input signal. It is required that C ≥ 0, otherwise an assertion is raised. To avoid a variable index system, C = Cmin, if 0 ≤ C < Cmin, where Cmin is a parameter with default value Modelica.Constants.eps.


Besides the Cmin parameter the capacitor model has got the two parameters IC and UIC that belong together. With the IC parameter the user can specify an initial value of the voltage over the capacitor, which is defined from positive pin p to negative pin n (v=p.v - n.v).


Hence the capacitor is charged at the beginning of the simulation. The other parameter UIC is of type Boolean. If UIC is true, the simulation tool uses


the IC value at the initial calculation by adding the equation v= IC. If UIC is false, the IC value can be used (but it does not need to!) to calculate the initial values in order to simplify the numerical algorithms of initial calculation.

Parameters

VariableCapacitor_0

NameLabelDescriptionData TypeValid Values

mo_Cmin

Cmin

lower bound for variable capacitance

Scalar

mo_IC

IC

Initial Value

Scalar

mo_UIC

UIC

Scalar

true
false

VariableCapacitor_1

NameLabelDescriptionData TypeValid Values

mo_v

v

v

Structure

mo_v/fixed

fixed

Cell of scalars

true
false

mo_v/start

start

Cell of scalars

mo_i

i

i

Structure

mo_i/fixed

fixed

Cell of scalars

true
false

mo_i/start

start

Cell of scalars

mo_C

C

C

Structure

mo_C/fixed

fixed

Cell of scalars

true
false

mo_C/start

start

Cell of scalars

mo_Q

Q

Q

Structure

mo_Q/fixed

fixed

Cell of scalars

true
false

mo_Q/start

start

Cell of scalars

Ports

NameTypeDescriptionIO TypeNumber

p

implicit

Positive electrical pin

input

1

n

implicit

Negative electrical pin

output

1

C

implicit

input

2