diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md index 9a298e81b598..326c015fffeb 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md @@ -8,6 +8,9 @@ This `FVKernel` implements the strong form of \end{equation*} where all parameters are defined in the [nomenclature](/nomenclature.md). +!alert note +Presently, a first-order accurate implicit Euler time derivative is hard-coded. + !syntax parameters /FVKernels/FVPorousFlowEnergyTimeDerivative !syntax inputs /FVKernels/FVPorousFlowEnergyTimeDerivative diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md index 8c6acdd34c62..9c2f02b4b4e5 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md @@ -8,6 +8,9 @@ This `FVKernel` implements the strong form of \end{equation*} where all parameters are defined in the [nomenclature](/nomenclature.md). +!alert note +Presently, a first-order accurate implicit Euler time derivative is hard-coded. + !syntax parameters /FVKernels/FVPorousFlowMassTimeDerivative !syntax inputs /FVKernels/FVPorousFlowMassTimeDerivative diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowAdvectiveFlux.C b/modules/porous_flow/src/fvkernels/FVPorousFlowAdvectiveFlux.C index 2d47fd462ec6..061976b8d26f 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowAdvectiveFlux.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowAdvectiveFlux.C @@ -70,9 +70,9 @@ FVPorousFlowAdvectiveFlux::computeQpResidual() ADRealGradient pressure_grad; ADRealTensorValue mobility; - for (unsigned int p = 0; p < _num_phases; ++p) + for (const auto p : make_range(_num_phases)) { - // If we are on a boundary face, use the reconstructed gradient computed in _grad_p + // If we are on a boundary face, use the gradient computed in _grad_p if (onBoundary(*_face_info)) { const auto & gradp = -_grad_p[_qp][p]; diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowDispersiveFlux.C b/modules/porous_flow/src/fvkernels/FVPorousFlowDispersiveFlux.C index 4a44d1547823..40196405a576 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowDispersiveFlux.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowDispersiveFlux.C @@ -137,7 +137,7 @@ FVPorousFlowDispersiveFlux::computeQpResidual() ADRealGradient gradp; ADRealTensorValue mobility; - // If we are on a boundary face, use the reconstructed gradient computed in _grad_p + // If we are on a boundary face, use the gradient computed in _grad_p if (onBoundary(*_face_info)) { gradp = -_grad_p[_qp][p] + _density[_qp][p] * _gravity; diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C b/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C index 31e6a38c1cf5..33c6af037491 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C @@ -62,7 +62,7 @@ FVPorousFlowEnergyTimeDerivative::computeQpResidual() /// Add the fluid heat energy if (_fluid_present) - for (unsigned int p = 0; p < _num_phases; ++p) + for (const auto p : make_range(_num_phases)) { energy += _porosity[_qp] * (*_density)[_qp][p] * (*_saturation)[_qp][p] * (*_energy)[_qp][p]; energy_old += _porosity_old[_qp] * (*_density_old)[_qp][p] * (*_saturation_old)[_qp][p] * diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowHeatAdvection.C b/modules/porous_flow/src/fvkernels/FVPorousFlowHeatAdvection.C index 636962676491..5e3a73dc9446 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowHeatAdvection.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowHeatAdvection.C @@ -59,9 +59,9 @@ FVPorousFlowHeatAdvection::computeQpResidual() ADRealGradient pressure_grad; ADRealTensorValue mobility; - for (unsigned int p = 0; p < _num_phases; ++p) + for (const auto p : make_range(_num_phases)) { - // If we are on a boundary face, use the reconstructed gradient computed in _grad_p + // If we are on a boundary face, use the gradient computed in _grad_p if (onBoundary(*_face_info)) { const auto & gradp = -_grad_p[_qp][p]; diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowHeatConduction.C b/modules/porous_flow/src/fvkernels/FVPorousFlowHeatConduction.C index ee46f9f65513..1a635b156c2f 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowHeatConduction.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowHeatConduction.C @@ -41,7 +41,7 @@ FVPorousFlowHeatConduction::computeQpResidual() ADRealGradient gradT; ADRealTensorValue coeff; - // If we are on a boundary face, use the reconstructed gradient computed in _grad_T + // If we are on a boundary face, use the gradient computed in _grad_T if (onBoundary(*_face_info)) { gradT = -_grad_T[_qp]; diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C b/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C index 9a3d22bbf499..185d5acebbfc 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C @@ -55,7 +55,7 @@ FVPorousFlowMassTimeDerivative::computeQpResidual() ADReal mass = 0.0; Real mass_old = 0.0; - for (unsigned int p = 0; p < _num_phases; ++p) + for (const auto p : make_range(_num_phases)) { mass += _density[_qp][p] * _saturation[_qp][p] * _mass_fractions[_qp][p][_fluid_component]; mass_old += _density_old[_qp][p] * _saturation_old[_qp][p] * diff --git a/modules/porous_flow/src/materials/PorousFlowThermalConductivityFromPorosity.C b/modules/porous_flow/src/materials/PorousFlowThermalConductivityFromPorosity.C index c07c79cda157..90254328849f 100644 --- a/modules/porous_flow/src/materials/PorousFlowThermalConductivityFromPorosity.C +++ b/modules/porous_flow/src/materials/PorousFlowThermalConductivityFromPorosity.C @@ -58,7 +58,7 @@ PorousFlowThermalConductivityFromPorosityTempl::computeQpProperties() if constexpr (!is_ad) { (*_dla_qp_dvar)[_qp].assign(_num_var, RealTensorValue()); - for (unsigned v = 0; v < _num_var; ++v) + for (const auto v : make_range(_num_var)) (*_dla_qp_dvar)[_qp][v] = (_la_f - _la_s) * (*_dporosity_qp_dvar)[_qp][v]; } } diff --git a/modules/porous_flow/src/materials/PorousFlowThermalConductivityIdeal.C b/modules/porous_flow/src/materials/PorousFlowThermalConductivityIdeal.C index 1653e4b52515..241234facf11 100644 --- a/modules/porous_flow/src/materials/PorousFlowThermalConductivityIdeal.C +++ b/modules/porous_flow/src/materials/PorousFlowThermalConductivityIdeal.C @@ -84,7 +84,7 @@ PorousFlowThermalConductivityIdealTempl::computeQpProperties() { (*_dla_qp_dvar)[_qp].assign(_num_var, RealTensorValue()); if (_aqueous_phase && _wet_and_dry_differ) - for (unsigned v = 0; v < _num_var; ++v) + for (const auto v : make_range(_num_var)) (*_dla_qp_dvar)[_qp][v] = _exponent * std::pow((*_saturation_qp)[_qp][_aqueous_phase_number], _exponent - 1.0) * (*_dsaturation_qp_dvar)[_qp][_aqueous_phase_number][v] * (_la_wet - _la_dry); diff --git a/modules/porous_flow/test/tests/heat_advection/tests b/modules/porous_flow/test/tests/heat_advection/tests index 3b5411553200..c4f502f40f5e 100644 --- a/modules/porous_flow/test/tests/heat_advection/tests +++ b/modules/porous_flow/test/tests/heat_advection/tests @@ -15,7 +15,7 @@ threading = '!pthreads' issues = '#7984' design = 'PorousFlowHeatAdvection.md PorousFlowEnergyTimeDerivative.md porous_flow/tests/heat_advection/heat_advection_tests.md' - requirement = 'The system shall correctly advect heat energy with a moving fluid, using no numerical stabilizatio.n' + requirement = 'The system shall correctly advect heat energy with a moving fluid, using no numerical stabilization' [] [heat_advection_1d_fully_saturated_action_none] type = CSVDiff @@ -26,7 +26,7 @@ threading = '!pthreads' issues = '#10426' design = 'PorousFlowFullySaturated.md porous_flow/numerical_diffusion.md porous_flow/kt_worked.md porous_flow/tests/heat_advection/heat_advection_tests.md' - requirement = 'The system shall correctly advect heat energy with a moving fluid, using no numerical stabilization, and the user should be able to activiate this stabilization using the PorousFlow Action system.' + requirement = 'The system shall correctly advect heat energy with a moving fluid, using no numerical stabilization, and the user should be able to activate this stabilization using the PorousFlow Action system.' [] [heat_advection_1d] type = CSVDiff @@ -44,7 +44,7 @@ threading = '!pthreads' issues = '#7984 #21275' design = 'PorousFlowHeatAdvection.md PorousFlowEnergyTimeDerivative.md porous_flow/tests/heat_advection/heat_advection_tests.md' - requirement = 'The system shall correctly advect heat energy with a moving fluid, using full-upwinding for numerical stabilization.' + requirement = 'The system shall correctly advect heat energy with a moving fluid using a finite volume discretization.' [] [heat_advection_1d_fullsat] type = CSVDiff @@ -66,7 +66,7 @@ threading = '!pthreads' issues = '#16841' design = 'PorousFlowFullySaturated.md PorousFlowEnergyTimeDerivative.md porous_flow/tests/heat_advection/heat_advection_tests.md' - requirement = 'The system shall correctly advect heat energy with a moving fluid, using full-upwinding for numerical stabilization, in fully-saturated single-phase systems, and the user should be able to activiate this stabilization using the PorousFlow Action system.' + requirement = 'The system shall correctly advect heat energy with a moving fluid, using full-upwinding for numerical stabilization, in fully-saturated single-phase systems, and the user should be able to activate this stabilization using the PorousFlow Action system.' [] [heat_advection_1d_KT] type = CSVDiff diff --git a/modules/porous_flow/test/tests/heat_conduction/tests b/modules/porous_flow/test/tests/heat_conduction/tests index 02a82c1af8dc..f801b6eed0ee 100644 --- a/modules/porous_flow/test/tests/heat_conduction/tests +++ b/modules/porous_flow/test/tests/heat_conduction/tests @@ -15,7 +15,7 @@ csvdiff = 'no_fluid_fv.csv' rel_err = 1.0E-5 threading = '!pthreads' - requirement = 'The system shall be able to simulate heat conduction in a fluid-free environment.' + requirement = 'The system shall be able to simulate heat conduction in a fluid-free environment using a finite volume discretization.' design = 'porous_flow/tests/heat_conduction/heat_conduction_tests.md' issues = '#13155 #21275' [] @@ -25,7 +25,7 @@ csvdiff = 'two_phase.csv' rel_err = 1.0E-5 threading = '!pthreads' - requirement = 'The system shall be able to simulate heat conduction for systems containing multi-phase fluid.s' + requirement = 'The system shall be able to simulate heat conduction for systems containing multi-phase fluids.' design = 'porous_flow/tests/heat_conduction/heat_conduction_tests.md' issues = '#13155' [] @@ -35,7 +35,7 @@ csvdiff = 'two_phase_fv.csv' rel_err = 1.0E-5 threading = '!pthreads' - requirement = 'The system shall be able to simulate heat conduction for systems containing multi-phase fluids.' + requirement = 'The system shall be able to simulate heat conduction for systems containing multi-phase fluids using a finite volume discretization.' design = 'porous_flow/tests/heat_conduction/heat_conduction_tests.md' issues = '#13155 #21275' []