Skip to content

Commit

Permalink
Created "viscosity" with addParam() instead, since the nonzero requir…
Browse files Browse the repository at this point in the history
…ement will be manually enforced in Step 8 for demonstration purposes. Also declared _permeability and _viscosity as reference variables

(refs idaholab#15232)
  • Loading branch information
crswong888 committed Nov 16, 2020
1 parent 5364535 commit f519664
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DarcyPressure : public ADKernelGrad
/// ADKernel objects must override precomputeQpResidual
virtual ADRealVectorValue precomputeQpResidual() override;

/// The variables which hold the value for K and mu
const Real _permeability;
const Real _viscosity;
/// The reference variables which hold the value for K and mu
const Real & _permeability;
const Real & _viscosity;
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ DarcyPressure::validParams()
// Add a required parameter. If this isn't provided in the input file MOOSE will error.
params.addRequiredParam<Real>("permeability", "The isotropic permeability ($K$) of the medium.");

// Add an optional parameter that can be any real number, except zero, and set its default value.
params.addRangeCheckedParam<Real>(
// Add an optional parameter and set its default value.
params.addParam<Real>(
"viscosity",
7.98e-04,
"viscosity != 0",
"The dynamic viscosity ($\\mu$) of the fluid, the default value is that of water at 30 "
"degrees Celcius (7.98e-04 Pa-s).");

Expand Down

0 comments on commit f519664

Please sign in to comment.