https://mooseframework.inl.gov
ComplianceSensitivity.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 "ComplianceSensitivity.h"
11 
12 registerMooseObject("SolidMechanicsApp", ComplianceSensitivity);
13 
16 {
18  params.addClassDescription("Computes compliance sensitivity needed for SIMP method.");
19  params.addRequiredCoupledVar("design_density", "Design density variable name.");
20  params.addRequiredParam<MaterialPropertyName>("youngs_modulus",
21  "DerivativeParsedMaterial for Youngs modulus.");
22 
23  return params;
24 }
25 
27  : StrainEnergyDensity(parameters),
28  _sensitivity(declareProperty<Real>(_base_name + "sensitivity")),
29  _design_density(coupledValue("design_density")),
30  _design_density_name(coupledName("design_density", 0)),
31  _dEdp(getMaterialPropertyDerivativeByName<Real>(
32  getParam<MaterialPropertyName>("youngs_modulus"), _design_density_name)),
33  _youngs_modulus(getMaterialProperty<Real>(getParam<MaterialPropertyName>("youngs_modulus")))
34 {
35 }
36 
37 void
39 {
40  // Call the parent class's method to compute the strain energy density
43 }
virtual void computeQpProperties() override
const MaterialProperty< Real > & _youngs_modulus
Young&#39;s modulus of the material.
static InputParameters validParams()
registerMooseObject("SolidMechanicsApp", ComplianceSensitivity)
ComplianceSensitivity(const InputParameters &parameters)
StrainEnergyDensity calculates the strain energy density.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const MaterialProperty< Real > & _dEdp
Derivative of elasticity modulus with respect to pseudo-density.
static InputParameters validParams()
MaterialProperty< Real > & _sensitivity
Sensitivity material generated by this error.
virtual void computeQpProperties() override
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
Computes the elasticity compliance sensitivity with respect to a user-supplied variable.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _strain_energy_density
The strain energy density material property.
void addClassDescription(const std::string &doc_string)