OOFEM 3.0
Loading...
Searching...
No Matches
isoheatmat.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
36#include "floatmatrix.h"
37#include "function.h"
38#include "gausspoint.h"
39#include "classfactory.h"
40#include "engngm.h"
41
42namespace oofem {
44
45IsotropicHeatTransferMaterial :: IsotropicHeatTransferMaterial(int n, Domain *d) : TransportMaterial(n, d) { }
46
47
48void
58
59double
60IsotropicHeatTransferMaterial :: giveProperty(int aProperty, GaussPoint *gp, TimeStep *tStep) const
61{
62 if ( aProperty == 'k' ) { //thermal conductivity [W/m/K]
63 return conductivity.eval( { { "te", giveTemperature(gp) }, { "t", tStep->giveIntrinsicTime() } }, this->giveDomain(), gp, giveTemperature(gp) );
64 } else if ( aProperty == 'c' ) { //mass-specific heat capacity [J/kg/K]
65 return capacity.eval( { { "te", giveTemperature(gp) }, { "t", tStep->giveIntrinsicTime() } }, this->giveDomain(), gp, giveTemperature(gp) );
66 } else if ( aProperty == 'd' && density.isDefined() ) { //density [kg/m3]
67 return density.eval( { { "te", giveTemperature(gp) }, { "t", tStep->giveIntrinsicTime() } }, this->giveDomain(), gp, giveTemperature(gp) );
68 } else if ( aProperty == HeatCapaCoeff ) { //volume-specific heat capacity [J/m3/K]
69 return ( this->giveProperty('c', gp, tStep) * this->giveProperty('d', gp, tStep) );
70 }
71
72 return this->Material :: give(aProperty, gp);
73}
74
75
77IsotropicHeatTransferMaterial :: computeFlux3D(const FloatArrayF<3> &grad, double field, GaussPoint *gp, TimeStep *tStep) const
78{
79 auto ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
80
81 ms->setTempField(field);
82 ms->setTempGradient(grad);
83
85 auto answer = -this->giveIsotropicConductivity(gp, tStep) * grad;
86 ms->setTempFlux(answer);
87 return answer;
88}
89
90
92IsotropicHeatTransferMaterial :: computeTangent3D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
93{
94 double cond = this->giveIsotropicConductivity(gp, tStep);
95 return cond * eye<3>();
96}
97
98
99double
100IsotropicHeatTransferMaterial :: giveIsotropicConductivity(GaussPoint *gp, TimeStep *tStep) const
101{
102 return giveProperty('k', gp, tStep);
103}
104
105double
106IsotropicHeatTransferMaterial :: giveCharacteristicValue(MatResponseMode mode,
107 GaussPoint *gp,
108 TimeStep *tStep) const
109{
110 if ( mode == Capacity ) {
111 return ( this->giveProperty('c', gp, tStep) * this->giveProperty('d', gp, tStep) );
112 } else {
113 OOFEM_ERROR("unknown mode (%s)", __MatResponseModeToString(mode) );
114 }
115
116 // return 0.;
117}
118
119
120int
121IsotropicHeatTransferMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
122{
123 if ( type == IST_HydrationDegree ) {
124 answer.resize(1);
125 answer.at(1) = 0.;
126 return 1;
127 }
128
129 if ( type == IST_Temperature ) {
130 answer = FloatArray{ this->giveTemperature(gp) };
131 return 1;
132 } else if ( type == IST_Density ) {
133 answer = FloatArray{ this->giveProperty('d', gp, tStep) };
134 return 1;
135 } else if ( type == IST_HeatCapacity ) {
136 answer = FloatArray{ this->giveProperty('c', gp, tStep) };
137 return 1;
138 } else if ( type == IST_ThermalConductivityIsotropic ) {
139 answer = FloatArray{ this->giveProperty('k', gp, tStep) };
140 return 1;
141 } else if ( type == IST_EnergyMassCapacity ) {
142 answer = FloatArray{ this->giveProperty('c', gp, tStep) * this->giveProperty('d', gp, tStep) * this->giveTemperature(gp) };
143 return 1;
144 }
145
146 return TransportMaterial :: giveIPValue(answer, gp, type, tStep);
147}
148
149double IsotropicHeatTransferMaterial :: giveTemperature(GaussPoint *gp) const
150{
151 auto ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
152 return ms->giveTempField();
153}
154
155} // end namespace oofem
#define REGISTER_Material(class)
Domain * giveDomain() const
Definition femcmpnn.h:97
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
virtual double giveIsotropicConductivity(GaussPoint *gp, TimeStep *tStep) const
Definition isoheatmat.C:100
ScalarFunction capacity
Capacity (c in input file).
Definition isoheatmat.h:63
ScalarFunction conductivity
Conductivity (k in input file).
Definition isoheatmat.h:62
double giveTemperature(GaussPoint *gp) const
Definition isoheatmat.C:149
double giveProperty(int aProperty, GaussPoint *gp, TimeStep *tStep) const
Definition isoheatmat.C:60
double maturityT0
Baseline for maturity mathod.
Definition isoheatmat.h:65
ScalarFunction density
Density (td in input file).
Definition isoheatmat.h:64
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Definition timestep.h:166
double giveTempField() const
Return last field.
void setTempField(double newField)
Set field.
TransportMaterial(int n, Domain *d)
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_IsotropicHeatTransferMaterial_d
Definition isoheatmat.h:50
#define _IFT_IsotropicHeatTransferMaterial_c
Specific heat.
Definition isoheatmat.h:48
#define _IFT_IsotropicHeatTransferMaterial_k
Conductivity.
Definition isoheatmat.h:47
#define _IFT_IsotropicHeatTransferMaterial_maturityT0
Baseline for maturity method.
Definition isoheatmat.h:49
#define HeatCapaCoeff
Definition matconst.h:75
FloatMatrixF< N, N > eye()
Constructs an identity matrix.

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