https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADIncompressibleMomentumSPBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "ADScalarKernel.h"
13
15
17{
19
20public:
23
24protected:
25 virtual ADReal computeQpResidual() override;
26 virtual Real computeQpJacobian() override;
27 virtual ADReal computeFrictionFactor(const ADReal & mu,
28 const ADReal & G,
29 const ADReal & Dh,
30 const unsigned int j);
31 virtual ADReal massFlowRate() const = 0;
32 virtual ADReal pressureDrop() const = 0;
33
35 const size_t _n_temps;
37 std::vector<const ADVariableValue *> _T;
39 const bool _is_implicit;
43 const unsigned int _n_fp;
45 const size_t _n_segments;
47 std::vector<const SinglePhaseFluidProperties *> _fp;
51 std::vector<const Moose::Functor<ADReal> *> _areas;
53 std::vector<const Moose::Functor<ADReal> *> _perimeters;
55 std::vector<const Moose::Functor<ADReal> *> _lengths;
57 std::vector<const Moose::Functor<ADReal> *> _dZs;
59 std::vector<const Moose::Functor<ADReal> *> _forms_losses;
61 std::vector<const Moose::Functor<ADReal> *> _dPps;
63 std::vector<const Moose::Functor<ADReal> *> _roughnesses;
66};
DualNumber< Real, DNDerivativeType, true > ADReal
const double mu
const size_t _n_segments
Number of geometrically/thermally unique segments.
const unsigned int _n_fp
Number of fluid property user objects supplied.
const bool _is_implicit
Property state integration flag.
std::vector< const Moose::Functor< ADReal > * > _dZs
Height change inlet to outlet of each segment.
virtual ADReal pressureDrop() const =0
const size_t _n_temps
Number of coupled temperature variables.
virtual ADReal computeFrictionFactor(const ADReal &mu, const ADReal &G, const ADReal &Dh, const unsigned int j)
std::vector< const Moose::Functor< ADReal > * > _perimeters
Wetted perimeter of each segment.
const Moose::Functor< ADReal > & _Pref
System reference pressure.
std::vector< const Moose::Functor< ADReal > * > _roughnesses
Wall roughness of each segment.
std::vector< const Moose::Functor< ADReal > * > _areas
Flow area of each segment.
const Moose::Functor< ADReal > & _gravity
Gravitational acceleration in the vertical downward direction.
std::vector< const Moose::Functor< ADReal > * > _forms_losses
Forms loss coefficients of each segment.
const SinglePhaseFluidProperties * _fp_ref
Pure liquid fluid properties reference (for draining problems, not for multiphase flow)
std::vector< const SinglePhaseFluidProperties * > _fp
Fluid properties per segment (non-owning pointers)
std::vector< const ADVariableValue * > _T
Coupled temperature variables.
std::vector< const Moose::Functor< ADReal > * > _dPps
Pump pressure gains of each segment.
virtual ADReal massFlowRate() const =0
std::vector< const Moose::Functor< ADReal > * > _lengths
Length of each segment.
const InputParameters & parameters() const
Common class for single phase fluid properties.