OOFEM 3.0
Loading...
Searching...
No Matches
hemobaznajmat.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 "floatmatrixf.h"
37#include "gausspoint.h"
38#include "mathfem.h"
39#include "classfactory.h"
40
41namespace oofem {
42
44
45bool
46HeMoBazNajMaterial :: hasMaterialModeCapability(MaterialMode mode) const
47{
48 return mode == _2dHeMo || mode == _3dHeMo;
49}
50
51
52void
68
69
70double
71HeMoBazNajMaterial :: give(int aProperty, GaussPoint *gp) const
72{
73 return this->Material :: give(aProperty, gp);
74}
75
76
77std::pair<FloatArrayF<3>, FloatArrayF<3>>
78HeMoBazNajMaterial :: computeHeMoFlux3D(const FloatArrayF<3> &grad_t, const FloatArrayF<3> &grad_w, double t, double h, GaussPoint *gp, TimeStep *tStep) const
79{
80 auto ms = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
81
82 auto ans_w = perm_mm(h, t) * grad_w + perm_mh(h, t) * grad_t;
83 auto ans_t = perm_hm(h, t) * grad_w + perm_hh(h, t) * grad_t;
84
85 ms->setTempTemperature(t);
86 ms->setTempTemperatureGradient(grad_t);
87 ms->setTempHeatFlux(ans_t);
88 ms->setTempHumidity(h);
89 ms->setTempHumidityGradient(grad_w);
90 ms->setTempHumidityFlux(ans_w);
91
92 return {ans_t, ans_w};
93}
94
95
97HeMoBazNajMaterial :: computeTangent3D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
98{
99 auto status = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
100
101 double t = status->giveTempTemperature();
102 double h = status->giveTempHumidity();
103
104 double k = 0.0;
105 if ( mode == Conductivity_ww ) {
106 k = perm_mm(h, t);
107 } else if ( mode == Conductivity_wh ) {
108 k = perm_mh(h, t);
109 } else if ( mode == Conductivity_hw ) {
110 k = perm_hm(h, t);
111 } else if ( mode == Conductivity_hh ) {
112 k = perm_hh(h, t);
113 } else {
114 OOFEM_ERROR("Unknown MatResponseMode");
115 }
116
117 return k * eye<3>();
118}
119
120
121double
122HeMoBazNajMaterial :: giveCharacteristicValue(MatResponseMode mode,
123 GaussPoint *gp,
124 TimeStep *atTime) const
125{
126 return this->computeCapacityCoeff(mode, gp, atTime);
127}
128
129
130double HeMoBazNajMaterial :: computeCapacityCoeff(MatResponseMode mode, GaussPoint *gp, TimeStep *atTime) const
131{
132 if ( mode == Capacity_ww ) {
133 return this->moistureCapacity;
134
135 } else if ( mode == Capacity_wh ) {
136 return 0.0;
137
138 } else if ( mode == Capacity_hw ) {
139 return 0.0;
140
141 } else if ( mode == Capacity_hh ) {
142 return this->heatCapacity;
143
144 } else {
145 OOFEM_ERROR("Unknown MatResponseMode");
146 }
147}
148
149
150double
151HeMoBazNajMaterial :: perm_mm(double h, double T) const
152{
153 return C1 * ( alpha0 + ( 1. - alpha0 ) / ( 1. + pow( ( 1. - h ) / ( 1. - hC ), n ) ) );
154}
155
156double
157HeMoBazNajMaterial :: perm_mh(double h, double T) const
158{
159 return 0.;
160}
161
162double
163HeMoBazNajMaterial :: perm_hm(double h, double T) const
164{
165 return 0.;
166}
167
168double
169HeMoBazNajMaterial :: perm_hh(double h, double T) const
170{
171 return this->heatConductivity;
172}
173
174bool
175HeMoBazNajMaterial :: isCharacteristicMtrxSymmetric(MatResponseMode mode) const
176{
177 if ( mode == Conductivity_ww || mode == Conductivity_hh || mode == Conductivity_hw || mode == Conductivity_wh ) {
178 return true;
179 } else {
180 OOFEM_ERROR( "isCharacteristicMtrxSymmetric : unknown mode (%s)", __MatResponseModeToString(mode) );
181 }
182
183 // return false; // to make compiler happy
184}
185
186int
187HeMoBazNajMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime)
188// IST_Humidity overriden to use inverse_sorption_isotherm
189{
190 if ( type == IST_Humidity ) {
191 answer.resize(1);
192 answer.at(1) = giveHumidity(gp, VM_Velocity); // VM_Previous = equilibrated value of humidity
193 return 1;
194 } else {
195 return TransportMaterial :: giveIPValue(answer, gp, type, atTime);
196 }
197}
198} // end namespace oofem
#define REGISTER_Material(class)
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
double n
exponent in nonlinear permeability function [-]
double computeCapacityCoeff(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
double perm_mh(double h, double T) const
double perm_hm(double h, double T) const
double heatCapacity
Capacity (c in input file).
double moistureCapacity
sorption isotherm derivative [kg/m^3]
double heatConductivity
Conductivity (k in input file).
double hC
nonlinear threshold [-]
double perm_hh(double h, double T) const
double perm_mm(double h, double T) const
double C1
maximal permeability [kg/ m s]
double alpha0
fraction minimal/maximal permeability [-]
double giveTempTemperature() const
Return last field.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
virtual double giveHumidity(GaussPoint *gp, ValueModeType mode) const
#define OOFEM_ERROR(...)
Definition error.h:79
#define _IFT_HeMoBazNajMaterial_capa
#define _IFT_HeMoBazNajMaterial_c1
#define _IFT_HeMoBazNajMaterial_c
Specific heat.
#define _IFT_HeMoBazNajMaterial_hc
#define _IFT_HeMoBazNajMaterial_n
#define _IFT_HeMoBazNajMaterial_k
Conductivity.
#define _IFT_HeMoBazNajMaterial_alpha0
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
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