Esempio n. 1
0
// print mechanical properties to the results
void TaitLiquid::PrintMechanicalProperties(void) const
{
	// print properties
	PrintProperty("K",Kbulk*UnitsController::Scaling(1.e-6),"");
    PrintProperty("gam0",gamma0,"");
	PrintProperty("a",aI,"");
    cout << endl;
	
	int i;
	for(i=0;i<numViscosity;i++)
	{	PrintProperty("eta",viscosity[i]*UnitsController::Scaling(1.e3),UnitsController::Label(VISCOSITY_UNITS));
		if(numViscosity>1)
		{	char hline[100];
			sprintf(hline,"1/(%s)",UnitsController::Label(TIME_UNITS));
			PrintProperty("log(rate)",logShearRate[i],hline);
		}
		cout << endl;
	}
	
    if(function!=NULL)
    {   char *expr=function->Expr('#');
        cout << "Initial Pressure  = " << expr << " " << UnitsController::Label(PRESSURE_UNITS) << " (";
        delete [] expr;
		cout << "mass adjusted to match)" << endl;
    }
}
Esempio n. 2
0
// print to output window
void HillPlastic::PrintYieldProperties(void) const
{	
    AnisoPlasticity::PrintYieldProperties();
	PrintProperty("K",Khard,"");
	PrintProperty("n",nhard,"");
    cout << endl;
}
Esempio n. 3
0
// print mechanical properties to the results
void WoodMaterial::PrintMechanicalProperties(void) const
{	
    HillPlastic::PrintMechanicalProperties();
	PrintProperty("tempC1",tempC1*100,"");
	PrintProperty("tempC2",tempC2*100,"C^-1");
	cout << endl;
}
Esempio n. 4
0
// print mechanical properties to the results
void HEMGEOSMaterial::PrintMechanicalProperties(void) const
{
	// core properties
	PrintProperty("C0",C0,"m/s");
	PrintProperty("gam0",gamma0,"");
	PrintProperty("K",Kbulk,"");
    PrintProperty("G1",G1,"");
	cout << endl;
    
	PrintProperty("S1",S1,"");
	PrintProperty("S2",S2,"");
	PrintProperty("S3",S3,"");
	cout << endl;
	
	// effective volumetric CTE (in ppm/K) alpha = rho0 gamma0 Cv / K
	double effAlpha = (1.e9*heatCapacity*gamma0)/C0squared;
	PrintProperty("a",effAlpha/3.,"");
	PrintProperty("T0",thermal.reference,"K");
	cout <<  endl;
    
    plasticLaw->PrintYieldProperties();
	
	// skip super class, but call it's superclass
	HyperElastic::PrintMechanicalProperties();
}
Esempio n. 5
0
// print mechanical properties to the results
void HEIsotropic::PrintMechanicalProperties(void) const
{	
    PrintProperty("G1",G1*UnitsController::Scaling(1.e-6),"");
    PrintProperty("K",Kbulk*UnitsController::Scaling(1.e-6),"");
    cout << endl;
	double calcE = 9.*Kbulk*G1/(3.*Kbulk+G1);
    PrintProperty("E",calcE*UnitsController::Scaling(1.e-6),"");
    PrintProperty("nu",(3.*Kbulk-2.*G1)/(6.*Kbulk+2.*G1),"");
    cout << endl;
    
    PrintProperty("a",aI,"");
    switch(UofJOption)
    {   case J_MINUS_1_SQUARED:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)(J-1)^2 ]");
            break;
            
        case LN_J_SQUARED:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)(ln J)^2 ]");
            break;
            
        case HALF_J_SQUARED_MINUS_1_MINUS_LN_J:
        default:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)((1/2)(J^2-1) - ln J) ]");
            break;
    }
    cout << endl;
    
	// JAN: print hardening law properties
	plasticLaw->PrintYieldProperties();
	
	// call superclass here if it is not Material base
	HyperElastic::PrintMechanicalProperties();
}
// print mechanical properties to output window
void BistableIsotropic::PrintMechanicalProperties(void) const
{
	PrintProperty("Initial:",false);
	PrintProperty("K",K0*UnitsController::Scaling(1.e-6),"");
	PrintProperty("G",G0*UnitsController::Scaling(1.e-6),"");
	PrintProperty("a",a0,"");
	cout << endl;
	
 	PrintProperty("Transformed:",false);
	PrintProperty("K",Kd*UnitsController::Scaling(1.e-6),"");
	PrintProperty("G",Gd*UnitsController::Scaling(1.e-6),"");
	PrintProperty("a",ad,"");
	cout << endl;
    
    char mline[200];
	if(rule==DILATION_RULE)
    {   sprintf(mline,"Dilation transition at dV = %g%c to V offset = %g%c",100.*dVcrit,'%',100.*dVii,'%');
	}
	else if(rule==DISTORTION_RULE)
    {   sprintf(mline,"Distortion transition at sqrt(0.5*e'ij e'ij) = %g%c",100.*dVcrit,'%');
	}
	else if(rule==VONMISES_RULE)
    {   sprintf(mline,"Distortion transition at sqrt(0.5*s'ij s'ij) = %g MPa",rho*dVcrit*UnitsController::Scaling(1.e-6));
	}

	cout << mline << endl;
    
    if(reversible)
        cout << "Reversible" << endl;
    else
        cout << "Irreversible" << endl;
}
// print to output window
void PressureLaw::PrintMechanicalProperties(void) const
{
	if(function==NULL)
	{	PrintProperty("Stress",stress1*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
		cout <<  endl;
	}
	else
	{	char *expr=function->Expr('#');
		cout << "Stress = " << expr << endl;
	}
	if(minCOD>=0.)
	{	PrintProperty("Min COD",minCOD,UnitsController::Label(CULENGTH_UNITS));
		cout << endl;
	}
}
Esempio n. 8
0
// print mechanical properties to the results
void TaitLiquid::PrintMechanicalProperties(void) const
{
	// print properties
	PrintProperty("K",Kbulk*UnitsController::Scaling(1.e-6),"");
	PrintProperty("eta",viscosity*UnitsController::Scaling(1.e3),UnitsController::Label(VISCOSITY_UNITS));
	PrintProperty("a",aI,"");
    cout << endl;
    PrintProperty("gam0",gamma0,"");
    cout << endl;
    if(function!=NULL)
    {   char *expr=function->Expr('#');
        cout << "Initial Pressure  = " << expr << " " << UnitsController::Label(PRESSURE_UNITS) << " (";
        delete [] expr;
		cout << "mass adjusted to match)" << endl;
    }
}
Esempio n. 9
0
HRESULT GetPropertyValue(PCWSTR pszFilename, PCWSTR pszCanonicalName)
{
    // Convert the Canonical name of the property to PROPERTYKEY
    PROPERTYKEY key;
    HRESULT hr = PSGetPropertyKeyFromName(pszCanonicalName, &key);
    if (SUCCEEDED(hr))
    {
        IPropertyStore* pps = NULL;

        // Call the helper to get the property store for the initialized item
        hr = GetPropertyStore(pszFilename, GPS_DEFAULT, &pps);
        if (SUCCEEDED(hr))
        {
            hr = PrintProperty(pps, key, pszCanonicalName);
            pps->Release();
        }
        else
        {
            wprintf(L"Error %x: getting the propertystore for the item.\n", hr);
        }
    }
    else
    {
        wprintf(L"Invalid property specified: %s\n", pszCanonicalName);
    }
    return hr;
}
static void print_menu()
{
	g_printf("\n================================= Location API Test =================================\n");
	g_printf("q.   Exit\n");
	g_printf("1.   location_init\n");
	g_printf("2.   location_new\n");
	g_printf("3.   location_free\n");
	g_printf("4.   location_start\n");
	g_printf("5.   location_stop\n");
	g_printf("6.   location_get_position\n");
	g_printf("6a.  location_get_last_position\n");
	g_printf("7.   location_get_velocity\n");
	g_printf("7a.  location_get_last_velocity\n");
	g_printf("8.   location_get_satellite\n");
	g_printf("8a.  location_get_last_satellite\n");
	g_printf("9.   location_get_distance\n");
	g_printf("10.  location_is_supported_method\n");
	g_printf("11.  location_is_enabled_gps\n");
	g_printf("99.  location_send_command\n");
	g_printf("a?.  signals:(1)'service-enabled',(2)'service-disabled',(3)'service-updated',(4)'zone-in',(5)'zone-out'\n");
	g_printf("b?.  disconnect signals:(1)'service-enabled',(2)'service-disabled',(3)'service-updated',(4)'zone-in',(5)'zone-out'\n");
	g_printf("c?. (1)Set boundary, (2)Get boundary, (3) Remove boundary, (4) Remove all boundaries, (5)Set device name, \n");
	g_printf("    (6)Set position interval (7) Set velocity interval (8) Set satellite interval\n");
	g_printf("==================================== Property ====================================\n");
	PrintProperty(location_obj);
	g_printf("\n==================================================================================\n");
}
Esempio n. 11
0
// print mechanical properties output window
void ClampedNeohookean::PrintMechanicalProperties(void) const
{
	PrintProperty("Cc",critComp,"");
	PrintProperty("Tc",critTens,"");
	PrintProperty("xi",hardening,"");
	cout << endl;
	
	cout << "Elastic Model: ";
	if(elasticModel==ELASTIC_DISNEY)
		cout << "Disney" << endl;
	else
		cout << "Neo-Hookean" << endl;
	
	// call superclass here if it is not Material base
	Neohookean::PrintMechanicalProperties();
}
Esempio n. 12
0
// print mechanical properties to the results
void NewMaterial::PrintMechanicalProperties(void) const
{	
	// call superclass here if it is not Material base
	
	// add new properties here
	PrintProperty("prp",newproperty,"");
    cout << endl;
}
Esempio n. 13
0
// print transport properties to output window - default is isotropic properties
// aniostropic materials must override it
void MaterialBase::PrintTransportProperties(void) const
{
	if(Rigid()) return;
	
	// Diffusion constants
	if(DiffusionTask::active)
	{	PrintProperty("D",diffusionCon,"mm^2/sec");
		PrintProperty("csat",concSaturation,"");
		cout << endl;
		PrintProperty("b",betaI,"1/wt fr");
		cout << endl;
	}
	// Conductivity constants
	if(ConductionTask::active)
	{	PrintProperty("k",rho*kCond*UnitsController::Scaling(1.e-6),UnitsController::Label(CONDUCTIVITY_UNITS));
		PrintProperty("Cv",heatCapacity*UnitsController::Scaling(1.e-6),UnitsController::Label(HEATCAPACITY_UNITS));
		PrintProperty("Cp",(heatCapacity+GetCpMinusCv(NULL))*UnitsController::Scaling(1.e-6),UnitsController::Label(HEATCAPACITY_UNITS));
		cout << endl;
	}
	else if(ConductionTask::adiabatic)
	{	PrintProperty("Cv",heatCapacity*UnitsController::Scaling(1.e-6),UnitsController::Label(HEATCAPACITY_UNITS));
        // Cp only used in conduction so not printed here when conduction is off
		cout << endl;
	}
}
Esempio n. 14
0
// Print transport properties
void HEMGEOSMaterial::PrintTransportProperties(void) const
{
	// Conductivity constants
	if(ConductionTask::active)
	{	MaterialBase::PrintTransportProperties();
	}
	else if(!ConductionTask::adiabatic)
	{	PrintProperty("Cv",heatCapacity,"J/(kg-K)");
		cout << endl;
	}
}
Esempio n. 15
0
// print to output window
void CubicTraction::PrintMechanicalProperties(void) const
{
	PrintProperty("GcI",JIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
	PrintProperty("sigI",stress1*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	PrintProperty("uI",delIc,UnitsController::Label(CULENGTH_UNITS));
	PrintProperty("kI0",kI1*delIc*delIc*UnitsController::Scaling(1.e-6),UnitsController::Label(TRACTIONSLOPE_UNITS));
    cout <<  endl;
	
	PrintProperty("GcII",JIIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
	PrintProperty("sigII",stress2*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	PrintProperty("uII",delIIc,UnitsController::Label(CULENGTH_UNITS));
	PrintProperty("kII0",kII1*delIIc*delIIc*UnitsController::Scaling(1.e-6),UnitsController::Label(TRACTIONSLOPE_UNITS));
    cout <<  endl;
	
	PrintProperty("n",nmix,"");
	cout << endl;
}
Esempio n. 16
0
// print mechanical properties output window
void Neohookean::PrintMechanicalProperties(void) const
{
	PrintProperty("G",G*UnitsController::Scaling(1.e-6),"");
	if(nu<0.5)
	{	PrintProperty("K",Kbulk*UnitsController::Scaling(1.e-6),"");
		PrintProperty("lam",Lame*UnitsController::Scaling(1.e-6),"");
	}
	else
		cout << "K = lam = infinite";
	cout << endl;
	
	PrintProperty("E",Etens*UnitsController::Scaling(1.e-6),"");
	PrintProperty("nu",nu,"");
	if(nu==0.5) cout << "incompressible";
	cout << endl;
	
	PrintProperty("a",aI,"");
	PrintProperty("gam0",gamma0,"");
    switch(UofJOption)
    {   case J_MINUS_1_SQUARED:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)(J-1)^2 ]");
            break;
            
        case LN_J_SQUARED:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)(ln J)^2 ]");
            break;
            
        case HALF_J_SQUARED_MINUS_1_MINUS_LN_J:
        default:
            PrintProperty("U(J)",UofJOption,"[ = (K/2)((1/2)(J^2-1) - ln J) ]");
            break;
    }
	cout << endl;
	
	// call superclass here if it is not Material base
	HyperElastic::PrintMechanicalProperties();
}
Esempio n. 17
0
void chkProperty(fleaCamera* camera, fc2PropertyType type)
{
    fc2PropertyInfo info;
    fc2Property prop;

    info.type = type;
    fc2GetPropertyInfo(camera->context, &info);
    PrintPropertyInfo(&info);
    
    prop.type = type;
    fc2GetProperty(camera->context, &prop);
    PrintProperty(&prop);
    
    return;
}
Esempio n. 18
0
/*----------------------------------------------------------------------
|       Listener_OnPropertyChanged
+---------------------------------------------------------------------*/
static void
Listener_OnPropertyChanged(ATX_PropertyListener*    _self,
                           ATX_CString              name,
                           ATX_PropertyType         type,
                           const ATX_PropertyValue* value)
{
    Listener* self = ATX_SELF(Listener, ATX_PropertyListener);

    ATX_Debug("OnPropertyChanged[%s]: ", ATX_CSTR(self->name));
    if (value) {
        PrintProperty(name, type, value);
    } else {
        ATX_Debug("name=%s [REMOVED]\n", name);
    }
}
Esempio n. 19
0
/*----------------------------------------------------------------------
|       DumpProperties
+---------------------------------------------------------------------*/
static void
DumpProperties(ATX_Properties* properties)
{
    ATX_Iterator* iterator;
    ATX_Property* property;

    ATX_Debug("[PROPERTIES] -------------------------------\n");
    if (ATX_FAILED(ATX_Properties_GetIterator(properties, &iterator))) {
        return;
    }
    while (ATX_SUCCEEDED(ATX_Iterator_GetNext(iterator, 
                                              (ATX_Any*)(void*)&property))) {
        PrintProperty(property->name, property->type, &property->value);
    }
    ATX_Debug("--------------------------------------------\n");

    ATX_DESTROY_OBJECT(iterator);
}
Esempio n. 20
0
HRESULT EnumerateProperties(PCWSTR pszFilename)
{
    IPropertyStore* pps = NULL;

    // Call the helper to get the property store for the initialized item
    // Note that as long as you have the property store, you are keeping the file open
    // So always release it once you are done.

    HRESULT hr = GetPropertyStore(pszFilename, GPS_DEFAULT, &pps);
    if (SUCCEEDED(hr))
    {
        // Retrieve the number of properties stored in the item.
        DWORD cProperties = 0;
        hr = pps->GetCount(&cProperties);
        if (SUCCEEDED(hr))
        {
            for (DWORD i = 0; i < cProperties; i++)
            {
                // Get the property key at a given index.
                PROPERTYKEY key;
                hr = pps->GetAt(i, &key);
                if (SUCCEEDED(hr))
                {
                    // Get the canonical name of the property
                    PWSTR pszCanonicalName = NULL;
                    hr = PSGetNameFromPropertyKey(key, &pszCanonicalName);
                    if (SUCCEEDED(hr))
                    {
                        hr = PrintProperty(pps, key, pszCanonicalName);
                        CoTaskMemFree(pszCanonicalName);
                    }
                }
            }
        }
        pps->Release();
    }
    else
    {
        wprintf(L"Error %x: getting the propertystore for the item.\n", hr);
    }
    return hr;
}
Esempio n. 21
0
static
void do_query_font (Display *dpy, char *name)
{
    register int i;
    register XFontStruct *info = XLoadQueryFont (dpy, name);

    if (!info) {
        fprintf (stderr, "%s:  unable to get info about font \"%s\"\n",
                 program_name, name);
        return;
    }
    printf ("name:  %s\n", name ? name : "(nil)");
    printf ("  direction:\t\t%s\n", ((info->direction == FontLeftToRight)
                                     ? "left to right" : "right to left"));
    printf ("  indexing:\t\t%s\n", 
            ((info->min_byte1 == 0 && info->max_byte1 == 0) ? "linear" :
             "matrix"));
    printf ("  rows:\t\t\t0x%02x thru 0x%02x (%d thru %d)\n",
            info->min_byte1, info->max_byte1,
            info->min_byte1, info->max_byte1);
    printf ("  columns:\t\t0x%02x thru 0x%02x (%d thru %d)\n",
            info->min_char_or_byte2, info->max_char_or_byte2,
            info->min_char_or_byte2, info->max_char_or_byte2);
    printf ("  all chars exist:\t%s\n",
        (info->all_chars_exist) ? "yes" : "no");
    printf ("  default char:\t\t0x%04x (%d)\n",
            info->default_char, info->default_char);
    printf ("  ascent:\t\t%d\n", info->ascent);
    printf ("  descent:\t\t%d\n", info->descent);
    ComputeFontType (info);
    printf ("  bounds:\t\t%s", bounds_metrics_title);
    PrintBounds ("min", &info->min_bounds);
    PrintBounds ("max", &info->max_bounds);
    if (info->per_char && long_list >= L_VERYLONG) 
        print_character_metrics (info);
    printf ("  properties:\t\t%d\n", info->n_properties);
    for (i = 0; i < info->n_properties; i++)
        PrintProperty (&info->properties[i]);
    printf ("\n");

    XFreeFontInfo (NULL, info, 1);
}
Esempio n. 22
0
// print mechanical properties to output window
void Viscoelastic::PrintMechanicalProperties(void) const
{
    PrintProperty("K",K,"");
	PrintProperty("G0",G0,"");
	PrintProperty("ntaus",(double)ntaus,"");
    cout <<  endl;
	
	int i;
    for(i=0;i<ntaus;i++)
	{	PrintProperty("i",(double)i,"");
		PrintProperty("Gk",Gk[i],"");
		PrintProperty("tauk",1000.*tauk[i],"ms");
        cout << endl;
    }
	
	PrintProperty("a",aI,"");
    cout << endl;
}
Esempio n. 23
0
// print any properties common to all MPM material types
void MaterialBase::PrintCommonProperties(void) const
{
	if(Rigid() || isTractionLaw()) return;
	
	// print density
	PrintProperty("rho",rho*UnitsController::Scaling(1000.),"");
	cout << endl;
	
	// print growth criterion and relevant material properties for crack growth
	cout << "Crack Growth Criterion: ";
	PrintCriterion(criterion[0],matPropagateDirection[0]);
	
	// traction mat
	if(criterion[0]!=NO_PROPAGATION && tractionMat[0]>0)
		cout << "   New crack surface has traction material " << tractionMat[0] << endl;
	
	if(criterion[0]!=NO_PROPAGATION && criterion[1]!=NO_PROPAGATION)
	{	cout << "Alternate Crack Growth Criterion: ";
		PrintCriterion(criterion[1],matPropagateDirection[1]);
		
		// traction mat
		if(tractionMat[1]>0)
			cout << "   New crack surface has traction material " << tractionMat[1] << endl;
	}
	   
    // artificial visconsity
    if(artificialViscosity)
	{	PrintProperty("Artificial viscosity on",FALSE);
		PrintProperty("AV-A1",avA1,"");
		PrintProperty("AV-A2",avA2,"");
        cout << endl;
        if(ConductionTask::AVHeating)
            PrintProperty("    AV heating on",FALSE);
        else
            PrintProperty("    AV heating off",FALSE);
	}
	
	// optional color
	if(red>=0.)
	{	char mline[200];
		sprintf(mline,"color= %g, %g, %g, %g",red,green,blue,alpha);
		cout << mline << endl;
	}
}
Esempio n. 24
0
// print mechanical properties to output window
void Viscoelastic::PrintMechanicalProperties(void) const
{
	if(pressureLaw==LINEAR_PRESSURE)
    {	cout << "Pressure law: linear elastic" << endl;
		PrintProperty("K",K*UnitsController::Scaling(1.e-6),"");
		PrintProperty("a",aI,"");
		cout << endl;
	}
	else
	{	// core properties
		cout << "Pressure law: MG-EOS" << endl;
		PrintProperty("C0",C0*UnitsController::Scaling(1.e-3),UnitsController::Label(ALTVELOCITY_UNITS));
		PrintProperty("gam0",gamma0,"");
		PrintProperty("K",K*UnitsController::Scaling(1.e-6),"");
		cout << endl;
		
		PrintProperty("S1",S1,"");
		PrintProperty("S2",S2,"");
		PrintProperty("S3",S3,"");
		cout << endl;
		
		// effective volumetric CTE (in ppm/K) alpha = rho0 gamma0 Cv / K
		PrintProperty("aI",1.e6*CTE,"");
		PrintProperty("T0",thermal.reference,"K");
		cout <<  endl;

	}
	PrintProperty("G0",G0*UnitsController::Scaling(1.e-6),"");
	PrintProperty("ntaus",(double)ntaus,"");
    cout <<  endl;
	
	int i;
    for(i=0;i<ntaus;i++)
	{	PrintProperty("i",(double)(i+1),"");
		PrintProperty("Gk",Gk[i]*UnitsController::Scaling(1.e-6),"");
		PrintProperty("tauk",tauk[i],UnitsController::Label(TIME_UNITS));
        cout << endl;
    }
	
	// For information, E and nu at time 0
	PrintProperty("E(0)",9.*Kered*Gered*rho/(3.*Kered+Gered)*UnitsController::Scaling(1.e-6),"");
	PrintProperty("nu(0)",(3.*Kered-2.*Gered)/(6.*Kered+2.*Gered),"");
	cout << endl;
}
Esempio n. 25
0
// print mechanical properties to output window
void Orthotropic::PrintMechanicalProperties(void) const
{
    PrintProperty("E1",Ex,"");
	PrintProperty("E2",Ey,"");
	PrintProperty("E3",Ez,"");
	PrintProperty("v12",nuxy,"");
    cout << endl;
    
	PrintProperty("v13",nuxz,"");
	PrintProperty("v23",nuyz,"");
    PrintProperty("G12",Gxy,"");
	PrintProperty("G13",Gxz,"");
    cout << endl;
    
	PrintProperty("G23",Gyz,"");
    cout << endl;
	
    PrintProperty("a1",ax,"");
	PrintProperty("a2",ay,"");
	PrintProperty("a3",az,"");
    cout << endl;
}
Esempio n. 26
0
// print mechanical properties to output window
void Orthotropic::PrintMechanicalProperties(void) const
{	
    PrintProperty("E1",Ex*UnitsController::Scaling(1.e-6),"");
	PrintProperty("E2",Ey*UnitsController::Scaling(1.e-6),"");
	PrintProperty("E3",Ez*UnitsController::Scaling(1.e-6),"");
	PrintProperty("v12",nuxy,"");
    cout << endl;
    
	PrintProperty("v13",nuxz,"");
	PrintProperty("v23",nuyz,"");
    PrintProperty("G12",Gxy*UnitsController::Scaling(1.e-6),"");
	PrintProperty("G13",Gxz*UnitsController::Scaling(1.e-6),"");
    cout << endl;
    
	PrintProperty("G23",Gyz*UnitsController::Scaling(1.e-6),"");
    cout << endl;
	
    PrintProperty("a1",ax,"");
	PrintProperty("a2",ay,"");
	PrintProperty("a3",az,"");
    cout << endl;
}
Esempio n. 27
0
// print fraction criterion
void MaterialBase::PrintCriterion(int thisCriterion,int thisDirection) const
{
	char mline[200];
	
	switch(thisCriterion)
	{   case NO_PROPAGATION:
			cout << "No propagation" << endl;
			break;
			
		case MAXHOOPSTRESS:
			cout << "Maximum hoop stess" << PreferredDirection(thisDirection) << endl;
			PrintProperty("KIc",KIc*UnitsController::Scaling(31.62277660168379e-9),UnitsController::Label(STRESSINTENSITY_UNITS));
			cout << endl;
			break;
			
		case CRITICALERR:
			cout << "Critical Energy Release Rate" << PreferredDirection(thisDirection) << endl;
			PrintProperty("Jc",JIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
			cout << endl;
			break;
			
		case STEADYSTATEGROWTH:
			cout << "Constant crack speed" << PreferredDirection(thisDirection) << endl;
			if(initTime<0.)
			{	PrintProperty("Jc",JIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
				PrintProperty("initSpeed",initSpeed*UnitsController::Scaling(0.001),"m/s");
			}
			else
			{	PrintProperty("ti",initTime*UnitsController::Scaling(1.e3),"ms");
				PrintProperty("initSpeed",initSpeed*UnitsController::Scaling(0.001),"m/s");
			}
			cout << endl;
			if(maxLength>0.)
			{	PrintProperty("max length",maxLength,"mm");
				cout << endl;
			}
			if(constantDirection && thisDirection==DEFAULT_DIRECTION)
			{	sprintf(mline,"direction = (%9.5f,%9.5f)",growDir.x,growDir.y);
				cout << mline << endl;
			}
			break;
			
		case STRAINENERGYDENSITY:
			cout << "Minmum strain energy density" << PreferredDirection(thisDirection) << endl;  
			PrintProperty("KIc",KIc*UnitsController::Scaling(31.62277660168379e-9),UnitsController::Label(STRESSINTENSITY_UNITS));
			cout << endl;
			break;
			
		case EMPIRICALCRITERION:
			cout << "Empirical criterion" << PreferredDirection(thisDirection) << endl;  
			sprintf(mline,"KIc=%12.3f %s  KIIc=%12.3f %s KIexp=%12.3f KIIexp=%12.3f",
					KIc*UnitsController::Scaling(31.62277660168379e-9),UnitsController::Label(STRESSINTENSITY_UNITS),
					KIIc*UnitsController::Scaling(31.62277660168379e-9),UnitsController::Label(STRESSINTENSITY_UNITS),
					KIexp,KIIexp);
			cout << mline << endl;
			break;
			
		case MAXCTODCRITERION:
			cout << "Maximum CTOD" << PreferredDirection(thisDirection) << endl;
			sprintf(mline,"delIc=%12.6f mm  delIIc=%12.6f mm",delIc,delIIc);
			cout << mline << endl;
			break;
			
		default:
			cout << "Unknown" << endl;
	}
}	
Esempio n. 28
0
// print to output window
void TrilinearTraction::PrintMechanicalProperties(void) const
{
	PrintProperty("GcI",JIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
	PrintProperty("sigI1",stress1*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	if(kI1>0.)
		PrintProperty("kI",kI1*UnitsController::Scaling(1.e-6),UnitsController::Label(TRACTIONSLOPE_UNITS));
	PrintProperty("upkI1",umidI,UnitsController::Label(CULENGTH_UNITS));
    cout <<  endl;
	PrintProperty("sigI2",sI2*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	PrintProperty("upkI2",uI2,UnitsController::Label(CULENGTH_UNITS));
	PrintProperty("uIc",delIc,UnitsController::Label(CULENGTH_UNITS));
    cout <<  endl;
	
	PrintProperty("GcII",JIIc*UnitsController::Scaling(0.001),UnitsController::Label(ERR_UNITS));
	PrintProperty("sigII1",stress2*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	if(kII1>0.)
		PrintProperty("kII",kII1*UnitsController::Scaling(1.e-6),UnitsController::Label(TRACTIONSLOPE_UNITS));
	PrintProperty("upkII1",umidII,UnitsController::Label(CULENGTH_UNITS));
    cout <<  endl;
	PrintProperty("sigII2",sII2*UnitsController::Scaling(1.e-6),UnitsController::Label(PRESSURE_UNITS));
	PrintProperty("upkII2",uII2,UnitsController::Label(CULENGTH_UNITS));
	PrintProperty("uIIc",delIIc,UnitsController::Label(CULENGTH_UNITS));
    cout <<  endl;
	
	PrintProperty("n",nmix,"");
	cout << endl;
}