HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Upwinding function for the 3-bus power system model. More...
#include <stdlib.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <physicalmodels/fppowersystem3bus.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
int | FPPowerSystem3BusDriftFunction (int, void *, double *, double, double *) |
int | FPPowerSystem3BusUpwind (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t) |
Upwinding function for the 3-bus power system model.
Definition in file FPPowerSystem3BusUpwind.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 FPPowerSystem3BusUpwind | ( | double * | fI, |
double * | fL, | ||
double * | fR, | ||
double * | uL, | ||
double * | uR, | ||
double * | u, | ||
int | dir, | ||
void * | s, | ||
double | t | ||
) |
Compute the upwind flux at the interface, based on the drift velocity at that interface, from the left and right biased approximations to the interface flux. The drift (advection) velocity is multiplied to the solution in this function to get the advective flux.
fI | Computed upwind interface flux |
fL | Left-biased reconstructed interface flux |
fR | Right-biased reconstructed interface flux |
uL | Left-biased reconstructed interface solution |
uR | Right-biased reconstructed interface solution |
u | Cell-centered solution |
dir | Spatial dimension (x or y) |
s | Solver object of type HyPar |
t | Current solution time |
Definition at line 18 of file FPPowerSystem3BusUpwind.c.