OOFEM 3.0
Loading...
Searching...
No Matches
hemotkmat.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 {
43
44bool
45HeMoTKMaterial :: hasMaterialModeCapability(MaterialMode mode) const
46{
47 return mode == _2dHeMo || mode == _3dHeMo;
48}
49
50
51void
73
74
75double
76HeMoTKMaterial :: give(int aProperty, GaussPoint *gp) const
77{
78 return Material :: give(aProperty, gp);
79}
80
81
82std::pair<FloatArrayF<3>, FloatArrayF<3>>
83HeMoTKMaterial :: computeHeMoFlux3D(const FloatArrayF<3> &grad_t, const FloatArrayF<3> &grad_w, double t, double w, GaussPoint *gp, TimeStep *tStep) const
84{
85 auto ms = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
86
87 auto ans_w = perm_ww(w, t) * grad_w + perm_wt(w, t) * grad_t;
88 auto ans_t = perm_ww(w, t) * get_latent(w, t) * grad_w + (get_chi(w, t) + get_latent(w, t) * perm_wt(w, t)) * grad_t;
89
90 ms->setTempTemperature(t);
91 ms->setTempTemperatureGradient(grad_t);
92 ms->setTempHeatFlux(ans_t);
93
94 ms->setTempHumidity(w);
95 ms->setTempHumidityGradient(grad_w);
96 ms->setTempHumidityFlux(ans_w);
97
98 return {ans_t, ans_w};
99}
100
102HeMoTKMaterial :: computeTangent3D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
103{
104 auto status = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
105
106 double t = status->giveTempTemperature();
107 double w = status->giveTempHumidity();
108
109 double k = 0.0;
110 if ( mode == Conductivity_ww ) {
111 k = perm_ww(w, t);
112 } else if ( mode == Conductivity_wh ) {
113 k = perm_wt(w, t);
114 } else if ( mode == Conductivity_hw ) {
115 k = perm_ww(w, t) * get_latent(w, t);
116 } else if ( mode == Conductivity_hh ) {
117 k = get_chi(w, t) + get_latent(w, t) * perm_wt(w, t);
118 } else {
119 OOFEM_ERROR("Unknown MatResponseMode");
120 }
121
122 return k * eye<3>();
123}
124
125
126double
127HeMoTKMaterial :: giveCharacteristicValue(MatResponseMode mode,
128 GaussPoint *gp,
129 TimeStep *tStep) const
130{
131 return this->computeCapacityCoeff(mode, gp, tStep);
132}
133
134
135double HeMoTKMaterial :: computeCapacityCoeff(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
136{
137 if ( mode == Capacity_ww ) {
138 return 1.0 * rho;
139 } else if ( mode == Capacity_wh ) {
140 return 0.0;
141 } else if ( mode == Capacity_hw ) {
142 auto status = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
143
144 double t = status->giveTempTemperature();
145 double w = status->giveTempHumidity();
146 return get_b(w, t) * get_latent(w, t);
147 } else if ( mode == Capacity_hh ) {
148 auto status = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
149
150 double t = status->giveTempTemperature();
151 double w = status->giveTempHumidity();
152 return get_ceff(w, t);
153 } else {
154 OOFEM_ERROR("Unknown MatResponseMode");
155 }
156
157 // return 0.0; // to make compiler happy
158}
159
160
161double
162HeMoTKMaterial :: giveHumidity(GaussPoint *gp, ValueModeType mode) const
163{
164 auto status = static_cast< HeMoTransportMaterialStatus * >( this->giveStatus(gp) );
165
166 double w = status->giveHumidity();
167 double tempw = status->giveTempHumidity();
168
169 if ( mode == VM_Total ) {
170 return inverse_sorption_isotherm( tempw );
171 } else if ( mode == VM_Incremental ) {
173 } else if ( mode == VM_Velocity ) { // VM_Previous
174 return inverse_sorption_isotherm( w );
175 }
176
177 return 1.;
178}
179
180
181double
182HeMoTKMaterial :: perm_ww(double w, double t) const
183{
184 // Function calculates permability water content-water content (k_ww)
185 // phi ... relative humidity
186 // delta_gw ... water vapor permeability
187 // dphi_dw ... differentiation of relative with respect to water content
188 // p_gws ... saturation water vapor pressure
189 double phi = inverse_sorption_isotherm(w);
190 double delta_gw = give_delta_gw(phi);
191 double dphi_dw = give_dphi_dw(w);
192 double p_gws = give_p_gws(t);
193
194 return delta_gw * p_gws * dphi_dw;
195}
196
197double
198HeMoTKMaterial :: perm_wt(double w, double t) const
199{
200 // Function calculates permability water content-temperature (k_wt)
201 // delta_gw ... water vapor permeability
202 // d_pgw_d_t ... differentiation of water vapor presssure with respect to temperature
203 double phi = inverse_sorption_isotherm(w);
204 double delta_gw = give_delta_gw(phi);
205 double dpgw_dt = give_dpgw_dt(t, phi);
206
207 return delta_gw * dpgw_dt;
208}
209
210
211double
212HeMoTKMaterial :: give_delta_gw(double phi) const
213// Function calculates the water vapor permeability delta_gw. Relative humidity (phi) is from range 0.2 - 0.98 !!!
214// delta_gw ... by Z. P. Bazant and L. J. Najjar (1972), Nonlinear water diffusion in nonsaturated concrete,
215// MATERIAUX ET CONSTRUCTIONS, Vol. 5, No. 25, pp. 3 -20.
216// phi ... relative humidity
217// a_0, nn, phi_c, delta_wet ... constants obtained from experiments
218{
219 if ( phi < 0.2 || phi > 0.98 ) {
220 OOFEM_ERROR("Relative humidity is out of range");
221 }
222
223 // water vapor permeability
224 return delta_wet * ( a_0 + ( 1.0 - a_0 ) / ( 1.0 + pow( ( 1.0 - phi ) / ( 1.0 - phi_c ), nn ) ) );
225}
226
227
228double
229HeMoTKMaterial :: sorption_isotherm(double phi) const
230// Function calculates water content in medium from relative humidity. Relative humidity (phi) is from range 0.2 - 0.98 !!!
231// sorption isotherm by C. R. Pedersen (1990), Combined heat and moisture transfer in building constructions,
232// PhD-thesis, Technical University of Denmark, Lingby.
233// w (kg/kg) ... water content
234// phi ... relative humidity
235// w_h, n, a ... constants obtained from experiments
236{
237 if ( phi < 0.2 || phi > 0.98 ) {
238 OOFEM_ERROR("Relative humidity %.3f is out of range", phi);
239 }
240
241 // water content
242 return w_h * pow( ( 1.0 - log(phi) / a ), ( -1.0 / n ) );
243}
244
245
246double
247HeMoTKMaterial :: inverse_sorption_isotherm(double w) const
248// Function calculates relative humidity from water content (inverse relation form sorption isotherm).
249// Relative humidity (phi) is from range 0.2 - 0.98 !!!
250// sorption isotherm by C. R. Pedersen (1990), Combined heat and moisture transfer in building constructions,
251// PhD-thesis, Technical University of Denmark, Lingby.
252// w (kg/kg) ... water content
253// phi ... relative humidity
254// w_h, n, a ... constants obtained from experiments
255{
256 // relative humidity
257 double phi = exp( a * ( 1.0 - pow( ( w_h / w ), ( n ) ) ) );
258
259 if ( phi < 0.2 || phi > 0.98 ) {
260 OOFEM_ERROR("Relative humidity %.3f is out of range", phi);
261 }
262
263 return phi;
264}
265
266
267double
268HeMoTKMaterial :: give_dphi_dw(double w) const
269// Function calculates differentiation of relative humidity with respect to water content (inverse relation form sorption isotherm).
270// Relative humidity (phi) is from range 0.2 - 0.98 !!!
271// sorption isotherm by C. R. Pedersen (1990), Combined heat and moisture transfer in building constructions,
272// PhD-thesis, Technical University of Denmark, Lingby.
273// w (kg/kg) ... water content
274// phi ... relative humidity
275// w_h, n, a ... constants obtained from experiments
276{
277 // diferentiation of realative humidity with respect to water content
278 return exp( a * ( 1.0 - pow( ( w_h / w ), n ) ) ) * a * n * pow(w_h, n) * pow( w, ( -1.0 - n ) );
279}
280
281double
282HeMoTKMaterial :: give_dpgw_dt(double t, double phi) const
283// Function calculates differentiation of water vapor pressure with respect to temperature
284// saturation water vapor pressure by C. R. Pedersen (1990), Combined heat and moisture transfer in building constructions,
285// PhD-thesis, Technical University of Denmark, Lingby.
286// t ... temperature [K]
287// phi ... relative humidity
288{
289 //differentiation of saturation water vapor pressure (analytical expression) with respect to temperature
290 double dp_gws_dt = exp( 23.5771 - 4042.9 / ( t - 37.58 ) ) * 4042.9 / ( t - 37.58 ) / ( t - 37.58 );
291 double dp_gw_dt = phi * dp_gws_dt;
292 return dp_gw_dt;
293}
294
295
296double
297HeMoTKMaterial :: give_p_gws(double t) const
298// Function calculates saturation water vapor pressure
299// saturation water vapor pressure by C. R. Pedersen (1990), Combined heat and moisture transfer in building constructions,
300// PhD-thesis, Technical University of Denmark, Lingby.
301// t ... temperature [K]
302// phi ... relative humidity
303{
304 //saturation water vapor pressure ... analytical expression
305 return exp( 23.5771 - 4042.9 / ( t - 37.58 ) );
306}
307
308double
309HeMoTKMaterial :: get_latent(double w, double t) const
310{
311 // Function calculates latent heat of evaporation
312 return latent; //zatim!!!!
313}
314
315double
316HeMoTKMaterial :: get_b(double w, double t) const
317{
318 // Function calculates coefficient b
319 // sat ... degree of saturation
320 double phi = inverse_sorption_isotherm(w);
321 double dphi_dw = give_dphi_dw(w);
322 double sat = get_sat(w, t);
323
324 return por * rho_gws * ( phi + ( 1 - sat ) * dphi_dw );
325}
326
327
328double
329HeMoTKMaterial :: get_sat(double w, double t) const
330{
331 // Function calculates degree of saturation
332 // sat ... degree of saturation
333 return 1.0; //zatim!!!!
334}
335
336double
337HeMoTKMaterial :: get_ceff(double w, double t) const
338{
339 // Function calculates effective thermal capacity
340 return c * rho; //zatim!!!!
341}
342
343
344double
345HeMoTKMaterial :: get_chi(double w, double t) const
346{
347 // Function calculates effective thermal conductivity
348 return chi_eff; //zatim!!!!
349}
350
351bool
352HeMoTKMaterial :: isCharacteristicMtrxSymmetric(MatResponseMode mode) const
353{
354 if ( mode == Conductivity_ww || mode == Conductivity_hh || mode == Conductivity_hw || mode == Conductivity_wh ) {
355 return false;
356 } else {
357 OOFEM_ERROR("unknown mode (%s)", __MatResponseModeToString(mode) );
358 }
359
360 // return false; // to make compiler happy
361}
362
363int
364HeMoTKMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
365// IST_Humidity overriden to use inverse_sorption_isotherm
366{
367 if ( type == IST_Humidity ) {
368 answer.resize(1);
369 answer.at(1) = giveHumidity(gp, VM_Velocity); // VM_Previous = equilibrated value of humidity
370 return 1;
371 } else {
372 return TransportMaterial :: giveIPValue(answer, gp, type, tStep);
373 }
374}
375} // end namespace oofem
#define REGISTER_Material(class)
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
double latent
Latent heat of evaporation.
Definition hemotkmat.h:78
double rho
Volume density.
Definition hemotkmat.h:80
double get_sat(double w, double t) const
Definition hemotkmat.C:329
double delta_wet
Constant-water vapor permeability (obtained from experiments) [Bazant and Najjar, 1972].
Definition hemotkmat.h:72
double giveHumidity(GaussPoint *gp, ValueModeType mode) const override
Definition hemotkmat.C:162
double computeCapacityCoeff(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
Definition hemotkmat.C:135
double chi_eff
Effective thermal conductivity.
Definition hemotkmat.h:81
double give_p_gws(double t) const
Definition hemotkmat.C:297
double a_0
Constant (obtained from experiments) [Bazant and Najjar, 1972].
Definition hemotkmat.h:69
double nn
Constant-exponent (obtained from experiments) [Bazant and Najjar, 1972].
Definition hemotkmat.h:70
double give_dpgw_dt(double t, double phi) const
Definition hemotkmat.C:282
double give_delta_gw(double phi) const
Definition hemotkmat.C:212
double get_ceff(double w, double t) const
Definition hemotkmat.C:337
double get_b(double w, double t) const
Definition hemotkmat.C:316
double get_chi(double w, double t) const
Definition hemotkmat.C:345
double rho_gws
Saturation volume density.
Definition hemotkmat.h:84
double a
Constant (obtained from experiments) [Pedersen, 1990].
Definition hemotkmat.h:76
double give_dphi_dw(double w) const
Definition hemotkmat.C:268
double inverse_sorption_isotherm(double w) const
Definition hemotkmat.C:247
double perm_ww(double w, double t) const
Definition hemotkmat.C:182
double c
Thermal capacity.
Definition hemotkmat.h:79
double get_latent(double w, double t) const
Definition hemotkmat.C:309
double perm_wt(double w, double t) const
Definition hemotkmat.C:198
double phi_c
Constant-relative humidity (obtained from experiments) [Bazant and Najjar, 1972].
Definition hemotkmat.h:71
double por
Porosity.
Definition hemotkmat.h:83
double w_h
Constant water content (obtained from experiments) [Pedersen, 1990].
Definition hemotkmat.h:74
double n
Constant-exponent (obtained from experiments) [Pedersen, 1990].
Definition hemotkmat.h:75
double giveHumidity() const
Return last field.
double giveTempTemperature() const
Return last field.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
#define OOFEM_ERROR(...)
Definition error.h:79
#define _IFT_HeMoTKMaterial_a
Definition hemotkmat.h:49
#define _IFT_HeMoTKMaterial_c
Definition hemotkmat.h:51
#define _IFT_HeMoTKMaterial_n
Definition hemotkmat.h:48
#define _IFT_HeMoTKMaterial_nn
Definition hemotkmat.h:44
#define _IFT_HeMoTKMaterial_w_h
Definition hemotkmat.h:47
#define _IFT_HeMoTKMaterial_delta_wet
Definition hemotkmat.h:46
#define _IFT_HeMoTKMaterial_chi_eff
Definition hemotkmat.h:53
#define _IFT_HeMoTKMaterial_rho_gws
Definition hemotkmat.h:55
#define _IFT_HeMoTKMaterial_rho
Definition hemotkmat.h:52
#define _IFT_HeMoTKMaterial_phi_c
Definition hemotkmat.h:45
#define _IFT_HeMoTKMaterial_por
Definition hemotkmat.h:54
#define _IFT_HeMoTKMaterial_latent
Definition hemotkmat.h:50
#define _IFT_HeMoTKMaterial_a_0
Definition hemotkmat.h:43
#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