Make polymer inflow specification by cell.

Before, it was a single number for the whole domain. It could vary
with time, though.

Simulator behaviour should be identical before and after this commit.

This touches the classes TransportModel*Polymer, Simulator*Polymer,
and the computeInjectedProduced() functions. The PolymerInflow class
and its usage has been replaced with PolymerInflowInterface, and
a subclass PolymerInflowBasic has been created which provides the
old behaviour (using parameters poly_start_days, poly_end_days and
poly_amount).
This commit is contained in:
Atgeirr Flø Rasmussen committed 2012-10-04 13:38:22 +02:00
1 parent f5eb116410
commit 6033e5ca69
9 files changed
+91 -71

No files matched your search

+2 -1
View File
@@ -211,6 +211,7 @@ main(int argc, char** argv)
const double ff = s; // Simplified a lot...
for (int conc = 0; conc < num_concs; ++conc) {
const double c = poly_props.cMax()*double(conc)/double(num_concs - 1);
std::vector<double> polymer_inflow_c(num_cells, c);
// std::cout << "(s, c) = (" << s << ", " << c << ")\n";
transport_src[0] = src[0]*ff;
// Resetting the state for next run.
@@ -223,8 +224,8 @@ main(int argc, char** argv)
reorder_model.solve(&state.faceflux()[0],
&porevol[0],
&transport_src[0],
&polymer_inflow_c[0],
dt,
c,
state.saturation(),
state.concentration(),
state.maxconcentration());