proteus
1.8.1
C/C++/Fortran libraries
|
A C library of analytical solutions to differential equations for use in verification. More...
Macros | |
#define | max(a, b) (((a)>(b))?(a):(b)) |
Functions | |
int | diffusionSin1D (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Sinusoidal 1D diffusion. More... | |
int | diffusionSin2D (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Sinusoidal 2D diffusion. More... | |
int | diffusionSin3D (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Sinusoidal 3D diffusion. More... | |
int | diffusionSin1D_r (int *iwork, double *rwork, int nPoints, double t, double *x, double *u, double *r) |
Sinusoidal 1D diffusion (reaction) More... | |
int | diffusionSin2D_r (int *iwork, double *rwork, int nPoints, double t, double *x, double *u, double *r) |
Sinusoidal 2D diffusion (reaction) More... | |
int | diffusionSin3D_r (int *iwork, double *rwork, int nPoints, double t, double *x, double *u, double *r) |
Sinusoidal 3D diffusion (reaction) More... | |
int | LinearAD_DiracIC (int *iwork, double *rwork, int nPoints, double T, double *x, double *u) |
Linear Advective Diffusion Dirac Initial Condition. More... | |
int | LinearAD_DiracIC_advectiveVelocity (int *iwork, double *rwork, int nPoints, double T, double *x, double *f) |
Linear Advective Diffusion Dirac Initial Condition(advective velocity) More... | |
int | LinearAD_DiracIC_diffusiveVelocity (int *iwork, double *rwork, int nPoints, double T, double *x, double *f) |
Linear Advective Diffusion Dirac Initial Condition(diffusive velocity) More... | |
int | LinearAD_DiracIC_du (int *iwork, double *rwork, int nPoints, double T, double *x, double *f) |
Linear Advective Diffusion Dirac Initial Condition (du) More... | |
int | LinearAD_DiracIC_totalVelocity (int *iwork, double *rwork, int nPoints, double T, double *x, double *f) |
Linear Advective Diffusion Dirac Initial Condition(total velocity) More... | |
int | LinearAD_SteadyState (int *iwork, double *rwork, int nPoints, double t, double *X, double *u) |
Linear Advection-Diffusion Steady State. More... | |
int | LinearADR_Decay_DiracIC (int *iwork, double *rwork, int nPoints, double T, double *x, double *u) |
Linear Avection Diffusion Reaction Decay Dirac Initial Condition. More... | |
int | LinearADR_Decay_DiracIC_dr (int *iwork, double *rwork, int nPoints, double T, double *x, double *u, double *dr) |
Linear Avection Diffusion Reaction Decay Dirac Initial Condition (dr) More... | |
int | LinearADR_Decay_DiracIC_r (int *iwork, double *rwork, int nPoints, double T, double *x, double *u, double *r) |
Linear Avection Diffusion Reaction Decay Dirac Initial Condition (reaction) More... | |
int | LinearADR_Sine (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Linear Avection Diffusion Reaction Sine function. More... | |
int | LinearADR_Sine_advectiveVelocity (int *iwork, double *rwork, int nPoints, double t, double *x, double *f) |
Linear Avection Diffusion Reaction Sine function (advective velocity) More... | |
int | LinearADR_Sine_diffusiveVelocity (int *iwork, double *rwork, int nPoints, double t, double *x, double *f) |
Linear Avection Diffusion Reaction Sine function (diffusive velocity) More... | |
int | LinearADR_Sine_dr (int *iwork, double *rwork, int nPoints, double t, double *x, double *u, double *dr) |
Linear Avection Diffusion Reaction Sine function (dr) More... | |
int | LinearADR_Sine_du (int *iwork, double *rwork, int nPoints, double t, double *x, double *f) |
Linear Avection Diffusion Reaction Sine function (du) More... | |
int | LinearADR_Sine_r (int *iwork, double *rwork, int nPoints, double t, double *x, double *u, double *r) |
Linear Avection Diffusion Reaction Sine function (reaction) More... | |
int | LinearADR_Sine_totalVelocity (int *iwork, double *rwork, int nPoints, double t, double *x, double *f) |
Linear Avection Diffusion Reaction Sine function (total velocity) More... | |
int | NonlinearAD_SteadyState (int *iwork, double *rwork, int nPoints, double t, double *X, double *u) |
Nonlinear Advection-Diffusion Steady State. More... | |
int | NonlinearADR_Decay_DiracIC (int *iwork, double *rwork, int nPoints, double T, double *x, double *u) |
Non Linear Avection Diffusion Reaction Decay Dirac Initial Condition. More... | |
int | NonlinearADR_Decay_DiracIC_dr (int *iwork, double *rwork, int nPoints, double T, double *x, double *u, double *dr) |
Non Linear Avection Diffusion Reaction Decay Dirac Initial Condition (dr) More... | |
int | NonlinearADR_Decay_DiracIC_r (int *iwork, double *rwork, int nPoints, double T, double *x, double *u, double *r) |
Non Linear Avection Diffusion Reaction Decay Dirac Initial Condition (reaction) More... | |
int | NonlinearDAE (int *iwork, double *rwork, int nPoints, double T, double *x, double *u) |
Nonlinear Differential-algebraic equations. More... | |
int | NonlinearDAE_f (int *iwork, double *rwork, int nPoints, double t, double *x, double *f) |
Nonlinear Differential-algebraic equations. More... | |
int | PlanePoiseuilleFlow_u (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Poiseuille Flow between two parallel fixed plates with constant seperation (width). More... | |
int | PoiseuillePipeFlow (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Poiseuille Flow through a circular pipe. More... | |
int | PoiseuillePipeFlow_P (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Poiseuille Flow through a circular pipe. More... | |
int | poissonsEquationExp1D (int *iwork, double *rwork, int nPoints, double t, double *X, double *u) |
Poisson Exponential Equation 1D. More... | |
int | poissonsEquationExp2D (int *iwork, double *rwork, int nPoints, double t, double *X, double *u) |
Poisson Exponential Equation 2D. More... | |
int | poissonsEquationExp3D (int *iwork, double *rwork, int nPoints, double t, double *X, double *u) |
Poisson Exponential Equation 3D. More... | |
int | poissonsEquationExp3D_dr (int *iwork, double *rwork, int nPoints, double t, double *X, double *u, double *dr) |
Poisson Exponential Equation 3D (dr) More... | |
int | poissonsEquationExp1D_r (int *iwork, double *rwork, int nPoints, double t, double *X, double *u, double *r) |
Poisson Exponential Equation 1D (reaction) More... | |
int | poissonsEquationExp2D_r (int *iwork, double *rwork, int nPoints, double t, double *X, double *u, double *r) |
Poisson Exponential Equation 2D (reaction) More... | |
int | poissonsEquationExp3D_r (int *iwork, double *rwork, int nPoints, double t, double *X, double *u, double *r) |
Poisson Exponential Equation 3D (reaction) More... | |
int | STflowSphere_P (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Stokes Flow around moving Sphere. More... | |
int | STflowSphere_Vx (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Stokes Flow around moving Sphere. More... | |
int | STflowSphere_Vy (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Stokes Flow around moving Sphere. More... | |
int | STflowSphere_Vz (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Stokes Flow around moving Sphere. More... | |
void | coords (double vx, double vy, double vz, double xS, double yS, double zS, double *x, double *r, double *theta, double *norm_v, double *eR, double *eTHETA) |
void | vel (double rS, double norm_v, double r, double theta, double *vR, double *vTHETA) |
double | uOfX_df (double nlC, double lu) |
double | uOfX_f (double a, double b, double nlC, double nlD, double x, double lu) |
double | f (double C, double b, double a, int q, int r) |
double | df (double C, double b, double a, int q, int r) |
int | PlaneCouetteFlow_u (int *iwork, double *rwork, int nPoints, double t, double *x, double *u) |
Couette Flow between two parallel plates. One moving relative to the other with constant seperation (width). More... | |
#define max | ( | a, | |
b | |||
) | (((a)>(b))?(a):(b)) |
Definition at line 14 of file analyticalSolutions.h.
void coords | ( | double | vx, |
double | vy, | ||
double | vz, | ||
double | xS, | ||
double | yS, | ||
double | zS, | ||
double * | x, | ||
double * | r, | ||
double * | theta, | ||
double * | norm_v, | ||
double * | eR, | ||
double * | eTHETA | ||
) |
Definition at line 2093 of file analyticalSolutions.c.
double df | ( | double | C, |
double | b, | ||
double | a, | ||
int | q, | ||
int | r | ||
) |
Definition at line 2209 of file analyticalSolutions.c.
int diffusionSin1D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork[0] | angular frequency, \( \omega_x \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ -\Delta u = f \]
\[ f = -(2 \pi \omega_x)^2 \sin(2 \pi \omega_x x) \]
Definition at line 84 of file analyticalSolutions.c.
int diffusionSin1D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork[0] | x-component angular frequency, \( \omega_x \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[ -\Delta u = -r \]
\[ r = (2 \pi \omega_x)^2 \sin(2 \pi \omega_x x) \]
Definition at line 172 of file analyticalSolutions.c.
int diffusionSin2D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork[0] | x-component angular frequency, \( \omega_x \) |
iwork[1] | y-component angular frequency, \( \omega_y \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ -\Delta u = f \]
\[ f = -(2\pi\omega_x)^2\sin(2 \pi \omega_x x) -(2 \pi \omega_y)^2\sin(2 \pi \omega_y y)\]
Definition at line 111 of file analyticalSolutions.c.
int diffusionSin2D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork[0] | x-component angular frequency, \( omega_x \) |
iwork[1] | y-component angular frequency, \( omega_y \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[-\Delta u = -r \]
\[r= (2\pi\omega_x)^2\sin(2 \pi \omega_x x)+(2 \pi \omega_y)^2\sin(2 \pi \omega_y y)\]
Definition at line 200 of file analyticalSolutions.c.
int diffusionSin3D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork[0] | x-component angular frequency, \( \omega_x \) |
iwork[1] | y-component angular frequency, \( \omega_y \) |
iwork[2] | z-component angular frequency, \( \omega_z \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ -\Delta u = f \]
\[ f = -(2\pi\omega_x)^2\sin(2\pi\omega_x x) -(2\pi\omega_y)^2\sin(2\pi\omega_y y)-(2\pi\omega_z)^2sin(2 \pi \omega_z z)\]
Definition at line 141 of file analyticalSolutions.c.
int diffusionSin3D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork[0] | x-component angular frequency, \( omega_x \) |
iwork[1] | y-component angular frequency, \( omega_y \) |
iwork[2] | z-component angular frequency, \( omega_z \) |
rwork | NOT USED |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[-\Delta u = -r \]
\[r=(2\pi\omega_x)^2\sin(2\pi\omega_x x) +(2\pi\omega_y)^2\sin(2\pi\omega_y y)+(2\pi\omega_z)^2sin(2 \pi \omega_z z)\]
Definition at line 231 of file analyticalSolutions.c.
double f | ( | double | C, |
double | b, | ||
double | a, | ||
int | q, | ||
int | r | ||
) |
Definition at line 2185 of file analyticalSolutions.c.
int LinearAD_DiracIC | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
The exact solution of
\[ u_t + \nabla \cdot (b u - a \nabla u) = 0\]
on an infinite domain with dirac initial data
\[u_0 = \int u_0 \delta(x - x_0)\]
also returns advective, diffusive, and total flux
Definition at line 273 of file analyticalSolutions.c.
int LinearAD_DiracIC_advectiveVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array, vector |
The exact solution of
\[ u_t + \nabla \cdot (b u - a \nabla u) = 0\]
on an infinite domain with dirac initial data
\[u_0 = \int u_0 \delta(x - x_0)\]
Definition at line 337 of file analyticalSolutions.c.
int LinearAD_DiracIC_diffusiveVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array, vector |
The exact solution of
\[ u_t + \nabla \cdot (b u - a \nabla u) = 0\]
on an infinite domain with dirac initial data
\[u_0 = \int u_0 \delta(x - x_0)\]
Definition at line 381 of file analyticalSolutions.c.
int LinearAD_DiracIC_du | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array, vector |
The exact solution of
\[ u_t + \nabla \cdot (b u - a \nabla u) = 0\]
on an infinite domain with dirac initial data
\[u_0 = \int u_0 \delta(x - x_0)\]
also returns advective, diffusive, and total flux
Definition at line 423 of file analyticalSolutions.c.
int LinearAD_DiracIC_totalVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array, vector |
The exact solution of
\[ u_t + \nabla \cdot (b u - a \nabla u) = 0\]
on an infinite domain with dirac initial data
\[u_0 = \int u_0 \delta(x - x_0)\]
Definition at line 471 of file analyticalSolutions.c.
int LinearAD_SteadyState | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( b \) |
rwork[1] | \( a \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[(bu - au_x)_x = 0\]
\[ u(0) = 1\]
\[ u(1) = 0\]
Definition at line 508 of file analyticalSolutions.c.
int LinearADR_Decay_DiracIC | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
The exact solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 566 of file analyticalSolutions.c.
int LinearADR_Decay_DiracIC_dr | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u, | ||
double * | dr | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
dr | output array |
The exact solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 613 of file analyticalSolutions.c.
int LinearADR_Decay_DiracIC_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
r | output array |
The exact solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 652 of file analyticalSolutions.c.
int LinearADR_Sine | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
also returns the advective, diffusive, and total velocity at a point.
Definition at line 691 of file analyticalSolutions.c.
int LinearADR_Sine_advectiveVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
rwork[4:6] | \( b[0:2] \) |
rwork[7:15] | \( a[0:3,0:3] \) |
rwork[16] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array (vector) |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
returns the advective velocity at a point.
Definition at line 749 of file analyticalSolutions.c.
int LinearADR_Sine_diffusiveVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
rwork[4:6] | \( b[0:2] \) |
rwork[7:15] | \( a[0:3,0:3] \) |
rwork[16] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array (vector) |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
returns the diffusive velocity at a point.
Definition at line 802 of file analyticalSolutions.c.
int LinearADR_Sine_dr | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u, | ||
double * | dr | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
rwork[4:6] | \( b[0:2] \) |
rwork[7:15] | \( a[0:3,0:3] \) |
rwork[16] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
dr | output array |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin[\vec \omega \cdot \vec x + \omega_0) ] = sin(Ax - b) \f \f[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
also returns the advective, diffusive, and total velocity at a point.
Definition at line 851 of file analyticalSolutions.c.
int LinearADR_Sine_du | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array (vector) |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
also returns the advective, diffusive, and total velocity at a point.
Definition at line 890 of file analyticalSolutions.c.
int LinearADR_Sine_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
rwork[4:6] | \( b[0:2] \) |
rwork[7:15] | \( a[0:3,0:3] \) |
rwork[16] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
r | output array |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
also returns the advective, diffusive, and total velocity at a point.
Definition at line 938 of file analyticalSolutions.c.
int LinearADR_Sine_totalVelocity | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0:2] | \( \omega[0:2] \) |
rwork[3] | \( \omega_0 \) |
rwork[4:6] | \( b[0:2] \) |
rwork[7:15] | \( a[0:3,0:3] \) |
rwork[16] | \( c \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
f | output array (vector) |
An exact solution and source term for
\[ \nabla \cdot (\vec b u - \ddot a \nabla u) + c u + d = 0 \]
where
\[ u(x) = sin(\vec \omega \cdot \vec x + \omega_0) = sin(Ax - b)\]
\[r(u,x) = - ((\ddot a \vec \omega) \cdot \vec \omega) u - (\vec b \cdot \vec \omega) cos(Ax - b)\]
\[ = c u + D cos(Ax - b) \]
\[ = cu + d \]
returns the total velocity at a point.
Definition at line 997 of file analyticalSolutions.c.
int NonlinearAD_SteadyState | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( q \) |
rwork[1] | \( r \) |
rwork[2] | \( b \) |
rwork[3] | \( a \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[(bu^q - a(u^r)_x)_x = 0\]
\[ u(0) = 1\]
\[ u(1) = 0\]
Definition at line 1036 of file analyticalSolutions.c.
int NonlinearADR_Decay_DiracIC | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
rwork[11] | \( d \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
dr | output array |
The approximate analytical solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu^d= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 1164 of file analyticalSolutions.c.
int NonlinearADR_Decay_DiracIC_dr | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u, | ||
double * | dr | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
rwork[11] | \( d \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
dr | output array |
The approximate analytical solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu^d= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 1216 of file analyticalSolutions.c.
int NonlinearADR_Decay_DiracIC_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0:2] | \( b[0:2] \) |
rwork[3] | \( n \) |
rwork[4] | \( a \) |
rwork[5] | \( tStart \) |
rwork[6] | \( u_0 \) |
rwork[7:9] | \( x_0[0:2] \) |
rwork[10] | \( c \) |
rwork[11] | \( d \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
r | output array |
The approximate analytical solution of
\f[ u_t + \nabla \cdot(bu - a \nabla u) + cu^d= 0 \f] on an infinite domain with Dirac initial data. Also returns the fluxes (by inheritance).
Definition at line 1257 of file analyticalSolutions.c.
int NonlinearDAE | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | T, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( a \) |
rwork[1] | \( p \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[u_t = - a*max(u,0)^p\]
\[u(0) = 1\]
Definition at line 1287 of file analyticalSolutions.c.
int NonlinearDAE_f | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | f | ||
) |
iwork | NOT USED |
rwork[0] | \( a \) |
rwork[1] | \( p \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
f | output array, vector |
\[u_t = - a*max(u,0)^p\]
\[u(0) = 1\]
Definition at line 1330 of file analyticalSolutions.c.
int PlaneCouetteFlow_u | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | velocity of moving plate in the x-dir, \( vx \) |
rwork[1] | width between plates, \( h \) |
rwork[2] | x-axis offset, \( xs \) |
rwork[3] | y-axis offset, \( ys \) |
rwork[4] | z-axis offset, \( zs \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
x-momentum equation
\[ \nabla^2 u_x = 0 \]
\[ u(y) = \frac{vx}{h} * y\]
\[ u(0) = 0 \]
\[ u(h) = vx \]
Axis of origin: at bottom plate
Definition at line 36 of file analyticalSolutions.c.
int PlanePoiseuilleFlow_u | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | width between the plates, \( h \) |
rwork[1] | viscosity of fluid, \( \mu \) |
rwork[2] | the pressure gradient, \( \nabla p \) (neg) |
rwork[3] | the rate of flow per unit width, \( q \) |
rwork[4] | x-axis offset, \( xs \) |
rwork[5] | y-axis offset, \( ys \) |
rwork[6] | z-axis offset, \( zs \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
x-momentum equation
\[ (\nabla p + \mu \nabla^2 u)_x = 0 \]
\[ u(y) = 4 u_{max} y (\frac{h-y}{h^2}) \]
\[ u(0) = u(h) = 0 \]
\[ u(h/2) = u_{max} \]
\[u_{max} = \frac{-\nabla p}{8 \mu} h^2 = \frac{3}{2} \frac{q}{h} \]
\( u_{max} \) = maximum velocity at the centerline
Axis of origin: at bottom plate
Definition at line 1380 of file analyticalSolutions.c.
int PoiseuillePipeFlow | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | radius of pipe, \( R \) |
rwork[1] | viscosity of fluid, \( \mu \) |
rwork[2] | the pressure gradient, \( \nabla p \) (neg) |
rwork[3] | the rate of flow, \( Q \) |
rwork[4] | x-axis offset, \( xs \) |
rwork[5] | y-axis offset, \( ys \) |
rwork[6] | z-axis offset, \( zs \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
x-momentum equation
\[ (\nabla p + \mu \nabla^2 u)_x = 0 \]
\[ u(r) = u_{max} (1 - \frac{r^2}{R^2}) \]
\[ u(0) = u_{max} \]
\[ u(R) = 0 \]
\[ u_{max} = -\nabla p \frac{R^2}{4 \mu}= \frac{2Q}{\pi R^2}\]
\( u_{max} \) = maximum velocity at the centerline
Axis of origin: at center of pipe
Definition at line 1466 of file analyticalSolutions.c.
int PoiseuillePipeFlow_P | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | radius of pipe, \( R \) |
rwork[1] | viscosity of fluid, \( \mu \) |
rwork[2] | the pressure gradient, \( \nabla p \) (neg) |
rwork[3] | the rate of flow, \( Q \) |
rwork[3] | the length of pipe, \( L \) |
rwork[4] | x-axis offset, \( xs \) |
rwork[5] | y-axis offset, \( ys \) |
rwork[6] | z-axis offset, \( zs \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ p - p_0 = -\nabla p L(1-x)\]
\( p_0 =p(L)\) = 0, the atmospheric pressure at the outflow
Axis of origin: at center of pipe
Definition at line 1554 of file analyticalSolutions.c.
int poissonsEquationExp1D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1620 of file analyticalSolutions.c.
int poissonsEquationExp1D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1754 of file analyticalSolutions.c.
int poissonsEquationExp2D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1659 of file analyticalSolutions.c.
int poissonsEquationExp2D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1787 of file analyticalSolutions.c.
int poissonsEquationExp3D | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1690 of file analyticalSolutions.c.
int poissonsEquationExp3D_dr | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u, | ||
double * | dr | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
dr | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1724 of file analyticalSolutions.c.
int poissonsEquationExp3D_r | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | X, | ||
double * | u, | ||
double * | r | ||
) |
iwork | NOT USED |
rwork[0] | \( K \) |
nPoints | total number of points |
t | NOT USED |
x | input array |
u | NOT USED |
r | output array |
\[-u_{xx} - f = 0\]
\[u = K x(1-x)y(1-y)z(1-z)e^{x^2 + y^2 + z^2}\]
\[f = -K \{[y(1-y)z(1-z)][4x^3 - 4x^2 + 6x - 2]+ [x(1-x)z(1-z)][4y^3 - 4y^2 + 6y - 2]+ [x(1-x)y(1-y)][4z^3 - 4z^2 + 6z - 2]\}e^{x^2 + y^2 + z^2}\]
Definition at line 1822 of file analyticalSolutions.c.
int STflowSphere_P | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | Sphere's x-component of velocity, \( vx \) |
rwork[1] | Sphere's y-component of velocity, \( vy \) |
rwork[2] | Sphere's z-component of velocity, \( vz \) |
rwork[3] | Sphere's radius, \( rs \) |
rwork[4] | Sphere's center x-component, \( xs \) |
rwork[5] | Sphere's center y-component, \( ys \) |
rwork[6] | Sphere's center z-component, \( zs \) |
rwork[7] | viscosity of fluid, \( mu \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ \nabla p = \mu \nabla^2 u \]
\[ p = \frac{(-3 * rs * \mu \| \vec v\| cos\theta)}{2r^2}\]
Definition at line 1864 of file analyticalSolutions.c.
int STflowSphere_Vx | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
rwork[0] | Sphere's x-component of velocity, \( vx \) |
rwork[1] | Sphere's y-component of velocity, \( vy \) |
rwork[2] | Sphere's z-component of velocity, \( vz \) |
rwork[3] | Sphere's radius, \( rs \) |
rwork[4] | Sphere's center x-component, \( xs \) |
rwork[5] | Sphere's center y-component, \( ys \) |
rwork[6] | Sphere's center z-component, \( zs \) |
rwork[7] | viscosity of fluid, \( mu \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ \nabla p = \mu \nabla^2 u \]
\[ v^r = \|\vec v \| cos\theta(1-\frac{3rs}{2r} + \frac{rs^3}{2r^3})\]
\[ v^\theta = -\|\vec v \| sin\theta(1-\frac{3rs}{4r} - \frac{rs^3}{4r^3})\]
\[v^r(r>rs) = 0\]
\[v^\theta(r>rs) = 0\]
\[e^R = \frac{\vec x}{\|\vec x \|} ; \{ x_x = x - xs;x_y = y-ys; x_z = z-zs\} \]
\[e^\theta = (e^R - \frac{\vec v}{\|\vec v \|}) - [(e^R - \frac{\vec v}{\|\vec v \|}) \cdot e^R]e^R\]
\[u_x = v^r e^R_x + v^\theta e^\theta_x \]
Definition at line 1929 of file analyticalSolutions.c.
int STflowSphere_Vy | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | Sphere's x-component of velocity, \( vx \) |
rwork[1] | Sphere's y-component of velocity, \( vy \) |
rwork[2] | Sphere's z-component of velocity, \( vz \) |
rwork[3] | Sphere's radius, \( rs \) |
rwork[4] | Sphere's center x-component, \( xs \) |
rwork[5] | Sphere's center y-component, \( ys \) |
rwork[6] | Sphere's center z-component, \( zs \) |
rwork[7] | viscosity of fluid, \( mu \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ \nabla p = \mu \nabla^2 u \]
\[ v^r = \|\vec v \| cos\theta(1-\frac{3rs}{2r} + \frac{rs^3}{2r^3})\]
\[ v^\theta = -\|\vec v \| sin\theta(1-\frac{3rs}{4r} - \frac{rs^3}{4r^3})\]
\[v^r(r>rs) = 0\]
\[v^\theta(r>rs) = 0\]
\[e^R = \frac{\vec x}{\|\vec x \|} ; \{ x_x = x - xs;x_y = y-ys; x_z = z-zs\} \]
\[e^\theta = (e^R - \frac{\vec v}{\|\vec v \|}) - [(e^R - \frac{\vec v}{\|\vec v \|}) \cdot e^R]e^R\]
\[u_y = v^r e^R_y + v^\theta e^\theta_y \]
Definition at line 1992 of file analyticalSolutions.c.
int STflowSphere_Vz | ( | int * | iwork, |
double * | rwork, | ||
int | nPoints, | ||
double | t, | ||
double * | x, | ||
double * | u | ||
) |
iwork | NOT USED |
rwork[0] | Sphere's x-component of velocity, \( vx \) |
rwork[1] | Sphere's y-component of velocity, \( vy \) |
rwork[2] | Sphere's z-component of velocity, \( vz \) |
rwork[3] | Sphere's radius, \( rs \) |
rwork[4] | Sphere's center x-component, \( xs \) |
rwork[5] | Sphere's center y-component, \( ys \) |
rwork[6] | Sphere's center z-component, \( zs \) |
rwork[7] | viscosity of fluid, \( mu \) |
nPoints | - total number of points |
t | NOT USED |
x | input array |
u | output array |
\[ \nabla p = \mu \nabla^2 u \]
\[ v^r = \|\vec v \| cos\theta(1-\frac{3rs}{2r} + \frac{rs^3}{2r^3})\]
\[ v^\theta = -\|\vec v \| sin\theta(1-\frac{3rs}{4r} - \frac{rs^3}{4r^3})\]
\[v^r(r>rs) = 0\]
\[v^\theta(r>rs) = 0\]
\[e^R = \frac{\vec x}{\|\vec x \|} ; \{ x_x = x - xs;x_y = y-ys; x_z = z-zs\} \]
\[e^\theta = (e^R - \frac{\vec v}{\|\vec v \|}) - [(e^R - \frac{\vec v}{\|\vec v \|}) \cdot e^R]e^R\]
\[u_z = v^r e^R_z + v^\theta e^\theta_z \]
Definition at line 2055 of file analyticalSolutions.c.
double uOfX_df | ( | double | nlC, |
double | lu | ||
) |
Definition at line 2177 of file analyticalSolutions.c.
double uOfX_f | ( | double | a, |
double | b, | ||
double | nlC, | ||
double | nlD, | ||
double | x, | ||
double | lu | ||
) |
Definition at line 2181 of file analyticalSolutions.c.
void vel | ( | double | rS, |
double | norm_v, | ||
double | r, | ||
double | theta, | ||
double * | vR, | ||
double * | vTHETA | ||
) |
Definition at line 2163 of file analyticalSolutions.c.