I used this code to create a .tec file. I have attached herein the corresponding files. I would really appreciate any suggestions.

using namespace std;

double momen_tecplot(int ni, double delt, double x[][50], double y[][50], double xnew[][50], double ynew[][50], double u[][50], double uincr[][50], double unew[][50], double v[][50], double vincr[][50], double vnew[][50], double H[][50])

{

double t1 = 0;

int w1 = 0;

ofstream myfile5;

while (t1 < 2)

{

myfile5.open(“momentum_”+ to_string(w1) + “.tec”);

cout <<“TECPLOT file dumped”<<“momentum_”<<w1<<".tec"<< endl;

myfile5 << “TITLE=” << “NadNLSW v1.0 Tecplot Output”<< endl;

myfile5 << “VARIABLES=”<< “x,” << “y,” << “u,” << “v,” << “H,” << endl;

myfile5 << “ZONE F=POINT, I=” << ni << “,J=”<< 50 << endl ;

if (t1 == 0)

{

for (int i = 0; i < ni; i++)

{

for (int j = 0; j < 50; j++)

{

myfile5 << x[i][j] << “,” << y[i][j] << “,” << u[i][j] << “,” << v[i][j] << “,” << H[i][j] << endl;

}

}

t1 = t1 + delt;

myfile5.close();

}

else

{

for (int i = 0; i < ni; i++)

{

for (int j = 0; j < 50; j++)

{

unew[i][j] = u[i][j] + uincr[i][j];

vnew[i][j] = v[i][j] + vincr[i][j];

xnew[i][j] = x[i][j] + (delt*unew[i][j]);*

ynew[i][j] = y[i][j] + (deltvnew[i][j]);

myfile5 << xnew[i][j] << “,” << ynew[i][j] << “,” << unew[i][j] << “,” << vnew[i][j] << “,” << H[i][j] << endl;

}

}

t1 = t1 + delt;

myfile5.close();

}

w1+=1;

}

}

momentum_0.tec (33.3 KB)

momentum_1.tec (33.7 KB)