https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeExternalGrainForceAndTorque.h
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#pragma once
11
15
16// Forward Declarations
18
23 : public DerivativeMaterialInterface<ShapeElementUserObject>,
25{
26public:
28
30
31 virtual void initialize();
32 virtual void execute();
33 virtual void executeJacobian(unsigned int jvar);
34 virtual void finalize();
35 virtual void threadJoin(const UserObject & y);
36
37 virtual const std::vector<RealGradient> & getForceValues() const;
38 virtual const std::vector<RealGradient> & getTorqueValues() const;
39 virtual const std::vector<Real> & getForceCJacobians() const;
40 virtual const std::vector<std::vector<Real>> & getForceEtaJacobians() const;
41
42protected:
43 unsigned int _qp;
44
45 VariableName _c_name;
46 unsigned int _c_var;
48 MaterialPropertyName _dF_name;
53 const unsigned int _op_num;
56 unsigned int _grain_num;
57 unsigned int _ncomp;
58
59 std::vector<unsigned int> _vals_var;
60 std::vector<VariableName> _vals_name;
61 std::vector<const MaterialProperty<std::vector<RealGradient>> *> _dFdeta;
62
64 std::vector<RealGradient> _force_values;
65 std::vector<RealGradient> _torque_values;
66
68 std::vector<Real> _force_torque_store;
71 std::vector<std::vector<Real>> _force_torque_eta_jacobian_store;
72
73 unsigned int _total_dofs;
74};
const std::vector< double > y
This class is here to get the force and torque acting on a grain.
std::vector< const MaterialProperty< std::vector< RealGradient > > * > _dFdeta
const unsigned int _op_num
no. of order parameters
std::vector< std::vector< Real > > _force_torque_eta_jacobian_store
virtual const std::vector< RealGradient > & getForceValues() const
virtual const std::vector< RealGradient > & getTorqueValues() const
const MaterialProperty< std::vector< RealGradient > > & _dF
MaterialPropertyName _dF_name
material property that provides force density
virtual const std::vector< std::vector< Real > > & getForceEtaJacobians() const
const MaterialProperty< std::vector< RealGradient > > & _dFdc
material property that provides jacobian of force density with respect to c
std::vector< Real > _force_torque_c_jacobian_store
vector storing jacobian of grain force and torque values
std::vector< RealGradient > _force_values
providing grain forces, torques and their jacobians w. r. t c
std::vector< Real > _force_torque_store
vector storing grain force and torque values
const GrainTrackerInterface & _grain_tracker
provide UserObject for calculating grain volumes and centers
virtual const std::vector< Real > & getForceCJacobians() const
This class provides interface for extracting the forces and torques computed in other UserObjects.
This class defines the interface for the GrainTracking objects.