MatlabTransportPack
Public Member Functions | Protected Member Functions | Protected Attributes

InnerIteration Class Reference

Solve the within-group transport equation. More...

Inheritance diagram for InnerIteration:
Inheritance graph
[legend]
Collaboration diagram for InnerIteration:
Collaboration graph
[legend]

List of all members.

Public Member Functions

function InnerIteration ()
 Class constructor.
function reset_convergence (in this, in max_iters, in tolerance)
 Solve the within-group problem.
function display_me (in this)

Protected Member Functions

function setup_base (in this, in)
 Setup the base solver.
function initialize_scatter (in this)
 Prebuild scattering matrix for each cell.
function build_scatter_source (in this, in g, in phi)
 Build the within-group scattering source.
function build_all_scatter_source (in this, in g, in phi)
 Build all the scattering sources.
function build_fixed_source (in this, in g)
 Build source for this group excluding within-group scatter.
function build_external_source (in this, in g)
function check_convergence (in this, in iteration, in flux_error)
function print_iteration (in this, in it, in e0, in e1, in e2)

Protected Attributes

Property d_input
 User input.
Property d_state
 State vectors.
Property d_boundary
 Boundary fluxes.
Property d_mesh
 Problem mesh (either Cartesian mesh or MOC tracking)
Property d_mat
 Materials definitions.
Property d_quadrature
 Angular mesh.
Property d_equation
 Spatial discretization.
Property d_sweeper
 Sweeper over the space-angle domain.
Property d_external_source
 User-defined external source.
Property d_fission_source
 Fission source, if used.
Property d_fixed_source
 Any source that remains "fixed" within the group solve.
Property d_scatter_source
 The within group scattering source.
Property d_sigma_s
 Scattering cross-section vector for faster source computation.
Property d_max_iters
Property d_tolerance
Property d_g
Property d_M
 Moments to discrete operator.

Detailed Description

Solve the within-group transport equation.

The within-group transport equation in operator form is

\[ \mathbf{L}\psi = \mathbf{MS}\phi + Q \]

where $ \mathbf{L} $ is the streaming and collision operator, {M} is the moment-to-discrete operator, {S} is the scattering operator, and Q represents any source considered fixed, which includes in-scatter, fission, and external sources.

What we are really after is the scalar flux and possibly its higher order moments. Consequently, we are able to solve a somewhat different problem then the within group transport equation above. Let us operate on both sides by $\mathbf{L}^{-1}$ followed by $ \mathbf{D}$ to get

\[ (\mathbf{I} - \mathbf{D}\mathbf{L}^{-1}\mathbf{MS})\phi = \mathbf{D} \mathbf{L}^{-1} Q \, . \]

Here, $\mathbf{D}$ is the discrete-to-moment operator, defined such that $ \phi = \mathbf{D}\psi $.

Notice this is nothing but a linear system of the form $ \mathbf{A}x = b $ where

\[ \mathbf{A} = (\mathbf{I} - \mathbf{D}\mathbf{L}^{-1}\mathbf{MS}) \]

and

\[ b = \mathbf{D} \mathbf{L}^{-1} Q \, . \]

Moreover, $ b$ is just the uncollided flux.

A nice overview of approaches for this inner iteration is given by Larsen and Morel in Nuclear Computational Science . We have implement the standard source iteration method, Livolant acceleration (an extrapolation technique), and solvers that use MATLAB's own GMRES (and other Krylov solvers).

Input parameters specific to InnerIteration and derived classes:

See also:
SourceIteration, Livolant, GMRESIteration

Constructor & Destructor Documentation

function InnerIteration ( )

Class constructor.

Parameters:
inputInput database.
stateState vectors, etc.
boundaryBoundary fluxes.
meshProblem mesh.
matMaterial definitions.
quadratureAngular mesh..
external_sourceUser-defined external source.
fission_sourceFission source.
Returns:
Instance of the InnerIteration class.

Member Function Documentation

function build_all_scatter_source ( in  this,
in  g,
in  phi 
) [protected]

Build all the scattering sources.

Parameters:
gGroup for this problem. (I.e. row in MG).
phiCurrent MG flux.
function build_external_source ( in  this,
in  g 
) [protected]
function build_fixed_source ( in  this,
in  g 
) [protected]

Build source for this group excluding within-group scatter.

Parameters:
gGroup for this problem.
function build_scatter_source ( in  this,
in  g,
in  phi 
) [protected]

Build the within-group scattering source.

Parameters:
gGroup for this problem.
phiCurrent group flux.
function check_convergence ( in  this,
in  iteration,
in  flux_error 
) [protected]
function display_me ( in  this)
function initialize_scatter ( in  this) [protected]

Prebuild scattering matrix for each cell.

While not the most *memory* efficient, this saves *time* by eliminate lots of loops.

function print_iteration ( in  this,
in  it,
in  e0,
in  e1,
in  e2 
) [protected]
function reset_convergence ( in  this,
in  max_iters,
in  tolerance 
)

Solve the within-group problem.

Parameters:
gGroup of the problem to be solved.
Returns:
Flux residual (L-inf norm) and iteration count. Reset convergence criteria. It can be useful to use a dynamically changing convergence criteria, especially for eigenproblems. For regular power iteration, it is wasteful to use tight tolerances on the inners when the source is not as tightly known.
Parameters:
max_itersMaximum number of iterations.
toleranceMaximum point-wise error in flux
function setup_base ( in  this,
in   
) [protected]

Setup the base solver.

By keeping everything out of the constructor, we can avoid having to copy the signature for all derived classes, both in their definitions and whereever thisects are instantiated. However, derived classes have other setup issues that need to be done, and so this serves as a general setup function that must be called before other setup stuff.

Parameters:
inputInput database.
stateState vectors, etc.
boundaryBoundary fluxes.
meshProblem mesh.
matMaterial definitions.
quadratureAngular mesh..
external_sourceUser-defined external source.
fission_sourceFission source.

Member Data Documentation

Property d_boundary [protected]

Boundary fluxes.

Property d_equation [protected]

Spatial discretization.

Property d_external_source [protected]

User-defined external source.

Property d_fission_source [protected]

Fission source, if used.

Property d_fixed_source [protected]

Any source that remains "fixed" within the group solve.

Property d_g [protected]
Property d_input [protected]

User input.

Property d_M [protected]

Moments to discrete operator.

Property d_mat [protected]

Materials definitions.

Property d_max_iters [protected]
Property d_mesh [protected]

Problem mesh (either Cartesian mesh or MOC tracking)

Property d_quadrature [protected]

Angular mesh.

Property d_scatter_source [protected]

The within group scattering source.

Property d_sigma_s [protected]

Scattering cross-section vector for faster source computation.

Property d_state [protected]

State vectors.

Property d_sweeper [protected]

Sweeper over the space-angle domain.

Property d_tolerance [protected]

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