Template Class LoadZ

Inheritance Relationships

Base Type

Class Documentation

template<typename scalar_type, typename index_type>
class LoadZ : public GridKit::EMT::Component<scalar_type, index_type>

N-phase impedance load.

Public Functions

explicit LoadZ(const ModelDataT &data)

Construct an impedance load with N phases.

Layout: internal variable i of size N, terminal bus of size N. Submodel z reads i as its input, and its output is added to the residual of i.

VectorFitT &submodel(SubmodelsT symbol)

Submodel symbol, the impedance operator.

virtual Model::ConfigurationChecks verify() const override

Check that N is positive and that the impedance is N by N.

Returns:

The failed checks.

virtual int setAbsoluteTolerance(RealT rel_tol) override

Set the current tolerances to rel_tol times the system power base over the bus base voltage.

Parameters:

rel_tol – [in] Relative tolerance of the integrator.

Returns:

0.

Pre:

The bus at the terminal has set its tolerances with the same rel_tol.

virtual int tagDifferentiable() override

Fill the tag() vector with proper indicators.

Note

For some models, this may be a no-op, and the vector returned by tag() will still be empty.

Pre:

allocate() must have been called.

template<typename T>
void internalResidual(const T *y, const T *yp, const T *w, const T *wp, T *f) const

Write the bus voltage to the residual of i.

The output of the impedance submodel is added to the same residual.

template<typename T>
void externalResidual(const T *y, const T *yp, const T *w, const T *wp, T *f) const

Write i to the residual of the bus voltage.