An open source method of characteristics neutron transport code.
Cmfd Class Reference

A class for Coarse Mesh Finite Difference (CMFD) acceleration. More...

#include "src/Cmfd.h"

Public Member Functions

 Cmfd ()
 Constructor initializes boundaries and variables that describe the CMFD object. More...
 
virtual ~Cmfd ()
 Destructor deletes arrays of A and M row insertion arrays.
 
double computeKeff (int moc_iteration)
 Solve the nonlinear diffusion acceleration problem to accelerate the convergence of the MOC problem. More...
 
void initialize ()
 Initialize the Matrix and Vector objects, k-nearest stencils, the CMFD cell currents and MOC materials.
 
void initializeCellMap ()
 Initializes the vector of vectors that links CMFD cells with FSRs. More...
 
void initializeGroupMap ()
 Initialize and set array that links the MOC energy groups to the CMFD energy groups. More...
 
void allocateTallies ()
 Allocates memory for the CMFD tallies. More...
 
void initializeLattice (Point *offset, bool is_2D=false)
 Initialize the CMFD lattice and compute mesh dimensions, considering both uniform/non-uniform and 2D/3D cases. More...
 
void initializeBackupCmfdSolver ()
 Initializes a backup CMFD solver. More...
 
void copyCurrentsToBackup ()
 Copies the current from the regular to the backup CMFD solver. More...
 
int findCmfdCell (LocalCoords *coords)
 Find the CMFD cell that a LocalCoords object is in. More...
 
int findCmfdSurface (int cell_id, LocalCoords *coords)
 Find the CMFD surface that a LocalCoords object lies on. More...
 
int findCmfdSurfaceOTF (int cell_id, double z, int surface_2D)
 Quickly finds a 3D CMFD surface given a cell, global coordinate, and 2D CMFD surface. Intended for use in axial on-the-fly ray tracing. More...
 
void addFSRToCell (int cell_id, long fsr_id)
 Add an FSR ID to a vector that contains all the FSR IDs contained within a CMFD mesh cell. More...
 
void zeroCurrents ()
 Zero the surface currents for each mesh cell and energy group.
 
void tallyCurrent (segment *curr_segment, float *track_flux, int azim_index, int polar_index, bool fwd)
 Tallies the current contribution from this segment across the the appropriate CMFD mesh cell surface. More...
 
void tallyStartingCurrent (Point *point, double delta_x, double delta_y, double delta_z, float *track_flux, double weight)
 This function tallies the current impinging on the domain from starting fluxes. More...
 
void recordNetCurrents ()
 Records net currents (leakage) on every CMFD cell for every group.
 
void printInputParamsSummary ()
 A function that prints a summary of the CMFD input parameters.
 
void printTimerReport ()
 Report the physical time use by major components of the CMFD solver.
 
void checkBalance ()
 Forces CMFD to check neutron balance on every solve.
 
int getNumCmfdGroups ()
 Get the number of coarse CMFD energy groups. More...
 
int getNumMOCGroups ()
 Get the number of MOC energy groups. More...
 
int getNumCells ()
 Get the number of CMFD cells. More...
 
int getCmfdGroup (int group)
 Get the CMFD group given an MOC group. More...
 
int getBoundary (int side)
 Get the boundaryType for one side of the CMFD mesh. More...
 
LatticegetLattice ()
 Returns the Lattice object used as the CMFD mesh. More...
 
int getNumX ()
 Get the number of Mesh cells in a row. More...
 
int getNumY ()
 Get the number of Mesh cells in a column. More...
 
int getNumZ ()
 Get the number of Mesh cells in the z-direction. More...
 
VectorgetLocalCurrents ()
 Get the Vector of surface currents. More...
 
CMFD_PRECISION *** getBoundarySurfaceCurrents ()
 Get the array of surface currents on the boundaries. More...
 
int convertFSRIdToCmfdCell (long fsr_id)
 Return the CMFD cell ID that a FSR lies in. More...
 
