|
@@ -20,6 +20,9 @@ namespace OTSClassifyEngine
|
|
|
const CString STR_SUL = _T("S");
|
|
|
const CString STR_N = _T("N");
|
|
|
const CString STR_CR = _T("Cr");
|
|
|
+ const CString STR_P = _T("P");
|
|
|
+ const CString STR_Na = _T("Na");
|
|
|
+ const CString STR_F = _T("F");
|
|
|
const double SIC_MOLAR_CUTOFF = 85.0;
|
|
|
const double NBC_MOLAR_CUTOFF = 30.0;
|
|
|
const double FEO_MOLAR_CUTOFF = 85.0;
|
|
@@ -139,6 +142,7 @@ namespace OTSClassifyEngine
|
|
|
};
|
|
|
const CString STR_NITR = _T("N");
|
|
|
const CString STR_Nb = _T("Nb");
|
|
|
+ const CString STR_Mn = _T("Mn");
|
|
|
const double MIN_NITR_MOLAR = ELEMENT_MAPPING_100MOLAR;
|
|
|
const double MIN_NITR_SUB_MOLAR = ELEMENT_MAPPING_100MOLAR;
|
|
|
const double NITRIDE_MOLAR_CUTOFF = 5.0;
|
|
@@ -286,11 +290,15 @@ namespace OTSClassifyEngine
|
|
|
double dCarbonMolar = 0;
|
|
|
double dCarbonWeight = 0;
|
|
|
double dNbMolar = 0;
|
|
|
+ double dMnWeight = 0;
|
|
|
double dOMolar = 0;
|
|
|
double dOweight = 0;
|
|
|
double dSiMolar = 0;
|
|
|
double dFeMolar = 0;
|
|
|
double dFeWeight = 0;
|
|
|
+ double dPWeight = 0;
|
|
|
+ double dNaWeight = 0;
|
|
|
+ double dFWeight = 0;
|
|
|
for (auto pElChem : a_listElementChemistries)
|
|
|
{
|
|
|
// create a new element chemistry
|
|
@@ -347,10 +355,15 @@ namespace OTSClassifyEngine
|
|
|
{
|
|
|
dSiMolar = pElChem->GetMolarPercentage();
|
|
|
}
|
|
|
- else if (pElChem->GetName().CompareNoCase(STR_Nb) == 0)
|
|
|
+
|
|
|
+ if (pElChem->GetName().CompareNoCase(STR_Nb) == 0)
|
|
|
{
|
|
|
dNbMolar = pElChem->GetMolarPercentage();
|
|
|
}
|
|
|
+ if (pElChem->GetName().CompareNoCase(STR_Mn) == 0)
|
|
|
+ {
|
|
|
+ dMnWeight = pElChem->GetPercentage();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|
|
@@ -364,6 +377,21 @@ namespace OTSClassifyEngine
|
|
|
dCarbonMolar = pElChem->GetMolarPercentage();
|
|
|
dCarbonWeight = pElChem->GetPercentage();
|
|
|
}
|
|
|
+ else if (pElChem->GetName().CompareNoCase(STR_P) == 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ dPWeight = pElChem->GetPercentage();
|
|
|
+ }
|
|
|
+ else if (pElChem->GetName().CompareNoCase(STR_Na) == 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ dNaWeight = pElChem->GetPercentage();
|
|
|
+ }
|
|
|
+ else if (pElChem->GetName().CompareNoCase(STR_F) == 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ dFWeight = pElChem->GetPercentage();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|
|
@@ -404,18 +432,37 @@ namespace OTSClassifyEngine
|
|
|
{
|
|
|
if (std::find_if(a_listElementChemistries.begin(), a_listElementChemistries.end(), [](CElementChemistryPtr i) {return ((i->GetName().CompareNoCase(STR_CR) != 0) && (i->GetName().CompareNoCase(STR_O) != 0)); }) != a_listElementChemistries.end())
|
|
|
{
|
|
|
- //this is a FeO, not a inclusion, return FALSE
|
|
|
+ //this is a FeO, not a inclusion
|
|
|
a_nIncId = OTS_PARTCLE_TYPE::ISNOT_INCLUTION;
|
|
|
notIncId = NOT_INCLUTION_ID::FeO;
|
|
|
return TRUE;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (dMolarFe_O > FEO_MOLAR_CUTOFF && dMnWeight < 20 && dMnWeight>0)
|
|
|
+ {
|
|
|
+ if (a_listElementChemistries.size() == 3)//there is only Fe and O and Mn(<20)
|
|
|
+ {
|
|
|
+ a_nIncId = OTS_PARTCLE_TYPE::ISNOT_INCLUTION;
|
|
|
+ notIncId = NOT_INCLUTION_ID::FeO;
|
|
|
+ return TRUE;
|
|
|
+ }
|
|
|
+ if (a_listElementChemistries.size() == 4)//there is only Fe and O and Mn(<20) and C
|
|
|
+ {
|
|
|
+ if (dCarbonWeight > 0)
|
|
|
+ {
|
|
|
+ a_nIncId = OTS_PARTCLE_TYPE::ISNOT_INCLUTION;
|
|
|
+ notIncId = NOT_INCLUTION_ID::FeO;
|
|
|
+ return TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- // both key molar percentage sum and sub molar percentage sum have to be over certain values
|
|
|
- double dSumKeyElementsMolar = Cal100NorValue(dSumKeyElements, a_dMolarSumNoFe);
|
|
|
- double dSumSubElementsMolar = Cal100NorValue(dSumSubElements, a_dMolarSumNoFe);
|
|
|
+
|
|
|
if (a_dMolarSumNoFe < MIN_ELEMENT_SUM)
|
|
|
{
|
|
|
a_nIncId = OTS_PARTICLE_TYPE::INVALID;
|
|
@@ -427,12 +474,19 @@ namespace OTSClassifyEngine
|
|
|
sumOfCarboOxideFe = dOweight + dCarbonWeight + dFeWeight;
|
|
|
}
|
|
|
|
|
|
- if (sumOfCarboOxideFe > 60)
|
|
|
+ if (sumOfCarboOxideFe > 95)// contain too much c o fe then classify it as invalid
|
|
|
{
|
|
|
a_nIncId = OTS_PARTICLE_TYPE::INVALID;
|
|
|
return TRUE;
|
|
|
}
|
|
|
-
|
|
|
+ if (dPWeight > 0 || dNaWeight > 0 || dFWeight > 0)// contain any of P Na or F then set it as invalid.
|
|
|
+ {
|
|
|
+ a_nIncId = OTS_PARTICLE_TYPE::INVALID;
|
|
|
+ return TRUE;
|
|
|
+ }
|
|
|
+ // both key molar percentage sum and sub molar percentage sum have to be over certain values
|
|
|
+ double dSumKeyElementsMolar = Cal100NorValue(dSumKeyElements, a_dMolarSumNoFe);
|
|
|
+ double dSumSubElementsMolar = Cal100NorValue(dSumSubElements, a_dMolarSumNoFe);
|
|
|
if (dSumKeyElementsMolar > INC_KEY_ELEMENT_TOTAL_100 && dSumSubElementsMolar > INC_SUB_ELEMENT_TOTAL_100)
|
|
|
{
|
|
|
a_nIncId = OTS_PARTCLE_TYPE::NOT_IDENTIFIED;
|