Template Class LineLumped

Inheritance Relationships

Base Type

Class Documentation

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

N-phase, K-conductor lumped line, with conductor k on phase c_k.

Public Functions

explicit LineLumped(const ModelDataT &data)

Construct a line of K conductors on N phases.

Layout: internal variable i12 of size K, terminals bus1 and bus2 of size N. Submodel z reads i12 as its input, and its output is added to the residual of i12. When the case gives Yp, submodels y1 and y2 read the conductor voltages at their terminals, and their outputs are added to the residuals of those voltages.

VectorFitT &submodel(SubmodelsT symbol)

Submodel symbol, an impedance or admittance operator.

Throws:

std::invalid_argument – for y1 or y2 of a line without Yp.

virtual Model::ConfigurationChecks verify() const override

Check the phase and conductor counts, the phase of each conductor, the length, and that the operators are K by K.

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 base voltage of each conductor’s phase at terminal 1.

Parameters:

rel_tol – [in] Relative tolerance of the integrator.

Returns:

0.

Pre:

The bus at bus1 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 voltage across each conductor to the residual of its series current, to which the output of the impedance is added.

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

Add the series current of each conductor to the residuals of the voltages of its phase.

Pre:

The residuals at the terminals are zero on entry.