OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
bazantnajjarmat.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 - 2013 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 "bazantnajjarmat.h"
36 #include "floatmatrix.h"
37 #include "gausspoint.h"
38 #include "mathfem.h"
39 #include "classfactory.h"
40 
41 namespace oofem {
42 REGISTER_Material(BazantNajjarMoistureTransferMaterial);
43 
46 {
47  IRResultType result; // Required by IR_GIVE_FIELD macro
48 
53 
54  this->moistureCapacity = 1.;
56 
58 }
59 
60 
61 double
63 {
64  return this->moistureCapacity;
65 }
66 
67 double
69 {
70  double permeability;
71  double humidity = this->giveHumidity(gp, VM_Total);
72 
73  humidity = max(humidity, 0.0);
74  humidity = min(humidity, 1.0);
75 
76  permeability = C1 * ( alpha0 + ( 1. - alpha0 ) / ( 1. + pow( ( 1. - humidity ) / ( 1. - hC ), n ) ) );
77  return permeability;
78 }
79 
80 double
82 {
83  FloatArray tempState = static_cast< TransportMaterialStatus * >( giveStatus(gp) )->giveTempField();
84  if ( ( tempState.at(1) > 1.0 ) || ( tempState.at(1) < 0.0 ) ) {
85  OOFEM_WARNING("Relative humidity %.5f is out of range 0.0 - 1.0", tempState.at(1) );
86  }
87  return tempState.at(1);
88 }
89 } // end namespace oofem
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
virtual double giveHumidity(GaussPoint *gp, ValueModeType mode)
Returns positive value of humidity if implemented and enabled in derived material, -1 otherwise.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
int max(int i, int j)
Returns bigger value form two given decimals.
Definition: mathfem.h:71
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
double moistureCapacity
sorption isotherm derivative [kg/m^3]
This class implements a transport material status information.
#define _IFT_BazantNajjarMoistureTransferMaterial_capa
#define _IFT_BazantNajjarMoistureTransferMaterial_n
#define _IFT_BazantNajjarMoistureTransferMaterial_alpha0
double C1
maximal permeability [kg/ m s]
virtual double givePermeability(GaussPoint *gp, TimeStep *tStep)
evaluates permeability according to Bazant - Najjar function for diffusivity
virtual double giveMoistureCapacity(GaussPoint *gp, TimeStep *tStep)
evaluates slope of the sorption isotherm
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double hC
nonlinear threshold [-]
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
#define _IFT_BazantNajjarMoistureTransferMaterial_c1
double n
exponent in nonlinear permeability function [-]
Class representing the general Input Record.
Definition: inputrecord.h:101
double alpha0
fraction minimal/maximal permeability [-]
int min(int i, int j)
Returns smaller value from two given decimals.
Definition: mathfem.h:59
REGISTER_Material(DummyMaterial)
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define _IFT_BazantNajjarMoistureTransferMaterial_hc
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
Class representing solution step.
Definition: timestep.h:80
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:27 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011