JUK1
NLCapacitor< T > Struct Template Reference

a non-linear capacitor model of the form C = C_p + C_o * ( 1.0 + tanh( P_10 + P_11 * u ) ) More...

#include <NLCapacitor.hpp>

Inheritance diagram for NLCapacitor< T >:
Collaboration diagram for NLCapacitor< T >:

Public Member Functions

void addNonLinearStampTo (Stamp< T > &stamp, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep=0) const
 adds this component's non-linear stamp to the target stamp. More...
 
void updateStoredState (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep, size_t sizeG_A)
 Updates any stored state based on the current solution index. More...
 
void updateDCStoredState (const Matrix< T > &solutionVector, size_t sizeG_A, size_t numCurrents)
 a function to update the stored state of a component based on a DC value More...
 
void addDCAnalysisStampTo (Stamp< T > &stamp, const Matrix< T > &solutionVector, size_t numCurrents) const
 adds this component's DC stamp to the target stamp. More...
 
- Public Member Functions inherited from Component< T >
virtual void addStaticStampTo (Stamp< T > &destination) const
 Adds this component's static stamp to the target stamp. More...
 
virtual void addDynamicStampTo (Stamp< T > &destination, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) const
 Adds this component's dynamic stamp to the target stamp. More...
 
virtual void setTimestep (T timestep)
 initialises the component More...
 
virtual ~Component ()
 

Static Public Member Functions

static void addToElements (const std::string &line, CircuitElements< T > &elements, size_t &numNodes, size_t &numCurrents, size_t &numDCCurrents)
 
- Static Public Member Functions inherited from Component< T >
static void addToElements (const std::string &line, CircuitElements< T > &elements, size_t &numNodes, size_t &numCurrents, size_t &numDCCurrents)
 Called as a helper to add the component to the elements class. More...
 

Public Attributes

size_t n1 = 0
 
size_t n2 = 0
 
C_p = 0
 
C_o = 0
 
P_10 = 0
 
P_11 = 0
 
u_last = 0
 
i_last = 0
 
C_last = C_p + C_o * (1.0 + std::tanh(P_10 + P_11 * u_last))
 
- Public Attributes inherited from Component< T >
std::string designator = ""
 The designator as in the netlist for e.g. More...
 

Detailed Description

template<typename T>
struct NLCapacitor< T >

a non-linear capacitor model of the form C = C_p + C_o * ( 1.0 + tanh( P_10 + P_11 * u ) )

Template Parameters
Tthe value type

Definition at line 11 of file NLCapacitor.hpp.

Member Function Documentation

◆ addDCAnalysisStampTo()

template<typename T >
void NLCapacitor< T >::addDCAnalysisStampTo ( Stamp< T > &  destination,
const Matrix< T > &  solutionVector,
size_t  numCurrents 
) const
inlinevirtual

adds this component's DC stamp to the target stamp.

Parameters
destinationThe stamp to be added to.
solutionMatrixA vector containing all past solutions to the circuit
numCurrentsThe number of currents used by the transient simulation

Reimplemented from Component< T >.

Definition at line 123 of file NLCapacitor.hpp.

◆ addNonLinearStampTo()

template<typename T >
void NLCapacitor< T >::addNonLinearStampTo ( Stamp< T > &  destination,
const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep = 0 
) const
inlinevirtual

adds this component's non-linear stamp to the target stamp.

Parameters
destinationThe stamp to be added to.
solutionMatrixA vector containing all past solutions to the circuit
currentSolutionIndexThe current timeStep index
timestepThe length of each time step

Reimplemented from Component< T >.

Definition at line 27 of file NLCapacitor.hpp.

◆ addToElements()

template<typename T >
static void NLCapacitor< T >::addToElements ( const std::string &  line,
CircuitElements< T > &  elements,
size_t &  numNodes,
size_t &  numCurrents,
size_t &  numDCCurrents 
)
inlinestatic

Definition at line 135 of file NLCapacitor.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDCStoredState()

template<typename T >
void NLCapacitor< T >::updateDCStoredState ( const Matrix< T > &  solutionVector,
size_t  sizeG_A,
size_t  numCurrents 
)
inlinevirtual

a function to update the stored state of a component based on a DC value

Parameters
solutionVectorThe DC vector
sizeG_Athe number of voltages
numCurrentsthe number of transient currents

Reimplemented from Component< T >.

Definition at line 99 of file NLCapacitor.hpp.

◆ updateStoredState()

template<typename T >
void NLCapacitor< T >::updateStoredState ( const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep,
size_t  numCurrents 
)
inlinevirtual

Updates any stored state based on the current solution index.

Parameters
solutionMatrixA vector containing all past solutions to the circuit
currentSolutionIndexThe current timeStep index
timestepThe length of each time step
sizeG_Athe size of the A portion of G, marks the end of the equiv currents

Reimplemented from Component< T >.

Definition at line 74 of file NLCapacitor.hpp.

Member Data Documentation

◆ C_last

template<typename T >
T NLCapacitor< T >::C_last = C_p + C_o * (1.0 + std::tanh(P_10 + P_11 * u_last))

Definition at line 24 of file NLCapacitor.hpp.

◆ C_o

template<typename T >
T NLCapacitor< T >::C_o = 0

Definition at line 17 of file NLCapacitor.hpp.

◆ C_p

template<typename T >
T NLCapacitor< T >::C_p = 0

Definition at line 16 of file NLCapacitor.hpp.

◆ i_last

template<typename T >
T NLCapacitor< T >::i_last = 0

Definition at line 22 of file NLCapacitor.hpp.

◆ n1

template<typename T >
size_t NLCapacitor< T >::n1 = 0

Definition at line 13 of file NLCapacitor.hpp.

◆ n2

template<typename T >
size_t NLCapacitor< T >::n2 = 0

Definition at line 14 of file NLCapacitor.hpp.

◆ P_10

template<typename T >
T NLCapacitor< T >::P_10 = 0

Definition at line 18 of file NLCapacitor.hpp.

◆ P_11

template<typename T >
T NLCapacitor< T >::P_11 = 0

Definition at line 19 of file NLCapacitor.hpp.

◆ u_last

template<typename T >
T NLCapacitor< T >::u_last = 0

Definition at line 21 of file NLCapacitor.hpp.


The documentation for this struct was generated from the following file: