HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Miscellaneous functions for the 3-bus power system model. More...
#include <stdio.h>
#include <stdlib.h>
#include <basic.h>
#include <math.h>
#include <arrayfunctions.h>
#include <physicalmodels/fppowersystem3bus.h>
Go to the source code of this file.
Functions | |
static void | ComputeElectricalPower (double theta1, double theta2, void *p, double *Pe1, double *Pe2, double *Pe3) |
int | FPPowerSystem3BusDriftFunction (int dir, void *p, double *x, double t, double *drift) |
int | FPPowerSystem3BusDissipationFunction (int dir1, int dir2, void *p, double t, double *dissp) |
Miscellaneous functions for the 3-bus power system model.
Definition in file FPPowerSystem3BusFunctions.c.
|
static |
Compute the electrical power of each generator, given their phases and other system parameters
theta1 | Phase of generator 1 |
theta2 | Phase of generator 2 |
p | Object of type FPPowerSystem3Bus |
Pe1 | Electrical power of generator 1 |
Pe2 | Electrical power of generator 2 |
Pe3 | Electrical power of generator 3 |
Definition at line 14 of file FPPowerSystem3BusFunctions.c.
int FPPowerSystem3BusDriftFunction | ( | int | dir, |
void * | p, | ||
double * | x, | ||
double | t, | ||
double * | drift | ||
) |
Compute the drift (advection) coefficients for the 3-bus power system
dir | Spatial dimension (not used) |
p | Object of type FPPowerSystem3Bus |
x | Spatial coordinates |
t | Current simulation time |
drift | Array to hold the drift velocities |
Definition at line 76 of file FPPowerSystem3BusFunctions.c.
int FPPowerSystem3BusDissipationFunction | ( | int | dir1, |
int | dir2, | ||
void * | p, | ||
double | t, | ||
double * | dissp | ||
) |
Compute the dissipation coefficient for the 3-bus power system
dir1 | First spatial dimension for the dissipation coefficient |
dir2 | Second spatial dimension for the dissipation coefficient |
p | Object of type FPPowerSystem3Bus |
t | Current simulation time |
dissp | Matrix of size ndims*ndims to hold the dissipation coefficients (row-major format) |
Definition at line 117 of file FPPowerSystem3BusFunctions.c.