int convertGlobalFSRIdToCmfdCell (long global_fsr_id)
 Return the CMFD cell ID that a FSR lies in. More...
 
std::vector< std::vector< long > > * getCellFSRs ()
 Return a pointer to the vector of vectors that contains the FSRs that lie in each cell. More...
 
bool isFluxUpdateOn ()
 Get flag indicating whether to update the MOC flux. More...
 
bool isCentroidUpdateOn ()
 Get flag indicating whether to use FSR centroids to update the MOC flux. More...
 
bool isSigmaTRebalanceOn ()
 Returns a flag indicating whether the sigma-t rebalance is on. More...
 
void setSORRelaxationFactor (double SOR_factor)
 Set successive over-relaxation relaxation factor. More...
 
void setCMFDRelaxationFactor (double relaxation_factor)
 Set the CMFD relaxation factor applied to diffusion coefficients. More...
 
void setGeometry (Geometry *geometry)
 Set a pointer to the Geometry. More...
 
void setWidthX (double width)
 Set Mesh width in the x-direction. More...
 
void setWidthY (double width)
 Set Mesh width in the y-direction. More...
 
void setWidthZ (double width)
 Set Mesh width in the z-direction. More...
 
void setNumX (int num_x)
 Set the number of Mesh cells in a row. More...
 
void setNumY (int num_y)
 Set the number of Mesh cells in a column. More...
 
void setNumZ (int num_z)
 Set the number of Mesh cells in the z-direction. More...
 
void setNumFSRs (long num_fsrs)
 set the number of FSRs. More...
 
void setNumMOCGroups (int num_moc_groups)
 Set the number of MOC energy groups. More...
 
void setBoundary (int side, boundaryType boundary)
 Set the CMFD boundary type for a given surface. More...
 
void setLatticeStructure (int num_x, int num_y, int num_z=1)
 The structure of the Lattice to be used as the CMFD mesh. More...
 
void setFluxUpdateOn (bool flux_update_on)
 Set flag indicating whether to update the MOC flux. More...
 
void setCentroidUpdateOn (bool centroid_update_on)
 Set flag indicating whether to use FSR centroids to update the MOC flux. More...
 
void setGroupStructure (std::vector< std::vector< int > > group_indices)
 Set a coarse energy group structure for CMFD. More...
 
void setSourceConvergenceThreshold (double source_thresh)
 Sets the threshold for CMFD source convergence (>0). More...
 
void setQuadrature (Quadrature *quadrature)
 Sets the Quadrature object in use by the MOC Solver. More...
 
void setKNearest (int k_nearest)
 Set a number of k-nearest neighbor cells to use in updating the FSR flux. More...
 
void setSolve3D (bool solve_3d)
 Sets a flag to indicate whether a 2D or 3D problem is being solved. More...
 
void setAzimSpacings (const std::vector< double > &azim_spacings, int num_azim)
 Sets the azimuthal spacings. More...
 
void setPolarSpacings (const std::vector< std::vector< double > > &polar_spacings, int num_azim, int num_polar)
 Sets the polar spacings. More...
 
void setKeff (double k_eff)
 Set the value of the k effective for the CMFD solver. This is meant for research / debugging purposes. More...
 
void setBackupGroupStructure (std::vector< std::vector< int > > group_indices)
 Set the backup CMFD solver's group structure. It is necessarily coarser than and must align with the regular CMFD group structure. More...
 
void setConvergenceData (ConvergenceData *convergence_data)
 Sets the a ConvergenceData object to record diagnostics. More...
 
void useAxialInterpolation (int interpolate)
 Set the flag indicating whether to use quadratic axial interpolation for update ratios. More...
 
void useFluxLimiting (bool flux_limiting)
 Turns on the flux limiting condition. More...
 
void enforceBalanceOnDiagonal (int cmfd_cell, int group)
 Modifies the diagonal element to be consistent with the MOC solve. More...
 
void rebalanceSigmaT (bool balance_sigma_t)
 Rebalances the total cross section to be consistent with the MOC solution on every sweep. More...
 
