Advanced Multi-Physics (AMP)
On-Line Documentation
FlowFrapconOperator.h
Go to the documentation of this file.
1
2#ifndef included_AMP_FlowFrapconOperator
3#define included_AMP_FlowFrapconOperator
4
5#include "AMP/operators/Operator.h"
6
7
8namespace AMP::Operator {
9
15{
16public:
21 explicit FlowFrapconOperator( std::shared_ptr<const OperatorParameters> params );
22
27
28 std::string type() const override { return "FlowFrapconOperator"; }
29
37
42 void reset( std::shared_ptr<const OperatorParameters> params ) override;
43
44 /*
45 static bool sort_nodes_in_z ( const libMesh::Node *one , const libMesh::Node *two ) {
46 return (*one)(2) < (*two)(2);
47 }
48 */
49 std::shared_ptr<AMP::LinearAlgebra::Variable> createInputVariable( const std::string &name,
50 int varId = -1 )
51 {
52 (void) varId;
53 return d_inpVariable->clone( name );
54 }
55
56 std::shared_ptr<AMP::LinearAlgebra::Variable> createOutputVariable( const std::string &name,
57 int varId = -1 )
58 {
59 (void) varId;
60 return d_outVariable->clone( name );
61 }
62
63 std::shared_ptr<AMP::LinearAlgebra::Variable> getInputVariable() const override
64 {
65 return d_inpVariable;
66 }
67
68 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override
69 {
70 return d_outVariable;
71 }
72
73 std::shared_ptr<AMP::LinearAlgebra::VectorSelector> selectOutputVector() const override;
74
75 std::shared_ptr<AMP::LinearAlgebra::VectorSelector> selectInputVector() const override;
76
80 void setZLocations( const std::vector<double> &zloc ) { zPoints = zloc; }
81
83
85
87 const auto &getZLocations() { return zPoints; }
88
89 double getHeatCapacity( double T_b )
90 {
91 double cp = 0;
92
93 if ( T_b < 544 ) {
94
95 cp = 2.4e5;
96 } else if ( 544 <= T_b && T_b < 588 ) {
97
98 cp = 2.4e5 * ( 1.0 + 2.9e-3 * ( 1.8 * T_b - 1031.0 ) );
99 } else {
100
101 cp = 2.4e5 * ( 1.0 + 2.9e-3 * ( 1.8 * T_b - 979.4 ) );
102 }
103
104 return cp;
105 }
106
107public: // Data members (should be private)
109 int d_numpoints = 0;
110 std::vector<unsigned int> d_dofIds;
111 std::vector<double> zPoints;
113 double d_De = 0;
114 double Cp = 0;
115 double d_G = 0;
116 double d_Tin = 0;
117 double d_K = 0;
118 double d_Re = 0;
119 double d_Pr = 0;
120 std::shared_ptr<AMP::LinearAlgebra::Variable> d_inpVariable;
121 std::shared_ptr<AMP::LinearAlgebra::Variable> d_outVariable;
122
123protected:
128 std::shared_ptr<OperatorParameters>
130
131private:
132};
133} // namespace AMP::Operator
134
135#endif
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
std::shared_ptr< AMP::LinearAlgebra::VectorSelector > selectInputVector() const override
Return the selector for input vectors.
const auto & getZLocations()
This member function returns the 1D locations stl vector.
std::shared_ptr< AMP::LinearAlgebra::Variable > d_inpVariable
Prandtl Number.
std::vector< unsigned int > d_dofIds
Number of points in z direction *‍/.
AMP::LinearAlgebra::Vector::shared_ptr getVector()
double d_G
Heat Capacity of Coolant.
void setZLocations(const std::vector< double > &zloc)
std::shared_ptr< AMP::LinearAlgebra::Variable > d_outVariable
std::shared_ptr< AMP::LinearAlgebra::VectorSelector > selectOutputVector() const override
Return the selector for output vectors.
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::LinearAlgebra::Variable > getInputVariable() const override
Return the input variable.
std::shared_ptr< AMP::LinearAlgebra::Variable > createOutputVariable(const std::string &name, int varId=-1)
FlowFrapconOperator(std::shared_ptr< const OperatorParameters > params)
void reset(std::shared_ptr< const OperatorParameters > params) override
void setVector(AMP::LinearAlgebra::Vector::shared_ptr frozenVec)
AMP::LinearAlgebra::Vector::shared_ptr d_cladVec
vector to hold z locations *‍/
std::shared_ptr< AMP::LinearAlgebra::Variable > createInputVariable(const std::string &name, int varId=-1)
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
std::shared_ptr< OperatorParameters > getJacobianParameters(AMP::LinearAlgebra::Vector::const_shared_ptr u) override
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page