diff --git a/source/branches/CLASSV3/Model/Irradiation/IM_Matrix.cxx b/source/branches/CLASSV3/Model/Irradiation/IM_Matrix.cxx index 09c128c8e08d7689e485d3f15d27e4f12a419b59..d6679a1ef948c4dcb86eeef495251e2d5407a805 100644 --- a/source/branches/CLASSV3/Model/Irradiation/IM_Matrix.cxx +++ b/source/branches/CLASSV3/Model/Irradiation/IM_Matrix.cxx @@ -98,23 +98,9 @@ EvolutionData IM_Matrix::GenerateEvolutionData(IsotopicVector isotopicvector, Ev ReactorType = XSSet.GetReactorType(); double M_ref = XSSet.GetHeavyMetalMass(); - double M = 0; + double M = cZAIMass.GetMass(isotopicvector.GetActinidesComposition()); double Power_ref = XSSet.GetPower(); - // Get the mass of the fuel to irradiate in order to perform the evolution at fixed burnup (the burnup step of the calculation will match the burnup step of the XSSet - { - map<ZAI, double >::iterator it ; - - - IsotopicVector IVtmp = isotopicvector.GetActinidesComposition(); - map<ZAI, double >isotopicquantity = IVtmp.GetIsotopicQuantity(); - - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M += isotopicvector.GetActinidesComposition().GetZAIIsotopicQuantity( (*it).first )*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; - isotopicquantity.clear(); - - } - int NStep = XSSet.GetFissionXS().begin()->second->GetN(); double* DBTimeStep = XSSet.GetFissionXS().begin()->second->GetX(); diff --git a/source/branches/CLASSV3/Model/Irradiation/IM_RK4.cxx b/source/branches/CLASSV3/Model/Irradiation/IM_RK4.cxx index 20123efd3cb16c6b0767b3542ffd7888ff2f8b0c..e8c614dd39adab4f60bfccaa0cbcd6b2e818c8a1 100644 --- a/source/branches/CLASSV3/Model/Irradiation/IM_RK4.cxx +++ b/source/branches/CLASSV3/Model/Irradiation/IM_RK4.cxx @@ -117,22 +117,9 @@ EvolutionData IM_RK4::GenerateEvolutionData(IsotopicVector isotopicvector, Evolu ReactorType = XSSet.GetReactorType(); double M_ref = XSSet.GetHeavyMetalMass(); - double M = 0; + double M = cZAIMass.GetMass(isotopicvector.GetActinidesComposition()); double Power_ref = XSSet.GetPower(); - // Get the mass of the fuel to irradiate in order to perform the evolution at fixed burnup (the burnup step of the calculation will match the burnup step of the XSSet - { - map<ZAI, double >::iterator it ; - - - IsotopicVector IVtmp = isotopicvector.GetActinidesComposition(); - map<ZAI, double >isotopicquantity = IVtmp.GetIsotopicQuantity(); - - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M += isotopicvector.GetActinidesComposition().GetZAIIsotopicQuantity( (*it).first )*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; - isotopicquantity.clear(); - - } int NStep = XSSet.GetFissionXS().begin()->second->GetN(); double* DBTimeStep = XSSet.GetFissionXS().begin()->second->GetX(); diff --git a/source/branches/CLASSV3/include/IsotopicVector.hxx b/source/branches/CLASSV3/include/IsotopicVector.hxx index c59b9ca5cd64973ccd0e99d05e0b78c20e4a0260..f633ad3369b7bfe5fd73a9a4d8b8cb92a57f46a1 100755 --- a/source/branches/CLASSV3/include/IsotopicVector.hxx +++ b/source/branches/CLASSV3/include/IsotopicVector.hxx @@ -137,6 +137,7 @@ public : protected : map<ZAI ,double> fIsotopicQuantity; ///< Isotopic vector composition in Atome Number + map<ZAI ,double> fIsotopicQuantityNeeded; ///< Isotopic vector request and not present ClassDef(IsotopicVector,1); diff --git a/source/branches/CLASSV3/include/Scenario.hxx b/source/branches/CLASSV3/include/Scenario.hxx index 3f889dedc1696e5341073859bb90783461788aaa..29d88d5dd558daa283dee023d60d6cce457660e7 100755 --- a/source/branches/CLASSV3/include/Scenario.hxx +++ b/source/branches/CLASSV3/include/Scenario.hxx @@ -187,7 +187,10 @@ public : /// \li 16 fuel Fabrication void Evolution(cSecond t); ///< Perform the Evolution - void PoolEvolution(); ///< Perform TF Evolution + void BackEndEvolution(); ///< Perform BackEnd Evolution + void PoolEvolution(); ///< Perform Pool Evolution + void PoolDump(); + void ReactorEvolution(); ///< Perform the Reactor Evolution void FabricationPlantEvolution(); ///< Perform the FabricationPlant Evolution void StorageEvolution(); ///< Perform the Storage Evolution diff --git a/source/branches/CLASSV3/include/ZAI.hxx b/source/branches/CLASSV3/include/ZAI.hxx index df0b9b9650aba56e5c71c28a8ab7606685ccac68..3aca697e1c184585c823f49f5a9024a4f75e83e7 100755 --- a/source/branches/CLASSV3/include/ZAI.hxx +++ b/source/branches/CLASSV3/include/ZAI.hxx @@ -79,7 +79,6 @@ public: protected : - string fName; ///< Name of the ZAI short fZ; ///< number of protons short fA; ///< number of nucleons (A=0 means natural isotopes) short fI; ///< Isomeric state diff --git a/source/branches/CLASSV3/include/ZAIMass.hxx b/source/branches/CLASSV3/include/ZAIMass.hxx index cbc2048738fc1b5720dfbb1dcdf1697137c5a0a1..6ae5690def5d599958b17406992127c2960f22d2 100644 --- a/source/branches/CLASSV3/include/ZAIMass.hxx +++ b/source/branches/CLASSV3/include/ZAIMass.hxx @@ -6,7 +6,7 @@ \brief Header file for ZAIMass classes. - @author BaM + @author BaM & BaL @version 2.0 */ @@ -35,13 +35,15 @@ public: ///< Normal Destructor. ~ZAIMass(); - map<ZAI, double> fZAIMass; //! ZAI mass list double GetMass(ZAI zai ) const; - double GetMass(const int Z, const int A ) const { return GetMass( ZAI(Z, A, 0) ); } + double GetMass(const int Z, const int A ) const { return GetMass( ZAI(Z, A, 0) ); } + + double GetMass(const IsotopicVector IV) const; //return Mass of IV in tons - double GetMass(const IsotopicVector IV) const; //return Mass of HM in tons +private: + map<ZAI, double> fZAIMass; //! ZAI mass list }; diff --git a/source/branches/CLASSV3/src/EvolutionData.cxx b/source/branches/CLASSV3/src/EvolutionData.cxx index fae33f540258416dd5ad2d5a5f2870260de9529d..371b63b3045c01db83d3e69f3a3a16d7c459311d 100755 --- a/source/branches/CLASSV3/src/EvolutionData.cxx +++ b/source/branches/CLASSV3/src/EvolutionData.cxx @@ -654,22 +654,7 @@ void EvolutionData::ReadDB(string DBfile, bool oldread) }while ( !DecayDB.eof() ); - double M = 0; - { - map<ZAI, double >::iterator it ; - - - IsotopicVector IVtmp = GetIsotopicVectorAt(0.).GetActinidesComposition(); - map<ZAI, double >isotopicquantity = IVtmp.GetIsotopicQuantity(); - - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - { - M += (*it).second*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; - } - isotopicquantity.clear(); - - } - fHeavyMetalMass = M; + fHeavyMetalMass = cZAIMass.GetMass( GetIsotopicVectorAt(0.).GetActinidesComposition() ); DecayDB.close(); diff --git a/source/branches/CLASSV3/src/FabricationPlant.cxx b/source/branches/CLASSV3/src/FabricationPlant.cxx index 8cc6367379c0c80cf9aafb05948150121ca03c6d..5abc02eff8b2ec12015c5876579495a9e800d078 100644 --- a/source/branches/CLASSV3/src/FabricationPlant.cxx +++ b/source/branches/CLASSV3/src/FabricationPlant.cxx @@ -442,11 +442,8 @@ void FabricationPlant::SetSubstitutionFuel(EvolutionData fuel) { fSubstitutionFuel = true; - map<ZAI ,double>::iterator it; - map<ZAI ,double> isotopicquantity = fuel.GetIsotopicVectorAt(0.).GetActinidesComposition().GetIsotopicQuantity(); - double M0 = 0; - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M0 += (*it).second*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; + + double M0 = cZAIMass.GetMass( fuel.GetIsotopicVectorAt(0.).GetActinidesComposition() ); fSubstitutionEvolutionData = fuel / M0; } diff --git a/source/branches/CLASSV3/src/Reactor.cxx b/source/branches/CLASSV3/src/Reactor.cxx index 1c72ad8c321e3a780529810880e708233486fc49..7196ed611f505fe656dc31e9c9f5104960f7bed6 100755 --- a/source/branches/CLASSV3/src/Reactor.cxx +++ b/source/branches/CLASSV3/src/Reactor.cxx @@ -251,13 +251,9 @@ Reactor::Reactor(CLASSLogger* log, EvolutionData* evolutivedb, fHeavyMetalMass = HMMass; - map<ZAI ,double>::iterator it; - map<ZAI ,double> isotopicquantity = evolutivedb->GetIsotopicVectorAt(0.).GetActinidesComposition().GetIsotopicQuantity(); - double M0 = 0; - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M0 += (*it).second*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; + double M0 = cZAIMass.GetMass( evolutivedb->GetIsotopicVectorAt(0.).GetActinidesComposition() ); - fEvolutionDB = *evolutivedb * (fHeavyMetalMass/M0); + fEvolutionDB = (*evolutivedb) * (fHeavyMetalMass/M0); fBurnUp = BurnUp; fCycleTime = (cSecond) (fBurnUp*1e9 / (fPower) * fHeavyMetalMass *3600*24); @@ -306,13 +302,9 @@ Reactor::Reactor(CLASSLogger* log, EvolutionData* evolutivedb, fHeavyMetalMass = HMMass; - map<ZAI ,double>::iterator it; - map<ZAI ,double> isotopicquantity = evolutivedb->GetIsotopicVectorAt(0.).GetActinidesComposition().GetIsotopicQuantity(); - double M0 = 0; - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M0 += (*it).second*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; + double M0 = cZAIMass.GetMass( evolutivedb->GetIsotopicVectorAt(0.).GetActinidesComposition() ); - fEvolutionDB = *evolutivedb * (fHeavyMetalMass/M0); + fEvolutionDB = (*evolutivedb) * (fHeavyMetalMass/M0); fBurnUp = BurnUp; @@ -391,11 +383,7 @@ void Reactor::SetBurnUp(double BU) //________________________________________________________________________ void Reactor::SetEvolutionDB(EvolutionData evolutionDB) { - map<ZAI ,double>::iterator it; - map<ZAI ,double> isotopicquantity = evolutionDB.GetIsotopicVectorAt(0.).GetActinidesComposition().GetIsotopicQuantity(); - double M0 = 0; - for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++ ) - M0 += (*it).second*cZAIMass.fZAIMass.find( (*it).first )->second/AVOGADRO*1e-6; + double M0 = cZAIMass.GetMass( evolutionDB.GetIsotopicVectorAt(0.).GetActinidesComposition() ); fEvolutionDB = evolutionDB * (fHeavyMetalMass/M0); fIVOutCycle = fEvolutionDB.GetIsotopicVectorAt( (cSecond)(fCycleTime/fEvolutionDB.GetPower()*fPower) ); diff --git a/source/branches/CLASSV3/src/Scenario.cxx b/source/branches/CLASSV3/src/Scenario.cxx index 0feee545df5fae52100c52dab2f93c495ffdca5f..487c45ec0ceed98166b9ae01ed581de407fc4f4c 100755 --- a/source/branches/CLASSV3/src/Scenario.cxx +++ b/source/branches/CLASSV3/src/Scenario.cxx @@ -586,6 +586,16 @@ void Scenario::BuildTimeVector(cSecond t) //___________________________ Evolution Method ___________________________ //________________________________________________________________________ +void Scenario::BackEndEvolution() +{ + DBGL + StorageEvolution(); + PoolEvolution(); + + PoolDump(); + DBGL +} + void Scenario::PoolEvolution() { DBGL @@ -593,8 +603,6 @@ void Scenario::PoolEvolution() for(int i = 0; i < (int) fPool.size();i++) fPool[i]->Evolution(fAbsoluteTime); - for(int i = 0; i < (int) fPool.size();i++) - fPool[i]->Dump(); DBGL } @@ -618,6 +626,15 @@ void Scenario::FabricationPlantEvolution() DBGL } + +void Scenario::PoolDump() +{ + DBGL + for(int i = 0; i < (int) fPool.size();i++) + fPool[i]->Dump(); + DBGL +} + //________________________________________________________________________ void Scenario::ReactorEvolution() { @@ -656,12 +673,8 @@ void Scenario::Evolution(cSecond t) fWaste = fDecayDataBase->GetDecay(fWaste, (*it).first - fAbsoluteTime); fAbsoluteTime = (*it).first; - - if( (*it).second & 1 || (*it).second & 4 || (*it).second & 8 || (*it).second & 16 ) - StorageEvolution(); - if( (*it).second & 1 || (*it).second & 2 || (*it).second & 4 || (*it).second & 8 || (*it).second & 16 ) - PoolEvolution(); + BackEndEvolution(); if( (*it).second & 1 || (*it).second & 2 || (*it).second & 4 || (*it).second & 16 ) FabricationPlantEvolution(); diff --git a/source/branches/CLASSV3/src/ZAI.cxx b/source/branches/CLASSV3/src/ZAI.cxx index 220ce8d9b2439aec1fc1a1006df4a6af0d1eca96..a75992d85a2c5aaac487a771289f4d7c04f7570a 100755 --- a/source/branches/CLASSV3/src/ZAI.cxx +++ b/source/branches/CLASSV3/src/ZAI.cxx @@ -28,7 +28,6 @@ ZAI ZAI::operator=(ZAI IVa) ZAI::ZAI() { - fName=""; fZ=0; fA=0; fI=0; diff --git a/source/branches/CLASSV3/src/ZAIMass.cxx b/source/branches/CLASSV3/src/ZAIMass.cxx index 58e342941582a9f60dea3c2f64c0992070a07b67..ef2e009e7a03ed65e659b28654ad3928e1491fd7 100644 --- a/source/branches/CLASSV3/src/ZAIMass.cxx +++ b/source/branches/CLASSV3/src/ZAIMass.cxx @@ -37,7 +37,7 @@ ZAIMass::ZAIMass() double MassUnity,MassDec,error; while (infile>>Z>>A>>Name>>MassUnity>>MassDec>>error) { - double Masse=MassUnity+MassDec*1e-6; + double Masse = MassUnity + MassDec * 1e-6; fZAIMass.insert( pair< ZAI,double >( ZAI(Z,A,0), Masse ) ); }