Classes | |
| class | CHTHandler |
| This class provides an interface for managing conjugate heat transfer (CHT) between fluid and solid domains. More... | |
| struct | PressureJumpInterfaceData |
| Complete face operator obtained by eliminating the two one-sided interface pressures. More... | |
Functions | |
| PressureJumpInterfaceData | pressureJumpInterfaceData (const RealVectorValue &normal, const Point &elem_to_face, const Point &face_to_neighbor, const RealVectorValue &elem_diffusion, const RealVectorValue &neighbor_diffusion, const RealVectorValue &elem_gradient, const RealVectorValue &neighbor_gradient, const RealVectorValue &elem_rho_hbya, const RealVectorValue &neighbor_rho_hbya, const Real face_area, const bool use_nonorthogonal_correction, const Real elem_jump) |
| Construct the conservative half-cell interface coefficients for a diagonal diffusion tensor. | |
| Real | pressureJumpHbyAFlux (const PressureJumpInterfaceData &data) |
| Compute the H/A part of the face mass flux after eliminating the interface pressures. | |
| Real | pressureJumpFlux (const PressureJumpInterfaceData &data, const Real elem_pressure, const Real neighbor_pressure) |
| Compute the pressure part of the element-to-neighbor flux after eliminating the interface pressures. | |
| Real | pressureJumpOneSidedFaceValue (const PressureJumpInterfaceData &data, const Real cell_pressure, const Real mass_flux, const bool elem_side) |
| Recover one side's face pressure from the common oriented face mass flux. | |
| void | relaxMatrix (SparseMatrix< Number > &matrix_in, const Real relaxation_parameter, NumericVector< Number > &diff_diagonal) |
| Relax the matrix to ensure diagonal dominance, we hold onto the difference in diagonals for later use in relaxing the right hand side. | |
| void | relaxRightHandSide (NumericVector< Number > &rhs_in, const NumericVector< Number > &solution_in, const NumericVector< Number > &diff_diagonal) |
| Relax the right hand side of an equation, this needs to be called once and the system matrix has been relaxed and the field describing the difference in the diagonals of the system matrix is already available. | |
| void | relaxSolutionUpdate (NumericVector< Number > &vec_new, const NumericVector< Number > &vec_old, const Real relaxation_factor) |
| Relax the update on a solution field using the following approach: $u = u_{old}+\lambda (u - u_{old})$. | |
| void | limitSolutionUpdate (NumericVector< Number > &solution, const Real min_limit=std::numeric_limits< Real >::epsilon(), const Real max_limit=1e10) |
| Limit a solution to its minimum and maximum bounds: $u = min(max(u, min_limit), max_limit)$. | |
| Real | computeNormalizationFactor (const NumericVector< Number > &solution, const SparseMatrix< Number > &mat, const NumericVector< Number > &rhs) |
| Compute a normalization factor which is applied to the linear residual to determine convergence. | |
| void | constrainSystem (SparseMatrix< Number > &mx, NumericVector< Number > &rhs, const Real desired_value, const dof_id_type dof_id) |
| Implicitly constrain the system by adding a factor*(u-u_desired) to it at a desired dof value. | |
| dof_id_type | findPointDoFID (const MooseVariableFieldBase &variable, const MooseMesh &mesh, const Point &point) |
| Find the ID of the degree of freedom which corresponds to the variable and a given point on the mesh. | |
| bool | converged (const std::vector< std::pair< unsigned int, Real > > &residuals, const std::vector< Real > &abs_tolerances) |
| Based on the residuals, determine if the iterative process converged or not. | |
| Real NS::FV::computeNormalizationFactor | ( | const NumericVector< Number > & | solution, |
| const SparseMatrix< Number > & | mat, | ||
| const NumericVector< Number > & | rhs | ||
| ) |
Compute a normalization factor which is applied to the linear residual to determine convergence.
This function is based on the description provided here: @article{greenshields2022notes, title={Notes on computational fluid dynamics: General principles}, author={Greenshields, Christopher J and Weller, Henry G}, journal={(No Title)}, year={2022} }
| solution | The solution vector |
| mat | The system matrix |
| rhs | The system right hand side |
Definition at line 135 of file SegregatedSolverUtils.C.
Referenced by LinearAssemblySegregatedSolve::solveAdvectedSystem(), SIMPLESolveNonlinearAssembly::solveAdvectedSystem(), LinearAssemblySegregatedSolve::solveMomentumPredictor(), SIMPLESolveNonlinearAssembly::solveMomentumPredictor(), LinearAssemblySegregatedSolve::solvePressureCorrector(), SIMPLESolveNonlinearAssembly::solvePressureCorrector(), LinearAssemblySegregatedSolve::solveSolidEnergy(), and SIMPLESolveNonlinearAssembly::solveSolidEnergySystem().
| void NS::FV::constrainSystem | ( | SparseMatrix< Number > & | mx, |
| NumericVector< Number > & | rhs, | ||
| const Real | desired_value, | ||
| const dof_id_type | dof_id | ||
| ) |
Implicitly constrain the system by adding a factor*(u-u_desired) to it at a desired dof value.
To make sure the conditioning of the matrix does not change significantly, factor is chosen to be the diagonal component of the matrix coefficients for a given dof.
| mx | The matrix of the system which needs to be constrained |
| rhs | The right hand side of the system which needs to be constrained |
| value | The desired value for the solution field at a dof |
| dof_id | The ID of the dof which needs to be constrained |
Definition at line 180 of file SegregatedSolverUtils.C.
Referenced by LinearAssemblySegregatedSolve::solvePressureCorrector(), and SIMPLESolveNonlinearAssembly::solvePressureCorrector().
| bool NS::FV::converged | ( | const std::vector< std::pair< unsigned int, Real > > & | residuals, |
| const std::vector< Real > & | abs_tolerances | ||
| ) |
Based on the residuals, determine if the iterative process converged or not.
| residuals | The current (number of iterations, residual) pairs |
| abs_tolerances | The corresponding absolute tolerances. |
Definition at line 229 of file SegregatedSolverUtils.C.
Referenced by converged(), LinearAssemblySegregatedSolve::solve(), and SIMPLESolveNonlinearAssembly::solve().
| dof_id_type NS::FV::findPointDoFID | ( | const MooseVariableFieldBase & | variable, |
| const MooseMesh & | mesh, | ||
| const Point & | point | ||
| ) |
Find the ID of the degree of freedom which corresponds to the variable and a given point on the mesh.
| variable | Reference to the moose variable whose dof should be fetched |
| mesh | The moose mesh where the element is |
| point | The point on the mesh |
Definition at line 197 of file SegregatedSolverUtils.C.
Referenced by SIMPLESolveBase::setupPressurePin().
| void NS::FV::limitSolutionUpdate | ( | NumericVector< Number > & | solution, |
| const Real | min_limit = std::numeric_limits<Real>::epsilon(), |
||
| const Real | max_limit = 1e10 |
||
| ) |
Limit a solution to its minimum and maximum bounds: $u = min(max(u, min_limit), max_limit)$.
| system_in | The system whose solution shall be limited |
| min_limit | = 0.0 The minimum limit for the solution |
| max_limit | = 1e10 The maximum limit for the solution |
Definition at line 123 of file SegregatedSolverUtils.C.
Referenced by SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solveAdvectedSystem().
|
inline |
Compute the pressure part of the element-to-neighbor flux after eliminating the interface pressures.
The face mass flux is this minus pressureJumpHbyAFlux.
Definition at line 138 of file PressureJumpInterface.h.
Referenced by FVPressureJumpGreenGaussGradient::internalFaceValues(), TEST(), TEST(), TEST(), and TEST().
|
inline |
Compute the H/A part of the face mass flux after eliminating the interface pressures.
Each side carries mdot = -h_s + (pressure flux of side s), so continuity of mdot weights the side H/A fluxes h_s with the same series weights T / T_s as the pressure.
Definition at line 129 of file PressureJumpInterface.h.
Referenced by PorousRhieChowMassFlux::computeHbyA(), FVPressureJumpGreenGaussGradient::internalFaceValues(), and TEST().
|
inline |
Construct the conservative half-cell interface coefficients for a diagonal diffusion tensor.
Both half-cell direction vectors point in the element-to-neighbor orientation.
Definition at line 48 of file PressureJumpInterface.h.
Referenced by PorousRhieChowMassFlux::pressureJumpInterfaceData(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inline |
Recover one side's face pressure from the common oriented face mass flux.
The face value of the pressure variable interpolates the two cell pressures, which is valid only where the pressure is continuous. On a baffle face, any consumer that needs the face pressure of one side, such as the surface sum of a Green-Gauss gradient, must use this value instead.
Definition at line 154 of file PressureJumpInterface.h.
Referenced by FVPressureJumpGreenGaussGradient::internalFaceValues(), TEST(), TEST(), and TEST().
| void NS::FV::relaxMatrix | ( | SparseMatrix< Number > & | matrix_in, |
| const Real | relaxation_parameter, | ||
| NumericVector< Number > & | diff_diagonal | ||
| ) |
Relax the matrix to ensure diagonal dominance, we hold onto the difference in diagonals for later use in relaxing the right hand side.
For the details of this relaxation process, see
Juretic, Franjo. Error analysis in finite volume CFD. Diss. Imperial College London (University of London), 2005.
| matrix_in | The matrix that needs to be relaxed |
| relaxation_parameter | The scale which described how much the matrix is relaxed |
| diff_diagonal | A vector holding the $A_{diag}-A_{diag, relaxed}$ entries for further use in the relaxation of the right hand side |
Definition at line 25 of file SegregatedSolverUtils.C.
Referenced by LinearAssemblySegregatedSolve::solveAdvectedSystem(), SIMPLESolveNonlinearAssembly::solveAdvectedSystem(), LinearAssemblySegregatedSolve::solveMomentumPredictor(), and SIMPLESolveNonlinearAssembly::solveMomentumPredictor().
| void NS::FV::relaxRightHandSide | ( | NumericVector< Number > & | rhs_in, |
| const NumericVector< Number > & | solution_in, | ||
| const NumericVector< Number > & | diff_diagonal | ||
| ) |
Relax the right hand side of an equation, this needs to be called once and the system matrix has been relaxed and the field describing the difference in the diagonals of the system matrix is already available.
The relaxation process needs modification to both the system matrix and the right hand side. For more information see:
Juretic, Franjo. Error analysis in finite volume CFD. Diss. Imperial College London (University of London), 2005.
| rhs_in | The unrelaxed right hand side that needs to be relaxed |
| solution_in | The solution |
| diff_diagonal | The diagonal correction used for the corresponding system matrix |
Definition at line 91 of file SegregatedSolverUtils.C.
Referenced by LinearAssemblySegregatedSolve::solveAdvectedSystem(), SIMPLESolveNonlinearAssembly::solveAdvectedSystem(), LinearAssemblySegregatedSolve::solveMomentumPredictor(), and SIMPLESolveNonlinearAssembly::solveMomentumPredictor().
| void NS::FV::relaxSolutionUpdate | ( | NumericVector< Number > & | vec_new, |
| const NumericVector< Number > & | vec_old, | ||
| const Real | relaxation_factor | ||
| ) |
Relax the update on a solution field using the following approach: $u = u_{old}+\lambda (u - u_{old})$.
| vector_new | The new solution vector |
| vec_old | The old solution vector |
| relaxation_factor | The lambda parameter in the expression above |
Definition at line 112 of file SegregatedSolverUtils.C.
Referenced by LinearAssemblySegregatedSolve::correctVelocity(), SIMPLESolveNonlinearAssembly::solve(), and LinearAssemblySegregatedSolve::solveAdvectedSystem().