void setFSRMaterials (Material **FSR_materials)
 Set the FSR materials array pointer. More...
 
void setFSRVolumes (FP_PRECISION *FSR_volumes)
 Set the pointer to the array of FSR_volumes. More...
 
void setFSRFluxes (FP_PRECISION *scalar_flux)
 Set pointer to FSR flux array. More...
 
void setFSRSources (FP_PRECISION *sources)
 Set pointer to FSR source array. More...
 
void setCellFSRs (std::vector< std::vector< long > > *cell_fsrs)
 Set the vector of vectors that contains the FSRs that lie in each cell. More...
 
void setFluxMoments (FP_PRECISION *flux_moments)
 Set pointer to source region flux moments array. More...
 
void setWidths (std::vector< std::vector< double > > widths)
 Set width of non-uniform meshes in x y z directions. More...
 
void printCmfdCellSizes ()
 Print information about CMFD cell dimensions. More...
 

Detailed Description

A class for Coarse Mesh Finite Difference (CMFD) acceleration.

Constructor & Destructor Documentation

◆ Cmfd()

Cmfd::Cmfd ( )

Constructor initializes boundaries and variables that describe the CMFD object.

The constructor initializes the many variables that describe the CMFD mesh and are used to solve the nonlinear diffusion acceleration problem.

Member Function Documentation

◆ addFSRToCell()

void Cmfd::addFSRToCell ( int  cmfd_cell,
long  fsr_id 
)

Add an FSR ID to a vector that contains all the FSR IDs contained within a CMFD mesh cell.

Parameters
cmfd_cellthe CMFD cell ID.
fsr_idthe FSR ID.

◆ allocateTallies()

void Cmfd::allocateTallies ( )

Allocates memory for the CMFD tallies.

This method is called by the CMFD initialization routine, and allocates memory for the diffusion, reaction and volume tallies for every CMFD cells.

◆ computeKeff()

double Cmfd::computeKeff ( int  moc_iteration)

Solve the nonlinear diffusion acceleration problem to accelerate the convergence of the MOC problem.

This method uses the information from the last MOC transport sweep and solves a simplified nonlinear diffusion problem. The diffusion problem is tightly converged and the solution is used to update the the solution of the MOC problem.

Parameters
moc_iterationMOC iteration number
Returns
The dominant eigenvalue of the nonlinear diffusion problem

◆ convertFSRIdToCmfdCell()

int Cmfd::convertFSRIdToCmfdCell ( long  fsr_id)

Return the CMFD cell ID that a FSR lies in.

Note that a CMFD cell is not an actual Cell object; rather, a CMFD cell is just a way of describing each of the rectangular regions that make up a CMFD lattice. CMFD cells are numbered with 0 in the lower left corner and monotonically increasing from left to right, from bottom to top. For example, the indices for a 4 x 4 lattice are: 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3

Parameters
fsr_idthe FSR ID.
Returns
The CMFD cell ID. Return -1 if cell is not found.

◆ convertGlobalFSRIdToCmfdCell()

int Cmfd::convertGlobalFSRIdToCmfdCell ( long  global_fsr_id)

Return the CMFD cell ID that a FSR lies in.

Parameters
global_fsr_idThe global FSR ID.
Returns
The CMFD cell ID.

◆ copyCurrentsToBackup()

void Cmfd::copyCurrentsToBackup ( )

Copies the current from the regular to the backup CMFD solver.

The currents are condensed to the backup solver's energy structure when transfered as well.

◆ enforceBalanceOnDiagonal()

void Cmfd::enforceBalanceOnDiagonal ( int  cmfd_cell,
int  group 
)

Modifies the diagonal element to be consistent with the MOC solve.

This function re-computes a new total cross-section x volume that maintains consistency with the MOC solution. Generally, this will not change the diagonal element at all since CMFD should be consistent with MOC. However, if negative fluxes are corrected to zero after the MOC transport sweep, there will be an inconsistency. This function modifies sigma-t so that there is consistency with the altered solution.

