25 double time_days = 0.0;
26 double time_years = 0.0;
30 time_years = (365.0 * 24.0 * 60.0 * 60.0) /
timeunit;
31 time_days = (24.0 * 60.0 * 60.0) /
timeunit;
33 res = strncmp(inputfile.
filename,
"yes", 3);
39 fprintf(mar,
"! The file produced for MARFA and contains rajectories of particle, simulated using \n");
40 fprintf(mar,
"! DFNTrans code: particle tracking code in discrete fracture network.\n");
42 fprintf(mar,
"/scratch/er/dharp/source/MARFA3.2.3/data/ \n");
43 fprintf(mar,
"%05d \n", currentnum);
47 res = strncmp(inputfile.
filename,
"yes", 3);
53 fprintf(plum,
"! The file produced for PLUMECALC and contains rajectories of particle, simulated using \n");
54 fprintf(plum,
"! DFNTrans code: particle tracking code in discrete fracture network.\n");
55 fprintf(plum,
"%d \n", currentnum);
60 res = strncmp(inputfile.
filename,
"yes", 3);
66 double posx = 0.0, posy = 0.0, posz = 0.0, vx = 0.0, vy = 0.0, vz = 0.0, ttime = 0.0, apert = 0.0, beta = 0.0, ntime, bbet = 0.0, pres = 0.0;
67 unsigned int cell, fr, ts, numtimes, inters;
70 for (i = 1; i <= currentnum; i++) {
71 sprintf(
filename,
"%s/traject_%d", path, i);
74 if (fscanf(tr,
"%d \n", &numtimes) != 1) {
79 fprintf(plum,
"%d \n", numtimes);
88 for (j = 1; j <= numtimes; j++) {
89 if (fscanf(tr,
"%d %lf %lf %lf %lf %lf %lf %d %d %lf %lf %lf %d %lf\n", &ts, &posx, &posy, &posz, &vx, &vy, &vz, &
cell, &fr, &ttime, &apert, &beta, &inters, &pres ) != 14) {
96 fprintf(mar,
"Part%05d %4.4f %4.4f %4.4f \n", i, posx, posy, posz);
98 ntime = ttime / time_years;
99 bbet = ntime / (ttime / beta);
100 fprintf(mar,
"%7.4f %7.4f %7.4f rtID %3.8E %3.8E %3.8E \n", posx, posy, posz, ntime, bbet, 0.00);
106 ntime = ttime / time_days;
107 fprintf(plum,
"%f %f %f %f \n", ntime, posx, posy, posz);
117 printf(
"Unable to delete the file %s\n",
filename);
123 fprintf(mar,
" END \n");
FILE * OpenFile(char filen[120], char fileopt[2])
struct inpfile Control_File(char fileobject[], int ctr)
void OutputMarPlumDisp(int currentnum, char path[125])