75 int components = (
ndim * (
ndim + 1 ) ) / 2;
76 for (
int i = 1; i <= components; ++i ) {
93 OOFEM_ERROR(
"1d flow not supported (should be added)")
96 }
else if (
ndim == 2 ) {
102 int components = (
ndim * (
ndim + 1 ) ) / 2;
104 initialStrain.
zero();
109 gps.emplace_back( std :: move(gp));
117 this->
outfile.open( outname.c_str() );
126 double strainVol, pressure, strainVolC = 0.;
127 FloatArray stressDevC, deltaStrain, strainDev, stressDev, res;
134 for (
int istep = 1; istep <= this->
numberOfSteps; ++istep ) {
160 for (
int iter = 1; iter < maxiter; iter++ ) {
167 resVol = strainVolC - strainVol;
170 OOFEM_LOG_RELEVANT(
"Time step: %d, Material %d, Iteration: %d, Residual = %e, Resvol = %e\n", istep, imat, iter, res.
computeNorm(), resVol );
179 for (
int i = 1; i <= this->
ndim; ++i ) {
180 for (
int j = 1; j <= this->
ndim; ++j ) {
195 pressure -= resVol/dedp;
220 if ( !dynamic_cast< FluidDynamicMaterial * >( d->
giveMaterial(i) ) ) {
234 for (
int var: this->
vars ) {
bool contains(int value) const
EngngModelTimer timer
E-model timer.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
std::unique_ptr< TimeStep > currentStep
Current time step.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
std::string giveOutputBaseFileName()
Returns base output file name to which extensions, like .out .vtu .osf should be added.
IntArray sControl
Time function controlling the volumetric/pressure part.
virtual int checkConsistency()
Allows programmer to test some receiver's internal data, before computation begins.
Abstract base class for all fluid materials.
bool solveForRhs(const FloatArray &b, FloatArray &answer, bool transpose=false)
Solves the system of linear equations .
void startTimer(EngngModelTimerType t)
const FloatArray & giveDeviatoricStrainRateVector()
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
#define _IFT_FluidMaterialEvaluator_volFunction
Integer of time function for volumetric part.
void beSubMatrixOf(const FloatMatrix &src, int topRow, int bottomRow, int topCol, int bottomCol)
Assigns to the receiver the sub-matrix of another matrix.
#define _IFT_FluidMaterialEvaluator_numberOfTimeSteps
void letDeviatoricStrainRateVectorBe(FloatArray v)
std::vector< std::unique_ptr< GaussPoint > > gps
void stopTimer(EngngModelTimerType t)
MaterialMode
Type representing material mode of integration point.
virtual void giveStiffnessMatrices(FloatMatrix &dsdd, FloatArray &dsdp, FloatArray &dedd, double &dedp, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the 4 tangents of the compressible material response in 3D.
REGISTER_EngngModel(ProblemSequence)
int & at(int i)
Coefficient access function.
#define _IFT_FluidMaterialEvaluator_pressureControl
Bool(Integer) determining if pressure or volumetric strain-rate is controlled.
#define _IFT_FluidMaterialEvaluator_componentFunctions
Integer list of time functions for each component.
#define _IFT_FluidMaterialEvaluator_stressControl
Integer list of the stress components which are controlled.
#define OOFEM_LOG_RELEVANT(...)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
bool isTheFirstStep()
Check if receiver is first step.
virtual void updateYourself(TimeStep *tStep)
Updates internal state of receiver after finishing time step.
This class implements a transport material status information.
virtual ~FluidMaterialEvaluator()
virtual void computeDeviatoricStressVector(FloatArray &stress_dev, double &epsp_vol, GaussPoint *gp, const FloatArray &eps, double pressure, TimeStep *tStep)
Computes the deviatoric stress vector and volumetric strain rate from given deviatoric strain and pre...
Material * giveMaterial(int n)
Service for accessing particular domain material model.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
int numberOfSteps
Total number of time steps.
int ndomains
Number of receiver domains.
int giveNumberOfMaterialModels() const
Returns number of material models in domain.
#define _IFT_FluidMaterialEvaluator_nDimensions
Number of dimensions (2 or 3)
double deltaT
Time increment.
double at(int i, int j) const
Coefficient access function.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Function * giveFunction(int n)
Service for accessing particular domain load time function.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Class representing vector of real numbers.
virtual void solveYourself()
Starts solution process.
virtual int checkConsistency()
Allows programmer to test some receiver's internal data, before computation begins.
virtual void doStepOutput(TimeStep *tStep)
Prints the ouput of the solution step (using virtual this->printOutputAtservice) to the stream detemi...
Implementation of matrix containing floating point numbers.
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
IRResultType
Type defining the return values of InputRecord reading operations.
double norm(const FloatArray &x)
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
double computeNorm() const
Computes the norm (or length) of the vector.
int volFunction
Time functions controlling each component of the deviatoric part of the stress.
#define _IFT_FluidMaterialEvaluator_deltat
void followedBy(const IntArray &b, int allocChunk=0)
Appends array b at the end of receiver.
void zero()
Zeroes all coefficients of receiver.
#define _IFT_FluidMaterialEvaluator_outputVariables
Variables (from integration point) to be written.
FluidMaterialEvaluator(int i, EngngModel *_master=NULL)
const char * __InternalStateTypeToString(InternalStateType _value)
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
IntArray cmpntFunctions
Number of spatial dimensions.
Class representing integration point in finite element program.
#define OOFEM_WARNING(...)
Class representing solution step.
void resize(int s)
Resizes receiver towards requested size.