Parameters
cmfd_cellThe cmfd cell of the element to adjust
groupThe cmfd group of the element to adjust

◆ findCmfdCell()

int Cmfd::findCmfdCell ( LocalCoords coords)

Find the CMFD cell that a LocalCoords object is in.

Parameters
coordsthe coords being evaluated.
Returns
The CMFD cell ID.

◆ findCmfdSurface()

int Cmfd::findCmfdSurface ( int  cell,
LocalCoords coords 
)

Find the CMFD surface that a LocalCoords object lies on.

If the coords is not on a surface, -1 is returned. Otherwise, the surface ID is returned.

Parameters
cellthe CMFD cell ID that the local coords is in.
coordsthe coords being evaluated.
Returns
The surface ID.

◆ findCmfdSurfaceOTF()

int Cmfd::findCmfdSurfaceOTF ( int  cell_id,
double  z,
int  surface_2D 
)
inline

Quickly finds a 3D CMFD surface given a cell, global coordinate, and 2D CMFD surface. Intended for use in axial on-the-fly ray tracing.

If the coords is not on a surface, -1 is returned. If there is no 2D CMFD surface intersection, -1 should be input for the 2D CMFD surface.

Parameters
cell_idThe CMFD cell ID that the local coords is in.
zthe axial height in the root universe of the point being evaluated.
surface_2DThe ID of the 2D CMFD surface that the LocalCoords object intersects. If there is no 2D intersection, -1 should be input.

◆ getBoundary()

int Cmfd::getBoundary ( int  side)

Get the boundaryType for one side of the CMFD mesh.

Parameters
sidethe CMFD mesh surface ID.
Returns
the boundaryType for the surface.

◆ getBoundarySurfaceCurrents()

CMFD_PRECISION *** Cmfd::getBoundarySurfaceCurrents ( )

Get the array of surface currents on the boundaries.

Returns
3D array containing the boundary surface currents

◆ getCellFSRs()

std::vector< std::vector< long > > * Cmfd::getCellFSRs ( )

Return a pointer to the vector of vectors that contains the FSRs that lie in each cell.

Returns
Vector of vectors containing FSR IDs in each cell.

◆ getCmfdGroup()

int Cmfd::getCmfdGroup ( int  group)
inline

Get the CMFD group given an MOC group.

Parameters
groupthe MOC energy group
Returns
the CMFD energy group

◆ getLattice()

Lattice * Cmfd::getLattice ( )

Returns the Lattice object used as the CMFD mesh.

Returns
A pointer to a Lattice object.

◆ getLocalCurrents()

Vector * Cmfd::getLocalCurrents ( )

Get the Vector of surface currents.

Returns
pointer to a vector containing the surface currents

◆ getNumCells()

int Cmfd::getNumCells ( )

Get the number of CMFD cells.

Returns
the number of CMFD cells

◆ getNumCmfdGroups()

int Cmfd::getNumCmfdGroups ( )

Get the number of coarse CMFD energy groups.

Returns
the number of CMFD energy groups

◆ getNumMOCGroups()

int Cmfd::getNumMOCGroups ( )

Get the number of MOC energy groups.

Returns
the number of MOC energy groups

◆ getNumX()

int Cmfd::getNumX ( )

Get the number of Mesh cells in a row.

Returns
number of Mesh cells in a row

◆ getNumY()

int Cmfd::getNumY ( )

Get the number of Mesh cells in a column.

Returns
number of Mesh cells in a column

◆ getNumZ()

int Cmfd::getNumZ ( )

Get the number of Mesh cells in the z-direction.

Returns
number of Mesh cells in the z-direction

◆ initializeBackupCmfdSolver()

void Cmfd::initializeBackupCmfdSolver ( )

Initializes a backup CMFD solver.

This backup solver is not necessary to run simulations, but may be used if the regular solver fails and the user wants to try another group structure without restarting the simulation.

◆ initializeCellMap()

