https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MathEBFreeEnergy.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "MathEBFreeEnergy.h"
11
13
16{
18 params.addClassDescription("Material that implements the math free energy using the expression "
19 "builder and automatic differentiation");
20 params.addRequiredCoupledVar("c", "Concentration variable");
21 return params;
22}
23
25 : DerivativeParsedMaterialHelper(parameters), _c("c")
26{
27 EBFunction free_energy;
28 // Definition of the free energy for the expression builder
29 free_energy(_c) = 1.0 / 4.0 * (1.0 + _c) * (1.0 + _c) * (1.0 - _c) * (1.0 - _c);
30
31 // Parse function for automatic differentiation
32 functionParse(free_energy);
33}
registerMooseObject("PhaseFieldApp", MathEBFreeEnergy)
static InputParameters validParams()
User facing host object for a function. This combines a term with an argument list.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Material class that creates the math free energy with the expression builder and uses automatic diffe...
static InputParameters validParams()
EBTerm _c
Coupled variable value for the concentration .
MathEBFreeEnergy(const InputParameters &parameters)
void functionParse(const std::string &function_expression)