www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TotalFreeEnergy Class Reference

Total free energy (both the bulk and gradient parts), where the bulk free energy has been defined in a material and called f_name. More...

#include <TotalFreeEnergy.h>

Inheritance diagram for TotalFreeEnergy:
[legend]

Public Member Functions

 TotalFreeEnergy (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue ()
 

Protected Attributes

const MaterialProperty< Real > & _F
 Bulk free energy material property. More...
 
std::vector< const MaterialProperty< Real > * > _kappas
 Gradient interface free energy coefficients. More...
 
unsigned int _nvars
 Coupled interface variables. More...
 
std::vector< const VariableValue * > _vars
 
std::vector< const VariableGradient * > _grad_vars
 
std::vector< MaterialPropertyName > _kappa_names
 Gradient free energy prefactor kappa. More...
 
unsigned int _nkappas
 
const VariableValue & _additional_free_energy
 Additional free energy contribution. More...
 

Detailed Description

Total free energy (both the bulk and gradient parts), where the bulk free energy has been defined in a material and called f_name.

Definition at line 22 of file TotalFreeEnergy.h.

Constructor & Destructor Documentation

TotalFreeEnergy::TotalFreeEnergy ( const InputParameters &  parameters)

Definition at line 25 of file TotalFreeEnergy.C.

26  : TotalFreeEnergyBase(parameters), _F(getMaterialProperty<Real>("f_name")), _kappas(_nkappas)
27 {
28  // Error check to ensure size of interfacial_vars is the same as kappa_names
29  if (_nvars != _nkappas)
30  mooseError(
31  "Size of interfacial_vars is not equal to the size of kappa_names in TotalFreeEnergy");
32 
33  // Assign kappa values
34  for (unsigned int i = 0; i < _nkappas; ++i)
35  _kappas[i] = &getMaterialPropertyByName<Real>(_kappa_names[i]);
36 }
unsigned int _nvars
Coupled interface variables.
const MaterialProperty< Real > & _F
Bulk free energy material property.
std::vector< const MaterialProperty< Real > * > _kappas
Gradient interface free energy coefficients.
TotalFreeEnergyBase(const InputParameters &parameters)
std::vector< MaterialPropertyName > _kappa_names
Gradient free energy prefactor kappa.

Member Function Documentation

Real TotalFreeEnergy::computeValue ( )
protectedvirtual

Implements TotalFreeEnergyBase.

Definition at line 39 of file TotalFreeEnergy.C.

40 {
41  // Include bulk energy contribution and additional contributions
42  Real total_energy = _F[_qp] + _additional_free_energy[_qp];
43 
44  // Calculate interfacial energy of each variable
45  for (unsigned int i = 0; i < _nvars; ++i)
46  total_energy += (*_kappas[i])[_qp] / 2.0 * (*_grad_vars[i])[_qp].norm_sq();
47 
48  return total_energy;
49 }
unsigned int _nvars
Coupled interface variables.
const VariableValue & _additional_free_energy
Additional free energy contribution.
const MaterialProperty< Real > & _F
Bulk free energy material property.
std::vector< const MaterialProperty< Real > * > _kappas
Gradient interface free energy coefficients.
const std::string total_energy
Definition: NS.h:19
std::vector< const VariableGradient * > _grad_vars

Member Data Documentation

const VariableValue& TotalFreeEnergyBase::_additional_free_energy
protectedinherited
const MaterialProperty<Real>& TotalFreeEnergy::_F
protected

Bulk free energy material property.

Definition at line 31 of file TotalFreeEnergy.h.

Referenced by computeValue().

std::vector<const VariableGradient *> TotalFreeEnergyBase::_grad_vars
protectedinherited
std::vector<MaterialPropertyName> TotalFreeEnergyBase::_kappa_names
protectedinherited
std::vector<const MaterialProperty<Real> *> TotalFreeEnergy::_kappas
protected

Gradient interface free energy coefficients.

Definition at line 34 of file TotalFreeEnergy.h.

Referenced by computeValue(), and TotalFreeEnergy().

unsigned int TotalFreeEnergyBase::_nkappas
protectedinherited
unsigned int TotalFreeEnergyBase::_nvars
protectedinherited
std::vector<const VariableValue *> TotalFreeEnergyBase::_vars
protectedinherited

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