https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
29public:
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
53protected:
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
70public:
72};
const std::vector< double > y
Base class for caching heat flux between a flow channel and a heat structure.
const std::vector< Real > & getHeatedPerimeter(dof_id_type element_id) const
std::map< dof_id_type, std::vector< Real > > _heated_perimeter
Cached heated perimeter.
std::map< dof_id_type, std::vector< Real > > _heat_flux
Cached heat flux.
const VariableValue & _P_hf
Coupled heated perimeter variable.
const std::vector< DenseVector< Real > > & getHeatFluxJacobian(dof_id_type element_id) const
const dof_id_type & getNearestElem(dof_id_type elem_id) const
Get the nearest element ID for given element ID.
const std::vector< Real > & getHeatFlux(dof_id_type element_id) const
virtual void threadJoin(const UserObject &y) override
std::map< dof_id_type, std::vector< DenseVector< Real > > > _heat_flux_jacobian
Cached heat flux jacobians.
virtual DenseVector< Real > computeQpHeatFluxJacobian()=0
Builds mapping between two aligned subdomains/boundaries.
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
const InputParameters & parameters() const
VariableValueTempl< false > VariableValue