Skip to content
Snippets Groups Projects
Commit 3213c91a authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Add the Burkholder energy density

parent 75fb1e6e
Branches
No related tags found
No related merge requests found
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <dune/elasticity/assemblers/localadolcstiffness.hh> #include <dune/elasticity/assemblers/localadolcstiffness.hh>
#include <dune/elasticity/assemblers/feassembler.hh> #include <dune/elasticity/assemblers/feassembler.hh>
#include <dune/elasticity/materials/neffenergy.hh> #include <dune/elasticity/materials/neffenergy.hh>
#include <dune/elasticity/materials/burkholderenergy.hh>
#include <dune/elasticity/materials/coshenergy.hh> #include <dune/elasticity/materials/coshenergy.hh>
#include <dune/elasticity/materials/dacorognaenergy.hh> #include <dune/elasticity/materials/dacorognaenergy.hh>
#include <dune/elasticity/materials/expacoshenergy.hh> #include <dune/elasticity/materials/expacoshenergy.hh>
...@@ -55,6 +54,33 @@ const int order = 1; ...@@ -55,6 +54,33 @@ const int order = 1;
using namespace Dune; using namespace Dune;
template<int dim, class field_type, class ctype=double>
struct BurkholderDensity final
: public Elasticity::LocalDensity<dim,field_type,ctype>
{
BurkholderDensity(const FieldMatrix<ctype,dim,dim>& F0, const Dune::ParameterTree& parameters)
: F0_(F0)
{
p_ = parameters.template get<double>("p");
}
field_type operator()(const FieldVector<ctype,dim>& x, const FieldMatrix<field_type,dim,dim>& derivative) const
{
auto F = derivative + F0_;
auto det = F.determinant();
auto normSquared = F.frobenius_norm2();
auto lambdaMaxSquared = 0.5 * (normSquared + std::sqrt(normSquared*normSquared - 4*det*det));
auto lambdaMax = std::sqrt(lambdaMaxSquared);
return -0.5 * p_ * det * std::pow(lambdaMax,p_-2) - 0.5*(2-p_) * std::pow(lambdaMax,p_);
}
FieldMatrix<ctype,dim,dim> F0_;
double p_;
};
template<int dim, class field_type, class ctype=double> template<int dim, class field_type, class ctype=double>
struct KPowerDensity final struct KPowerDensity final
: public Elasticity::LocalDensity<dim,field_type,ctype> : public Elasticity::LocalDensity<dim,field_type,ctype>
...@@ -491,11 +517,14 @@ int main (int argc, char *argv[]) try ...@@ -491,11 +517,14 @@ int main (int argc, char *argv[]) try
adouble> >(density); adouble> >(density);
} }
// if (parameterSet.get<std::string>("energy") == "burkholder") if (parameterSet.get<std::string>("energy") == "burkholder")
// elasticEnergy = std::make_shared<Elasticity::BurkholderEnergy<GridView, {
// FEBasis::LocalView::Tree::FiniteElement, auto density = std::make_shared<BurkholderDensity<dim,adouble> >(F0,materialParameters);
// adouble> >(materialParameters); elasticEnergy = std::make_shared<Elasticity::LocalIntegralEnergy<GridView,
// FEBasis::LocalView::Tree::FiniteElement,
adouble> >(density);
}
// if (parameterSet.get<std::string>("energy") == "w2") // if (parameterSet.get<std::string>("energy") == "w2")
// elasticEnergy = std::make_shared<Elasticity::NeffW2Energy<GridView, // elasticEnergy = std::make_shared<Elasticity::NeffW2Energy<GridView,
// FEBasis::LocalView::Tree::FiniteElement, // FEBasis::LocalView::Tree::FiniteElement,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment