Commit 6129f614 authored by Kevin Dugan's avatar Kevin Dugan

Restoring coupled grad aux

parent 37f06151
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#ifndef COUPLEDGRADAUX_H
#define COUPLEDGRADAUX_H
#include "AuxKernel.h"
//Forward Declarations
class CoupledGradAux;
template<>
InputParameters validParams<CoupledGradAux>();
/**
* Coupled auxiliary gradient
*/
class CoupledGradAux : public AuxKernel
{
public:
/**
* Factory constructor, takes parameters so that all derived classes can be built using the same
* constructor.
*/
CoupledGradAux(const InputParameters & parameters);
virtual ~CoupledGradAux();
protected:
virtual Real computeValue();
/// Gradient being set by this kernel
RealGradient _grad;
/// The number of coupled variable
int _coupled;
/// The value of coupled gradient
const VariableGradient & _coupled_grad;
/// Thermal conductivity (diffusion coefficient)
const MaterialProperty<Real> & _diffusion_coefficient;
};
#endif //COUPLEDGRADAUX_H
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#include "CoupledGradAux.h"
template<>
InputParameters validParams<CoupledGradAux>()
{
InputParameters params = validParams<AuxKernel>();
params.addRequiredCoupledVar("coupled", "Coupled gradient for calculation");
params.addParam<MaterialPropertyName>("diffusion_coefficient_name",
"thermal_conductivity",
"Property name of the diffusivity (Default: thermal_conductivity)");
return params;
}
CoupledGradAux::CoupledGradAux(const InputParameters & parameters) :
AuxKernel(parameters),
_coupled(coupled("coupled")),
_coupled_grad(coupledGradient("coupled")),
_diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient_name"))
{
}
CoupledGradAux::~CoupledGradAux()
{
}
Real
CoupledGradAux::computeValue()
{
return _coupled_grad[_qp].norm() * _diffusion_coefficient[_qp];
}
......@@ -19,6 +19,9 @@
#include "NekExecutioner.h"
#include "NekTimeStepper.h"
// AuxKernels
#include "CoupledGradAux.h"
template <>
InputParameters
validParams<GiraffeApp>()
......@@ -65,6 +68,8 @@ GiraffeApp::registerObjects(Factory & factory)
registerExecutioner(NekExecutioner);
registerTimeStepper(NekTimeStepper);
registerAuxKernel(CoupledGradAux);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment