OOFEM 3.0
Loading...
Searching...
No Matches
isomoisturemat.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 "gausspoint.h"
38
39namespace oofem {
40void
41IsotropicMoistureTransferMaterial :: initializeFrom(InputRecord &ir)
42{
43 Material :: initializeFrom(ir);
44}
45
46
48IsotropicMoistureTransferMaterial :: computeFlux3D(const FloatArrayF<3> &grad, double field, GaussPoint *gp, TimeStep *tStep) const
49{
50 auto ms = static_cast< TransportMaterialStatus * >( this->giveStatus(gp) );
51 ms->setTempGradient(grad);
52 ms->setTempField(field);
53
54 auto answer = -this->givePermeability(gp, tStep) * grad;
55 ms->setTempFlux(answer);
56 return answer;
57}
58
59
61IsotropicMoistureTransferMaterial :: computeTangent3D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
62{
63 double permeability = this->givePermeability(gp, tStep);
64 return permeability * eye<3>();
65}
66
67
68double
69IsotropicMoistureTransferMaterial :: giveCharacteristicValue(MatResponseMode mode,
70 GaussPoint *gp,
71 TimeStep *tStep) const
72{
73 if ( mode == Capacity ) {
74 return this->giveMoistureCapacity(gp, tStep);
75 } else {
76 OOFEM_ERROR("unknown mode (%s)", __MatResponseModeToString(mode) );
77 }
78
79 // return 0.;
80}
81
82
83int
84IsotropicMoistureTransferMaterial :: giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
85{
86 if ( type == IST_HydrationDegree ) {
87 answer.resize(1);
88 answer.at(1) = 0.;
89 return 1;
90 } else if ( type == IST_MoistureContent ) {
91 FloatArray humidity;
92 answer.resize(1);
93 this->giveIPValue(humidity, gp, IST_Humidity, tStep);
94 answer.at(1) = giveMoistureContent(humidity.at(1));
95 return 1;
96 }
97
98 /* else if ( type == IST_Humidity ) {
99 * FloatArray state = static_cast< TransportMaterialStatus * >( giveStatus(gp) )->giveStateVector();
100 * if ( state.giveSize() < 1 ) {
101 * OOFEM_ERROR("undefined moisture status!");
102 * }
103 *
104 * answer.resize(1);
105 * answer.at(1) = state.at(1);
106 * return 1;
107 * }*/
108
109 return TransportMaterial :: giveIPValue(answer, gp, type, tStep);
110}
111} // end namespace oofem
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
virtual double givePermeability(GaussPoint *gp, TimeStep *tStep) const =0
virtual double giveMoistureCapacity(GaussPoint *gp, TimeStep *tStep) const =0
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual double giveMoistureContent(double humidity) const
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
void setTempGradient(const FloatArrayF< 3 > &newGradient)
Set gradient.
#define OOFEM_ERROR(...)
Definition error.h:79
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