예제 #1
0
// verify settings and some initial calculations
const char *Neohookean::VerifyAndLoadProperties(int np)
{
	// must enter G1 and Kbulk OR Etens and nu
	if(G>=0. && Kbulk>=0.)
	{	if(Etens>=0. || nu>=-1. || Lame>=0.)
			return "Neohookean Hyperelastic material needs K and G, Lame and G, OR E and nu";
		Etens = 9.*Kbulk*G/(3.*Kbulk+G);
		nu = (3.*Kbulk-2.*G)/(6.*Kbulk+2.*G);
		Lame = Kbulk - 2.*G/3.;
	}
	else if(G>=0. || Lame>=0.)
	{	if(Etens>=0. || nu>=-1. || Kbulk>=0.)
			return "Neohookean Hyperelastic material needs K and G, Lame and G, OR E and nu";
		Kbulk = Lame + 2.*G/3.;
		Etens = 9.*Kbulk*G/(3.*Kbulk+G);
		nu = (3.*Kbulk-2.*G)/(6.*Kbulk+2.*G);
	}
	else if(Etens>=0 && G<0. && Lame<0. && Kbulk<0.)
	{	// has Etens and nu
		if(nu>0.5 || nu<-1.)
			return "Neohookean Hyperelastic material needs K and G, Lame and G, OR E and nu (with nu between -1 and 1/2)";
		G = Etens/(2.*(1.+nu));
		
		// bulk modulus, but allow membrane to be incompressible
		if(nu<0.5)
		{	Kbulk = Etens/(3.*(1-2.*nu));
			Lame = nu*Etens/(1.+nu)/(1.-2.*nu);
		}
		else if(MaterialStyle()!=MEMBRANE_MAT)
			return "Neohookean Hyperelastic Poisson's ratio for solid material must be less than 1/2";
		else
		{	Kbulk = 0.;			// whcih causes Cp-Cv=0 as well
			Lame = 0.;
		}
	}
	else
		return "Neohookean Hyperelastic material needs K and G, Lame and G, OR E and nu";
		
	
    if(UofJOption<HALF_J_SQUARED_MINUS_1_MINUS_LN_J && UofJOption>LN_J_SQUARED)
		return "Neohookean dilational energy (UJOption) must be 0, 1, or 2";
	
	// Convert to specific units (F/L^2 L^3/mass)
	pr.Gsp = G/rho;
	pr.Lamesp = Lame/rho;
    pr.Ksp = pr.Lamesp + 2.*pr.Gsp/3.;
	
    // heating gamma0
    double alphaV = 3.e-6*aI;
    gamma0 = Kbulk*alphaV/(rho*heatCapacity);
	
	// call super class
	return HyperElastic::VerifyAndLoadProperties(np);
}
예제 #2
0
// verify settings and some initial calculations
const char *Mooney::VerifyAndLoadProperties(int np)
{
	// must enter G1 and Kbulk OR Etens and nu
	if(G1>=0. && Kbulk>=0.)
	{	if(Etens>=0. || nu>=-1.)
			return "Mooney-Rivlin Hyperelastic material needs K and G1 OR E and nu";
		Etens = 9.*Kbulk*G1/(3.*Kbulk+G1);
		nu = (3.*Kbulk-2.*G1)/(6.*Kbulk+2.*G1);
	}
	else if(G1>=0. || Kbulk>=0. || Etens<0. || nu<-1.)
	{	return "Mooney-Rivlin Hyperelastic material needs K and G1 OR E and nu";
	}
	else
	{	// has Etens and nu
		if(nu>0.5)
			return "Mooney-Rivlin Hyperelastic Poisson's ratio must be between -1 and 1/2";
		
		// get G1+G2 equal to low strain shear modulus
		G1 = Etens/(2.*(1.+nu)) - G2;
		
		// bulk modulus, but allow membrane to be incompressible
		if(nu<0.5)
			Kbulk = Etens/(3.*(1-2.*nu));
		else if(MaterialStyle()!=MEMBRANE_MAT)
			return "Mooney-Rivlin Hyperelastic Poisson's ratio for solid material must be less than 1/2";
		else
		{	Kbulk = 0.;	// which causes CP-Cv=0 as well
		}
	}
		
    if(G2<0.)
		return "Mooney-Rivlin Hyperelastic material needs non-negative G2";
    
    if(UofJOption<HALF_J_SQUARED_MINUS_1_MINUS_LN_J && UofJOption>LN_J_SQUARED)
		return "Mooney-Rivlin dilational energy (UJOption) must be 0, 1, or 2";

	// G1 and G2 in Specific units using initial rho (F/L^2 L^3/mass)
	G1sp=G1/rho;
	G2sp=G2/rho;
	
    // heating gamma0 (dimensionless)
    double alphaV = 3.e-6*aI;
    gamma0 = Kbulk*alphaV/(rho*heatCapacity);
	
	// call super class
	return HyperElastic::VerifyAndLoadProperties(np);
}