51 #define BINGHAM_MIN_SHEAR_RATE 1.e-10 110 double gamma2 = gamma * gamma;
111 double dmudg, dgde1, dgde2, dgde3, mu;
113 dmudg = dgde1 = dgde2 = dgde3 = 0.0;
120 dgde1 = 2.0 * fabs( epsd.
at(1) ) / gamma;
121 dgde2 = 2.0 * fabs( epsd.
at(2) ) / gamma;
122 dgde3 = 1.0 * fabs( epsd.
at(3) ) / gamma;
125 return min(
min( ( epsd.
at(1) * dmudg * dgde1 + mu ), ( epsd.
at(2) * dmudg * dgde2 + mu ) ),
126 ( epsd.
at(3) * dmudg * dgde3 + mu ) );
131 if ( temp_tau <
tau_c ) {
169 double gamma, tau, _nu;
187 if ( tau > this->
tau_c ) {
212 double gamma2 = gamma * gamma;
214 if ( mmode == _2dFlow ) {
218 double dgde1, dgde2, dgde3;
224 answer.
at(1, 1) = answer.
at(2, 2) = 2.0 * _nu;
225 answer.
at(3, 3) = _nu;
232 if ( ( mode == ElasticStiffness ) || ( mode == SecantStiffness ) ) {
234 answer.
at(1, 1) = answer.
at(2, 2) = 2.0 * _nu;
235 answer.
at(3, 3) = _nu;
239 dmudg = dgde1 = dgde2 = dgde3 = 0.0;
250 dgde1 = 0.5 * fabs( epsd.
at(1) ) / gamma;
251 dgde2 = 0.5 * fabs( epsd.
at(2) ) / gamma;
252 dgde3 = 1.0 * fabs( epsd.
at(3) ) / gamma;
260 answer.
at(1, 1) = 2.0 * epsd.
at(1) * dmudg * dgde1 + 2.0 * mu;
261 answer.
at(1, 2) = 2.0 * epsd.
at(1) * dmudg * dgde2;
262 answer.
at(1, 3) = 2.0 * epsd.
at(1) * dmudg * dgde3;
264 answer.
at(2, 1) = 2.0 * epsd.
at(2) * dmudg * dgde1;
265 answer.
at(2, 2) = 2.0 * epsd.
at(2) * dmudg * dgde2 + 2.0 * mu;
266 answer.
at(2, 3) = 2.0 * epsd.
at(2) * dmudg * dgde3;
268 answer.
at(3, 1) = epsd.
at(3) * dmudg * dgde1;
269 answer.
at(3, 2) = epsd.
at(3) * dmudg * dgde2;
270 answer.
at(3, 3) = epsd.
at(3) * dmudg * dgde3 + mu;
274 }
else if ( mmode == _2dAxiFlow ) {
279 double dgde1, dgde2, dgde3, dgde4;
285 answer.
at(1, 1) = answer.
at(2, 2) = answer.
at(3, 3) = 2.0 * _nu;
286 answer.
at(4, 4) = _nu;
293 if ( ( mode == ElasticStiffness ) || ( mode == SecantStiffness ) ) {
295 answer.
at(1, 1) = answer.
at(2, 2) = answer.
at(3, 3) = 2.0 * _nu;
296 answer.
at(4, 4) = _nu;
300 dmudg = dgde1 = dgde2 = dgde3 = dgde4 = 0.0;
308 dgde1 = 2.0 * fabs( epsd.
at(1) ) / gamma;
309 dgde2 = 2.0 * fabs( epsd.
at(2) ) / gamma;
310 dgde3 = 2.0 * fabs( epsd.
at(3) ) / gamma;
311 dgde4 = 1.0 * fabs( epsd.
at(4) ) / gamma;
313 dgde1 = 2.0 * epsd.
at(1) / gamma;
314 dgde2 = 2.0 * epsd.
at(2) / gamma;
315 dgde3 = 2.0 * epsd.
at(3) / gamma;
316 dgde4 = 1.0 * epsd.
at(4) / gamma;
320 answer.
at(1, 1) = 2.0 * epsd.
at(1) * dmudg * dgde1 + 2.0 * mu;
321 answer.
at(1, 2) = 2.0 * epsd.
at(1) * dmudg * dgde2;
322 answer.
at(1, 3) = 2.0 * epsd.
at(1) * dmudg * dgde3;
323 answer.
at(1, 4) = 2.0 * epsd.
at(1) * dmudg * dgde4;
325 answer.
at(2, 1) = 2.0 * epsd.
at(2) * dmudg * dgde1;
326 answer.
at(2, 2) = 2.0 * epsd.
at(2) * dmudg * dgde2 + 2.0 * mu;
327 answer.
at(2, 3) = 2.0 * epsd.
at(2) * dmudg * dgde3;
328 answer.
at(2, 4) = 2.0 * epsd.
at(2) * dmudg * dgde4;
330 answer.
at(3, 1) = 2.0 * epsd.
at(3) * dmudg * dgde1;
331 answer.
at(3, 2) = 2.0 * epsd.
at(3) * dmudg * dgde2;
332 answer.
at(3, 3) = 2.0 * epsd.
at(3) * dmudg * dgde3 + 2.0 * mu;
333 answer.
at(3, 4) = 2.0 * epsd.
at(3) * dmudg * dgde4;
336 answer.
at(4, 1) = epsd.
at(4) * dmudg * dgde1;
337 answer.
at(4, 2) = epsd.
at(4) * dmudg * dgde2;
338 answer.
at(4, 3) = epsd.
at(4) * dmudg * dgde3;
339 answer.
at(4, 4) = epsd.
at(4) * dmudg * dgde4 + mu;
359 dgde.
at(1) = 2.0 * epsd.
at(1) / gamma;
360 dgde.
at(2) = 2.0 * epsd.
at(2) / gamma;
361 dgde.
at(3) = 2.0 * epsd.
at(3) / gamma;
362 dgde.
at(4) = 1.0 * epsd.
at(4) / gamma;
363 dgde.
at(5) = 1.0 * epsd.
at(5) / gamma;
364 dgde.
at(6) = 1.0 * epsd.
at(6) / gamma;
367 for (
int i = 1; i <= 6; i++ ) {
368 answer.
at(1, i) = fabs( 2.0 * epsd.
at(1) * dmudg * dgde.
at(i) );
369 answer.
at(2, i) = fabs( 2.0 * epsd.
at(2) * dmudg * dgde.
at(i) );
370 answer.
at(3, i) = fabs( 2.0 * epsd.
at(3) * dmudg * dgde.
at(i) );
371 answer.
at(4, i) = fabs( epsd.
at(4) * dmudg * dgde.
at(i) );
372 answer.
at(5, i) = fabs( epsd.
at(5) * dmudg * dgde.
at(i) );
373 answer.
at(6, i) = fabs( epsd.
at(6) * dmudg * dgde.
at(i) );
376 answer.
at(1, 1) += 2.0 * mu;
377 answer.
at(2, 2) += 2.0 * mu;
378 answer.
at(3, 3) += 2.0 * mu;
379 answer.
at(4, 4) += mu;
380 answer.
at(5, 5) += mu;
381 answer.
at(6, 6) += mu;
400 this->
tau_0 /= scale;
419 if ( Tau <=
tau_c ) {
433 if ( mmode == _2dFlow ) {
435 _val = 0.5 * ( epsd.
at(1) * epsd.
at(1) + epsd.
at(2) * epsd.
at(2) ) + epsd.
at(3) * epsd.
at(3);
436 }
else if ( mmode == _2dAxiFlow ) {
437 _val = 2.0 * ( epsd.
at(1) * epsd.
at(1) + epsd.
at(2) * epsd.
at(2) +
438 epsd.
at(3) * epsd.
at(3) ) + epsd.
at(4) * epsd.
at(4);
439 }
else if ( mmode == _3dFlow ) {
440 _val = 2.0 * ( epsd.
at(1) * epsd.
at(1) + epsd.
at(2) * epsd.
at(2) + epsd.
at(3) * epsd.
at(3) )
441 + epsd.
at(4) * epsd.
at(4) + epsd.
at(5) * epsd.
at(5) + epsd.
at(6) * epsd.
at(6);
453 if ( mmode == _2dFlow ) {
454 _val = 0.5 * ( sigd.
at(1) * sigd.
at(1) + sigd.
at(2) * sigd.
at(2) + 2.0 * sigd.
at(3) * sigd.
at(3) );
455 }
else if ( mmode == _2dAxiFlow ) {
456 _val = 0.5 * ( sigd.
at(1) * sigd.
at(1) +
457 sigd.
at(2) * sigd.
at(2) +
458 sigd.
at(3) * sigd.
at(3) +
459 2.0 * sigd.
at(4) * sigd.
at(4) );
460 }
else if ( mmode == _3dFlow ) {
461 _val = 0.5 * ( sigd.
at(1) * sigd.
at(1) + sigd.
at(2) * sigd.
at(2) + sigd.
at(3) * sigd.
at(3) +
462 2.0 * sigd.
at(4) * sigd.
at(4) + 2.0 * sigd.
at(5) * sigd.
at(5) + 2.0 * sigd.
at(6) * sigd.
at(6) );
473 if ( mmode == _2dFlow ) {
482 }
else if ( mmode == _2dAxiFlow ) {
492 }
else if ( mmode == _3dFlow ) {
514 if ( mmode == _2dFlow ) {
516 2.0 * _nu * ( deps.
at(1) ),
517 2.0 * _nu * ( deps.
at(2) ),
520 }
else if ( mmode == _2dAxiFlow ) {
522 answer.
at(1) = 2.0 * _nu * ( deps.
at(1) ),
523 answer.
at(2) = 2.0 * _nu * ( deps.
at(2) ),
524 answer.
at(3) = 2.0 * _nu * ( deps.
at(3) ),
525 answer.
at(4) = deps.
at(4) * _nu,
527 }
else if ( mmode == _3dFlow ) {
529 2.0 * _nu * ( deps.
at(1) ),
530 2.0 * _nu * ( deps.
at(2) ),
531 2.0 * _nu * ( deps.
at(3) ),
551 if ( mmode == _2dFlow ) {
553 }
else if ( mmode == _2dAxiFlow ) {
555 }
else if ( mmode == _3dFlow ) {
572 fprintf(File,
" strains ");
574 fprintf( File,
" %.4e", e );
577 fprintf(File,
"\n deviatoric stresses");
579 fprintf( File,
" %.4e", e );
670 for (
int i = 1; i <= nincr; i++ ) {
672 computeDeviatoricStressVector(tau, gp, eps, tStep);
673 giveDeviatoricStiffnessMatrix(d, TangentStiffness, gp, tStep);
674 tau_t.beProductOf(d, eps_i);
679 printf(
"%e %e %e %e %e %e %e %e %e\n", eps.at(1), eps.at(2), eps.at(3), tau.at(1), tau.at(2), tau.at(3), tau_t.at(1), tau_t.at(2), tau_t.at(3) );
double computeActualViscosity(double Tau, double shearRate)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
virtual void updateYourself(TimeStep *)
Update equilibrium history variables according to temp-variables.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
const FloatArray & giveTempDeviatoricStrainVector()
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
FloatArray deviatoricStressVector
Stress vector in reduced form.
GaussPoint * gp
Associated integration point.
Abstract base class for all fluid materials.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual void giveDeviatoricStiffnessMatrix(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Computes the deviatoric stiffness; .
void letTempDevStrainMagnitudeBe(double _val)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
double & at(int aKey)
Returns the value of the pair which key is aKey.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
#define _IFT_BinghamFluidMaterial2_mu0
double & at(int i)
Coefficient access function.
int max(int i, int j)
Returns bigger value form two given decimals.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
#define BINGHAM_DEFAULT_STRESS_GROWTH_RATE
Dictionary propertyDictionary
Property dictionary.
double giveTempDevStrainMagnitude() const
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
BinghamFluidMaterial2Status(int n, Domain *d, GaussPoint *g)
Constructor - creates new BinghamFluidMaterial2Status with number n, belonging to domain d and Integr...
MaterialMode
Type representing material mode of integration point.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
#define _IFT_BinghamFluidMaterial2_tau0
BinghamFluidMaterial2(int n, Domain *d)
Constructor.
REGISTER_Material_Alt(ConcreteDPM, concreteidp)
void letDeviatoricStressVectorBe(FloatArray v)
Sets the deviatoric stress.
void letTempDevStressMagnitudeBe(double _val)
void letTempDeviatoricStrainVectorBe(FloatArray v)
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
double devStressMagnitude
Magnitude of deviatoric stresses.
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
FloatArray deviatoricStrainRateVector
Strain vector in reduced form.
This class implements a transport material status information.
Class representing material status for Bingham material.
virtual double giveVariableScale(VarScaleType varId)
Returns the scale factor for given variable type.
void __debug(GaussPoint *gp, TimeStep *tStep)
FloatArray temp_deviatoricStrainVector
Deviatoric stresses and strains (reduced form).
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
double computeDevStressMagnitude(MaterialMode mmode, const FloatArray &sigd)
void computeDeviatoricStrain(FloatArray &answer, const FloatArray &eps, MaterialMode mmode)
#define _IFT_BinghamFluidMaterial2_stressGrowthRate
#define _IFT_BinghamFluidMaterial2_muinf
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double at(int i, int j) const
Coefficient access function.
double computeDevStrainMagnitude(MaterialMode mmode, const FloatArray &epsd)
Abstract base class representing a material status information.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class representing vector of real numbers.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
void computeDeviatoricStress(FloatArray &answer, const FloatArray &deps, double _nu, MaterialMode mmode)
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual bool giveEquationScalingFlag()
Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled...
void zero()
Zeroes all coefficients of receiver.
double devStrainMagnitude
Magnitude of deviatoric strains.
double temp_devStrainMagnitude
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void zero()
Zeroes all coefficient of receiver.
double tau_0
Yield stress.
Domain * giveDomain() const
int min(int i, int j)
Returns smaller value from two given decimals.
#define BINGHAM_MIN_SHEAR_RATE
REGISTER_Material(DummyMaterial)
virtual double giveEffectiveViscosity(GaussPoint *gp, TimeStep *tStep)
Gives the effective viscosity for the given integration point.
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.
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
virtual void computeDeviatoricStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &eps, TimeStep *tStep)
Computes the deviatoric stress vector from given strain.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
double temp_devStressMagnitude
Class representing solution step.
void add(const FloatArray &src)
Adds array src to receiver.
void resize(int s)
Resizes receiver towards requested size.