Class EJ_Diffusion

Class Documentation

class EJ_Diffusion

A general class for solving diffusion problems using the explicit jump method.

Implemented in diffusion based material property modules which use the explicit jump method.

See also

EJ_ThermalConductivity, EJ_ElectricalConductivity, EJ_Tortuosity Makes use of EJ_AMatrix class for use with BiCGSTAB.

Public Functions

EJ_Diffusion(puma::Matrix<double> *T, puma::Matrix<double> *kMat, char dir, double solverTol, int solverMaxIt, bool print, puma::Printer *printer, int numThreads)

A constructor which takes in the parameters used for calculating the diffusion coefficient using the explicit jump method.

Parameters
  • T – a pointer to a puma matrix to store the resulting solution field.

  • kMat – a point to a puma matrix containing the diffusion coefficient at each point

  • dir – a char specifying which direction to run the simulation in (should be ‘x’, ‘y’, or ‘z’).

  • solverTol – a double specifying the convergence criterion for the iterative solver used.

  • solverMaxIt – an integer specifying the maximum number of iterations the solver may execute before exiting.

  • print – a boolean which specifies whether the the number of iterations and residual are printed after each iteration of the solver.

  • numThreads – an integer which specifies the number of threads used for the simulation.

EJ_Diffusion(puma::Matrix<double> *T, puma::Matrix<double> *kMat, char dir, double solverTol, int solverMaxIt, bool print, int numThreads)
~EJ_Diffusion()
puma::Vec3<double> compute_DiffusionCoefficient()

computes the diffusion coefficient using the parameters specified when constructing the object.

Returns

a puma vector containing the diffusion coefficient in the x, y, and z directions.

Public Static Functions

static bool computeKMatrix(puma::Workspace *segWS, std::map<int, double> matCond, puma::Matrix<double> *kMat, int numThreads)

computes a puma matrix which contains the diffusion coefficient at each cell in the domain.

Implemented in diffusion based material property modules which use the explicit jump method.

Parameters
  • segWS – a pointer to a segmented workspace containing the domain.

  • matCond – a map containing the ID’s for each material and their corresponding diffusion coefficients.

  • kMat – a pointer to a puma matrix in which to store the diffusion coefficients for each cell in the domain.

Returns

a boolean indicating the function executed without errors.