Select Git revision
dG3DMaterialLaw.cpp
dG3DMaterialLaw.cpp 520.25 KiB
//
//
// Description: Class with definition of materialLaw for shell
//
//
// Author: <Gauthier BECKER>, (C) 2011
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "dG3DMaterialLaw.h"
#include "ipstate.h"
#include "MInterfaceElement.h"
#include "ipField.h"
#include "mlawLinearThermoMechanics.h"
#include "mlawSMP.h"
#include "mlawPhenomenologicalSMP.h"
#include "mlaw.h"
#include "mlawLinearElecTherMech.h"
#include "mlawAnIsotropicElecTherMech.h"
#include "mlawElecSMP.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include "dG3DCohesiveIPVariable.h"
#include "FractureCohesiveDG3DIPVariable.h"
#include "dG3DReduction.h"
#include "mlawLinearElecMagTherMech.h"
#include "nonLinearMechSolver.h"
#include "numericalMaterial.h"
#include "nonLocalDamageDG3DIPVariable.h"
#if defined(HAVE_TORCH)
#include <torch/torch.h>
#include <torch/script.h>
#endif
// 3D to 1D
void dG3DMaterialLaw::stress3DTo1D(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac){
reduction3DTo1DStress(this,ipv,ipvprev,stiff,checkfrac);
};
void dG3DMaterialLaw::stress3DTo1D_constantTriaxiality(double T, IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac){
reduction3DTo1DStress_constantTriaxiality(T,this,ipv,ipvprev,stiff,checkfrac);
};
// 3D to 2D
void dG3DMaterialLaw::stress3DTo2D(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac, const bool dTangent){
reduction3DTo2DStress(this,ipv,ipvprev,stiff,checkfrac,dTangent);
};
void dG3DMaterialLaw::fillElasticStiffness(double E, double nu, STensor43 &K_) const
{
double mu = 0.5*E/(1.+nu);
double lambda = (E*nu)/(1.+nu)/(1.-2.*nu);
double twicemu = mu+mu;
STensorOperation::zero(K_);
K_(0,0,0,0) = lambda + twicemu;
K_(1,1,0,0) = lambda;
K_(2,2,0,0) = lambda;
K_(0,0,1,1) = lambda;
K_(1,1,1,1) = lambda + twicemu;
K_(2,2,1,1) = lambda;
K_(0,0,2,2) = lambda;
K_(1,1,2,2) = lambda;