84 if (type == MomentumBalance_StiffnessMatrix) {
86 answer.
resize(udofs,udofs);
89 }
else if (type == MomentumBalance_ThermalCouplingMatrix) {
92 answer.
resize(udofs,tdofs);
96 }
else if (type == EnergyBalance_ConductivityMatrix) {
98 answer.
resize(tdofs,tdofs);
101 }
else if (type == EnergyBalance_CapacityMatrix) {
103 answer.
resize(tdofs,tdofs);
113 if (type == MomentumBalance_StressResidual) {
117 }
else if (type == EnergyBalance_Residual) {
127 }
else if (type == ExternalForcesVector) {
141 std::unique_ptr<IntegrationRule> ir;
152 OOFEM_ERROR(
"Unsupported boundary condition geometry type");
186 if ( type != ExternalForcesVector ) {
208 contrib2.
times(-1.0);
214 OOFEM_ERROR(
"Unsupported boundary condition type");
222 if ( type != ExternalForcesVector ) {
243 contrib2.
times(-1.0);
248 OOFEM_ERROR(
"Unsupported boundary condition type");
255 if (type == ExternalForcesVector) {
275 if (q == Variable::VariableQuantity::Displacement) {
285 for (
int i = 1; i <= 3; i++ ) {
286 answer.
at(i, 3) = nn.
at(i);
291 double test = fabs(fabs( nn.
at(3) ) - 1.0);
292 if ( test < 1.e-5 ) {
293 h1.at(1) = answer.
at(1, 1) = 1.0;
294 h1.at(2) = answer.
at(2, 1) = 0.0;
296 h1.at(1) = answer.
at(1, 1) = answer.
at(2, 3);
297 h1.at(2) = answer.
at(2, 1) = -answer.
at(1, 3);
300 h1.at(3) = answer.
at(3, 1) = 0.0;
303 for (
int i = 1; i <= 3; i++ ) {
304 answer.
at(i, 2) = h2.
at(i);
344 if (q == Variable::VariableQuantity::Displacement) {
347 answer={o, o+1, o+2};
348 }
else if (q == Variable::VariableQuantity::Temperature) {
373 if (q == Variable::VariableQuantity::Displacement) {
374 answer={1,2,3, 5,6,7, 9,10,11, 13,14,15};
376 answer ={4, 8, 12, 16};
409#define _IFT_TMBrick11_Name "tmbrick11"
427 TMTetra11(
int n,
Domain* d):
431 numberOfGaussPoints = 4;
432 this->computeGaussPoints();
437 if (q == Variable::VariableQuantity::Displacement) {
440 answer={o, o+1, o+2};
441 }
else if (q == Variable::VariableQuantity::Temperature) {
450 void giveDofManDofIDMask(
int inode,
IntArray &answer)
const override {
453 int giveNumberOfDofs()
override {
return 16; }
454 const char *giveInputRecordName()
const override {
return "tmtetra11";}
455 const char *giveClassName()
const override {
return "TMTetra11"; }
458 const FEInterpolation* getGeometryInterpolation()
const override {
return &this->tInterpol;}
463 int getNumberOfSurfaceDOFs()
const override {
return 12;}
464 int getNumberOfEdgeDOFs()
const override {
return 0;}
466 if (q == Variable::VariableQuantity::Displacement) {
467 answer={1,2,3, 5,6,7, 9,10,11};
484 virtual int giveNumberOfUDofs()
const override {
return 12;}
485 virtual int giveNumberOfTDofs()
const override {
return 4;}
486 virtual const Variable* getU()
const override {
return &u;}
487 virtual const Variable* getT()
const override {
return &t;}
488 void computeGaussPoints()
override {
489 if ( integrationRulesArray.size() == 0 ) {
490 integrationRulesArray.resize( 1 );
491 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1,
this);
492 integrationRulesArray [ 0 ]->SetUpPointsOnTetrahedra(numberOfGaussPoints, _3dMat);
497const FEI3dTetLin TMTetra11::uInterpol;
498const FEI3dTetLin TMTetra11::tInterpol;
499const Variable TMTetra11::t(&TMTetra11::tInterpol, Variable::VariableQuantity::Temperature, Variable::VariableType::scalar, 1, NULL, {10});
500const Variable TMTetra11::u(&TMTetra11::uInterpol, Variable::VariableQuantity::Displacement, Variable::VariableType::vector, 3, NULL, {1,2,3});
502#define _IFT_TMTetra11_Name "tmtetra11"
506#define _IFT_TMSimpleMaterial_Name "tmm"
507#define _IFT_TMSimpleMaterial_E "e"
508#define _IFT_TMSimpleMaterial_nu "nu"
509#define _IFT_TMSimpleMaterial_lambda "lambda"
510#define _IFT_TMSimpleMaterial_alpha "alpha"
511#define _IFT_TMSimpleMaterial_c "c"
531 tempStressVector(), tempStrainVector()
535 const FloatArray &giveStrainVector()
const {
return strainVector; }
537 const FloatArray &giveStressVector()
const {
return stressVector; }
539 const FloatArray &giveTempStrainVector()
const {
return tempStrainVector; }
541 const FloatArray &giveTempStressVector()
const {
return tempStressVector; }
543 const FloatArray &giveTempFluxVector()
const {
return tempFluxVector; }
545 const FloatArray &giveFluxVector()
const {
return fluxVector; }
547 void letTempStressVectorBe(
const FloatArray &v) { tempStressVector = v; }
549 void letTempStrainVectorBe(
const FloatArray &v) { tempStrainVector = v; }
551 void letTempFluxVectorBe(
const FloatArray &v) { tempFluxVector = v; }
553 void printOutputAt(FILE *file,
TimeStep *tStep)
const override {
554 MaterialStatus :: printOutputAt(file, tStep);
555 fprintf(file,
" strains ");
556 for (
auto &var : strainVector ) {
557 fprintf( file,
" %+.4e", var );
560 fprintf(file,
"\n stresses");
561 for (
auto &var : stressVector ) {
562 fprintf( file,
" %+.4e", var );
565 fprintf(file,
"\n fluxes");
566 for (
auto &var : fluxVector ) {
567 fprintf( file,
" %+.4e", var );
572 void initTempStatus()
override {
573 MaterialStatus :: initTempStatus();
574 tempStressVector = stressVector;
575 tempStrainVector = strainVector;
576 tempFluxVector = fluxVector;
578 void updateYourself(
TimeStep *tStep)
override {
579 MaterialStatus :: updateYourself(tStep);
580 stressVector = tempStressVector;
581 strainVector = tempStrainVector;
582 fluxVector = tempFluxVector;
584 const char *giveClassName()
const override {
return "TMMaterialStatus";}
599 if (type == TangentStiffness) {
602 ee =
e / ( ( 1. +
nu ) * ( 1. - 2. *
nu ) );
606 answer.
at(1, 1) = 1. -
nu;
607 answer.
at(1, 2) =
nu;
608 answer.
at(1, 3) =
nu;
609 answer.
at(2, 1) =
nu;
610 answer.
at(2, 2) = 1. -
nu;
611 answer.
at(2, 3) =
nu;
612 answer.
at(3, 1) =
nu;
613 answer.
at(3, 2) =
nu;
614 answer.
at(3, 3) = 1. -
nu;
616 answer.
at(4, 4) = ( 1. - 2. *
nu ) * 0.5;
617 answer.
at(5, 5) = ( 1. - 2. *
nu ) * 0.5;
618 answer.
at(6, 6) = ( 1. - 2. *
nu ) * 0.5;
621 }
else if (type == DSigmaDT) {
624 }
else if (type == Conductivity) {
625 if (mmode == _3dMat) {
628 answer.
times(this->lambda);
638 TMMaterialStatus *status =
static_cast< TMMaterialStatus *
>( this->
giveStatus(gp) );
639 if (type == Stress) {
642 for (
int i=0; i<6; i++) {
654 status->letTempStrainVectorBe(flux);
655 status->letTempStressVectorBe(answer);
657 }
else if (type == Flux) {
665 status->letTempFluxVectorBe(answer);
666 }
else if (type == IntSource) {
676 if (type == BiotConstant) {
678 }
else if (type == Capacity) {
686 Material :: initializeFrom(ir);
697 std::unique_ptr<MaterialStatus>
CreateStatus(
GaussPoint *gp)
const override {
return std::make_unique<TMMaterialStatus>(gp); }
702 TMMaterialStatus *status =
static_cast< TMMaterialStatus *
>( this->
giveStatus(gp) );
703 if ( type == IST_StrainTensor ) {
704 answer = status->giveStrainVector();
707 if ( type == IST_StressTensor ) {
708 answer = status->giveStressVector();
#define REGISTER_Material(class)
#define REGISTER_Element(class)
momentum balance term (lhs only) (\int (\partial N)^T D (-\alpha\Pi))
evaluates lhs of β«(π΅π’)π(ππ(π,π)/ππ)
bcType giveType() const override
int giveApproxOrder() override=0
virtual int giveNumberOfDofs()
virtual const FEInterpolation * getGeometryInterpolation() const
int numberOfDofMans
Number of dofmanagers.
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
virtual IntegrationRule * giveDefaultIntegrationRulePtr()
virtual Element_Geometry_Type giveGeometryType() const =0
virtual std::unique_ptr< IntegrationRule > giveBoundaryEdgeIntegrationRule(int order, int boundary, const Element_Geometry_Type) const
virtual std::unique_ptr< IntegrationRule > giveBoundarySurfaceIntegrationRule(int order, int boundary, const Element_Geometry_Type) const
int giveInterpolationOrder() const
virtual double boundarySurfaceEvalNormal(FloatArray &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
void assemble(const FloatArray &fe, const IntArray &loc)
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
void subtract(const FloatArray &src)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
void beUnitMatrix()
Sets receiver to unity matrix.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
virtual bcGeomType giveBCGeoType() const
virtual bcValType giveBCValType() const
virtual bcType giveType() const
virtual int getNumberOfSurfaceDOFs() const =0
virtual void getEdgeLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const =0
virtual void getLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const
virtual int getNumberOfEdgeDOFs() const =0
void integrateSurfaceTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, int isurf, TimeStep *tstep)
virtual void getSurfaceLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const =0
MPElement(int n, Domain *aDomain)
void integrateEdgeTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, int iedge, TimeStep *tstep)
void integrateTerm_c(FloatArray &answer, const Term &term, IntegrationRule *iRule, TimeStep *tstep)
void integrateSurfaceTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, int isurf, TimeStep *tstep)
void integrateTerm_dw(FloatMatrix &answer, const Term &term, IntegrationRule *iRule, TimeStep *tstep)
Material(int n, Domain *d)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
evaluates flux due to convection BC β«(Nt)a(T-Te)ds, Te being external temperature and a being convect...
A continuity equation compressibility matrix $S=(N_p)^T c\ N_p$, where $c=({\alpha-n}...
A external flux term $S=(N)^T f$, where $f$ is functor evaluating the flux.
A external flux term $S=(N)^T f$, where $f$ is functor evaluating the flux.
A external flux term $S=(N)^T f$, where $f$ is functor evaluating the flux.
A Linear momentum balance equation term ($B^T\sigma(u)$).
3D Equal order linear Brick TS Element
virtual int giveNumberOfTDofs() const override
static const FEI3dHexaLin tInterpol
const char * giveInputRecordName() const override
void computeGaussPoints() override
void getEdgeLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const override
int getNumberOfSurfaceDOFs() const override
const char * giveClassName() const override
int giveNumberOfDofs() override
void getSurfaceLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const override
void getDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int num) const override
Element_Geometry_Type giveGeometryType() const override
static const FEI3dHexaLin uInterpol
virtual const Variable * getU() const override
TMBrick11(int n, Domain *d)
virtual const Variable * getT() const override
virtual int giveNumberOfUDofs() const override
void getInternalDofManLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int num) const override
const FEInterpolation * getGeometryInterpolation() const override
void giveDofManDofIDMask(int inode, IntArray &answer) const override
Interface * giveInterface(InterfaceType it) override
int getNumberOfEdgeDOFs() const override
Base class for fully coupled, nonlinear thermo mechanical elements.
int computeFluxLBToLRotationMatrix(FloatMatrix &answer, int iSurf, const FloatArray &lc, const Variable::VariableQuantity q, char btype) override
virtual int giveNumberOfTDofs() const =0
void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep) override
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override
virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override
virtual const Variable * getU() const =0
TMElement(int n, Domain *d)
virtual int giveNumberOfUDofs() const =0
void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep) override
virtual const Variable * getT() const =0
void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep) override
void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true) override
void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID) override
double giveCharacteristicValue(MatResponseMode type, GaussPoint *gp, TimeStep *tStep) const override
Returns characteristic value of the receiver.
const char * giveClassName() const override
const char * giveInputRecordName() const override
void giveCharacteristicVector(FloatArray &answer, FloatArray &flux, MatResponseMode type, GaussPoint *gp, TimeStep *tStep) const override
void initializeFrom(InputRecord &ir) override
TMSimpleMaterial(int n, Domain *d)
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
void giveInputRecord(DynamicInputRecord &input) override
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void giveCharacteristicMatrix(FloatMatrix &answer, MatResponseMode type, GaussPoint *gp, TimeStep *tStep) const override
Returns characteristic matrix of the receiver.
oofem::VariableQuantity VariableQuantity
const FEInterpolation * interpolation
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
@ SurfaceLoadBGT
Distributed surface load.
@ EdgeLoadBGT
Distributed edge load.
@ ZZNodalRecoveryModelInterfaceType
bcType
Type representing the type of bc.
@ TransmissionBC
Neumann type (prescribed flux).
@ ConvectionBC
Newton type - transfer coefficient.
#define _IFT_TMSimpleMaterial_alpha
#define _IFT_TMSimpleMaterial_nu
#define _IFT_TMSimpleMaterial_c
#define _IFT_TMSimpleMaterial_E
#define _IFT_TMSimpleMaterial_Name
#define _IFT_TMSimpleMaterial_lambda