OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::MixedGradientPressureNeumann Class Reference

Applies a mean deviatoric shear rate and pressure (Neumann boundary condition). More...

#include <mixedgradientpressureneumann.h>

+ Inheritance diagram for oofem::MixedGradientPressureNeumann:
+ Collaboration diagram for oofem::MixedGradientPressureNeumann:

Public Member Functions

 MixedGradientPressureNeumann (int n, Domain *d)
 Creates boundary condition with given number, belonging to given domain. More...
 
virtual ~MixedGradientPressureNeumann ()
 Destructor. More...
 
virtual int giveNumberOfInternalDofManagers ()
 Returns the number of internal DOF managers (=2). More...
 
virtual DofManagergiveInternalDofManager (int i)
 Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2. More...
 
virtual bcType giveType () const
 Not relevant for this boundary condition. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Setups the input record string of receiver. More...
 
virtual void scale (double s)
 Scales the receiver according to given value. More...
 
virtual void computeFields (FloatArray &sigmaDev, double &vol, TimeStep *tStep)
 Computes the homogenized fields through sensitivity analysis. More...
 
virtual void computeTangents (FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep)
 Computes the macroscopic tangents through sensitivity analysis. More...
 
virtual void setPrescribedPressure (double p)
 Set prescribed pressure. More...
 
virtual void setPrescribedDeviatoricGradientFromVoigt (const FloatArray &ddev)
 Sets the prescribed tensor from the matrix from given Voigt notation. More...
 
virtual void assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=NULL)
 Assembles B.C. More...
 
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0)
 Assembles B.C. More...
 
virtual void giveLocationArrays (std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s)
 Gives a list of location arrays that will be assembled. More...
 
virtual const char * giveClassName () const
 
virtual const char * giveInputRecordName () const
 
- Public Member Functions inherited from oofem::MixedGradientPressureBC
 MixedGradientPressureBC (int n, Domain *d)
 Creates boundary condition with given number, belonging to given domain. More...
 
virtual ~MixedGradientPressureBC ()
 Destructor. More...
 
double domainSize ()
 Computes the size (including pores) by surface integral over the domain. More...
 
- Public Member Functions inherited from oofem::ActiveBoundaryCondition
 ActiveBoundaryCondition (int n, Domain *d)
 Constructor. More...
 
virtual ~ActiveBoundaryCondition ()
 Destructor. More...
 
virtual void addElementSide (int elem, int side)
 Adds element for active boundary condition. More...
 
virtual bool requiresActiveDofs ()
 Checks to see if active boundary condition requires special DOFs. More...
 
virtual bool isPrimaryDof (ActiveDof *dof)
 Checks to see if the dof is a primary DOF. More...
 
virtual double giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep)
 Returns the prescribed value of a dof (if any). More...
 
virtual bool hasBc (Dof *dof, TimeStep *tStep)
 Returns the prescribed value of a dof (if any). More...
 
virtual int giveNumberOfMasterDofs (ActiveDof *dof)
 Allows for active boundary conditions to handle their own special DOF. More...
 
virtual DofgiveMasterDof (ActiveDof *dof, int mdof)
 Give the pointer to master dof belonging to active DOF. More...
 
virtual void computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs)
 
virtual double giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
 Computes the value of the dof. More...
 
virtual double giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
 Computes the value of the dof. More...
 
- Public Member Functions inherited from oofem::GeneralBoundaryCondition
 GeneralBoundaryCondition (int n, Domain *d)
 Constructor. More...
 
virtual ~GeneralBoundaryCondition ()
 Destructor. More...
 
int giveSetNumber ()
 Gives the set number which boundary condition is applied to. More...
 
FunctiongiveTimeFunction ()
 
virtual bcValType giveBCValType () const
 Returns receiver load type. More...
 
virtual bool isImposed (TimeStep *tStep)
 Returns nonzero if receiver representing BC is imposed at given time, otherwise returns zero. More...
 
virtual const IntArraygiveDofIDs () const
 Array with default dofs which b.c. More...
 
virtual bcGeomType giveBCGeoType () const
 Returns geometry character of boundary condition. More...
 
virtual void postInitialize ()
 Performs post initialization steps. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream. More...
 
- Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
 Regular constructor, creates component with given number and belonging to given domain. More...
 
virtual ~FEMComponent ()
 Virtual destructor. More...
 
DomaingiveDomain () const
 
virtual void setDomain (Domain *d)
 Sets associated Domain. More...
 
int giveNumber () const
 
void setNumber (int num)
 Sets number of receiver. More...
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. More...
 
virtual int checkConsistency ()
 Allows programmer to test some internal data, before computation begins. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints output of receiver to stream, for given time step. More...
 
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging. More...
 
virtual InterfacegiveInterface (InterfaceType t)
 Interface requesting service. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Member Functions

void integrateDevTangent (FloatMatrix &answer, Element *e, int boundary)
 Helper function that integrates the deviatoric tangent contribution from a single element boundary. More...
 
void integrateVolTangent (FloatArray &answer, Element *e, int boundary)
 Helper function that integrates the volumetric tangent contribution from a single element boundary. More...
 
void fromDeviatoricBase2D (FloatArray &cartesian, FloatArray &deviatoric)
 Converts from deviatoric to (normal) cartesian base (arrays are second order 2D tensors in Voigt notation) More...
 
void fromDeviatoricBase3D (FloatArray &cartesian, FloatArray &deviatoric)
 Converts from deviatoric to (normal) cartesian base (arrays are second order 3D tensors in Voigt notation) More...
 
void fromDeviatoricBase2D (FloatMatrix &cartesian, FloatMatrix &deviatoric)
 Converts from deviatoric to (normal) cartesian base (arrays are fourth order 2D tensors in Voigt notation) More...
 
void fromDeviatoricBase3D (FloatMatrix &cartesian, FloatMatrix &deviatoric)
 Converts from deviatoric to (normal) cartesian base (arrays are fourth order 3D tensors in Voigt notation) More...
 

Protected Attributes

FloatArray devGradient
 Prescribed gradient $ d_{\mathrm{dev},ij} $ in Voigt form. More...
 
double volGradient
 The volumetric part of what was sent in (needed to return the difference). More...
 
double pressure
 Prescribed pressure. More...
 
std::unique_ptr< NodesigmaDev
 DOF-manager containing the unknown deviatoric stress. More...
 
IntArray dev_id
 Dof IDs for the lagrange multipliers in sigmaDev. More...
 
- Protected Attributes inherited from oofem::GeneralBoundaryCondition
int timeFunction
 Associated load time function. More...
 
bcValType valType
 Physical meaning of BC value. More...
 
IntArray dofs
 Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s). More...
 
int isImposedTimeFunction
 Zero by default - the BC is than always imposed. More...
 
int set
 Set number for boundary condition to be applied to. More...
 
- Protected Attributes inherited from oofem::FEMComponent
int number
 Component number. More...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Detailed Description

Applies a mean deviatoric shear rate and pressure (Neumann boundary condition).

Introduces unknowns for the deviatoric stress, and this boundary condition adds contributions to both the left and right hand side of the system. The approach expresses the deviatoric stresses/strain(rates) in a special (nonsymmetric) base;

\[ \boldsymbol A_{\mathrm{dev}} = \sum_{i=1}^{n} A_{\mathrm{dev},i} \boldsymbol E_i \]

where the bases $ \boldsymbol E_i $ can be chosen as

\[ \boldsymbol E_1 = \frac{1}{\sqrt{2}}\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}, \quad \boldsymbol E_2 = \begin{pmatrix}0 & 1 \\ 0 & 0\end{pmatrix}, \quad \boldsymbol E_3 = \begin{pmatrix}0 & 0 \\ 1 & 0\end{pmatrix}. \]

in 2D, and

\[ \boldsymbol E_1 = \frac{1}{\sqrt{6}}\begin{pmatrix}2 & 0 & 0\\ 0 & -1 & 0 \\ 0 & 0 & -1\end{pmatrix}, \quad \boldsymbol E_2 = \frac{1}{\sqrt{2}}\begin{pmatrix}0 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & -1\end{pmatrix}, \quad \boldsymbol E_3 = \begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 0 \\ 0 & 0 & 0\end{pmatrix}, \ldots\quad \boldsymbol E_8 = \begin{pmatrix}0 & 0 & 0\\ 0 & 0 & 0 \\ 0 & 1 & 0\end{pmatrix} \]

in 3D (in 1D no deviatoric component exists).

Either bulk elements + side number can be used, or a boundary element (line in 2D, surface in 3D) can be used directly.

Note
The 2D case assumes plane strain(rate), as is the case in _2dFlow.
This is only applicable to momentum balance equation. Both solid or fluids, incompressible or compressible, should work.
Should typically be prescribed on the entire external boundary of an representative volume element.
Should be applied to element boundaries, not DOFs.
The implementation doesn't assume that the stress is symmetric, so rigid body rotations are automatically removed.
Rigid body translations must be controlled separately.
Author
Mikael Öhman

Definition at line 91 of file mixedgradientpressureneumann.h.

Constructor & Destructor Documentation

oofem::MixedGradientPressureNeumann::MixedGradientPressureNeumann ( int  n,
Domain d 
)

Creates boundary condition with given number, belonging to given domain.

Parameters
nBoundary condition number.
dDomain to which new object will belongs.
Todo:
Rethink this. Should be created as part of createDofs()

Definition at line 62 of file mixedgradientpressureneumann.C.

References dev_id, oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), and sigmaDev.

oofem::MixedGradientPressureNeumann::~MixedGradientPressureNeumann ( )
virtual

Destructor.

Definition at line 77 of file mixedgradientpressureneumann.C.

Member Function Documentation

void oofem::MixedGradientPressureNeumann::assemble ( SparseMtrx answer,
TimeStep tStep,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s,
double  scale = 1.0 
)
virtual

Assembles B.C.

contributions to specified matrix.

Parameters
[in,out]answerMatrix to assemble to.
tStepActive time step.
tStepActive time step.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.
scaleScaling factor.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 468 of file mixedgradientpressureneumann.C.

References oofem::SparseMtrx::assemble(), oofem::IntArray::at(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateDevTangent(), oofem::FloatMatrix::negated(), sigmaDev, and oofem::FloatMatrix::times().

void oofem::MixedGradientPressureNeumann::assembleVector ( FloatArray answer,
TimeStep tStep,
CharType  type,
ValueModeType  mode,
const UnknownNumberingScheme s,
FloatArray eNorms = NULL 
)
virtual
void oofem::MixedGradientPressureNeumann::computeTangents ( FloatMatrix Ed,
FloatArray Ep,
FloatArray Cd,
double &  Cp,
TimeStep tStep 
)
virtual
void oofem::MixedGradientPressureNeumann::fromDeviatoricBase2D ( FloatArray cartesian,
FloatArray deviatoric 
)
protected

Converts from deviatoric to (normal) cartesian base (arrays are second order 2D tensors in Voigt notation)

Definition at line 94 of file mixedgradientpressureneumann.C.

References oofem::FloatArray::at(), and oofem::FloatArray::resize().

Referenced by computeFields(), and computeTangents().

void oofem::MixedGradientPressureNeumann::fromDeviatoricBase2D ( FloatMatrix cartesian,
FloatMatrix deviatoric 
)
protected

Converts from deviatoric to (normal) cartesian base (arrays are fourth order 2D tensors in Voigt notation)

Definition at line 118 of file mixedgradientpressureneumann.C.

References oofem::FloatMatrix::at(), and oofem::FloatMatrix::resize().

void oofem::MixedGradientPressureNeumann::fromDeviatoricBase3D ( FloatArray cartesian,
FloatArray deviatoric 
)
protected

Converts from deviatoric to (normal) cartesian base (arrays are second order 3D tensors in Voigt notation)

Definition at line 103 of file mixedgradientpressureneumann.C.

References oofem::FloatArray::at(), and oofem::FloatArray::resize().

Referenced by computeFields(), and computeTangents().

void oofem::MixedGradientPressureNeumann::fromDeviatoricBase3D ( FloatMatrix cartesian,
FloatMatrix deviatoric 
)
protected

Converts from deviatoric to (normal) cartesian base (arrays are fourth order 3D tensors in Voigt notation)

Definition at line 139 of file mixedgradientpressureneumann.C.

References oofem::FloatMatrix::at(), and oofem::FloatMatrix::resize().

virtual const char* oofem::MixedGradientPressureNeumann::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 163 of file mixedgradientpressureneumann.h.

void oofem::MixedGradientPressureNeumann::giveInputRecord ( DynamicInputRecord input)
virtual

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 666 of file mixedgradientpressureneumann.C.

References _IFT_MixedGradientPressure_pressure, oofem::GeneralBoundaryCondition::giveInputRecord(), OOFEM_ERROR, pressure, and oofem::DynamicInputRecord::setField().

virtual const char* oofem::MixedGradientPressureNeumann::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 164 of file mixedgradientpressureneumann.h.

References _IFT_MixedGradientPressureNeumann_Name.

DofManager * oofem::MixedGradientPressureNeumann::giveInternalDofManager ( int  i)
virtual

Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 88 of file mixedgradientpressureneumann.C.

References sigmaDev.

void oofem::MixedGradientPressureNeumann::giveLocationArrays ( std::vector< IntArray > &  rows,
std::vector< IntArray > &  cols,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s 
)
virtual

Gives a list of location arrays that will be assembled.

This should only be used to construct zero structure in sparse matrices. The rows and columns location arrays returned in tuples (stored in vector), allowing to efficiently assemble and allocate off-diagonal blocks. The nonzero entries are assembled and allocated for entries at (rows[i], cols[i]) positions.

Parameters
rowsList of location arrays for r_s.
colsList of location arrays for c_s.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 238 of file mixedgradientpressureneumann.C.

References oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::IntArray::resize(), and sigmaDev.

int oofem::MixedGradientPressureNeumann::giveNumberOfInternalDofManagers ( )
virtual

Returns the number of internal DOF managers (=2).

This boundary condition stores its own DOF managers, one for $ d_{\mathrm{dev},ij} $ in which the DOFs are prescribed and one for $ d_{\mathrm{vol}} $ for single free volumetric strain rate.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 82 of file mixedgradientpressureneumann.C.

virtual bcType oofem::MixedGradientPressureNeumann::giveType ( ) const
inlinevirtual

Not relevant for this boundary condition.

Reimplemented from oofem::MixedGradientPressureBC.

Definition at line 133 of file mixedgradientpressureneumann.h.

References oofem::UnknownBT.

IRResultType oofem::MixedGradientPressureNeumann::initializeFrom ( InputRecord ir)
virtual

Initializes receiver according to object description stored in input record.

The input record contains two fields;

  • devGradient #columns { d_11 d_22 ... d_21 ... } (required)
  • pressure p (required) The gradient should be in Voigt notation (only the deviatoric part will be used)

Reimplemented from oofem::MixedGradientPressureBC.

Definition at line 660 of file mixedgradientpressureneumann.C.

References oofem::MixedGradientPressureBC::initializeFrom().

void oofem::MixedGradientPressureNeumann::scale ( double  s)
virtual

Scales the receiver according to given value.

Typically used in nondimensional analysis to scale down BCs and ICs.

Parameters
sScale factor.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 677 of file mixedgradientpressureneumann.C.

References devGradient, pressure, and oofem::FloatArray::times().

void oofem::MixedGradientPressureNeumann::setPrescribedDeviatoricGradientFromVoigt ( const FloatArray ddev)
virtual

Sets the prescribed tensor from the matrix from given Voigt notation.

Assumes use of double values (gamma) for off-diagonal, usually the way for strain in Voigt form.

Parameters
ddevVector in Voigt format.

Implements oofem::MixedGradientPressureBC.

Definition at line 206 of file mixedgradientpressureneumann.C.

References oofem::FloatArray::at(), oofem::FloatArray::clear(), devGradient, oofem::FEMComponent::domain, oofem::Domain::giveNumberOfSpatialDimensions(), oofem::FloatArray::resize(), and volGradient.

virtual void oofem::MixedGradientPressureNeumann::setPrescribedPressure ( double  p)
inlinevirtual

Set prescribed pressure.

Parameters
pNew prescribed pressure.

Implements oofem::MixedGradientPressureBC.

Definition at line 150 of file mixedgradientpressureneumann.h.

Member Data Documentation

IntArray oofem::MixedGradientPressureNeumann::dev_id
protected

Dof IDs for the lagrange multipliers in sigmaDev.

Definition at line 108 of file mixedgradientpressureneumann.h.

Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveLocationArrays(), and MixedGradientPressureNeumann().

FloatArray oofem::MixedGradientPressureNeumann::devGradient
protected

Prescribed gradient $ d_{\mathrm{dev},ij} $ in Voigt form.

Definition at line 95 of file mixedgradientpressureneumann.h.

Referenced by assembleVector(), scale(), and setPrescribedDeviatoricGradientFromVoigt().

double oofem::MixedGradientPressureNeumann::pressure
protected

Prescribed pressure.

Definition at line 103 of file mixedgradientpressureneumann.h.

Referenced by assembleVector(), giveInputRecord(), and scale().

std :: unique_ptr< Node > oofem::MixedGradientPressureNeumann::sigmaDev
protected

DOF-manager containing the unknown deviatoric stress.

Definition at line 106 of file mixedgradientpressureneumann.h.

Referenced by assemble(), assembleVector(), computeTangents(), giveInternalDofManager(), giveLocationArrays(), and MixedGradientPressureNeumann().

double oofem::MixedGradientPressureNeumann::volGradient
protected

The volumetric part of what was sent in (needed to return the difference).

If caller takes care and sends in a deviatoric gradient, then this will be zero and the return value for the volumetric part will be the true volumetric change.

Definition at line 100 of file mixedgradientpressureneumann.h.

Referenced by computeFields(), and setPrescribedDeviatoricGradientFromVoigt().


The documentation for this class was generated from the following files:

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