19 params.addClassDescription(
"Upwind numerical flux scheme for the advection equation using a "
20 "cell-centered finite volume method.");
21 params.addParam<Real>(
"velocity", 1.0,
"Advective velocity");
36 const std::vector<Real> & uvec1,
37 const std::vector<Real> & uvec2,
38 const RealVectorValue & dwave,
39 std::vector<Real> & flux)
const
41 mooseAssert(uvec1.size() == 1,
"Invalid size for uvec1. Must be single variable coupling.");
42 mooseAssert(uvec2.size() == 1,
"Invalid size for uvec1. Must be single variable coupling.");
48 RealVectorValue uadv1(
_velocity, 0.0, 0.0);
51 RealVectorValue uadv2(
_velocity, 0.0, 0.0);
54 Real vdon1 = uadv1 * dwave;
55 Real vdon2 = uadv2 * dwave;
58 Real aplus = 0.5 * (vdon1 + std::abs(vdon1));
59 Real amins = 0.5 * (vdon2 - std::abs(vdon2));
62 flux[0] = aplus * uvec1[0] + amins * uvec2[0];
69 const std::vector<Real> & libmesh_dbg_var(uvec1),
70 const std::vector<Real> & libmesh_dbg_var(uvec2),
71 const RealVectorValue & dwave,
72 DenseMatrix<Real> & jac1,
73 DenseMatrix<Real> & jac2)
const
75 mooseAssert(uvec1.size() == 1,
"Invalid size for uvec1. Must be single variable coupling.");
76 mooseAssert(uvec2.size() == 1,
"Invalid size for uvec1. Must be single variable coupling.");
83 RealVectorValue uadv1(
_velocity, 0.0, 0.0);
86 RealVectorValue uadv2(
_velocity, 0.0, 0.0);
89 Real vdon1 = uadv1 * dwave;
90 Real vdon2 = uadv2 * dwave;
93 Real aplus = 0.5 * (vdon1 + std::abs(vdon1));
94 Real amins = 0.5 * (vdon2 - std::abs(vdon2));