|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
SymEngine-based symbolic algebra utilities for network analysis. More...
#include "../../Constants.h"

Go to the source code of this file.
Functions | |
| DenseMatrix | createZeroMatrix (int size1, int size2) |
| Creates a zero-filled SymEngine dense matrix. | |
| void | fillWithZero (DenseMatrix &mat) |
| Sets every entry of a SymEngine dense matrix to zero in place. | |
| DenseMatrix | eigenToSymEngineDenseMatrix (const MatrixXcd &eigenMat) |
| Converts an Eigen complex matrix to a SymEngine DenseMatrix. | |
| complex< double > | substitute_symbol (const RCP< const Basic > &expr, const std::string &symbol_name, double value) |
| Substitutes a named symbol with a real value in an expression. | |
| complex< double > | substitute_symbol (const RCP< const Basic > &expr, RCP< const Basic > symbol_name, double value) |
| Substitutes a symbolic variable with a real value in an expression. | |
| complex< double > | substitute_symbol (const RCP< const Basic > &expr, const std::string &symbol_name, complex< double > value) |
| Substitutes a named symbol with a complex value in an expression. | |
| complex< double > | substitute_symbol (const RCP< const Basic > &expr, RCP< const Basic > symbol_name, complex< double > value) |
| Substitutes a symbolic variable with a complex value in an expression. | |
| MatrixXcd | substitute_symbol (DenseMatrix, const string &, double) |
| Substitutes a named symbol with a real value in every matrix entry. | |
| MatrixXcd | substitute_symbol (DenseMatrix, const string &, complex< double >) |
| Substitutes a named symbol with a complex value in every matrix entry. | |
| MatrixXcd | substitute_symbol (DenseMatrix, RCP< const Basic >, double) |
| Substitutes a symbolic variable with a real value in every matrix entry. | |
| MatrixXcd | substitute_symbol (DenseMatrix, RCP< const Basic >, complex< double >) |
| Substitutes a symbolic variable with a complex value in every matrix entry. | |
| RCP< const Basic > | substitute_symbols (const RCP< const Basic > &expr, const std::vector< RCP< const Basic > > &symbols, double value) |
| Substitutes multiple symbols with the same real value in an expression. | |
| double | eval_basic (const RCP< const Basic > &expr) |
| Evaluates a symbolic expression to a real scalar. | |
| MatrixXd | kron_reduction (MatrixXd, vector< int >) |
| Kron-reduces a real matrix by eliminating specified nodes. | |
| DenseMatrix | kron_reduction (DenseMatrix, vector< int >) |
| Kron-reduces a symbolic dense matrix by eliminating specified nodes. | |
| Eigen::SparseMatrix< double > | absoluteSparseMatrix (const Eigen::SparseMatrix< std::complex< double > > &matrix) |
| Takes the element-wise absolute value of a complex sparse matrix. | |
| RCP< const Basic > | inv (const RCP< const Basic > &val) |
| Symbolic multiplicative inverse (1/x). | |
| RCP< const Basic > | addSym (const RCP< const Basic > &a, const RCP< const Basic > &b) |
| Symbolic addition a + b. | |
| RCP< const Basic > | subSym (const RCP< const Basic > &a, const RCP< const Basic > &b) |
| Symbolic subtraction a - b. | |
Variables | |
| const RCP< const Basic > | PI |
| Symbolic representation of π. | |
| const double | mu_0 |
| Vacuum permeability (H/m). | |
| const double | epsilon_0 |
| Vacuum permittivity (F/m). | |
| const double | gamma_num |
| Euler–Mascheroni constant. | |
| RCP< const Basic > | j |
| Imaginary unit j. | |
| RCP< const Basic > | omega |
| Angular frequency symbol ω. | |
| RCP< const Basic > | s |
| Complex frequency symbol s = jω. | |
SymEngine-based symbolic algebra utilities for network analysis.
Provides symbolic constants, matrix creation/conversion, parameter substitution, Kron reduction, and basic symbolic arithmetic used when assembling MNA matrices and transfer functions.
|
extern |
Takes the element-wise absolute value of a complex sparse matrix.
| matrix | Input complex sparse matrix. |
Referenced by PowerFlow::load_params_dc().
|
extern |
Symbolic addition a + b.
| a | First operand. |
| b | Second operand. |
Referenced by Impedance::Impedance(), Impedance::Impedance(), MMC::writeMNAmatrix(), Resistor::writeMNAmatrix(), AC_source::writeMNAmatrix(), DC_source::writeMNAmatrix(), and Inductor::writeMNAmatrix().
|
extern |
Creates a zero-filled SymEngine dense matrix.
| size1 | Number of rows. |
| size2 | Number of columns. |
References j.
Referenced by Cable::Cable(), Element::Element(), Generator::Generator(), Overhead_Line::Overhead_Line(), PVplant::PVplant(), TransformerDeltaDelta::TransformerDeltaDelta(), TransformerDeltaY::TransformerDeltaY(), TransformerDeltaY_real::TransformerDeltaY_real(), TransformerYDelta::TransformerYDelta(), WTtype3::WTtype3(), WTtype4::WTtype4(), StateSpaceModel::formState(), and kron_reduction().
|
extern |
Converts an Eigen complex matrix to a SymEngine DenseMatrix.
| eigenMat | Input Eigen MatrixXcd. |
References j.
|
extern |
Evaluates a symbolic expression to a real scalar.
| expr | Symbolic expression (must be real-valued after substitution). |
Referenced by extractCoefficient().
|
extern |
Sets every entry of a SymEngine dense matrix to zero in place.
| mat | Matrix to zero. |
References j.
|
extern |
Symbolic multiplicative inverse (1/x).
| val | Symbolic value. |
Referenced by Resistor::writeMNAmatrix().
|
extern |
Kron-reduces a symbolic dense matrix by eliminating specified nodes.
| matrix | Input symbolic matrix. |
| nodes | Indices of nodes to eliminate. |
References createZeroMatrix(), and j.
|
extern |
Kron-reduces a real matrix by eliminating specified nodes.
| matrix | Input admittance/impedance matrix. |
| nodes | Indices of nodes to eliminate. |
Referenced by Cable::Cable(), and Overhead_Line::Overhead_Line().
|
extern |
Substitutes a named symbol with a complex value in an expression.
| expr | Symbolic expression. |
| symbol_name | Name of the symbol to replace. |
| value | Complex substitution value. |
|
extern |
Substitutes a named symbol with a real value in an expression.
| expr | Symbolic expression. |
| symbol_name | Name of the symbol to replace. |
| value | Real substitution value. |
Referenced by AC_source::AC_source(), Cable::compute_y_parameters(), Overhead_Line::compute_y_parameters(), TransmissionLine::computePowerFlow(), Transformer_base::computePowerFlow(), and Impedance_base::computePowerFlow().
|
extern |
Substitutes a symbolic variable with a complex value in an expression.
| expr | Symbolic expression. |
| symbol_name | Symbol to replace. |
| value | Complex substitution value. |
|
extern |
Substitutes a symbolic variable with a real value in an expression.
| expr | Symbolic expression. |
| symbol_name | Symbol to replace. |
| value | Real substitution value. |
|
extern |
Substitutes a named symbol with a complex value in every matrix entry.
| mat | Symbolic dense matrix. |
| symbol_name | Name of the symbol to replace. |
| value | Complex substitution value. |
References j.
|
extern |
Substitutes a named symbol with a real value in every matrix entry.
| mat | Symbolic dense matrix. |
| symbol_name | Name of the symbol to replace. |
| value | Real substitution value. |
References j.
|
extern |
Substitutes a symbolic variable with a complex value in every matrix entry.
| mat | Symbolic dense matrix. |
| symbol_name | Symbol to replace. |
| value | Complex substitution value. |
References j.
|
extern |
Substitutes a symbolic variable with a real value in every matrix entry.
| mat | Symbolic dense matrix. |
| symbol_name | Symbol to replace. |
| value | Real substitution value. |
References j.
|
extern |
Substitutes multiple symbols with the same real value in an expression.
| expr | Symbolic expression. |
| symbols | List of symbols to replace. |
| value | Common real substitution value. |
|
extern |
Symbolic subtraction a - b.
| a | Minuend. |
| b | Subtrahend. |
Referenced by Resistor::writeMNAmatrix().
|
extern |
Vacuum permittivity (F/m).
Vacuum permittivity (F/m).
Referenced by Cable::Cable(), and Overhead_Line::Overhead_Line().
|
extern |
|
extern |
Imaginary unit j.
Referenced by AC_source::AC_source(), AC_source::AC_source(), AC_source::AC_source(), Admittance::Admittance(), Cable::Cable(), DC_source::DC_source(), DC_source::DC_source(), DC_source::DC_source(), DC_source::DC_source(), Impedance::Impedance(), Impedance::Impedance(), Impedance::Impedance(), Impedance::Impedance(), Impedance::Impedance(), Load::Load(), Overhead_Line::Overhead_Line(), Resistor::Resistor(), Transformer_classic::Transformer_classic(), Transformer_real::Transformer_real(), TransformerDeltaDelta::TransformerDeltaDelta(), TransformerDeltaY::TransformerDeltaY(), TransformerDeltaY_real::TransformerDeltaY_real(), TransformerYDelta::TransformerYDelta(), WTtype3::WTtype3(), Element::apply_transformation(), bode_plot_implot(), StabilityEstimate::bodeplotTF(), StabilityEstimate::compute_equivalent_admittance_parameters_num(), Element::compute_y_parameters(), MMC::compute_y_parameters(), Cable::compute_y_parameters(), Overhead_Line::compute_y_parameters(), computeJacobians(), Converter::computeParticipationFactors(), MMC::computeStateDerivatives(), convertToPhasor(), createZeroMatrix(), eigen2sun(), eigenToSymEngineDenseMatrix(), fillWithZero(), ComponentBuilder::findNonEmptyNumericArray(), ComponentBuilder::findNonEmptyString(), ComponentBuilder::findNumber(), ComponentBuilder::findNumericOrReferenceArray(), ComponentBuilder::findScalar(), StateSpaceModel::form_cutset_nodes(), StateSpaceModel::formState(), get_block(), kron_reduction(), mat_add(), mat_mul(), mat_sub(), mat_transpose(), matrixToVector(), matrixToVector(), mul_scalar(), nyquist_plot_implot(), StabilityEstimate::nyquistplotTF(), plot_participation_factors_implot(), Element::plotYParameters(), Element::printElementValues(), Resistor::printElementValues(), PowerFlow::solve_opf(), substitute_symbol(), substitute_symbol(), substitute_symbol(), substitute_symbol(), SimulationBuilder::validateJSON(), vectorToMatrix(), vectorToMatrix(), viz_opf(), Element::writeFile(), StabilityEstimate::writeFileTF(), and Switch::writeMNAmatrix().
|
extern |
Vacuum permeability (H/m).
Vacuum permeability (H/m).
Referenced by Cable::Cable(), and Overhead_Line::Overhead_Line().
|
extern |
Angular frequency symbol ω.
Referenced by AC_source::AC_source(), Load::Load(), MMC::MMC(), Transformer_classic::Transformer_classic(), Transformer_real::Transformer_real(), TransmissionLine::TransmissionLine(), Element::compute_y_parameters(), Cable::compute_y_parameters(), Overhead_Line::compute_y_parameters(), TransmissionLine::computePowerFlow(), Transformer_base::computePowerFlow(), Impedance_base::computePowerFlow(), Load::computePowerFlow(), example_DQsym_MMC_controlled(), example_DQsym_Simple_MMC(), example_MMC(), example_OPF_double_area(), example_OPF_PV(), example_OPF_single_area(), example_OPF_WT(), example_point2point_case(), and example_stability_check().
|
extern |
Symbolic representation of π.
|
extern |
Complex frequency symbol s = jω.
Referenced by Cable::Cable(), Capacitor::Capacitor(), Generator::Generator(), Inductor::Inductor(), Overhead_Line::Overhead_Line(), PVplant::PVplant(), WTtype3::WTtype3(), WTtype4::WTtype4(), DQsym::buildMatricesForState(), Impedance_base::computePowerFlow(), dq_multiply(), and extractCoefficient().