| 1 |
// @HEADER |
| 2 |
// ***************************************************************************** |
| 3 |
// NOX: An Object-Oriented Nonlinear Solver Package |
| 4 |
// |
| 5 |
// Copyright 2002 NTESS and the NOX contributors. |
| 6 |
// SPDX-License-Identifier: BSD-3-Clause |
| 7 |
// ***************************************************************************** |
| 8 |
// @HEADER |
| 9 |
|
| 10 |
// 1D Linear basis function for finite element method |
| 11 |
|
| 12 |
#ifndef _NOX_TEST_EPETRA_PELLETTRANSPORT_MATERIALPROPS_H |
| 13 |
#define _NOX_TEST_EPETRA_PELLETTRANSPORT_MATERIALPROPS_H |
| 14 |
|
| 15 |
#include "Teuchos_RCP.hpp" |
| 16 |
#include <string> |
| 17 |
|
| 18 |
#include "PelletTransport.H" |
| 19 |
|
| 20 |
class MaterialPropBase { |
| 21 |
|
| 22 |
public: |
| 23 |
|
| 24 |
class PropData |
| 25 |
{ |
| 26 |
public: |
| 27 |
|
| 28 |
double density ; |
| 29 |
double k_thermal ; |
| 30 |
double Cp ; |
| 31 |
double Qstar ; |
| 32 |
double Qdot ; |
| 33 |
double thermoF ; |
| 34 |
double D_diff ; |
| 35 |
}; |
| 36 |
|
| 37 |
// Constructor |
| 38 |
MaterialPropBase() { } |
| 39 |
|
| 40 |
// Destructor |
| 41 |
virtual ~MaterialPropBase() { } |
| 42 |
|
| 43 |
// Calculates the values of u and x at the specified gauss point |
| 44 |
virtual void computeProps( double T, double x, PropData & props ) = 0; |
| 45 |
|
| 46 |
virtual PelletTransport::ACTIVE_REGIONS get_property_type() |
| 47 |
{ return PelletTransport::NONE; } |
| 48 |
|
| 49 |
}; |
| 50 |
|
| 51 |
class MaterialPropFactory { |
| 52 |
|
| 53 |
public: |
| 54 |
|
| 55 |
static MaterialPropFactory & factory(); |
| 56 |
|
| 57 |
static void computeProps( PelletTransport::ACTIVE_REGIONS propType, double T, double x, MaterialPropBase::PropData & props ) |
| 58 |
{ return factory().property_models[propType]->computeProps( T, x, props ); } |
| 59 |
|
| 60 |
MaterialPropBase * add_model( MaterialPropBase * ); |
| 61 |
const MaterialPropBase & get_model( PelletTransport::ACTIVE_REGIONS ); |
| 62 |
|
| 63 |
private: |
| 64 |
|
| 65 |
MaterialPropFactory() { }; |
| 66 |
~MaterialPropFactory(); |
| 67 |
MaterialPropFactory( const MaterialPropFactory & ); |
| 68 |
|
| 69 |
map< PelletTransport::ACTIVE_REGIONS, Teuchos::RCP<MaterialPropBase> > property_models; |
| 70 |
|
| 71 |
}; |
| 72 |
|
| 73 |
class MaterialProp_He : public MaterialPropBase |
| 74 |
{ |
| 75 |
|
| 76 |
public: |
| 77 |
|
| 78 |
// Constructor |
| 79 |
MaterialProp_He(); |
| 80 |
|
| 81 |
// Destructor |
| 82 |
virtual ~MaterialProp_He() { } |
| 83 |
|
| 84 |
// Calculates the values of u and x at the specified gauss point |
| 85 |
void computeProps( double T, double x, MaterialPropBase::PropData & props ); |
| 86 |
|
| 87 |
PelletTransport::ACTIVE_REGIONS get_property_type(); |
| 88 |
|
| 89 |
}; |
| 90 |
|
| 91 |
class MaterialProp_UO2 : public MaterialPropBase |
| 92 |
{ |
| 93 |
|
| 94 |
public: |
| 95 |
|
| 96 |
// Constructor |
| 97 |
MaterialProp_UO2(); |
| 98 |
|
| 99 |
// Destructor |
| 100 |
virtual ~MaterialProp_UO2() { } |
| 101 |
|
| 102 |
// Calculates the values of u and x at the specified gauss point |
| 103 |
void computeProps( double T, double x, MaterialPropBase::PropData & props ); |
| 104 |
|
| 105 |
PelletTransport::ACTIVE_REGIONS get_property_type(); |
| 106 |
|
| 107 |
void set_qdot( double qdot_ ) |
| 108 |
{ qdot = qdot_; } |
| 109 |
|
| 110 |
void set_xB( double xB_ ) |
| 111 |
{ xB = xB_; } |
| 112 |
|
| 113 |
const double & get_xB( ) const |
| 114 |
{ return xB; } |
| 115 |
|
| 116 |
private: |
| 117 |
|
| 118 |
double qdot; |
| 119 |
double xB; |
| 120 |
|
| 121 |
}; |
| 122 |
|
| 123 |
class MaterialProp_Clad : public MaterialPropBase |
| 124 |
{ |
| 125 |
|
| 126 |
public: |
| 127 |
|
| 128 |
// Constructor |
| 129 |
MaterialProp_Clad(); |
| 130 |
|
| 131 |
// Destructor |
| 132 |
virtual ~MaterialProp_Clad() { } |
| 133 |
|
| 134 |
// Calculates the values of u and x at the specified gauss point |
| 135 |
void computeProps( double T, double x, MaterialPropBase::PropData & props ); |
| 136 |
|
| 137 |
PelletTransport::ACTIVE_REGIONS get_property_type(); |
| 138 |
|
| 139 |
}; |
| 140 |
|
| 141 |
#endif |