• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

FELIX_ViscosityFO.hpp

Go to the documentation of this file.
00001 //*****************************************************************//
00002 //    Albany 2.0:  Copyright 2012 Sandia Corporation               //
00003 //    This Software is released under the BSD license detailed     //
00004 //    in the file "license.txt" in the top-level Albany directory  //
00005 //*****************************************************************//
00006 
00007 #ifndef FELIX_VISCOSITYFO_HPP
00008 #define FELIX_VISCOSITYFO_HPP
00009 
00010 #include "Phalanx_ConfigDefs.hpp"
00011 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00012 #include "Phalanx_Evaluator_Derived.hpp"
00013 #include "Phalanx_MDField.hpp"
00014 #include "Sacado_ParameterAccessor.hpp" 
00015 #include "Albany_Layouts.hpp"
00016 
00017 namespace FELIX {
00024 template<typename EvalT, typename Traits>
00025 class ViscosityFO : public PHX::EvaluatorWithBaseImpl<Traits>,
00026         public PHX::EvaluatorDerived<EvalT, Traits>,
00027         public Sacado::ParameterAccessor<EvalT, SPL_Traits> {
00028 
00029 public:
00030 
00031   typedef typename EvalT::ScalarT ScalarT;
00032 
00033   ViscosityFO(const Teuchos::ParameterList& p,
00034               const Teuchos::RCP<Albany::Layouts>& dl);
00035 
00036   void postRegistrationSetup(typename Traits::SetupData d,
00037                       PHX::FieldManager<Traits>& vm);
00038 
00039   void evaluateFields(typename Traits::EvalData d);
00040 
00041   ScalarT& getValue(const std::string &n); 
00042 
00043   template <typename DataType>
00044   DataType flowRate (DataType T)
00045   {
00046       return (T < 263) ? 1.3e7 / exp (6.0e4 / 8.314 / T) : 6.26e22 / exp (1.39e5 / 8.314 / T);
00047   }
00048 
00049 private:
00050  
00051   typedef typename EvalT::MeshScalarT MeshScalarT;
00052 
00053   ScalarT homotopyParam;
00054 
00055   //coefficients for Glen's law
00056   double A; 
00057   double n; 
00058 
00059   // Input:
00060   PHX::MDField<ScalarT,Cell,QuadPoint,VecDim,Dim> Ugrad;
00061   PHX::MDField<MeshScalarT,Cell,QuadPoint, Dim> coordVec;
00062   PHX::MDField<ScalarT,Cell> temperature;
00063   PHX::MDField<ScalarT,Cell> flowFactorA;  //this is the coefficient A.  To distinguish it from the scalar flowFactor defined in the body of the function, it is called flowFactorA.  Probably this should be changed at some point...
00064 
00065   // Output:
00066   PHX::MDField<ScalarT,Cell,QuadPoint> mu;
00067 
00068   unsigned int numQPs, numDims, numNodes;
00069   
00070   enum VISCTYPE {CONSTANT, EXPTRIG, GLENSLAW};
00071   enum FLOWRATETYPE {UNIFORM, TEMPERATUREBASED, FROMFILE};
00072   VISCTYPE visc_type;
00073   FLOWRATETYPE flowRate_type;
00074  
00075 };
00076 
00077 }
00078 
00079 #endif

Generated on Wed Mar 26 2014 18:36:38 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1