diff --git a/GridKit/CommonMath.md b/GridKit/CommonMath.md index 01f46a4f33..65102e1d95 100644 --- a/GridKit/CommonMath.md +++ b/GridKit/CommonMath.md @@ -155,7 +155,7 @@ We implement an approximation to $\text{ReQU}$ using the logistic function. x & x\gt y \\[0pt] y & x\le y \end{cases} \\[0pt] - &=y+\text{ReLU}(x-y)=\approx y+\rho(x-y) + &=y+\text{ReLU}(x-y)\approx y+\rho(x-y) \end{aligned} ``` diff --git a/GridKit/LinearAlgebra/Vector/Vector.hpp b/GridKit/LinearAlgebra/Vector/Vector.hpp index ec6d5c1b70..13ae804662 100644 --- a/GridKit/LinearAlgebra/Vector/Vector.hpp +++ b/GridKit/LinearAlgebra/Vector/Vector.hpp @@ -297,6 +297,7 @@ namespace GridKit * Use this function if you update vector elements by accessing the raw data * pointer. * + * @param[in] j - Index of a vector in multivector * @param[in] memspace - Memory space (HOST or DEVICE) * * @warning This is an expert level method. Use only if you know what diff --git a/GridKit/Model/EMT/Bus/README.md b/GridKit/Model/EMT/Bus/README.md index ab03e9aa7c..57e6cd1d8f 100644 --- a/GridKit/Model/EMT/Bus/README.md +++ b/GridKit/Model/EMT/Bus/README.md @@ -2,7 +2,7 @@ `Bus` represents an $N$-phase bus in instantaneous phase coordinates. It owns the bus voltage and contributes the current-balance residual to -the assembled DAE. $`\mathcal{D}`$ denotes the set of connected devices. +the assembled DAE. $\mathcal{D}$ denotes the set of connected devices. Bus voltage and its residual are algebraic when no connected model contributes a voltage derivative; see [assembly](../README.md#assembly). @@ -24,7 +24,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer N \in \mathbb{Z}_{>0} ``` -### Derived Parameters +### Model Derived Parameters None. diff --git a/GridKit/Model/EMT/Component/Line/LineDistributed/README.md b/GridKit/Model/EMT/Component/Line/LineDistributed/README.md index 7fef9e054c..3de5af7547 100644 --- a/GridKit/Model/EMT/Component/Line/LineDistributed/README.md +++ b/GridKit/Model/EMT/Component/Line/LineDistributed/README.md @@ -38,7 +38,7 @@ K &\in \mathbb{Z}_{>0} \\ \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters ```math P_{\phi,nk} = diff --git a/GridKit/Model/EMT/Component/Line/LineLumped/README.md b/GridKit/Model/EMT/Component/Line/LineLumped/README.md index ffb140c3c6..71f7a790cc 100644 --- a/GridKit/Model/EMT/Component/Line/LineLumped/README.md +++ b/GridKit/Model/EMT/Component/Line/LineLumped/README.md @@ -42,7 +42,7 @@ K &\in \mathbb{Z}_{>0} \\ \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters ```math P_{\phi,nk} = diff --git a/GridKit/Model/EMT/Component/Load/LoadZ/README.md b/GridKit/Model/EMT/Component/Load/LoadZ/README.md index 0b2c3fdde0..415eebab50 100644 --- a/GridKit/Model/EMT/Component/Load/LoadZ/README.md +++ b/GridKit/Model/EMT/Component/Load/LoadZ/README.md @@ -21,7 +21,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer N \in \mathbb{Z}_{>0} ``` -### Derived Parameters +### Model Derived Parameters None. diff --git a/GridKit/Model/EMT/Component/Source/VoltageSource/README.md b/GridKit/Model/EMT/Component/Source/VoltageSource/README.md index e52b42513b..6fa45ec3d9 100644 --- a/GridKit/Model/EMT/Component/Source/VoltageSource/README.md +++ b/GridKit/Model/EMT/Component/Source/VoltageSource/README.md @@ -29,7 +29,7 @@ N &\in \mathbb{Z}_{>0} \\ \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters Define the phase-index set diff --git a/GridKit/Model/EMT/Component/Switch/README.md b/GridKit/Model/EMT/Component/Switch/README.md index 58c9ec049b..52a67349e5 100644 --- a/GridKit/Model/EMT/Component/Switch/README.md +++ b/GridKit/Model/EMT/Component/Switch/README.md @@ -24,7 +24,7 @@ $N$ | [-] | `N` | Number of phases | Required, positive integer N \in \mathbb{Z}_{>0} ``` -### Derived Parameters +### Model Derived Parameters None. diff --git a/GridKit/Model/EMT/Operators/Rational/StateSpace/README.md b/GridKit/Model/EMT/Operators/Rational/StateSpace/README.md index c166f906e0..3001d9daa1 100644 --- a/GridKit/Model/EMT/Operators/Rational/StateSpace/README.md +++ b/GridKit/Model/EMT/Operators/Rational/StateSpace/README.md @@ -10,7 +10,7 @@ the pole-index set ```math \mathbf{H}(s) \approx \mathbf{D} + s\mathbf{E} - + \mathbf{C}\dfrac{\mathbf{I}}{s\mathbf{I}-\mathbf{P}}\mathbf{B} + + \mathbf{C}(s\mathbf{I}-\mathbf{P})^{-1}\mathbf{B} ``` > [!NOTE] @@ -80,7 +80,7 @@ p_{q+1} &= p_q^{\ast}, \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters ```math \begin{aligned} diff --git a/GridKit/Model/EMT/Operators/Rational/VectorFit/README.md b/GridKit/Model/EMT/Operators/Rational/VectorFit/README.md index 09c5a99448..3f424639ee 100644 --- a/GridKit/Model/EMT/Operators/Rational/VectorFit/README.md +++ b/GridKit/Model/EMT/Operators/Rational/VectorFit/README.md @@ -73,7 +73,7 @@ p_{q+1} &= p_q^{\ast}, \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters ```math \begin{aligned} diff --git a/GridKit/Model/EMT/Operators/Shift/Delay/README.md b/GridKit/Model/EMT/Operators/Shift/Delay/README.md index 6c980a52f1..694dadb9e3 100644 --- a/GridKit/Model/EMT/Operators/Shift/Delay/README.md +++ b/GridKit/Model/EMT/Operators/Shift/Delay/README.md @@ -29,7 +29,7 @@ M &\in \mathbb{Z}_{>0} \\ \end{aligned} ``` -### Derived Parameters +### Model Derived Parameters ```math \tau_{\min} = \min(\boldsymbol{\tau}), @@ -112,7 +112,7 @@ Accepted input history is stored as the knot sequence ```math (t_j,\ \mathbf{u}_j,\ \mathbf{u}'_j), -\qquad 0 = t_0 < t_1 < \cdots < t_n, +\qquad 0 = t_0 < t_1 < \cdots < t_n ``` where $\mathbf{u}_j$ and $\mathbf{u}'_j$ are the input value and derivative at @@ -145,7 +145,7 @@ u(\xi) + \theta(1-\theta)^2\,h_j\,u'_j \\ &\quad + \theta^2(3-2\theta)\,u_{j+1} - - \theta^2(1-\theta)\,h_j\,u'_{j+1}, + - \theta^2(1-\theta)\,h_j\,u'_{j+1} \end{aligned} ``` diff --git a/GridKit/Model/EMT/Operators/Shift/Propagation/README.md b/GridKit/Model/EMT/Operators/Shift/Propagation/README.md index a2a6a7f6e8..78087baf95 100644 --- a/GridKit/Model/EMT/Operators/Shift/Propagation/README.md +++ b/GridKit/Model/EMT/Operators/Shift/Propagation/README.md @@ -11,7 +11,7 @@ delay per mode, and a fitted output factor while preserving the input units. \end{aligned} ``` -With $`\mathbf{G}_\mathrm{in}`$ and $`\mathbf{G}_\mathrm{out}`$ the transfer matrices +With $\mathbf G_\mathrm{in}$ and $\mathbf G_\mathrm{out}$ the transfer matrices of the input and output factors, ```math @@ -37,7 +37,7 @@ $K$ | [-] | `K` | Signal dimension | Required, positive integer K \in \mathbb{Z}_{>0} ``` -### Derived Parameters +### Model Derived Parameters The full modal basis has one mode per channel: diff --git a/GridKit/Model/PhasorDynamics/Branch/README.md b/GridKit/Model/PhasorDynamics/Branch/README.md index a5106957f0..adebd94fdf 100644 --- a/GridKit/Model/PhasorDynamics/Branch/README.md +++ b/GridKit/Model/PhasorDynamics/Branch/README.md @@ -9,7 +9,7 @@ contributions are oriented entering the adjacent buses. - Setting $\tau = 1$ and $\theta = 0$ gives the ordinary symmetric transmission-line $\pi$ model. - The total line shunt $G + jB$ is split equally between the two terminals, - while the magnetizing shunt $`G_\mathrm{mag} + jB_\mathrm{mag}`$ is connected at + while the magnetizing shunt $G_\mathrm{mag} + jB_\mathrm{mag}$ is connected at bus 1; both shunts are added outside the $\mathbf{M}$ transformation. - The branch has no solver-owned variables; it contributes current residuals directly to the connected buses. diff --git a/GridKit/Model/PhasorDynamics/Controller/REECB/README.md b/GridKit/Model/PhasorDynamics/Controller/REECB/README.md index 571362a17a..aada6d629e 100644 --- a/GridKit/Model/PhasorDynamics/Controller/REECB/README.md +++ b/GridKit/Model/PhasorDynamics/Controller/REECB/README.md @@ -250,8 +250,9 @@ Initialization resolves the steady-state quantities in dependency order; all internal derivatives start at zero. Initialize the component-base commands: $I_p\leftarrow k_\mathrm{base}I_p^\mathrm{cmd}$ and $I_q\leftarrow k_\mathrm{base}I_q^\mathrm{cmd}$. -REECB's `iclamp` helper inverts the CommonMath [clamp](../../../../CommonMath.md#clamp) -during initialization. At a bound, REECB uses an outward offset +REECB's `iclamp` helper inverts the smooth CommonMath +[clamp](../../../../CommonMath.md#clamp) during initialization. +At a bound, REECB uses an outward offset $\delta=-\ln(\text{expm1}(\mu\epsilon_\mathrm{init}/2))/\mu$ to keep the clamp error within $\epsilon_\mathrm{init}$; collapsed bounds return the bound. @@ -290,6 +291,8 @@ operating point is rejected if no finite solution exists or the reactive-current injection is incompatible. Q, V, and P limits are expanded as needed; each adjustment logs a warning. This matches PowerWorld's default `Modify Limits and Run` treatment of initial limit violations. +This preserves the supplied operating point for steady-state initialization; +subsequent simulation uses the adjusted limits. ```math \begin{aligned} @@ -376,7 +379,7 @@ For $\ell<0 Branch diff --git a/docs/GridKit/Model/README.md b/docs/GridKit/Model/README.md index d725e4a3a0..91f567fb3e 100644 --- a/docs/GridKit/Model/README.md +++ b/docs/GridKit/Model/README.md @@ -1,9 +1,11 @@ # Models +Browse models by family, or see the shared mathematical functions. + ```{toctree} -:maxdepth: 4 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index CommonMath <../CommonMath> EMT diff --git a/docs/_static/css/gridkit.css b/docs/_static/css/gridkit.css index 1e539a368a..435384420c 100644 --- a/docs/_static/css/gridkit.css +++ b/docs/_static/css/gridkit.css @@ -4,3 +4,9 @@ background: #fff; padding: 0.5rem; } + +.gk-index > ul { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); + gap: 0.4rem 1.5rem; +} diff --git a/docs/api.md b/docs/api.md index 4e4284860a..091eaca013 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3,7 +3,7 @@ ```{toctree} :maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index GridKit Core Solvers diff --git a/docs/application/README.md b/docs/application/README.md index b7faa35c04..ec457bf6c5 100644 --- a/docs/application/README.md +++ b/docs/application/README.md @@ -1,9 +1,9 @@ # Applications ```{toctree} -:maxdepth: 3 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index Phasor Dynamics ``` diff --git a/docs/development/README.md b/docs/development/README.md index e6c32e2664..8272efb10c 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -1,9 +1,9 @@ # Development ```{toctree} -:maxdepth: 2 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index Contributing Buildsystem diff --git a/docs/examples/PhasorDynamics/Validation/Toy/README.md b/docs/examples/PhasorDynamics/Validation/Toy/README.md index 98e33ac2b2..2652efa945 100644 --- a/docs/examples/PhasorDynamics/Validation/Toy/README.md +++ b/docs/examples/PhasorDynamics/Validation/Toy/README.md @@ -1,9 +1,9 @@ # Toy ```{toctree} -:maxdepth: 4 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index TwoBusBasic TwoBusTgov1 diff --git a/docs/examples/PowerElectronics/README.md b/docs/examples/PowerElectronics/README.md index 2658685a96..4b39f61d7f 100644 --- a/docs/examples/PowerElectronics/README.md +++ b/docs/examples/PowerElectronics/README.md @@ -1,9 +1,9 @@ # PowerElectronics ```{toctree} -:maxdepth: 4 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index Microgrid ScaleMicrogrid diff --git a/docs/examples/PowerFlow/README.md b/docs/examples/PowerFlow/README.md index a09011b8f8..71e820ec65 100644 --- a/docs/examples/PowerFlow/README.md +++ b/docs/examples/PowerFlow/README.md @@ -1,9 +1,9 @@ # PowerFlow ```{toctree} -:maxdepth: 4 +:maxdepth: 1 :titlesonly: -:hidden: +:class: gk-index Grid3Bus ```