|
Ember
|
System representing diffusion of a single solution component. More...
#include <diffusionSystem.h>
Public Member Functions | |
| DiffusionSystem () | |
| void | get_A (dvec &a, dvec &b, dvec &c) |
| Build the matrix A describing the linear ODE. | |
| void | get_k (dvec &k) |
| Provides the constant term k to the integrator. | |
| void | resize (size_t N) |
| Set the number of points in the domain. | |
| void | resetSplitConstants () |
| Set the splitting constant C to zero. | |
Public Member Functions inherited from TridiagonalODE | |
| TridiagonalODE () | |
| virtual | ~TridiagonalODE () |
| virtual void | initialize () |
Public Member Functions inherited from GridBased | |
| GridBased () | |
| virtual | ~GridBased () |
| virtual void | setGrid (const OneDimGrid &grid) |
| Copy the specified grid to this object. | |
Public Attributes | |
| dvec | B |
| scaling factor for the spatial derivative | |
| dvec | D |
| diffusion coefficient or equivalent | |
| dvec | splitConst |
| Balancing constant introduced by the splitting method. | |
| size_t | N |
| Number of points in the region to be solved. | |
| double | yInf |
| reference value for wall flux boundary condition | |
| double | wallConst |
| wall flux proportionality constant | |
Public Attributes inherited from GridBased | |
| OneDimGrid | grid |
| the actual grid | |
Private Attributes | |
| dvec | c1 |
| dvec | c2 |
Additional Inherited Members | |
Protected Attributes inherited from GridBased | |
| dvec & | x |
| The coordinates of the grid points [m]. | |
| dvec & | r |
| "radius" at x[j]. | |
| dvec & | rphalf |
| "radius" at x[j+1/2]. | |
| dvec & | hh |
| Grid spacing between x[j] and x[j+1]. | |
| dvec & | dlj |
| Average of left and right grid spacing. | |
| dvec & | cfm |
| Coefficient for y[j-1] in first centered difference. | |
| dvec & | cf |
| Coefficient for y[j] in first centered difference. | |
| dvec & | cfp |
| Coefficient for y[j+1] in first centered difference. | |
| int & | alpha |
| curved grid exponent. | |
| int & | beta |
| curved grid exponent. | |
| size_t & | nPoints |
| number of grid point | |
| size_t & | jj |
index of last grid point (== nPoints-1) | |
System representing diffusion of a single solution component.
Represents an ODE in one of the following forms:
\[ \dot{y} = B \frac{d}{dx}\left(D \frac{dy}{dx}\right) + C \]
\[ \dot{y} = \frac{B}{r} \frac{d}{dr}\left(r D \frac{dy}{dr}\right) + C \]
The ODE in this form may be written as a linear system:
\[ \dot{y} = Ay + k \]
where the entries of the matrix A are determined by the prefactor B, the diffusion coefficients D, the boundary conditions and the finite difference formulas used.
| DiffusionSystem::DiffusionSystem | ( | ) |
Build the matrix A describing the linear ODE.
a[j], b[j], and c[j] are respectivley the subdiagonal, diagonal, and superdiagonal elements of row j.
Implements TridiagonalODE.
|
virtual |
Provides the constant term k to the integrator.
Implements TridiagonalODE.
|
virtual |
Set the number of points in the domain.
Reimplemented from TridiagonalODE.
| void DiffusionSystem::resetSplitConstants | ( | ) |
Set the splitting constant C to zero.
| dvec DiffusionSystem::B |
scaling factor for the spatial derivative
| dvec DiffusionSystem::D |
diffusion coefficient or equivalent
| dvec DiffusionSystem::splitConst |
Balancing constant introduced by the splitting method.
| size_t DiffusionSystem::N |
Number of points in the region to be solved.
| double DiffusionSystem::yInf |
reference value for wall flux boundary condition
| double DiffusionSystem::wallConst |
wall flux proportionality constant
|
private |
|
private |