https://mooseframework.inl.gov
HeatFluxFromHeatStructureBaseUserObject.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 
12 #include "ElementUserObject.h"
13 #include "MeshAlignment.h"
14 
28 {
29 public:
31 
32  virtual void initialize() override;
33  virtual void execute() override;
34  virtual void finalize() override;
35  virtual void threadJoin(const UserObject & y) override;
36 
37  const std::vector<Real> & getHeatedPerimeter(dof_id_type element_id) const;
38  const std::vector<Real> & getHeatFlux(dof_id_type element_id) const;
39  const std::vector<DenseVector<Real>> & getHeatFluxJacobian(dof_id_type element_id) const;
40 
48  const dof_id_type & getNearestElem(dof_id_type elem_id) const
49  {
50  return _mesh_alignment.getCoupledElemID(elem_id);
51  }
52 
53 protected:
54  virtual Real computeQpHeatFlux() = 0;
55  virtual DenseVector<Real> computeQpHeatFluxJacobian() = 0;
56 
60  unsigned int _qp;
62  std::map<dof_id_type, std::vector<Real>> _heated_perimeter;
64  std::map<dof_id_type, std::vector<Real>> _heat_flux;
66  std::map<dof_id_type, std::vector<DenseVector<Real>>> _heat_flux_jacobian;
69 
70 public:
72 };
const dof_id_type & getNearestElem(dof_id_type elem_id) const
Get the nearest element ID for given element ID.
virtual void threadJoin(const UserObject &y) override
const std::vector< Real > & getHeatedPerimeter(dof_id_type element_id) const
Builds mapping between two aligned subdomains/boundaries.
Definition: MeshAlignment.h:24
const std::vector< double > y
std::map< dof_id_type, std::vector< Real > > _heat_flux
Cached heat flux.
Base class for caching heat flux between a flow channel and a heat structure.
HeatFluxFromHeatStructureBaseUserObject(const InputParameters &parameters)
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
std::map< dof_id_type, std::vector< DenseVector< Real > > > _heat_flux_jacobian
Cached heat flux jacobians.
std::map< dof_id_type, std::vector< Real > > _heated_perimeter
Cached heated perimeter.
OutputTools< Real >::VariableValue VariableValue
const std::vector< Real > & getHeatFlux(dof_id_type element_id) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _P_hf
Coupled heated perimeter variable.
const InputParameters & parameters() const
virtual DenseVector< Real > computeQpHeatFluxJacobian()=0
const std::vector< DenseVector< Real > > & getHeatFluxJacobian(dof_id_type element_id) const
uint8_t dof_id_type