Added reading of reservoir fluid max rate for GCONINJE

This commit is contained in:
Kjetil Olsen Lye 2012-04-16 14:49:13 +02:00
parent 2771bec005
commit 3b99ec7ae3
3 changed files with 9 additions and 5 deletions

View File

@ -4,7 +4,7 @@ namespace Opm
InjectionSpecification::InjectionSpecification()
: injector_type_(WATER), control_mode_(NONE), surface_flow_max_rate_(1e100),
reinjection_fraction_target_(0.0), BHP_limit_(1e100)
reinjection_fraction_target_(0.0), BHP_limit_(1e100), fluid_volume_max_rate_(1e100)
{
}

View File

@ -128,7 +128,7 @@ namespace Opm
}
}
int number_of_leaf_nodes = 1;//numberOfLeafNodes();
int number_of_leaf_nodes = numberOfLeafNodes();
double bhp_target = 1e100;
double rate_target = 1e100;
@ -154,9 +154,10 @@ namespace Opm
return false;
}
if(well_rate[index_of_well] - rate_target > epsilon) {
std::cout << wells->type[index_of_well] << std::endl;
std::cout << "well_rate not met" << std::endl;
std::cout << "target = " << rate_target << ", well_rate[index_of_well] = " << well_rate[index_of_well] << std::endl;
std::cout << injSpec().fluid_volume_max_rate_ << std::endl;
std::cout << "Group name = " << name() << std::endl;
return false;
}
return true;
@ -422,6 +423,7 @@ namespace Opm
injection_specification.injector_type_ = toSurfaceComponent(line.injector_type_);
injection_specification.control_mode_ = toInjectionControlMode(line.control_mode_);
injection_specification.surface_flow_max_rate_ = line.surface_flow_max_rate_;
injection_specification.fluid_volume_max_rate_ = line.resv_flow_max_rate_;
}
}
}

View File

@ -999,12 +999,13 @@ struct GconinjeLine
std::string injector_type_; // Injector type
std::string control_mode_; // Control mode
double surface_flow_max_rate_; // Surface flow rate target or upper limit
double resv_flow_max_rate_; // Reservoir flow rate target or upper limit
double reinjection_fraction_target_;
// Default values
GconinjeLine() :
surface_flow_max_rate_(1.0E20), reinjection_fraction_target_(1E20)
surface_flow_max_rate_(1.0E20), reinjection_fraction_target_(1E20),
resv_flow_max_rate_(1E20)
{
}
};
@ -1044,6 +1045,7 @@ struct GCONINJE : public SpecialBase
const int num_to_read = 10;
int num_read = readDefaultedVectorData(is, double_data, num_to_read);
gconinje_line.surface_flow_max_rate_ = double_data[0];
gconinje_line.resv_flow_max_rate_ = double_data[1];
gconinje_line.reinjection_fraction_target_ = double_data[2];
// HACK! Ignore any further items
if (num_read == num_to_read) {