Memosa-FVM  0.2
RosselandModel< T >::Impl Class Reference

#include <RosselandModel_impl.h>

Collaboration diagram for RosselandModel< T >::Impl:

Public Types

typedef Array< T > TArray
 

Public Member Functions

 Impl (const GeomFields &geomFields, ThermalFields &thermalFields, const MeshList &meshes)
 
VCMapgetVCMap ()
 
void init ()
 
bool advance (const int niter, bool init=false)
 

Private Attributes

const MeshList _meshes
 
const GeomFields_geomFields
 
ThermalFields_thermalFields
 
VCMap _vcMap
 

Detailed Description

template<class T>
class RosselandModel< T >::Impl

Definition at line 13 of file RosselandModel_impl.h.

Member Typedef Documentation

template<class T>
typedef Array<T> RosselandModel< T >::Impl::TArray

Definition at line 16 of file RosselandModel_impl.h.

Constructor & Destructor Documentation

template<class T>
RosselandModel< T >::Impl::Impl ( const GeomFields geomFields,
ThermalFields thermalFields,
const MeshList meshes 
)
inline

Definition at line 18 of file RosselandModel_impl.h.

References Model::_meshes, and Mesh::getID().

20  :
21  _meshes(meshes),
22  _geomFields(geomFields),
23  _thermalFields(thermalFields)
24  {
25  const int numMeshes = _meshes.size();
26  for (int n=0; n<numMeshes; n++)
27  {
28  const Mesh& mesh = *_meshes[n];
29 
30  RosselandVC<T> *vc(new RosselandVC<T>());
31  _vcMap[mesh.getID()] = vc;
32  }
33  }
ThermalFields & _thermalFields
Definition: Mesh.h:49
const GeomFields & _geomFields
int getID() const
Definition: Mesh.h:106

Member Function Documentation

template<class T>
bool RosselandModel< T >::Impl::advance ( const int  niter,
bool  init = false 
)
inline

Definition at line 39 of file RosselandModel_impl.h.

References Model::_meshes, Mesh::getCells(), StorageSite::getCount(), Mesh::getID(), and FloatVarDict< T >::getVal().

40  {
41  const int numMeshes = _meshes.size();
42  for (int n=0; n<numMeshes; n++)
43  {
44  const Mesh& mesh = *_meshes[n];
45 
46  const RosselandVC<T>& vc = *_vcMap[mesh.getID()];
47 
48  const StorageSite& cells = mesh.getCells();
49 
50  TArray& conductivity= dynamic_cast<TArray&>(_thermalFields.conductivity[cells]);
51 
52  FloatValEvaluator<T> cellT(vc.getVal("temperature"),cells);
53 
54  const int nCells = cells.getCount();
55  const float stefan = 0.0000000567;
56  const T index(1.);
57  const T a(1.);
58  const T sigmas(0.);
59  const T C(1.0);
60  const T gamma = 1/(3*(a+sigmas) - C*sigmas);
61  for(int c=0; c<nCells; c++)
62  {
63 
64  T temp = cellT[c];
65 
66  conductivity[c] = 16*stefan*gamma*index*index*temp*temp*temp;
67  }
68  }
69  return true;
70  }
ThermalFields & _thermalFields
Field conductivity
Definition: ThermalFields.h:22
Definition: Mesh.h:49
FloatVal< T > getVal(const string varName) const
Definition: FloatVarDict.h:85
const StorageSite & getCells() const
Definition: Mesh.h:109
int getCount() const
Definition: StorageSite.h:39
int getID() const
Definition: Mesh.h:106
template<class T>
VCMap& RosselandModel< T >::Impl::getVCMap ( )
inline

Definition at line 35 of file RosselandModel_impl.h.

35 {return _vcMap;}
template<class T>
void RosselandModel< T >::Impl::init ( )
inline

Definition at line 37 of file RosselandModel_impl.h.

References RosselandModel< T >::advance().

37 { advance(1,true); }
bool advance(const int niter, bool init=false)

Member Data Documentation

template<class T>
const GeomFields& RosselandModel< T >::Impl::_geomFields
private

Definition at line 75 of file RosselandModel_impl.h.

template<class T>
const MeshList RosselandModel< T >::Impl::_meshes
private

Definition at line 74 of file RosselandModel_impl.h.

template<class T>
ThermalFields& RosselandModel< T >::Impl::_thermalFields
private

Definition at line 76 of file RosselandModel_impl.h.

template<class T>
VCMap RosselandModel< T >::Impl::_vcMap
private

Definition at line 78 of file RosselandModel_impl.h.


The documentation for this class was generated from the following file: