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

Prescribes $ v_i = d_{ij}(x_j-\bar{x}_j) = (d_{\mathrm{dev},ij}+ \frac13 d_{\mathrm{vol}} I_{ij})(x_j+\bar{x}_j)) $ where $ d_{\mathrm{vol}} $ is unknown, loaded by a pressure. More...

#include <mixedgradientpressuredirichlet.h>

+ Inheritance diagram for oofem::MixedGradientPressureDirichlet:
+ Collaboration diagram for oofem::MixedGradientPressureDirichlet:

Public Member Functions

 MixedGradientPressureDirichlet (int n, Domain *d)
 Creates boundary condition with given number, belonging to given domain. More...
 
virtual ~MixedGradientPressureDirichlet ()
 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 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 &stressDev, 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 setCenterCoordinate (const FloatArray &x)
 Set the center coordinate. More...
 
virtual FloatArraygiveCenterCoordinate ()
 Returns the center coordinate. More...
 
virtual void assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=NULL)
 Assembles B.C. 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...
 
bool isDevDof (Dof *dof)
 Returns true is DOF represents one of the deviatoric parts. 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)
 
double giveUnknown (double vol, const FloatArray &dev, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
 
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...
 
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...
 
virtual bcType giveType () const
 Not relevant for this boundary condition. 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 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 void addElementSide (int elem, int side)
 Adds element for active boundary condition. 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

DofgiveVolDof ()
 

Protected Attributes

FloatArray devGradient
 Prescribed gradient $ d_{\mathrm{dev},ij} $ in Voigt form. More...
 
FloatArray centerCoord
 Center coordinate $ \bar{x}_i $. More...
 
double pressure
 Prescribed pressure. More...
 
std::unique_ptr< Nodevoldman
 DOF-manager containing the unknown volumetric strain(rate). More...
 
int vol_id
 
std::unique_ptr< Nodedevdman
 DOF-manager containing the known deviatoric strain(rate). More...
 
IntArray dev_id
 
- 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

Prescribes $ v_i = d_{ij}(x_j-\bar{x}_j) = (d_{\mathrm{dev},ij}+ \frac13 d_{\mathrm{vol}} I_{ij})(x_j+\bar{x}_j)) $ where $ d_{\mathrm{vol}} $ is unknown, loaded by a pressure.

This is mixed Dirichlet boundary condition in multiscale analysis where $ d = \partial_x s$ would a macroscopic gradient at the integration point, i.e. this is a boundary condition for prolongation. It is also convenient to use when one wants to test a arbitrary specimen for shear.

Note
The 2D case assumes plane strain(rate), as is the case in _2dFlow.
It is possible to use a non-deviatoric strain rate, in which case, $ d_{\mathrm{vol}} $ obtains the value of the actual volumetric strain rate minus the volumetric part of $ d_{\mathrm{dev}} $.
This is only applicable to momentum balance equation. Both solid or fluids, incompressible or compressible, should work.
Can only be prescribed to active dofs, so they must be denoted as such in the in the input file.
See also
MixedGradientPressureNeumann
Author
Mikael Öhman

Definition at line 72 of file mixedgradientpressuredirichlet.h.

Constructor & Destructor Documentation

oofem::MixedGradientPressureDirichlet::MixedGradientPressureDirichlet ( 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:
Creating these statically in the constructor is a bad idea.. it should be part of Domain::createDofs()

Definition at line 59 of file mixedgradientpressuredirichlet.C.

References oofem::IntArray::clear(), dev_id, devdman, oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfSpatialDimensions(), vol_id, and voldman.

oofem::MixedGradientPressureDirichlet::~MixedGradientPressureDirichlet ( )
virtual

Destructor.

Definition at line 83 of file mixedgradientpressuredirichlet.C.

Member Function Documentation

void oofem::MixedGradientPressureDirichlet::assembleVector ( FloatArray answer,
TimeStep tStep,
CharType  type,
ValueModeType  mode,
const UnknownNumberingScheme s,
FloatArray eNorms = NULL 
)
virtual

Assembles B.C.

contributions to specified vector.

Parameters
[in,out]answerVector to assemble to.
tStepActive time step.
typeType of matrix to assemble.
modeMode of value.
sNumbering scheme.
eNormsNorms for each dofid.
Returns
Equivalent of the sum of the element norm (squared) of assembled vector.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 399 of file mixedgradientpressuredirichlet.C.

References oofem::FloatArray::at(), oofem::MixedGradientPressureBC::domainSize(), oofem::Dof::giveDofID(), oofem::Dof::giveEquationNumber(), giveVolDof(), and pressure.

void oofem::MixedGradientPressureDirichlet::computeFields ( FloatArray stressDev,
double &  vol,
TimeStep tStep 
)
virtual
double oofem::MixedGradientPressureDirichlet::giveBcValue ( Dof dof,
ValueModeType  mode,
TimeStep tStep 
)
virtual

Returns the prescribed value of a dof (if any).

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 424 of file mixedgradientpressuredirichlet.C.

References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), isDevDof(), and OOFEM_ERROR.

virtual FloatArray& oofem::MixedGradientPressureDirichlet::giveCenterCoordinate ( )
inlinevirtual

Returns the center coordinate.

Definition at line 146 of file mixedgradientpressuredirichlet.h.

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

Implements oofem::FEMComponent.

Definition at line 169 of file mixedgradientpressuredirichlet.h.

void oofem::MixedGradientPressureDirichlet::giveInputRecord ( DynamicInputRecord input)
virtual
virtual const char* oofem::MixedGradientPressureDirichlet::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 170 of file mixedgradientpressuredirichlet.h.

References _IFT_MixedGradientPressureDirichlet_Name.

DofManager * oofem::MixedGradientPressureDirichlet::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 100 of file mixedgradientpressuredirichlet.C.

References devdman, and voldman.

Dof * oofem::MixedGradientPressureDirichlet::giveMasterDof ( ActiveDof dof,
int  mdof 
)
virtual

Give the pointer to master dof belonging to active DOF.

Parameters
dofActive dof belonging to receiver.
mdofLocal master dof number.
Returns
Master dof.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 119 of file mixedgradientpressuredirichlet.C.

References dev_id, devdman, isDevDof(), and voldman.

int oofem::MixedGradientPressureDirichlet::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 94 of file mixedgradientpressuredirichlet.C.

int oofem::MixedGradientPressureDirichlet::giveNumberOfMasterDofs ( ActiveDof dof)
virtual

Allows for active boundary conditions to handle their own special DOF.

Parameters
dofActive dof belonging to receiver.
Returns
Number of primary master DOFs.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 110 of file mixedgradientpressuredirichlet.C.

References devdman, and isDevDof().

double oofem::MixedGradientPressureDirichlet::giveUnknown ( double  vol,
const FloatArray dev,
ValueModeType  mode,
TimeStep tStep,
ActiveDof dof 
)
double oofem::MixedGradientPressureDirichlet::giveUnknown ( PrimaryField field,
ValueModeType  mode,
TimeStep tStep,
ActiveDof dof 
)
virtual

Computes the value of the dof.

Parameters
fieldField to take value from.
modeMode of unknown value.
tStepTime step.
dofActive dof for which to obtain the value.
Returns
Value of dof.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 375 of file mixedgradientpressuredirichlet.C.

References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), giveUnknown(), giveVolDof(), and isDevDof().

double oofem::MixedGradientPressureDirichlet::giveUnknown ( ValueModeType  mode,
TimeStep tStep,
ActiveDof dof 
)
virtual

Computes the value of the dof.

Parameters
modeMode of unknown value.
tStepTime step.
dofActive dof for which to obtain the value.
Returns
Value of dof.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 384 of file mixedgradientpressuredirichlet.C.

References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), giveUnknown(), giveVolDof(), and isDevDof().

Dof * oofem::MixedGradientPressureDirichlet::giveVolDof ( )
protected

Definition at line 88 of file mixedgradientpressuredirichlet.C.

References voldman.

Referenced by assembleVector(), computeFields(), computeTangents(), and giveUnknown().

bool oofem::MixedGradientPressureDirichlet::hasBc ( Dof dof,
TimeStep tStep 
)
virtual

Returns the prescribed value of a dof (if any).