void Cmfd::initializeCellMap ( )

Initializes the vector of vectors that links CMFD cells with FSRs.

This method is called by the geometry once the CMFD mesh has been initialized by the geometry. This method allocates a vector for each CMFD cell that is used to store the FSR ids contained within that cell.

◆ initializeGroupMap()

void Cmfd::initializeGroupMap ( )

Initialize and set array that links the MOC energy groups to the CMFD energy groups.

This method initializes the _group_indices_map, which is a 1D array of length _num_moc_groups that maps the MOC energy groups to CMFD energy groups. The indices into _group_indices_map are the MOC energy groups and the values are the CMFD energy groups.

◆ initializeLattice()

void Cmfd::initializeLattice ( Point offset,
bool  is_2D = false 
)

Initialize the CMFD lattice and compute mesh dimensions, considering both uniform/non-uniform and 2D/3D cases.

Parameters
offsetthe offset point of the CMFD Lattice
is_2Dwhether CMFD will be used in a 2D simulation (true) or 3D

◆ isCentroidUpdateOn()

bool Cmfd::isCentroidUpdateOn ( )

Get flag indicating whether to use FSR centroids to update the MOC flux.

Returns
Flag saying whether to use centroids to update MOC flux

◆ isFluxUpdateOn()

bool Cmfd::isFluxUpdateOn ( )

Get flag indicating whether to update the MOC flux.

Returns
Flag saying whether to update MOC flux

◆ isSigmaTRebalanceOn()

bool Cmfd::isSigmaTRebalanceOn ( )

Returns a flag indicating whether the sigma-t rebalance is on.

Returns
A flag indicating whether the rebalance is on

◆ printCmfdCellSizes()

void Cmfd::printCmfdCellSizes ( )

Print information about CMFD cell dimensions.

For debug use.

◆ rebalanceSigmaT()

void Cmfd::rebalanceSigmaT ( bool  balance_sigma_t)

Rebalances the total cross section to be consistent with the MOC solution on every sweep.

Parameters
balance_sigma_tWheter to compute the rebalanced total cross-section

◆ setAzimSpacings()

void Cmfd::setAzimSpacings ( const std::vector< double > &  azim_spacings,
int  num_azim 
)

Sets the azimuthal spacings.

Parameters
azim_spacingsAn array of azimuthal spacings for each azimuthal angle.
num_azimthe number of azimuthal angles.

◆ setBackupGroupStructure()

void Cmfd::setBackupGroupStructure ( std::vector< std::vector< int > >  group_indices)

Set the backup CMFD solver's group structure. It is necessarily coarser than and must align with the regular CMFD group structure.

Parameters
group_indicesthe indices of the CMFD groups in the MOC groups

◆ setBoundary()

void Cmfd::setBoundary ( int  side,
boundaryType  boundary 
)

Set the CMFD boundary type for a given surface.

The CMFD boundary is assumed to be rectangular with the surfaces identified by constants in the constants.h file.

Parameters
sideThe CMFD surface UID.
boundaryThe boundaryType of the surface.

◆ setCellFSRs()

void Cmfd::setCellFSRs ( std::vector< std::vector< long > > *  cell_fsrs)

Set the vector of vectors that contains the FSRs that lie in each cell.

Parameters
cell_fsrsvector of vectors containing FSR IDs in each cell.

◆ setCentroidUpdateOn()

void Cmfd::setCentroidUpdateOn ( bool  centroid_update_on)

Set flag indicating whether to use FSR centroids to update the MOC flux.

Parameters
centroid_update_onFlag saying whether to use centroids to update MOC flux

◆ setCMFDRelaxationFactor()

void Cmfd::setCMFDRelaxationFactor ( double  relaxation_factor)

Set the CMFD relaxation factor applied to diffusion coefficients.

Parameters
relaxation_factorCMFD relaxation factor

◆ setConvergenceData()

void Cmfd::setConvergenceData ( ConvergenceData convergence_data)

