void ConvDiffAnisotropic2DLaw::CalculateMaterialResponseCauchy (Parameters& rValues)
	{
		// get some references
		const Properties& props = rValues.GetMaterialProperties();
		Vector& strainVector = rValues.GetStrainVector();
		Vector& stressVector = rValues.GetStressVector();
		Matrix& constitutiveMatrix = rValues.GetConstitutiveMatrix();
		Flags& Options = rValues.GetOptions();
		bool compute_constitutive_tensor = Options.Is(COMPUTE_CONSTITUTIVE_TENSOR);
		bool compute_stress = Options.Is(COMPUTE_STRESS) || compute_constitutive_tensor;

		SizeType size = GetStrainSize();
		if (compute_stress)
			if (stressVector.size() != size)
				stressVector.resize(size, false);
		if (compute_constitutive_tensor)
			if (constitutiveMatrix.size1() != size || constitutiveMatrix.size2() != size)
				constitutiveMatrix.resize(size, size, false);

		if (compute_stress)
		{
			CalculateStress(props, strainVector, stressVector);
		}
		
		if (compute_constitutive_tensor)
		{
			CalculateConstitutiveMatrix(props, strainVector, stressVector, constitutiveMatrix);
		}
	}
    void ConvDiffInterface2DLaw::CalculateMaterialResponseCauchy (Parameters& rValues)
    {
        const Properties& props = rValues.GetMaterialProperties();
		Vector& strainVector = rValues.GetStrainVector();
		Vector& stressVector = rValues.GetStressVector();
		Matrix& constitutiveMatrix = rValues.GetConstitutiveMatrix();
		Flags& Options = rValues.GetOptions();
		bool compute_constitutive_tensor = Options.Is(COMPUTE_CONSTITUTIVE_TENSOR);
		bool compute_stress = Options.Is(COMPUTE_STRESS) || compute_constitutive_tensor;

		SizeType size = GetStrainSize();

		if(compute_stress) 
			if(stressVector.size() != size)
				stressVector.resize(size, false);
		if(compute_constitutive_tensor)
			if(constitutiveMatrix.size1() != size || constitutiveMatrix.size2() != size)
				constitutiveMatrix.resize(size, size, false);

		CalculationData data;
				
		InitializeCalculationData( props, rValues.GetElementGeometry(), strainVector, data );

		std::stringstream ss;
		//std::cout << "CalculateMaterialResponseCauchy -  strainVector = " << strainVector << std::endl;
		//std::cout << "CalculateMaterialResponseCauchy -  constitutiveMatrix = " << constitutiveMatrix << std::endl;
		
		if (data.ExpCurveTypeFlag)
		{
			CalculateElasticStressVector(data, strainVector);
			//std::cout << "CalculateMaterialResponseCauchy -  ElasticStressVector = " << data.ElasticStressVector << std::endl;
			CalculateEquivalentMeasure(data);
			UpdateDamage(data);
			CalculateContactConductivity(data);
		}
		else
		{
			CalculateEffectiveOpening(data);
			UpdateDamage(data);
			CalculateContactConductivity(data);
		}

		mD1 = data.D1; // Update the mK1 to the current value
		
		if( compute_stress )
		{
			CalculateStress(data, strainVector, stressVector);
		}
		//std::cout << "CalculateMaterialResponseCauchy -  CalculateStress = " << stressVector << std::endl;

		if( compute_constitutive_tensor )
		{
			CalculateConstitutiveMatrix( data, strainVector, stressVector, constitutiveMatrix );
		}

		std::cout << ss.str();
    }
    void ConvDiffInterface2DLaw::GetLawFeatures(Features& rFeatures)
    {
        //Set the type of law
		rFeatures.mOptions.Set( PLANE_STRESS_LAW ); // TODO: INTERFACE 2D LAW
		rFeatures.mOptions.Set( INFINITESIMAL_STRAINS );
		rFeatures.mOptions.Set( ISOTROPIC );

		//Set strain measure required by the consitutive law
		rFeatures.mStrainMeasures.push_back(StrainMeasure_Infinitesimal);

		//Set the strain size
		rFeatures.mStrainSize = GetStrainSize();

		//Set the space dimension
		rFeatures.mSpaceDimension = WorkingSpaceDimension();
    }