Returns
True if dof is prescribed.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 434 of file mixedgradientpressuredirichlet.C.

References isDevDof().

IRResultType oofem::MixedGradientPressureDirichlet::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)
  • cCoords #columns x_1 x_2 ... (optional, default 0) The gradient should be deviatoric and in Voigt notation. The prescribed tensor's columns must be equal to the size of the center coordinates. The size of the center coordinates must be equal to the size of the coordinates in the applied nodes.

Reimplemented from oofem::MixedGradientPressureBC.

Definition at line 446 of file mixedgradientpressuredirichlet.C.

References _IFT_MixedGradientPressure_centerCoords, centerCoord, oofem::FEMComponent::domain, oofem::Domain::giveNumberOfSpatialDimensions(), oofem::MixedGradientPressureBC::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, oofem::FloatArray::resize(), and oofem::FloatArray::zero().

bool oofem::MixedGradientPressureDirichlet::isDevDof ( Dof dof)

Returns true is DOF represents one of the deviatoric parts.

Definition at line 440 of file mixedgradientpressuredirichlet.C.

References devdman, and oofem::Dof::giveDofManager().

Referenced by giveBcValue(), giveMasterDof(), giveNumberOfMasterDofs(), giveUnknown(), hasBc(), and isPrimaryDof().

bool oofem::MixedGradientPressureDirichlet::isPrimaryDof ( ActiveDof dof)
virtual

Checks to see if the dof is a primary DOF.

Returns
True if ActiveDof is a primary DOF.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 418 of file mixedgradientpressuredirichlet.C.

References isDevDof().

virtual bool oofem::MixedGradientPressureDirichlet::requiresActiveDofs ( )
inlinevirtual

Checks to see if active boundary condition requires special DOFs.

Returns
True if ActiveDof should be created.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 152 of file mixedgradientpressuredirichlet.h.

virtual void oofem::MixedGradientPressureDirichlet::scale ( double  s)
inlinevirtual

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 129 of file mixedgradientpressuredirichlet.h.

References oofem::FloatArray::times().

virtual void oofem::MixedGradientPressureDirichlet::setCenterCoordinate ( const FloatArray x)
inlinevirtual

Set the center coordinate.

Parameters
xNew center coordinate.

Definition at line 144 of file mixedgradientpressuredirichlet.h.

void oofem::MixedGradientPressureDirichlet::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 393 of file mixedgradientpressuredirichlet.C.

References devGradient.

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

Set prescribed pressure.

Parameters
pNew prescribed pressure.

Implements oofem::MixedGradientPressureBC.

Definition at line 137 of file mixedgradientpressuredirichlet.h.

Member Data Documentation

FloatArray oofem::MixedGradientPressureDirichlet::centerCoord
protected

Center coordinate $ \bar{x}_i $.

Definition at line 79 of file mixedgradientpressuredirichlet.h.

Referenced by computeDofTransformation(), giveInputRecord(), giveUnknown(), and initializeFrom().

IntArray oofem::MixedGradientPressureDirichlet::dev_id
protected
std :: unique_ptr< Node > oofem::MixedGradientPressureDirichlet::devdman
protected
FloatArray oofem::MixedGradientPressureDirichlet::devGradient
protected

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

Definition at line 76 of file mixedgradientpressuredirichlet.h.

Referenced by computeTangents(), giveBcValue(), giveInputRecord(), giveUnknown(), and setPrescribedDeviatoricGradientFromVoigt().

double oofem::MixedGradientPressureDirichlet::pressure
protected

Prescribed pressure.

Definition at line 82 of file mixedgradientpressuredirichlet.h.

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

int oofem::MixedGradientPressureDirichlet::vol_id
protected

Definition at line 86 of file mixedgradientpressuredirichlet.h.

Referenced by MixedGradientPressureDirichlet().

std :: unique_ptr< Node > oofem::MixedGradientPressureDirichlet::voldman
protected

DOF-manager containing the unknown volumetric strain(rate).

Definition at line 85 of file mixedgradientpressuredirichlet.h.

Referenced by giveInternalDofManager(), giveMasterDof(), giveVolDof(), and MixedGradientPressureDirichlet().


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