Sets the a ConvergenceData object to record diagnostics.

The ConvergenceData object records the number of fission source and flux iterations for the CMFD solver as well as the maximum magnitude prolongation factor

Parameters
convergence_dataThe convergence data object

◆ setFluxMoments()

void Cmfd::setFluxMoments ( FP_PRECISION *  flux_moments)

Set pointer to source region flux moments array.

Parameters
flux_momentspointer to source region flux moments array

◆ setFluxUpdateOn()

void Cmfd::setFluxUpdateOn ( bool  flux_update_on)

Set flag indicating whether to update the MOC flux.

Parameters
flux_update_onFlag saying whether to update MOC flux.

◆ setFSRFluxes()

void Cmfd::setFSRFluxes ( FP_PRECISION *  scalar_flux)

Set pointer to FSR flux array.

Parameters
scalar_fluxpointer to FSR flux array

◆ setFSRMaterials()

void Cmfd::setFSRMaterials ( Material **  FSR_materials)

Set the FSR materials array pointer.

Parameters
FSR_materialspointer to FSR_materials array

◆ setFSRSources()

void Cmfd::setFSRSources ( FP_PRECISION *  sources)

Set pointer to FSR source array.

Parameters
sourcespointer to FSR source array

◆ setFSRVolumes()

void Cmfd::setFSRVolumes ( FP_PRECISION *  FSR_volumes)

Set the pointer to the array of FSR_volumes.

Parameters
FSR_volumesarray of FSR volumes

◆ setGeometry()

void Cmfd::setGeometry ( Geometry geometry)

Set a pointer to the Geometry.

Parameters
geometryA pointer to a Geometry object.

◆ setGroupStructure()

void Cmfd::setGroupStructure ( std::vector< std::vector< int > >  group_indices)

Set a coarse energy group structure for CMFD.

CMFD does not necessarily need to have the same energy group structure as the MOC problem. This function can be used to set a sparse energy group structure to speed up the CMFD solve. An example of how this may be called from Python to use a coarse 2-group CMFD structure atop a fine 7-group MOC structure is illustrated below:

cmfd.setGroupStructure([[1,2,3], [4,5,6,7]])
Parameters
group_indicesA nested vector of MOC-to-CMFD group mapping

◆ setKeff()

void Cmfd::setKeff ( double  k_eff)

Set the value of the k effective for the CMFD solver. This is meant for research / debugging purposes.

Parameters
k_effthe k_eff value to set.

◆ setKNearest()

void Cmfd::setKNearest ( int  k_nearest)

Set a number of k-nearest neighbor cells to use in updating the FSR flux.

Parameters
k_nearestThe number of nearest neighbor CMFD cells.

◆ setLatticeStructure()

void Cmfd::setLatticeStructure ( int  num_x,
int  num_y,
int  num_z = 1 
)

The structure of the Lattice to be used as the CMFD mesh.

Parameters
num_xThe number of cells in the x direction.
num_yThe number of cells in the y direction.
num_zThe number of cells in the z direction.

◆ setNumFSRs()

void Cmfd::setNumFSRs ( long  num_fsrs)

set the number of FSRs.

Parameters
num_fsrsthe number of FSRs

◆ setNumMOCGroups()

void Cmfd::setNumMOCGroups ( int  num_groups)

Set the number of MOC energy groups.

Parameters
num_groupsnumber of MOC energy groups

◆ setNumX()

void Cmfd::setNumX ( int  num_x)

Set the number of Mesh cells in a row.

Parameters
num_xnumber of Mesh cells in a row

◆ setNumY()

void Cmfd::setNumY ( int  num_y)

Set the number of Mesh cells in a column.

Parameters
num_ynumber of Mesh cells in a column

◆ setNumZ()

void Cmfd::setNumZ ( int  num_z)

Set the number of Mesh cells in the z-direction.

Parameters
num_znumber of Mesh cells in the z direction

◆ setPolarSpacings()

