OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
supgelement.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 supgelement_h
36 #define supgelement_h
37 
38 #include "fmelement.h"
39 #include "matresponsemode.h"
40 
42 
43 #define _IFT_SUPGElement_bsides "bsides"
44 #define _IFT_SUPGElement_bcodes "bcodes"
45 
46 
47 namespace oofem {
48 class TimeStep;
49 class GaussPoint;
50 class FloatMatrix;
51 class FloatArray;
52 class IntArray;
53 class Load;
54 
58 class SUPGElement : public FMElement
59 {
60 protected:
65 
70  double t_supg, t_pspg, t_lsic;
71 
72 public:
73  SUPGElement(int n, Domain * aDomain);
74  virtual ~SUPGElement();
75 
77  virtual void giveInputRecord(DynamicInputRecord &input);
78 
79  virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep);
80  virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep);
81  virtual void updateStabilizationCoeffs(TimeStep *tStep) { }
83 
87  virtual void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep) = 0;
91  virtual void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep) = 0;
96  virtual void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep) = 0;
100  virtual void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep) = 0;
105  virtual void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep) = 0;
109  virtual void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep) = 0;
113  virtual void computeBCLhsPressureTerm_MC(FloatMatrix &answer, TimeStep *tStep);
117  virtual void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep) = 0;
121  virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep) = 0;
125  virtual void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep) = 0;
130  virtual void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep) = 0;
134  virtual void computeDiffusionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep) = 0;
138  virtual void computeDiffusionTerm_MC(FloatArray &answer, TimeStep *tStep) = 0;
142  virtual void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep) = 0;
146  virtual void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep) = 0;
150  virtual void computeBCLhsTerm_MB(FloatMatrix &answer, TimeStep *tStep);
154  virtual void computeBCLhsPressureTerm_MB(FloatMatrix &answer, TimeStep *tStep);
158  virtual void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep) = 0;
162  virtual void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep) = 0;
166  virtual void computeSlipWithFrictionBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep) {
167  OOFEM_WARNING("computeSlipWithFrictionBCTerm_MB not implemented");
168  answer.clear();
169  }
173  virtual void computePenetrationWithResistanceBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep) {
174  OOFEM_WARNING("computePenetrationWithResistanceBCTerm_MB not implemented");
175  answer.clear();
176  }
180  virtual void computeOutFlowBCTerm_MB(FloatMatrix &answer, int side, TimeStep *tStep) {
181  OOFEM_WARNING("computeOutFlowBCTerm_MB not implemented");
182  answer.clear();
183  }
184 
185 
186  virtual void computeHomogenizedReinforceTerm_MB(FloatMatrix &answer, Load *load, TimeStep *tStep) {
187  OOFEM_WARNING("computeHomogenizedReinforceTerm_MB");
188  answer.clear();
189  }
190  virtual void computeHomogenizedReinforceTerm_MC(FloatMatrix &answer, Load *load, TimeStep *tStep) {
191  OOFEM_WARNING("computeHomogenizedReinforceTerm_MB");
192  answer.clear();
193  }
194 
195 
197  virtual double computeCriticalTimeStep(TimeStep *tStep) = 0;
198 
199  // time step termination
200  virtual void updateInternalState(TimeStep *tStep);
201  virtual int checkConsistency();
202 
203 #ifdef __OOFEG
205  int node, TimeStep *tStep);
206 #endif
207 
208  virtual void giveLocalVelocityDofMap(IntArray &map) { }
209  virtual void giveLocalPressureDofMap(IntArray &map) { }
210 
211 protected:
212  virtual void computeDeviatoricStrain(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) = 0;
213  virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep);
214 };
215 } // end namespace oofem
216 #endif // supgelement_h
virtual void updateStabilizationCoeffs(TimeStep *tStep)
Updates the stabilization coefficients used for CBS and SUPG algorithms.
Definition: supgelement.h:81
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep)=0
Computes pressure terms for momentum balance equations(s).
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
Definition: supgelement.C:91
virtual void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep)=0
Computes the derivative of advection terms for mass conservation equation with respect to nodal veloc...
Class and object Domain.
Definition: domain.h:115
virtual void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep)=0
Computes SLIC stabilization term for momentum balance equation(s).
virtual void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep)=0
Computes the linear advection term for mass conservation equation.
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
Computes characteristic vector of receiver of requested type in given time step.
Definition: supgelement.C:151
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Definition: supgelement.C:351
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
IntArray boundarySides
Array of boundary sides.
Definition: supgelement.h:62
virtual void updateElementForNewInterfacePosition(TimeStep *tStep)
Definition: supgelement.h:82
virtual ~SUPGElement()
Definition: supgelement.C:60
virtual void computeHomogenizedReinforceTerm_MC(FloatMatrix &answer, Load *load, TimeStep *tStep)
Definition: supgelement.h:190
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: supgelement.C:80
virtual double computeCriticalTimeStep(TimeStep *tStep)=0
Computes the critical time increment.
virtual void giveLocalPressureDofMap(IntArray &map)
Definition: supgelement.h:209
virtual void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep)=0
Computes Rhs terms due to boundary conditions.
General stabilized SUPG/PSPG element for CFD analysis.
Definition: supgelement.h:58
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep)=0
Computes diffusion terms for momentum balance equations(s).
virtual void computeHomogenizedReinforceTerm_MB(FloatMatrix &answer, Load *load, TimeStep *tStep)
Definition: supgelement.h:186
virtual void computeDiffusionTerm_MC(FloatArray &answer, TimeStep *tStep)=0
Computes diffusion terms for mass conservation equation.
virtual void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep)=0
Computes Rhs terms due to boundary conditions.
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Definition: supgelement.C:230
double t_supg
Stabilization coefficients, updated for each solution step in updateStabilizationCoeffs() ...
Definition: supgelement.h:70
virtual void computePenetrationWithResistanceBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep)
Computes Lhs contribution due to applied Penetration bc.
Definition: supgelement.h:173
virtual void computeDeviatoricStrain(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)=0
virtual void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)=0
Computes the derivative of diffusion terms for momentum balance equations(s) with respect to nodal ve...
virtual void computeOutFlowBCTerm_MB(FloatMatrix &answer, int side, TimeStep *tStep)
Computes Lhs contribution due to outflow BC.
Definition: supgelement.h:180
virtual void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep)=0
Computes acceleration terms (generalized mass matrix with stabilization terms) for momentum balance e...
virtual void giveLocalVelocityDofMap(IntArray &map)
Definition: supgelement.h:208
virtual void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep)=0
Computes acceleration terms for mass conservation equation.
Class representing vector of real numbers.
Definition: floatarray.h:82
This abstract class represent a general base element class for fluid dynamic problems.
Definition: fmelement.h:54
virtual void computeBCLhsPressureTerm_MC(FloatMatrix &answer, TimeStep *tStep)
Computes Lhs terms due to boundary conditions - pressure.
Definition: supgelement.C:316
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 void computeDiffusionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep)=0
Computes diffusion derivative terms for mass conservation equation.
virtual void computeBCLhsPressureTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes Lhs terms due to boundary conditions - pressure.
Definition: supgelement.C:288
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep)=0
Computes nonlinear advection terms for momentum balance equations(s).
IntArray boundaryCodes
Boundary sides codes.
Definition: supgelement.h:64
Class representing the a dynamic Input Record.
Load is base abstract class for all loads.
Definition: load.h:61
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: supgelement.C:65
SUPGElement(int n, Domain *aDomain)
Definition: supgelement.C:55
the oofem namespace is to define a context or scope in which all oofem names are defined.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
Definition: floatmatrix.h:516
virtual int checkConsistency()
Performs consistency check.
Definition: supgelement.C:339
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)
Returns internal state variable (like stress,strain) at node of element in Reduced form...
Definition: supgelement.C:366
virtual void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep)=0
Computes advection terms for mass conservation equation.
Class representing solution step.
Definition: timestep.h:80
virtual void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep)=0
Computes pressure terms for mass conservation equation.
InternalStateMode
Determines the mode of internal variable.
virtual void computeBCLhsTerm_MB(FloatMatrix &answer, TimeStep *tStep)
Computes Lhs terms due to boundary conditions - velocity.
Definition: supgelement.C:243
virtual void computeSlipWithFrictionBCTerm_MB(FloatMatrix &answer, Load *load, int side, TimeStep *tStep)
Computes Lhs term due to applied slip with friction bc.
Definition: supgelement.h:166
virtual void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep)=0
Computes the derivative of advection terms for momentum balance equations(s) with respect to nodal ve...

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