Unit Tests: Fix Comparison Values

This commit is contained in:
Bård Skaflestad 2018-09-10 15:05:33 +02:00 committed by Jostein Alvestad
parent 9637109ca8
commit 6688a9286f
4 changed files with 36 additions and 31 deletions

View File

@ -596,9 +596,7 @@ Opm::RestartIO::InteHEAD::
stepParam(const int num_solver_steps, const int sim_step)
{
this -> data_[NUM_SOLVER_STEPS] = num_solver_steps;
this -> data_[REPORT_STEP] = sim_step+1;
this -> data_[REPORT_STEP] = sim_step + 1;
return *this;
}
@ -622,18 +620,27 @@ Opm::RestartIO::InteHEAD::variousParam(const int version,
{
this->data_[VERSION] = version;
this->data_[IPROG] = iprog;
// ih_049: Usage unknown, value fixed across reference cases
this->data_[ih_049] = 1;
// ih_050: Usage unknown, value fixed across reference cases
this->data_[ih_050] = 1;
// ih_076: Usage unknown, experiments fails (zero determinant in well message) with too low numbers. 5 is highest observed across reference cases.
this->data_[ih_076] = 2;
// ih_076: Usage unknown, experiments fails (zero determinant
// in well message) with too low numbers.
// 5 is highest observed across reference cases.
this->data_[ih_076] = 5;
// ih_101: Usage unknown, value fixed across reference cases.
this->data_[ih_101] = 1;
// ih_103: Usage unknown, value not fixed across reference cases, experiments generate warning with 0 but not with 1.
this->data_[ih_103] = 1;
this->data_[ih_101] = 1;
// ih_103: Usage unknown, value not fixed across reference cases,
// experiments generate warning with 0 but not with 1.
this->data_[ih_103] = 1;
// ih_200: Usage unknown, value fixed across reference cases.
this->data_[ih_200] = 1;
this->data_[ih_200] = 1;
return *this;
}

View File

@ -428,15 +428,24 @@ BOOST_AUTO_TEST_CASE (Declared_Well_Data)
const auto i0 = 0*ih.nswelz;
const auto& swell = awd.getSWell();
BOOST_CHECK_CLOSE(swell[i0 + Ix::OilRateTarget] , 20.0e3f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::WatRateTarget] , 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::GasRateTarget] , 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::LiqRateTarget] , 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::ResVRateTarget], 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::THPTarget] , 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::BHPTarget] , 1000.0f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::OilRateTarget], 20.0e3f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::DatumDepth] , 0.375f, 1.0e-7f);
// No WRAT limit
BOOST_CHECK_CLOSE(swell[i0 + Ix::WatRateTarget], 1.0e20f, 1.0e-7f);
// No GRAT limit
BOOST_CHECK_CLOSE(swell[i0 + Ix::GasRateTarget], 1.0e20f, 1.0e-7f);
// LRAT limit derived from ORAT + WRAT (= ORAT + 0.0)
BOOST_CHECK_CLOSE(swell[i0 + Ix::LiqRateTarget], 20.0e3f, 1.0e-7f);
// No direct limit, extract value from 'smry' (WVPR:OP_1)
BOOST_CHECK_CLOSE(swell[i0 + Ix::ResVRateTarget], 4.0f, 1.0e-7f);
// No THP limit
BOOST_CHECK_CLOSE(swell[i0 + Ix::THPTarget] , 1.0e20f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::BHPTarget] , 1000.0f, 1.0e-7f);
BOOST_CHECK_CLOSE(swell[i0 + Ix::DatumDepth], 0.375f, 1.0e-7f);
}
// SWEL (OP_2)

View File

@ -328,8 +328,8 @@ BOOST_AUTO_TEST_CASE(Time_and_report_step)
const auto& v = ih.data();
BOOST_CHECK_EQUAL(v[67], 12); // TSTEP
BOOST_CHECK_EQUAL(v[68], 2); // REP_STEP
BOOST_CHECK_EQUAL(v[67], 12); // TSTEP
BOOST_CHECK_EQUAL(v[68], 2 + 1); // REP_STEP (= sim_step + 1)
}
BOOST_AUTO_TEST_CASE(Tuning_param)

View File

@ -39,18 +39,7 @@ BOOST_AUTO_TEST_CASE(Radial_Settings_and_Init)
BOOST_CHECK_EQUAL(v[ 1], true); //
BOOST_CHECK_EQUAL(v[ 3], false); // E300 Radial
BOOST_CHECK_EQUAL(v[ 4], true); // E100 Radial
BOOST_CHECK_EQUAL(v[ 16], true); //
BOOST_CHECK_EQUAL(v[ 18], true); //
BOOST_CHECK_EQUAL(v[ 31], true); //
BOOST_CHECK_EQUAL(v[ 44], true); //
BOOST_CHECK_EQUAL(v[ 75], true); // MS Well Simulation Case
BOOST_CHECK_EQUAL(v[ 76], true); //
BOOST_CHECK_EQUAL(v[ 87], true); //
BOOST_CHECK_EQUAL(v[ 99], true); //
BOOST_CHECK_EQUAL(v[113], true); //
BOOST_CHECK_EQUAL(v[114], true); //
BOOST_CHECK_EQUAL(v[115], true); //
BOOST_CHECK_EQUAL(v[117], true); //
BOOST_CHECK_EQUAL(v[ 75], true); // MS Well Simulation Case
}
BOOST_AUTO_TEST_SUITE_END()