sca_c
Project Library Model Name Kind
sca_basic_libraries elec_lin_symbols sca_c Electrical Module

Parameters

Name Type Default Description
value double 1.0 capacitance in Farad
q0 double 0.0 initial charge in couloumb

Ports

Name Interface Type Description
p sca_eln::sca_terminal positive terminal
n sca_eln::sca_terminal negative terminal

Description

Capacitor

Long Description

P1666.1  p.138 - SystemC AMS build in element

7.1.7 sca_eln::sca_c

The class sca_eln::sca_c shall implement a primitive module for the ELN MoC that represents a capacitor.
The primitive shall contribute the following equationEquation (7.2) to the equation system:

(7.2)     ip,n(t)=d(value*vp,n(t)+q0)/dt

where value is the capacitance in farad, q0 is the initial charge in coulomb, vp,n(t) is the voltage across the capacitor between terminals p and n, and ip,n(t) is the current through the capacitor flowing from terminal p to terminal n.
If the initial charge q0 is set to sca_util::SCA_UNDEFINED, the primitive shall contribute no equation to the equation system for the first calculation. In this case, the initial charge q0 shall be calculated as follows:
q0 = value · vp,n0, where vp,n0 is the voltage across the capacitor after the first calculation.

The element supports current tracing. The current is flowing from terminal p to n through the capacitor.