From 57fc371a042bcf807741a0892bed322cb759caf7 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Sun, 17 Dec 2023 22:02:13 +1100 Subject: [PATCH] Add missing source documentation for doxygen Refs #21275 --- .../fvbcs/FVPorousFlowAdvectiveFluxBC.md | 2 +- .../fvkernels/FVPorousFlowAdvectiveFlux.md | 2 +- .../fvkernels/FVPorousFlowDispersiveFlux.md | 2 +- .../FVPorousFlowEnergyTimeDerivative.md | 2 +- .../fvkernels/FVPorousFlowHeatAdvection.md | 2 +- .../fvkernels/FVPorousFlowHeatConduction.md | 2 +- .../FVPorousFlowMassTimeDerivative.md | 2 +- .../fvbcs/FVPorousFlowAdvectiveFluxBC.h | 14 +++++++++++ .../fvkernels/FVPorousFlowAdvectiveFlux.h | 13 ++++++++++ .../fvkernels/FVPorousFlowDispersiveFlux.h | 16 ++++++++++++- .../FVPorousFlowEnergyTimeDerivative.h | 24 +++++++++++++++---- .../fvkernels/FVPorousFlowHeatAdvection.h | 12 ++++++++++ .../fvkernels/FVPorousFlowHeatConduction.h | 4 ++++ .../FVPorousFlowMassTimeDerivative.h | 20 +++++++++++++--- .../FVPorousFlowEnergyTimeDerivative.C | 16 ++++++------- .../FVPorousFlowMassTimeDerivative.C | 6 ++--- 16 files changed, 113 insertions(+), 26 deletions(-) diff --git a/modules/porous_flow/doc/content/source/fvbcs/FVPorousFlowAdvectiveFluxBC.md b/modules/porous_flow/doc/content/source/fvbcs/FVPorousFlowAdvectiveFluxBC.md index c705d07a8b90..2579fe735618 100644 --- a/modules/porous_flow/doc/content/source/fvbcs/FVPorousFlowAdvectiveFluxBC.md +++ b/modules/porous_flow/doc/content/source/fvbcs/FVPorousFlowAdvectiveFluxBC.md @@ -2,7 +2,7 @@ !syntax description /FVBCs/FVPorousFlowAdvectiveFluxBC -This boundary condition implements the weak form of +This boundary condition implements the strong form of \begin{equation*} -\nabla\cdot \sum_{\beta}\chi_{\beta}^{\kappa} \rho_{\beta}\frac{k\,k_{\mathrm{r,}\beta}}{\mu_{\beta}}(\nabla P_{\beta} - \rho_{\beta} \mathbf{g}) \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowAdvectiveFlux.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowAdvectiveFlux.md index 77463310e7a0..7e89e128d9ba 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowAdvectiveFlux.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowAdvectiveFlux.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowAdvectiveFlux -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} -\nabla\cdot \sum_{\beta}\chi_{\beta}^{\kappa} \rho_{\beta}\frac{k\,k_{\mathrm{r,}\beta}}{\mu_{\beta}}(\nabla P_{\beta} - \rho_{\beta} \mathbf{g}) \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowDispersiveFlux.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowDispersiveFlux.md index 8ae839b8e229..f619ca6e92ba 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowDispersiveFlux.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowDispersiveFlux.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowDispersiveFlux -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} -\nabla\cdot \sum_{\beta}\rho_{\beta}{\mathcal{D}}_{\beta}^{\kappa}\nabla \chi_{\beta}^{\kappa} \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md index df41e809b00f..9a298e81b598 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowEnergyTimeDerivative.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowEnergyTimeDerivative -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} \frac{\partial}{\partial t}\left((1-\phi)\rho_{R}C_{R}T + \phi\sum_{\beta}S_{\beta}\rho_{\beta}\mathcal{E}_{\beta}\right) \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatAdvection.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatAdvection.md index 2ba38abe4839..668509603981 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatAdvection.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatAdvection.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowHeatAdvection -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} -\nabla\cdot \sum_{\beta}h_{\beta} \rho_{\beta}\frac{k\,k_{\mathrm{r,}\beta}}{\mu_{\beta}}(\nabla P_{\beta} - \rho_{\beta} \mathbf{g}) \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatConduction.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatConduction.md index a647474b877c..46201bbb6a39 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatConduction.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowHeatConduction.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowHeatConduction -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} -\nabla\cdot \left(\lambda \nabla T\right) \end{equation*} diff --git a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md index 4baed50cea19..8c6acdd34c62 100644 --- a/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md +++ b/modules/porous_flow/doc/content/source/fvkernels/FVPorousFlowMassTimeDerivative.md @@ -2,7 +2,7 @@ !syntax description /FVKernels/FVPorousFlowMassTimeDerivative -This `FVKernel` implements the weak form of +This `FVKernel` implements the strong form of \begin{equation*} \frac{\partial}{\partial t}\left(\phi\sum_{\beta}S_{\beta}\rho_{\beta}\chi_{\beta}^{\kappa}\right) \end{equation*} diff --git a/modules/porous_flow/include/fvbcs/FVPorousFlowAdvectiveFluxBC.h b/modules/porous_flow/include/fvbcs/FVPorousFlowAdvectiveFluxBC.h index fe0024a80fe1..90550f613db4 100644 --- a/modules/porous_flow/include/fvbcs/FVPorousFlowAdvectiveFluxBC.h +++ b/modules/porous_flow/include/fvbcs/FVPorousFlowAdvectiveFluxBC.h @@ -13,6 +13,9 @@ class PorousFlowDictator; +/** + * Flux boundary condition where an advective flux is applied + */ class FVPorousFlowAdvectiveFluxBC : public FVFluxBC { public: @@ -22,29 +25,40 @@ class FVPorousFlowAdvectiveFluxBC : public FVFluxBC protected: virtual ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases present const unsigned int _num_phases; + /// Index of the fluid phase this BC applies to const unsigned int _phase; + /// Index of the fluid component this BC applies to const unsigned int _fluid_component; + /// Fluid density const ADMaterialProperty> & _density; const ADMaterialProperty> & _density_neighbor; + /// Fluid viscosity const ADMaterialProperty> & _viscosity; const ADMaterialProperty> & _viscosity_neighbor; + /// Relative permeability const ADMaterialProperty> & _relperm; const ADMaterialProperty> & _relperm_neighbor; + /// Mass fraction of fluid components in fluid phases const ADMaterialProperty>> & _mass_fractions; const ADMaterialProperty>> & _mass_fractions_neighbor; + /// Permeability const ADMaterialProperty & _permeability; const ADMaterialProperty & _permeability_neighbor; + /// Fluid pressure const ADMaterialProperty> & _pressure; const ADMaterialProperty> & _pressure_neighbor; + /// Gravity vector const RealVectorValue & _gravity; /// The porepressure value at the boundary diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowAdvectiveFlux.h b/modules/porous_flow/include/fvkernels/FVPorousFlowAdvectiveFlux.h index c2f0dacbbd41..44e73dc0adce 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowAdvectiveFlux.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowAdvectiveFlux.h @@ -13,6 +13,9 @@ class PorousFlowDictator; +/** + * Advective flux of fluid component k in fluid phase alpha + */ class FVPorousFlowAdvectiveFlux : public FVFluxKernel { public: @@ -22,28 +25,38 @@ class FVPorousFlowAdvectiveFlux : public FVFluxKernel protected: virtual ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases present const unsigned int _num_phases; + /// Index of the fluid component this kernel applies to const unsigned int _fluid_component; + /// Fluid density const ADMaterialProperty> & _density; const ADMaterialProperty> & _density_neighbor; + /// Fluid viscosity const ADMaterialProperty> & _viscosity; const ADMaterialProperty> & _viscosity_neighbor; + /// Relative permeability const ADMaterialProperty> & _relperm; const ADMaterialProperty> & _relperm_neighbor; + /// Mass fraction of fluid components in fluid phases const ADMaterialProperty>> & _mass_fractions; const ADMaterialProperty>> & _mass_fractions_neighbor; + /// Permeability const ADMaterialProperty & _permeability; const ADMaterialProperty & _permeability_neighbor; + /// Fluid pressure const ADMaterialProperty> & _pressure; const ADMaterialProperty> & _pressure_neighbor; const ADMaterialProperty> & _grad_p; + /// Gravity vector const RealVectorValue & _gravity; }; diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowDispersiveFlux.h b/modules/porous_flow/include/fvkernels/FVPorousFlowDispersiveFlux.h index 99f21d7eeb8f..11755f40dcc1 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowDispersiveFlux.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowDispersiveFlux.h @@ -14,6 +14,10 @@ class PorousFlowDictator; +/** + * Dispersive flux of component k in fluid phase alpha. Includes the effects + * of both molecular diffusion and hydrodynamic dispersion + */ class FVPorousFlowDispersiveFlux : public FVFluxKernel { public: @@ -23,30 +27,39 @@ class FVPorousFlowDispersiveFlux : public FVFluxKernel protected: virtual ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases present const unsigned int _num_phases; + /// Index of the fluid component this kernel applies to const unsigned int _fluid_component; + /// Fluid density const ADMaterialProperty> & _density; + /// Fluid viscosity const ADMaterialProperty> & _viscosity; const ADMaterialProperty> & _viscosity_neighbor; + /// Relative permeability const ADMaterialProperty> & _relperm; const ADMaterialProperty> & _relperm_neighbor; + /// Mass fraction of fluid components in fluid phases const ADMaterialProperty>> & _mass_fractions; const ADMaterialProperty>> & _mass_fractions_neighbor; const ADMaterialProperty>> & _grad_mass_frac; + /// Permeability const ADMaterialProperty & _permeability; const ADMaterialProperty & _permeability_neighbor; + /// Fluid pressure const ADMaterialProperty> & _pressure; const ADMaterialProperty> & _pressure_neighbor; const ADMaterialProperty> & _grad_p; - /// Porosity at the qps + /// Porosity const ADMaterialProperty & _porosity; const ADMaterialProperty & _porosity_neighbor; @@ -58,6 +71,7 @@ class FVPorousFlowDispersiveFlux : public FVFluxKernel const MaterialProperty>> & _diffusion_coeff; const MaterialProperty>> & _diffusion_coeff_neighbor; + /// Gravity vector const RealVectorValue & _gravity; const ADRankTwoTensor _identity_tensor; diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowEnergyTimeDerivative.h b/modules/porous_flow/include/fvkernels/FVPorousFlowEnergyTimeDerivative.h index edcceefb2886..ca1e0b1044d2 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowEnergyTimeDerivative.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowEnergyTimeDerivative.h @@ -12,6 +12,10 @@ #include "FVTimeKernel.h" class PorousFlowDictator; + +/** + * Time derivative of energy + */ class FVPorousFlowEnergyTimeDerivative : public FVTimeKernel { public: @@ -21,18 +25,30 @@ class FVPorousFlowEnergyTimeDerivative : public FVTimeKernel protected: ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases const unsigned int _num_phases; + /// Whether fluid is present const bool _fluid_present; + /// Porosity const ADMaterialProperty & _porosity; - const ADMaterialProperty> * const _density; - const ADMaterialProperty & _rock_energy; - const ADMaterialProperty> * const _energy; - const ADMaterialProperty> * const _saturation; const MaterialProperty & _porosity_old; + + /// Fluid density + const ADMaterialProperty> * const _density; const MaterialProperty> * const _density_old; + + /// Internal energy of porous matrix + const ADMaterialProperty & _rock_energy; const MaterialProperty & _rock_energy_old; + + /// Internal energy of fluid + const ADMaterialProperty> * const _energy; const MaterialProperty> * const _energy_old; + + /// Fluid phase saturation + const ADMaterialProperty> * const _saturation; const MaterialProperty> * const _saturation_old; }; diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowHeatAdvection.h b/modules/porous_flow/include/fvkernels/FVPorousFlowHeatAdvection.h index 90000ac1290d..cf1a1eae3a0a 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowHeatAdvection.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowHeatAdvection.h @@ -13,6 +13,9 @@ class PorousFlowDictator; +/** + * Advective flux of heat energy + */ class FVPorousFlowHeatAdvection : public FVFluxKernel { public: @@ -22,27 +25,36 @@ class FVPorousFlowHeatAdvection : public FVFluxKernel protected: virtual ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases present const unsigned int _num_phases; + /// Fluid density const ADMaterialProperty> & _density; const ADMaterialProperty> & _density_neighbor; + /// Fluid viscosity const ADMaterialProperty> & _viscosity; const ADMaterialProperty> & _viscosity_neighbor; + /// Fluid enthalpy const ADMaterialProperty> & _enthalpy; const ADMaterialProperty> & _enthalpy_neighbor; + /// Relative permeability const ADMaterialProperty> & _relperm; const ADMaterialProperty> & _relperm_neighbor; + /// Permeability const ADMaterialProperty & _permeability; const ADMaterialProperty & _permeability_neighbor; + /// Fluid pressure const ADMaterialProperty> & _pressure; const ADMaterialProperty> & _pressure_neighbor; const ADMaterialProperty> & _grad_p; + /// Gravity vector const RealVectorValue & _gravity; }; diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowHeatConduction.h b/modules/porous_flow/include/fvkernels/FVPorousFlowHeatConduction.h index 09334561b021..345c10859c20 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowHeatConduction.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowHeatConduction.h @@ -13,6 +13,9 @@ class PorousFlowDictator; +/** + * Heat conduction kernel + */ class FVPorousFlowHeatConduction : public FVFluxKernel { public: @@ -22,6 +25,7 @@ class FVPorousFlowHeatConduction : public FVFluxKernel protected: virtual ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; /// Thermal conductivity diff --git a/modules/porous_flow/include/fvkernels/FVPorousFlowMassTimeDerivative.h b/modules/porous_flow/include/fvkernels/FVPorousFlowMassTimeDerivative.h index a9a3393c5da5..3fec73515520 100644 --- a/modules/porous_flow/include/fvkernels/FVPorousFlowMassTimeDerivative.h +++ b/modules/porous_flow/include/fvkernels/FVPorousFlowMassTimeDerivative.h @@ -12,6 +12,10 @@ #include "FVTimeKernel.h" class PorousFlowDictator; + +/** + * Time derivative of fluid mass + */ class FVPorousFlowMassTimeDerivative : public FVTimeKernel { public: @@ -21,16 +25,26 @@ class FVPorousFlowMassTimeDerivative : public FVTimeKernel protected: ADReal computeQpResidual() override; + /// UserObject that holds information (number of phases, components, etc) const PorousFlowDictator & _dictator; + /// Number of fluid phases present const unsigned int _num_phases; + /// Index of the fluid component this kernel applies to const unsigned int _fluid_component; + /// Porosity const ADMaterialProperty & _porosity; - const ADMaterialProperty> & _density; - const ADMaterialProperty> & _saturation; - const ADMaterialProperty>> & _mass_fractions; const MaterialProperty & _porosity_old; + + /// Fluid density + const ADMaterialProperty> & _density; const MaterialProperty> & _density_old; + + /// Fluid phase saturation + const ADMaterialProperty> & _saturation; const MaterialProperty> & _saturation_old; + + /// Mass fraction of fluid components in fluid phases + const ADMaterialProperty>> & _mass_fractions; const MaterialProperty>> & _mass_fractions_old; }; diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C b/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C index d41e0968926c..31e6a38c1cf5 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowEnergyTimeDerivative.C @@ -29,24 +29,24 @@ FVPorousFlowEnergyTimeDerivative::FVPorousFlowEnergyTimeDerivative( _num_phases(_dictator.numPhases()), _fluid_present(_num_phases > 0), _porosity(getADMaterialProperty("PorousFlow_porosity_qp")), + _porosity_old(getMaterialPropertyOld("PorousFlow_porosity_qp")), _density(_fluid_present ? &getADMaterialProperty>("PorousFlow_fluid_phase_density_qp") : nullptr), - _rock_energy(getADMaterialProperty("PorousFlow_matrix_internal_energy_nodal")), - _energy(_fluid_present ? &getADMaterialProperty>( - "PorousFlow_fluid_phase_internal_energy_qp") - : nullptr), - _saturation(_fluid_present - ? &getADMaterialProperty>("PorousFlow_saturation_qp") - : nullptr), - _porosity_old(getMaterialPropertyOld("PorousFlow_porosity_qp")), _density_old(_fluid_present ? &getMaterialPropertyOld>( "PorousFlow_fluid_phase_density_qp") : nullptr), + _rock_energy(getADMaterialProperty("PorousFlow_matrix_internal_energy_nodal")), _rock_energy_old(getMaterialPropertyOld("PorousFlow_matrix_internal_energy_nodal")), + _energy(_fluid_present ? &getADMaterialProperty>( + "PorousFlow_fluid_phase_internal_energy_qp") + : nullptr), _energy_old(_fluid_present ? &getMaterialPropertyOld>( "PorousFlow_fluid_phase_internal_energy_qp") : nullptr), + _saturation(_fluid_present + ? &getADMaterialProperty>("PorousFlow_saturation_qp") + : nullptr), _saturation_old(_fluid_present ? &getMaterialPropertyOld>("PorousFlow_saturation_qp") : nullptr) diff --git a/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C b/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C index 3224e5481ebc..9a3d22bbf499 100644 --- a/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C +++ b/modules/porous_flow/src/fvkernels/FVPorousFlowMassTimeDerivative.C @@ -29,13 +29,13 @@ FVPorousFlowMassTimeDerivative::FVPorousFlowMassTimeDerivative(const InputParame _num_phases(_dictator.numPhases()), _fluid_component(getParam("fluid_component")), _porosity(getADMaterialProperty("PorousFlow_porosity_qp")), + _porosity_old(getMaterialPropertyOld("PorousFlow_porosity_qp")), _density(getADMaterialProperty>("PorousFlow_fluid_phase_density_qp")), + _density_old(getMaterialPropertyOld>("PorousFlow_fluid_phase_density_qp")), _saturation(getADMaterialProperty>("PorousFlow_saturation_qp")), + _saturation_old(getMaterialPropertyOld>("PorousFlow_saturation_qp")), _mass_fractions( getADMaterialProperty>>("PorousFlow_mass_frac_qp")), - _porosity_old(getMaterialPropertyOld("PorousFlow_porosity_qp")), - _density_old(getMaterialPropertyOld>("PorousFlow_fluid_phase_density_qp")), - _saturation_old(getMaterialPropertyOld>("PorousFlow_saturation_qp")), _mass_fractions_old( getMaterialPropertyOld>>("PorousFlow_mass_frac_qp")) {