GRINS-0.8.0
List of all members | Public Member Functions | Private Member Functions
GRINS::SpectroscopicAbsorption Class Reference

QoI class for absorption calculations using the Beer-Lambert Law. More...

#include <spectroscopic_absorption.h>

Inheritance diagram for GRINS::SpectroscopicAbsorption:
Inheritance graph
[legend]
Collaboration diagram for GRINS::SpectroscopicAbsorption:
Collaboration graph
[legend]

Public Member Functions

 SpectroscopicAbsorption (const GetPot &input, const std::string &qoi_name, SharedPtr< FEMFunctionAndDerivativeBase< libMesh::Real > > absorb)
 
virtual QoIBaseclone () const
 Required to provide clone (deep-copy) for adding QoI object to libMesh objects. More...
 
virtual void parallel_op (const libMesh::Parallel::Communicator &communicator, libMesh::Number &sys_qoi, libMesh::Number &local_qoi)
 Override the QoIBase implementation to perform exp(-kv*L) More...
 
- Public Member Functions inherited from GRINS::IntegratedFunction< FEMFunctionAndDerivativeBase< libMesh::Real > >
 IntegratedFunction (unsigned int p_level, SharedPtr< FEMFunctionAndDerivativeBase< libMesh::Real > > f, RayfireMesh *rayfire, const std::string &qoi_name)
 Constructor. More...
 
 IntegratedFunction (const GetPot &input, unsigned int p_level, SharedPtr< FEMFunctionAndDerivativeBase< libMesh::Real > > f, const std::string &input_qoi_string, const std::string &qoi_name)
 Constructor. More...
 
 IntegratedFunction (const IntegratedFunction &original)
 Copy Constructor. More...
 
virtual bool assemble_on_interior () const
 Does the QoI need an element interior assembly loop? More...
 
virtual bool assemble_on_sides () const
 Does the QoI need a domain boundary assembly loop? More...
 
virtual void element_qoi (AssemblyContext &context, const unsigned int qoi_index)
 Compute the qoi value. More...
 
virtual void element_qoi_derivative (AssemblyContext &context, const unsigned int qoi_index)
 Compute the qoi derivative with respect to the solution. More...
 
virtual void init (const GetPot &input, const MultiphysicsSystem &system, unsigned int qoi_num)
 Initializes the rayfire with the mesh from system. More...
 
virtual void reinit (MultiphysicsSystem &system)
 Reinitialize the rayfire. More...
 
const RayfireMeshget_rayfire ()
 
- Public Member Functions inherited from GRINS::QoIBase
 QoIBase (const std::string &qoi_name)
 
virtual ~QoIBase ()
 
virtual void init_context (AssemblyContext &)
 
virtual void side_qoi (AssemblyContext &, const unsigned int)
 Compute the qoi value on the domain boundary. More...
 
virtual void side_qoi_derivative (AssemblyContext &, const unsigned int)
 Compute the qoi derivative with respect to the solution on the domain boundary. More...
 
virtual void thread_join (libMesh::Number &qoi, const libMesh::Number &other_qoi)
 Call the operation to accumulate this QoI from multiple threads. More...
 
virtual void output_qoi (std::ostream &out) const
 Basic output for computed QoI's. More...
 
libMesh::Number value () const
 Returns the current QoI value. More...
 
const std::string & name () const
 Returns the name of this QoI. More...
 
- Public Member Functions inherited from GRINS::ParameterUser
 ParameterUser (const std::string &user_name)
 
virtual ~ParameterUser ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 
virtual void set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void register_parameter (const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 

Private Member Functions

 SpectroscopicAbsorption ()
 

Additional Inherited Members

- Static Public Attributes inherited from GRINS::ParameterUser
static std::string zero_vector_function = std::string("{0}")
 A parseable function string with LIBMESH_DIM components, all 0. More...
 
- Protected Attributes inherited from GRINS::QoIBase
std::string _qoi_name
 
libMesh::Number _qoi_value
 

Detailed Description

QoI class for absorption calculations using the Beer-Lambert Law.

Relies upon the IntegratedFunction class for hooking into QoI infrastructure, and AbsorptionCoeff class for evaluating the spectral absorption coefficient, $ k_{\nu} $

$ \frac{I_{\nu}}{I_{\nu}^0} = \exp\left\{- \int_0^L k_{\nu} dx\right\} $

where $ \frac{I_{\nu}}{I_{\nu}^0} $ is the spectral absorption

Expects all parameters given in standard SI units [m], [K], [Pa]

Definition at line 48 of file spectroscopic_absorption.h.

Constructor & Destructor Documentation

GRINS::SpectroscopicAbsorption::SpectroscopicAbsorption ( const GetPot &  input,
const std::string &  qoi_name,
SharedPtr< FEMFunctionAndDerivativeBase< libMesh::Real > >  absorb 
)
Parameters
absorbAbsorptionCoeff object

Definition at line 45 of file spectroscopic_absorption.C.

46  : IntegratedFunction<FEMFunctionAndDerivativeBase<libMesh::Real> >(input,2 /* QGauss order */,absorb,"SpectroscopicAbsorption",qoi_name)
47  {}
GRINS::SpectroscopicAbsorption::SpectroscopicAbsorption ( )
private

Referenced by clone().

Member Function Documentation

QoIBase * GRINS::SpectroscopicAbsorption::clone ( ) const
virtual

Required to provide clone (deep-copy) for adding QoI object to libMesh objects.

Reimplemented from GRINS::IntegratedFunction< FEMFunctionAndDerivativeBase< libMesh::Real > >.

Definition at line 49 of file spectroscopic_absorption.C.

References SpectroscopicAbsorption().

50  {
51  return new SpectroscopicAbsorption( *this );
52  }
void GRINS::SpectroscopicAbsorption::parallel_op ( const libMesh::Parallel::Communicator &  communicator,
libMesh::Number &  sys_qoi,
libMesh::Number &  local_qoi 
)
virtual

Override the QoIBase implementation to perform exp(-kv*L)

Reimplemented from GRINS::QoIBase.

Definition at line 54 of file spectroscopic_absorption.C.

References GRINS::QoIBase::_qoi_value, and GRINS::QoIBase::parallel_op().

57  {
58  QoIBase::parallel_op(communicator,sys_qoi,local_qoi);
59 
60  // absorption coefficient is calculated in [cm^-1], but path length is given in [m]
61  // 100.0 factor converts pathlength to [cm]
62  sys_qoi = std::exp( -sys_qoi * 100.0 );
63  QoIBase::_qoi_value = sys_qoi;
64  }
libMesh::Number _qoi_value
Definition: qoi_base.h:132
virtual void parallel_op(const libMesh::Parallel::Communicator &communicator, libMesh::Number &sys_qoi, libMesh::Number &local_qoi)
Call the parallel operation for this QoI and cache the value.
Definition: qoi_base.C:45

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

Generated on Tue Dec 19 2017 12:47:32 for GRINS-0.8.0 by  doxygen 1.8.9.1