Beispiel #4
0
void LocalDamagePlaneStrain2DLaw::GetLawFeatures(Features& rFeatures)
{
    //Set the type of law
	rFeatures.mOptions.Set( PLANE_STRAIN_LAW );
	rFeatures.mOptions.Set( INFINITESIMAL_STRAINS );
	rFeatures.mOptions.Set( ISOTROPIC );

	//Set strain measure required by the consitutive law
	rFeatures.mStrainMeasures.push_back(StrainMeasure_Infinitesimal);
	//rFeatures.mStrainMeasures.push_back(StrainMeasure_Deformation_Gradient);

	//Set the strain size
	rFeatures.mStrainSize = GetStrainSize();

	//Set the spacedimension
	rFeatures.mSpaceDimension = WorkingSpaceDimension();
}
void HyperElasticUP3DLaw::GetLawFeatures(Features& rFeatures)
{
    	//Set the type of law
	rFeatures.mOptions.Set( THREE_DIMENSIONAL_LAW );
	rFeatures.mOptions.Set( FINITE_STRAINS );
	rFeatures.mOptions.Set( ISOTROPIC );
	rFeatures.mOptions.Set( U_P_LAW );

	//Set strain measure required by the consitutive law
	rFeatures.mStrainMeasures.push_back(StrainMeasure_Deformation_Gradient);
	
	//Set the strain size
	rFeatures.mStrainSize = GetStrainSize();

	//Set the spacedimension
	rFeatures.mSpaceDimension = WorkingSpaceDimension();

}
Beispiel #6
0
    void ScalarDamageInterface2DLaw::CalculateMaterialResponseCauchy (Parameters& rValues)
    {
        const Properties& props = rValues.GetMaterialProperties();
		const Vector& strainVector = rValues.GetStrainVector();
		Vector& stressVector = rValues.GetStressVector();
		Matrix& constitutiveMatrix = rValues.GetConstitutiveMatrix();
		Flags& Options = rValues.GetOptions();
		bool compute_constitutive_tensor = Options.Is(COMPUTE_CONSTITUTIVE_TENSOR);
		bool compute_stress = Options.Is(COMPUTE_STRESS) || compute_constitutive_tensor;

#ifdef INTERF_DAM_2D_IMPLEX
		this->m_strain = rValues.GetStrainVector();
#endif // INTERF_DAM_2D_IMPLEX

		SizeType size = GetStrainSize();
		if(compute_stress) 
			if(stressVector.size() != size)
				stressVector.resize(size, false);
		if(compute_constitutive_tensor)
			if(constitutiveMatrix.size1() != size || constitutiveMatrix.size2() != size)
				constitutiveMatrix.resize(size, size, false);

		CalculationData data;
		InitializeCalculationData( props, rValues.GetElementGeometry(), strainVector, rValues.GetProcessInfo(), data );
		CalculateElasticStressVector( data, strainVector );

#ifdef INTERF_DAM_2D_IMPLEX

		double time_factor = 0.0;
		if(m_dTime_n_converged>0.0) time_factor = data.dTime/m_dTime_n_converged;
		m_dTime_n = data.dTime;
		mK1 = mK1_converged + time_factor * (mK1_converged-mK1_converged_old);
		mK2 = mK2_converged + time_factor * (mK2_converged-mK2_converged_old);
		if(mK1 > 0.0)
		{
			data.D1 = 1.0 - data.Ft/(mK1+data.Ft) * std::exp( -data.Ft/(data.GI*data.Kn) * mK1 );
			data.D1 = std::max( std::min( data.D1, 1.0 ), 0.0 );
		}
		if(mK2 > 0.0)
		{
			data.D2 = 1.0 - data.C0/(mK2+data.C0) * std::exp( -data.C0/data.GII/data.Kt * mK2 );
			data.D2 = std::max( std::min( data.D2, 1.0 ), 0.0 );
		}
#ifdef USE_AS_BRICK_INTERFACE
		data.D2 = 0.0;
		if(data.D1 > 0.99)
			data.D2 = 1.0;
#endif // USE_AS_BRICK_INTERFACE
#else

		CalculateEquivalentMeasure( data );
		UpdateDamage( data );

#endif // INTERF_DAM_2D_IMPLEX

		mD1 = data.D1;
		mD2 = data.D2;
		
		if( compute_stress )
			CalculateStress( data, stressVector );

		//**********************************************
		double sig_n = stressVector(1);
		double sig_t = std::abs(stressVector(0));
		double C0_d = (1.0 - mD2)*data.C0;
		mYieldValue = sig_n*data.Fs + sig_t - C0_d;
		//**********************************************
		
		if( compute_constitutive_tensor )
		{
			if(data.ForceSecant) {
				constitutiveMatrix.clear();
				constitutiveMatrix(0,0) = data.Kt*(1.0-mD2);
				constitutiveMatrix(1,1) = data.Kn;
				if(stressVector(1) > 0.0) {
					constitutiveMatrix(1,1) *= (1.0-mD1);
				}
			}
			else {
				CalculateConstitutiveMatrix( data, strainVector, stressVector, constitutiveMatrix );
			}
		}
    }