This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new mms tests to test the temporally scaled equations against the…
… originallsolutions.
- Loading branch information
1 parent
35616ba
commit 5655951
Showing
20 changed files
with
584 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef SCALEDPHASETRANSITION_H | ||
#define SCALEPHASETRANSITION_H | ||
|
||
// modules/phase_field includes | ||
#include "ACBulk.h" | ||
|
||
#include "PropertyUserObjectInterface.h" | ||
//Forward Declarations | ||
class ScaledPhaseTransition; | ||
|
||
template<> | ||
InputParameters validParams<ScaledPhaseTransition>(); | ||
|
||
class ScaledPhaseTransition : | ||
public ACBulk, | ||
public PropertyUserObjectInterface | ||
{ | ||
public: | ||
|
||
ScaledPhaseTransition(const std::string & name, InputParameters parameters); | ||
|
||
protected: | ||
virtual Real computeDFDOP(PFFunctionType type); | ||
|
||
private: | ||
VariableValue & _s; | ||
|
||
MaterialProperty<Real> & _lambda; | ||
|
||
MaterialProperty<Real> & _s_eq; | ||
|
||
const Real & _xi; | ||
|
||
}; | ||
#endif // SCALEDPHASETRANSITION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "ScaledPhaseTransition.h" | ||
#include "AirProperties.h" | ||
|
||
template<> | ||
InputParameters validParams<ScaledPhaseTransition>() | ||
{ | ||
InputParameters params = validParams<ACBulk>(); | ||
params.addRequiredCoupledVar("chemical_potential", "The chemical potential variable to couple"); | ||
params.addParam<std::string>("lambda", "lambda", "The name of the material property containing the definition of lambda"); | ||
params.addParam<std::string>("equilibrium_concentration", "equilibrium_concentration", "The name of the material property containing the equilibrium concentration"); | ||
return params; | ||
} | ||
|
||
ScaledPhaseTransition::ScaledPhaseTransition(const std::string & name, InputParameters parameters) : | ||
ACBulk(name, parameters), | ||
PropertyUserObjectInterface(name, parameters), | ||
_s(coupledValue("chemical_potential")), | ||
_lambda(getMaterialProperty<Real>(getParam<std::string>("lambda"))), | ||
_s_eq(getMaterialProperty<Real>(getParam<std::string>("equilibrium_concentration"))), | ||
_xi(_property_uo.getParam<Real>("temporal_scaling")) | ||
{ | ||
} | ||
|
||
Real | ||
ScaledPhaseTransition::computeDFDOP(PFFunctionType type) | ||
{ | ||
switch (type) | ||
{ | ||
case Residual: | ||
return -(_lambda[_qp]*_xi) * (_s[_qp] - _s_eq[_qp]) * (1.0 - _u[_qp]*_u[_qp])*(1.0 - _u[_qp]*_u[_qp]); | ||
|
||
case Jacobian: | ||
return 4.0 * _xi * _lambda[_qp] * _u[_qp] * (-_u[_qp]*_u[_qp]+1.0) * (_s[_qp] - (_s_eq[_qp])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.