void Cmfd::setPolarSpacings ( const std::vector< std::vector< double > > &  polar_spacings,
int  num_azim,
int  num_polar 
)

Sets the polar spacings.

Parameters
polar_spacingsA 2D array of polar spacings for each azimuthal and polar angle combination.
num_azimthe number of azimuthal angles.
num_polarthe number of polar angles.

◆ setQuadrature()

void Cmfd::setQuadrature ( Quadrature quadrature)

Sets the Quadrature object in use by the MOC Solver.

Parameters
quadraturea Quadrature object pointer from the Solver

◆ setSolve3D()

void Cmfd::setSolve3D ( bool  solve_3D)

Sets a flag to indicate whether a 2D or 3D problem is being solved.

Parameters
solve_3DA boolean indicate whether a 2D or 3D problem is being solved.

◆ setSORRelaxationFactor()

void Cmfd::setSORRelaxationFactor ( double  SOR_factor)

Set successive over-relaxation relaxation factor.

Parameters
SOR_factorover-relaxation factor

◆ setSourceConvergenceThreshold()

void Cmfd::setSourceConvergenceThreshold ( double  source_thresh)

Sets the threshold for CMFD source convergence (>0).

Parameters
source_threshthe threshold for source convergence

◆ setWidths()

void Cmfd::setWidths ( std::vector< std::vector< double > >  widths)

Set width of non-uniform meshes in x y z directions.

An example of how this may be called from Python illustrated below:

cmfd.setWidths([[1,2,3], [4,5,6,7], [3.3,2.4]])
Parameters
widthsA vector of 3 vectors for the x y z sizes of non-uniform meshes

◆ setWidthX()

void Cmfd::setWidthX ( double  width)

Set Mesh width in the x-direction.

Parameters
widthPhysical width of Mesh in the x-direction

◆ setWidthY()

void Cmfd::setWidthY ( double  width)

Set Mesh width in the y-direction.

Parameters
widthPhysical width of Mesh in the y-direction

◆ setWidthZ()

void Cmfd::setWidthZ ( double  width)

Set Mesh width in the z-direction.

Parameters
widthPhysical width of Mesh in the z-direction

◆ tallyCurrent()

void Cmfd::tallyCurrent ( segment curr_segment,
float *  track_flux,
int  azim_index,
int  polar_index,
bool  fwd 
)
inline

Tallies the current contribution from this segment across the the appropriate CMFD mesh cell surface.

Parameters
curr_segmentthe current Track segment
track_fluxthe outgoing angular flux for this segment
azim_indexazimuthal index of track angle
polar_indexpolar index of track angle
fwdboolean indicating direction of integration along segment

◆ tallyStartingCurrent()

void Cmfd::tallyStartingCurrent ( Point point,
double  delta_x,
double  delta_y,
double  delta_z,
float *  track_flux,
double  weight 
)

This function tallies the current impinging on the domain from starting fluxes.

Incoming currents are tallied for use in diagnostics, debugging, and adjusting sigma-t to enforce consistency with the MOC solution, if requested

Parameters
pointThe point where the fluxes enter the geometry
delta_xThe a small x-nudge in the direction of travel
delta_yThe a small y-nudge in the direction of travel
delta_zThe a small z-nudge in the direction of travel
track_fluxThe angular fluxes impinging on the domain
weightThe weight of the Track

◆ useAxialInterpolation()

void Cmfd::useAxialInterpolation ( int  interpolate)

Set the flag indicating whether to use quadratic axial interpolation for update ratios.

Parameters
interpolateflag meaning No interpolation(0), FSR axially averaged value(1) or centroid z-coordinate evaluated value(2)

◆ useFluxLimiting()

void Cmfd::useFluxLimiting ( bool  flux_limiting)

Turns on the flux limiting condition.

If the CMFD correction diffusion coefficient is larger than the diffusion coefficient, recompute the diffusion coefficient as the ratio of current to twice the flux, and re-compute a correction diffusion coefficient.

Parameters
flux_limitingwhether to turn on the flux limiting condition

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