OOFEM
3.0
Loading...
Searching...
No Matches
src
tm
Elements
tr1_ht.C
Go to the documentation of this file.
1
/*
2
*
3
* ##### ##### ###### ###### ### ###
4
* ## ## ## ## ## ## ## ### ##
5
* ## ## ## ## #### #### ## # ##
6
* ## ## ## ## ## ## ## ##
7
* ## ## ## ## ## ## ## ##
8
* ##### ##### ## ###### ## ##
9
*
10
*
11
* OOFEM : Object Oriented Finite Element Code
12
*
13
* Copyright (C) 1993 - 2025 Borek Patzak
14
*
15
*
16
*
17
* Czech Technical University, Faculty of Civil Engineering,
18
* Department of Structural Mechanics, 166 29 Prague, Czech Republic
19
*
20
* This library is free software; you can redistribute it and/or
21
* modify it under the terms of the GNU Lesser General Public
22
* License as published by the Free Software Foundation; either
23
* version 2.1 of the License, or (at your option) any later version.
24
*
25
* This program is distributed in the hope that it will be useful,
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
* Lesser General Public License for more details.
29
*
30
* You should have received a copy of the GNU Lesser General Public
31
* License along with this library; if not, write to the Free Software
32
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33
*/
34
35
#include "
tm/Elements/tr1_ht.h
"
36
#include "
fei2dtrlin.h
"
37
#include "
crosssection.h
"
38
#include "
gausspoint.h
"
39
#include "
gaussintegrationrule.h
"
40
#include "
floatmatrix.h
"
41
#include "
floatarray.h
"
42
#include "
intarray.h
"
43
#include "
mathfem.h
"
44
#include "
classfactory.h
"
45
46
47
namespace
oofem
{
48
REGISTER_Element
(
Tr1_ht
);
49
REGISTER_Element
(
Tr1_hmt
);
50
REGISTER_Element
(
Tr1_mt
);
51
52
FEI2dTrLin
Tr1_ht :: interp(1, 2);
53
54
Tr1_ht :: Tr1_ht(
int
n,
Domain
*aDomain) :
55
TransportElement
(n, aDomain,
HeatTransferEM
),
SpatialLocalizerInterface
(this),
ZZNodalRecoveryModelInterface
(this)
56
{
57
numberOfDofMans
= 3;
58
numberOfGaussPoints
= 1;
59
}
60
61
Tr1_hmt :: Tr1_hmt(
int
n,
Domain
*aDomain) :
Tr1_ht
(n, aDomain)
62
{
63
emode
=
HeatMass1TransferEM
;
64
}
65
66
Tr1_mt :: Tr1_mt(
int
n,
Domain
*aDomain) :
Tr1_ht
(n, aDomain)
67
{
68
emode
=
Mass1TransferEM
;
69
}
70
71
72
FEInterpolation
*
73
Tr1_ht :: giveInterpolation()
const
{
return
& this->
interp
; }
74
75
void
76
Tr1_ht :: computeGaussPoints()
77
{
78
if
(
integrationRulesArray
.size() == 0 ) {
79
integrationRulesArray
.resize( 1 );
80
integrationRulesArray
[ 0 ] = std::make_unique<GaussIntegrationRule>(1,
this
, 1, 3);
81
this->
giveCrossSection
()->setupIntegrationPoints(*
integrationRulesArray
[ 0 ],
numberOfGaussPoints
,
this
);
82
}
83
}
84
85
86
void
87
Tr1_ht :: initializeFrom(
InputRecord
&ir,
int
priority)
88
{
89
TransportElement :: initializeFrom(ir, priority);
90
}
91
92
93
double
94
Tr1_ht :: computeVolumeAround(
GaussPoint
*gp)
95
{
96
double
determinant = fabs( this->
interp
.giveTransformationJacobian( gp->
giveNaturalCoordinates
(),
FEIElementGeometryWrapper
(
this
) ) );
97
double
weight = gp->
giveWeight
();
98
return
determinant * weight * this->
giveCrossSection
()->give(
CS_Thickness
, gp);
99
}
100
101
102
double
103
Tr1_ht :: giveThicknessAt(
const
FloatArray
&gcoords)
104
{
105
return
this->
giveCrossSection
()->give(
CS_Thickness
, gcoords,
this
,
false
);
106
}
107
108
109
double
110
Tr1_ht :: computeEdgeVolumeAround(
GaussPoint
*gp,
int
iEdge)
111
{
112
double
determinant = fabs( this->
interp
.edgeGiveTransformationJacobian( iEdge, gp->
giveNaturalCoordinates
(),
FEIElementGeometryWrapper
(
this
) ) );
113
FloatArray
gc
;
114
double
thick = this->
giveCrossSection
()->give(
CS_Thickness
, gp->
giveNaturalCoordinates
(), NULL);
// 't'
115
return
determinant * thick * gp->
giveWeight
();
116
}
117
118
119
Interface
*
120
Tr1_ht :: giveInterface(
InterfaceType
interface)
121
{
122
if
( interface ==
SpatialLocalizerInterfaceType
) {
123
return
static_cast<
SpatialLocalizerInterface
*
>
(
this
);
124
}
else
if
( interface ==
EIPrimaryFieldInterfaceType
) {
125
return
static_cast<
EIPrimaryFieldInterface
*
>
(
this
);
126
}
else
if
( interface ==
ZZNodalRecoveryModelInterfaceType
) {
127
return
static_cast<
ZZNodalRecoveryModelInterface
*
>
(
this
);
128
}
129
130
return
nullptr
;
131
}
132
133
}
// end namespace oofem
classfactory.h
REGISTER_Element
#define REGISTER_Element(class)
Definition
classfactory.h:131
oofem::Domain
Definition
domain.h:121
oofem::EIPrimaryFieldInterface
Definition
primaryfield.h:59
oofem::Element::numberOfDofMans
int numberOfDofMans
Number of dofmanagers.
Definition
element.h:136
oofem::Element::integrationRulesArray
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition
element.h:157
oofem::Element::numberOfGaussPoints
int numberOfGaussPoints
Definition
element.h:175
oofem::Element::giveCrossSection
CrossSection * giveCrossSection()
Definition
element.C:534
oofem::FEI2dTrLin
Definition
fei2dtrlin.h:45
oofem::FEIElementGeometryWrapper
Definition
feinterpol.h:108
oofem::FEInterpolation
Definition
feinterpol.h:175
oofem::FloatArray
Definition
floatarray.h:92
oofem::GaussPoint
Definition
gausspoint.h:95
oofem::GaussPoint::giveNaturalCoordinates
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition
gausspoint.h:138
oofem::GaussPoint::giveWeight
double giveWeight()
Returns integration weight of receiver.
Definition
gausspoint.h:180
oofem::InputRecord
Definition
inputrecord.h:98
oofem::Interface
Definition
interface.h:83
oofem::SpatialLocalizerInterface::SpatialLocalizerInterface
SpatialLocalizerInterface(Element *element)
Definition
spatiallocalizer.h:65
oofem::Tr1_hmt
Definition
tr1_ht.h:107
oofem::Tr1_ht
Definition
tr1_ht.h:54
oofem::Tr1_ht::interp
static FEI2dTrLin interp
Definition
tr1_ht.h:56
oofem::Tr1_ht::Tr1_ht
Tr1_ht(int n, Domain *d)
Definition
tr1_ht.C:54
oofem::Tr1_mt
Definition
tr1_ht.h:93
oofem::TransportElement::TransportElement
TransportElement(int n, Domain *d, ElementMode em=HeatTransferEM)
Definition
transportelement.C:75
oofem::TransportElement::Mass1TransferEM
@ Mass1TransferEM
Definition
transportelement.h:57
oofem::TransportElement::HeatTransferEM
@ HeatTransferEM
Definition
transportelement.h:57
oofem::TransportElement::HeatMass1TransferEM
@ HeatMass1TransferEM
Definition
transportelement.h:57
oofem::TransportElement::emode
ElementMode emode
Definition
transportelement.h:60
oofem::ZZNodalRecoveryModelInterface::ZZNodalRecoveryModelInterface
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
Definition
zznodalrecoverymodel.h:106
crosssection.h
fei2dtrlin.h
floatarray.h
floatmatrix.h
gaussintegrationrule.h
gausspoint.h
intarray.h
mathfem.h
oofem
Definition
additivemanufacturingproblem.C:83
oofem::CS_Thickness
@ CS_Thickness
Thickness.
Definition
crosssection.h:59
oofem::InterfaceType
InterfaceType
Definition
interfacetype.h:43
oofem::ZZNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
Definition
interfacetype.h:49
oofem::EIPrimaryFieldInterfaceType
@ EIPrimaryFieldInterfaceType
Definition
interfacetype.h:60
oofem::SpatialLocalizerInterfaceType
@ SpatialLocalizerInterfaceType
Definition
interfacetype.h:57
gc
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
tr1_ht.h
This page is part of the
OOFEM-3.0
documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at
for OOFEM by
doxygen
1.15.0 written by
Dimitri van Heesch
, © 1997-2011