AF_Eij.cpp

Go to the documentation of this file.
00001 
00002 //   COPYLEFT (C): Woody's viral GPL-like license (by BJ):
00003 //                 ``This    source  code is Copyrighted in
00004 //                 U.S.,  for  an  indefinite  period,  and anybody
00005 //                 caught  using it without our permission, will be
00006 //                 mighty good friends of ourn, cause we don't give
00007 //                 a  darn.  Hack it. Compile it. Debug it. Run it.
00008 //                 Yodel  it.  Enjoy it. We wrote it, that's all we
00009 //                 wanted to do.''
00010 //
00011 //
00012 // COPYRIGHT (C):     :-))
00013 // PROJECT:           Object Oriented Finite Element Program
00014 // FILE:              
00015 // CLASS:             
00016 // MEMBER FUNCTIONS:
00017 //
00018 // MEMBER VARIABLES
00019 //
00020 // PURPOSE:           
00021 //
00022 // RETURN:
00023 // VERSION:
00024 // LANGUAGE:          C++
00025 // TARGET OS:         
00026 // DESIGNER:          Zhao Cheng, Boris Jeremic
00027 // PROGRAMMER:        Zhao Cheng, 
00028 // DATE:              Fall 2005
00029 // UPDATE HISTORY:    
00030 //
00032 //
00033 
00034 #ifndef AF_Eij_CPP
00035 #define AF_Eij_CPP
00036 #include <OPS_Globals.h>
00037 
00038 #include "AF_Eij.h"
00039         
00040 stresstensor AF_Eij::AFal;
00041 
00042 AF_Eij::AF_Eij(int ha_index_in, 
00043                int Cr_index_in,
00044                int alpha_index_in)
00045 : ha_index(ha_index_in), 
00046   Cr_index(Cr_index_in),
00047   alpha_index(alpha_index_in)
00048 {
00049 
00050 }
00051 
00052 TensorEvolution* AF_Eij::newObj()
00053 {
00054     TensorEvolution* nObj = new AF_Eij(this->ha_index,
00055                                        this->Cr_index,
00056                                        this->alpha_index);
00057                                        
00058     return nObj;
00059 }
00060 
00061 const straintensor& AF_Eij::Hij(const straintensor& plastic_flow, const stresstensor& Stre, 
00062                                 const straintensor& Stra, const MaterialParameter& material_parameter)
00063 {
00064     double ha = getha(material_parameter);
00065     double Cr = getCr(material_parameter);
00066     stresstensor a = getalpha(material_parameter);
00067 
00068     TensorEvolution::TensorEvolutionHij = plastic_flow * (2.0*ha/3.0) - (a * plastic_flow.equivalent() *Cr); 
00069     
00070     return TensorEvolution::TensorEvolutionHij;
00071 }
00072 
00073 double AF_Eij::getha(const MaterialParameter& material_parameter) const
00074 {
00075     if ( ha_index <= material_parameter.getNum_Material_Parameter() && ha_index > 0)
00076         return material_parameter.getMaterial_Parameter(ha_index -1);
00077     else {
00078         opserr << "AF_Eij: Invalid Input of " << ha_index << endln;
00079         exit (1);
00080     }
00081 }
00082 
00083 double AF_Eij::getCr(const MaterialParameter& material_parameter) const
00084 {
00085     if ( Cr_index <= material_parameter.getNum_Material_Parameter() && Cr_index > 0)
00086         return material_parameter.getMaterial_Parameter(Cr_index -1);
00087     else {
00088         opserr << "AF_Eij: Invalid Input of " << Cr_index << endln;
00089         exit (1);
00090     }
00091 }
00092 
00093 const stresstensor& AF_Eij::getalpha(const MaterialParameter& material_parameter) const
00094 {
00095     if ( alpha_index <= material_parameter.getNum_Internal_Tensor() && alpha_index > 0) {
00096         AF_Eij::AFal = material_parameter.getInternal_Tensor(alpha_index -1);
00097         return AF_Eij::AFal;
00098     }
00099     else {
00100         opserr << "AF_Eij: Invalid Input of " << alpha_index << endln;
00101         exit (1);
00102     }
00103 }
00104 
00105 #endif
00106 

Generated on Mon Oct 23 15:05:14 2006 for OpenSees by doxygen 1.5.0