eisgenerator 2.1.x
eis::Cap Class Reference

Ideal capacitor, model character c. More...

#include <cap.h>

Inherits eis::Componant.

Collaboration diagram for eis::Cap:
Collaboration graph

Public Member Functions

 Cap (std::string paramStr, size_t count=10, bool defaultToRange=false)
 Cap (fvalue c=1e-6)
virtual std::complex< fvalue > execute (fvalue omega) override
virtual size_t paramCount () const override
virtual char getComponantChar () const override
virtual std::string componantName () const override
virtual std::string getCode (std::vector< std::string > &parameters) override
virtual std::string getTorchScript (std::vector< std::string > &parameters) override
virtual std::vector< eis::Range > getDefaultParameters (bool range=true) const override
Public Member Functions inherited from eis::Componant
virtual void setParamRanges (const std::vector< eis::Range > &ranges)
virtual std::vector< eis::Range > & getParamRanges ()
virtual std::vector< eis::Range > getParamRanges () const
virtual std::string getComponantString (bool currentValue=true, bool withCount=false) const
 Gets this componant as a model string.
virtual bool compileable ()
std::string getUniqueName ()
bool hasDefaultedParameters () const
 Checks if this componant had to use default parameters.

Static Public Member Functions

static constexpr char staticGetComponantChar ()
Static Public Member Functions inherited from eis::Componant
static Componant * copy (Componant *componant)
static Componant * createNewComponant (char componant, std::string paramStr="", size_t count=1, bool defaultToRange=false)
static bool isValidComponantChar (char componant)

Additional Inherited Members

Protected Member Functions inherited from eis::Componant
void initRanges (const std::string &paramStr, size_t count, bool defaultToRange)
Protected Attributes inherited from eis::Componant
std::vector< eis::Range > ranges
std::string uniqueName
bool defaultedParameters = false

Detailed Description

Ideal capacitor, model character c.

Z(omega) = 1 / (j omega C)
= -j / (omega C)
Re(Z) = 0
Im(Z) = -1 / (omega C) always negative

Parameters: c{C}

  • C : capacitance in Farad

Ideal: the real part is exactly zero, so there is no series resistance and no leakage conductance. A depressed or tilted semicircle therefore needs a p in parallel or a series r, not a lossy c.

Equivalent to a CPE with alpha = 1 and Q = C, so the two are interchangeable in a circuit; see eis::Model::getEquivalentParameterPermutations().

Member Function Documentation

◆ componantName()

virtual std::string eis::Cap::componantName ( ) const
inlineoverridevirtual

Implements eis::Componant.

◆ execute()

virtual std::complex< fvalue > eis::Cap::execute ( fvalue omega)
overridevirtual

Reimplemented from eis::Componant.

◆ getCode()

virtual std::string eis::Cap::getCode ( std::vector< std::string > & parameters)
overridevirtual

Reimplemented from eis::Componant.

◆ getComponantChar()

virtual char eis::Cap::getComponantChar ( ) const
overridevirtual

Implements eis::Componant.

◆ getDefaultParameters()

virtual std::vector< eis::Range > eis::Cap::getDefaultParameters ( bool range = true) const
overridevirtual

Reimplemented from eis::Componant.

◆ getTorchScript()

virtual std::string eis::Cap::getTorchScript ( std::vector< std::string > & parameters)
overridevirtual

Reimplemented from eis::Componant.

◆ paramCount()

virtual size_t eis::Cap::paramCount ( ) const
overridevirtual

Reimplemented from eis::Componant.