コード例 #1
0
ファイル: Pipe.cpp プロジェクト: uesoft/AutoPFA
double Pipe::StepTime()
{
	if( !( 1e-6 < fabs( WaveSpeed() - 1e-6) ) || WaveSpeed() < 0 )
	{
		return -1;
	}
	return Len()/WaveSpeed();
}
コード例 #2
0
ファイル: Pipe.cpp プロジェクト: uesoft/AutoPFA
void Pipe::SectionInfo(StrArray<8> &array,double dTime)
{
	array.Data(GetKey(),0);
	array.Data(float(Len()),1);
	array.Data(float(WaveSpeed()),2);
	array.Data(float(CalcSection(dTime)),3);
	int nNum = 0;
	double dError = 0;
	double dWave = 0;
	CalcSection(nNum,dError,dTime);
	dWave = (Len()/nNum) / dTime;
	array.Data(nNum,4);
	array.Data(float(dError),5);
	array.Data(float(dWave),6);
}
コード例 #3
0
/* This method is only called by the custom task to adjust the wave speed depending on
    particle stress state. The default implementation calls the WaveSpeed() method used
    at the start of the time step. If wave speed depends on particle state in a known way,
    this method can be overridden to get the current wave speed. The custom task to
    adjust time step will only work for materials that override this method for
    particle-dependent results.
*/
double MaterialBase::CurrentWaveSpeed(bool threeD,MPMBase *mptr) const { return WaveSpeed(threeD,mptr); }
コード例 #4
0
/* Calculate shear wave speed for material in mm/sec. This is only called for silent
	boundary conditions. This base class return WaveSpeed()/sqrt(3). A new
	material only needs to override this method if it will implement silent boundary
	conditions and if the base class method is not correct.
*/
double MaterialBase::ShearWaveSpeed(bool threeD,MPMBase *mptr) const { return WaveSpeed(threeD,mptr)/sqrt(3.); }