OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
transportmaterial.h
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 #ifndef transportmaterial_h
36 #define transportmaterial_h
37 
38 #include "material.h"
39 #include "floatarray.h"
40 #include "floatmatrix.h"
41 #include "matconst.h"
42 #include "matstatus.h"
43 #include "transportelement.h"
44 
45 namespace oofem {
54 {
55 protected:
59 
63 
65  double maturity;
66 
67 public:
69  TransportMaterialStatus(int n, Domain * d, GaussPoint * g);
72 
73  virtual void printOutputAt(FILE *file, TimeStep *tStep);
74 
75  virtual void initTempStatus();
76  virtual void updateYourself(TimeStep *tStep);
77 
78  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
79  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
80 
83  void letTempStateVectorBe(FloatArray v) { temp_field = std :: move(v); }
84 
85  virtual const char *giveClassName() const { return "TransportMaterialStatus"; }
86 
88  void setTempGradient(FloatArray grad);
90  void setTempField(FloatArray newField);
92  void setTempFlux(FloatArray w);
93 
95  const FloatArray &giveGradient() { return gradient; }
97  const FloatArray &giveField() { return field; }
99  const FloatArray &giveFlux() { return flux; }
100 
104  const FloatArray &giveTempField() { return temp_field; }
106  const FloatArray &giveTempFlux() { return temp_flux; }
108  double giveMaturity() { return maturity; }
109 };
110 
111 
120 {
121 public:
127  TransportMaterial(int n, Domain * d) : Material(n, d) { }
129  virtual ~TransportMaterial() { }
130 
141  virtual void giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep) = 0;
142 
152  virtual void giveCharacteristicMatrix(FloatMatrix &answer,
153  MatResponseMode mode,
154  GaussPoint *gp,
155  TimeStep *tStep) = 0;
156 
165  virtual double giveCharacteristicValue(MatResponseMode mode,
166  GaussPoint *gp,
167  TimeStep *tStep) = 0;
168 
175  virtual void updateInternalState(const FloatArray &state, GaussPoint *gp, TimeStep *tStep);
176 
180  virtual int hasInternalSource() { return 0; }
189  { val.clear(); }
193  virtual double giveHumidity(GaussPoint *gp, ValueModeType mode) { return -1.0; }
194 
195  // post-processing
196  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
197 
198  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const { return new TransportMaterialStatus(1, domain, gp); }
199 };
200 } // end namespace oofem
201 #endif // transportmaterial_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
const FloatArray & giveTempField()
Return last field.
const FloatArray & giveTempFlux()
Returns last flux.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
FloatArray flux
Vector containing the last equilibrated flux. The physical meaning corresponds to energy flux...
virtual void computeInternalSourceVector(FloatArray &val, GaussPoint *gp, TimeStep *tStep, ValueModeType mode)
Computes the internal source vector of receiver.
FloatArray gradient
Vector containing the last equilibrated gradient. It is the spatial gradient of the field...
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
virtual ~TransportMaterial()
Destructor.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
Defines several material constant (respective their representative number).
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
double giveMaturity()
Returns maturity.
virtual double giveHumidity(GaussPoint *gp, ValueModeType mode)
Returns positive value of humidity if implemented and enabled in derived material, -1 otherwise.
void clear()
Clears receiver (zero size).
Definition: floatarray.h:206
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
FloatArray temp_flux
Vector containing the last computed flux.
This class implements a transport material status information.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
const FloatArray & giveTempGradient()
Return last gradient.
TransportMaterialStatus(int n, Domain *d, GaussPoint *g)
Constructor - creates new TransportMaterialStatus with number n, belonging to domain d and Integratio...
const FloatArray & giveFlux()
Returns last flux.
virtual int hasInternalSource()
Returns nonzero if receiver generates internal source of state variable(s), zero otherwise.
const FloatArray & giveField()
Return last field.
virtual ~TransportMaterialStatus()
Destructor.
FloatArray field
Vector containing the last equilibrated field. The physical meaning corresponds to temperature...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
void setTempField(FloatArray newField)
Set field.
Abstract base class for all material models.
Definition: material.h:95
virtual const char * giveClassName() const
FloatArray temp_gradient
Vector containing the last used gradient.
void setTempGradient(FloatArray grad)
Set gradient.
Abstract base class representing a material status information.
Definition: matstatus.h:84
double maturity
A scalar containing maturity (integration of temperature over time)
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
void setTempFlux(FloatArray w)
Set flux.
Abstract base class for all constitutive models for transport problems.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
FloatArray temp_field
Vector containing the last used field.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void letTempStateVectorBe(FloatArray v)
TransportMaterial(int n, Domain *d)
Constructor.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
const FloatArray & giveGradient()
Return last gradient.

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011