OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fe2fluidmaterial.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 fe2sinteringmaterial_h
36 #define fe2sinteringmaterial_h
37 
38 #include "fluiddynamicmaterial.h"
39 #include "matstatus.h"
41 #include "floatmatrix.h"
42 
43 #include <memory>
44 
46 
47 #define _IFT_FE2FluidMaterial_Name "fe2fluidmaterial"
48 #define _IFT_FE2FluidMaterial_fileName "inputfile"
49 
50 
51 namespace oofem {
52 class EngngModel;
53 
59 {
60 protected:
62  std :: unique_ptr< EngngModel > rve;
65 
69  double Cp;
70 
71  double pressure;
72  double voffraction;
73 
75 
76 public:
84  FE2FluidMaterialStatus(int n, Domain * d, GaussPoint * gp, const std :: string & inputfile);
86  virtual ~FE2FluidMaterialStatus();
87 
88  EngngModel *giveRVE() { return this->rve.get(); }
89  MixedGradientPressureBC *giveBC() { return this->bc; }
90 
91  void markOldTangents();
92  void computeTangents(TimeStep *tStep);
93 
94  double giveVOFFraction() { return this->voffraction; }
95 
97  bool createRVE(int n, GaussPoint *gp, const std :: string &inputfile);
98 
100  void setTimeStep(TimeStep *tStep);
101 
105  double &giveVolumetricPressureTangent() { return Cp; }
106 
107  double givePressure() { return this->pressure; }
108  void letPressureBe(double val) { this->pressure = val; }
109 
110  virtual void printOutputAt(FILE *file, TimeStep *tStep);
111 
112  virtual void initTempStatus();
113  virtual void updateYourself(TimeStep *tStep);
114 
115  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
116  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
117 
118  virtual const char *giveClassName() const { return "FE2FluidMaterialStatus"; }
119 };
120 
121 
133 {
134 private:
135  std :: string inputfile;
136  static int n;
137 
138 public:
146  virtual ~FE2FluidMaterial() { }
147 
149  virtual void giveInputRecord(DynamicInputRecord &input);
150 
151  virtual int checkConsistency();
152 
153  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
154 
155  virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &r_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep);
156  virtual void computeDeviatoricStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &eps, TimeStep *tStep);
157 
158  virtual void giveDeviatoricStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep);
159  virtual void giveStiffnessMatrices(FloatMatrix &dsdd, FloatArray &dsdp, FloatArray &dedd, double &dedp,
160  MatResponseMode mode, GaussPoint *gp, TimeStep *tStep);
161 
162  virtual double giveEffectiveViscosity(GaussPoint *gp, TimeStep *tStep);
163 
164  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
165 
166  virtual const char *giveClassName() const { return "FE2FluidMaterial"; }
167  virtual const char *giveInputRecordName() const { return _IFT_FE2FluidMaterial_Name; }
168 };
169 } // end namespace oofem
170 #endif // rvesinteringmaterial_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
FE2FluidMaterial(int n, Domain *d)
Constructor.
virtual const char * giveInputRecordName() const
FE2FluidMaterialStatus(int n, Domain *d, GaussPoint *gp, const std::string &inputfile)
Creates new material status.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
Abstract base class for all fluid materials.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
void computeTangents(TimeStep *tStep)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
MixedGradientPressureBC * bc
Boundary condition in RVE that performs the computational homogenization.
void setTimeStep(TimeStep *tStep)
Copies time step data to RVE.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Multiscale constitutive model for subscale flow problems, typically sintering.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: femcmpnn.C:77
MatResponseMode
Describes the character of characteristic material matrix.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual ~FE2FluidMaterial()
Destructor.
FloatArray & giveVolumetricDeviatoricTangent()
This class implements a transport material status information.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
virtual const char * giveClassName() const
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
Definition: femcmpnn.C:94
std::unique_ptr< EngngModel > rve
The subscale flow.
virtual ~FE2FluidMaterialStatus()
Destructor.
MixedGradientPressureBC * giveBC()
Class representing material status for the subscale fluid, i.e an Representative Volume Element (RVE)...
FloatArray & giveDeviatoricPressureTangent()
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual const char * giveClassName() const
Class representing the general Input Record.
Definition: inputrecord.h:101
bool createRVE(int n, GaussPoint *gp, const std::string &inputfile)
Creates/Initiates the RVE problem.
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define _IFT_FE2FluidMaterial_Name
General class for boundary condition that prolongates macroscopic fields to incompressible flow...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80

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