Ember
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
DiffusionSystem Class Reference

System representing diffusion of a single solution component. More...

#include <diffusionSystem.h>

Inheritance diagram for DiffusionSystem:
[legend]

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 get_A (dvec &a, dvec &b, dvec &c)=0
 Provide the matrix associated with the ODE to the integrator.
 
virtual void get_k (dvec &k)=0
 Provides the constant term k to the integrator.
 
virtual void resize (size_t N)
 Set the number of points in the domain.
 
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
dvecx
 The coordinates of the grid points [m].
 
dvecr
 "radius" at x[j].
 
dvecrphalf
 "radius" at x[j+1/2].
 
dvechh
 Grid spacing between x[j] and x[j+1].
 
dvecdlj
 Average of left and right grid spacing.
 
dveccfm
 Coefficient for y[j-1] in first centered difference.
 
dveccf
 Coefficient for y[j] in first centered difference.
 
dveccfp
 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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DiffusionSystem()

DiffusionSystem::DiffusionSystem ( )

Member Function Documentation

◆ get_A()

void DiffusionSystem::get_A ( dvec a,
dvec b,
dvec c 
)
virtual

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.

◆ get_k()

void DiffusionSystem::get_k ( dvec k)
virtual

Provides the constant term k to the integrator.

Implements TridiagonalODE.

◆ resize()

void DiffusionSystem::resize ( size_t  N)
virtual

Set the number of points in the domain.

Reimplemented from TridiagonalODE.

◆ resetSplitConstants()

void DiffusionSystem::resetSplitConstants ( )

Set the splitting constant C to zero.

Member Data Documentation

◆ B

dvec DiffusionSystem::B

scaling factor for the spatial derivative

◆ D

dvec DiffusionSystem::D

diffusion coefficient or equivalent

◆ splitConst

dvec DiffusionSystem::splitConst

Balancing constant introduced by the splitting method.

◆ N

size_t DiffusionSystem::N

Number of points in the region to be solved.

◆ yInf

double DiffusionSystem::yInf

reference value for wall flux boundary condition

◆ wallConst

double DiffusionSystem::wallConst

wall flux proportionality constant

◆ c1

dvec DiffusionSystem::c1
private

◆ c2

dvec DiffusionSystem::c2
private

The documentation for this class was generated from the following files: