#include #include #include #include #include #include "ChemPlugin.h" int exit_client(int status) { std::cin.get(); return status; } void write_line(std::ofstream& f, ChemPlugin *cp, int nx, double gap, double& then) { double now = cp[0].Report1("Time", "years"); if ((then - now) < gap / 1e4) { f << now; for (int i=0; i> veloc_in; std::cin.ignore(); double velocity = veloc_in / 31557600.; // m/s double flow = deltay * deltaz * porosity * velocity; // m3/s double diffcoef = 1e-10; // m2/s double dispersivity = 1.0; // m double dispcoef = velocity * dispersivity + diffcoef; // m2/s double trans = deltay * deltaz * porosity * dispcoef / deltax; // m3/s double time_end = 10.0; // years double delta_years = time_end / 5; // years double next_output = 0.0; // years // Open output file and write instance positions on the first line. std::ofstream f; f.open("Advection.txt"); if (f.is_open()) { f << "years"; for (int i=0; i