Dear all
I have written the results at inlet boundary of label 1 and 2 based on the following two methods:
method (1)
fespace XXXMh(th,[P2,P2,P2,P1]);
XXXMh [u1x,u1r,u1phi,u1p];
XXXMh [v1x,v1r,v1phi,v1p];
XXXMh [xx, xy, xz, xp] = [x,x,x,x];
XXXMh [yx, yy, yz, yp] = [y,y,y,y];
ofstream file8("Boundary2.txt");
varf vBC1([u1x,u1r,u1phi,u1p], [v1x,v1r,v1phi,v1p]) =
on(1, u1x = 1)+on(2,u1x = 2);
real[int] bcLab1vec = vBC1(0,XXXMh,tgv=-1);
cout << "-----1st Method-----" <<endl;
for(int i=0; i< bcLab1vec .n; i++) {
if(abs(bcLab1vec[i]-1)<1e-10||abs(bcLab1vec[i]-2)<1e-10)
{
real xx2=xx[][i], yy2=yx[][i];
file8 << xx[][i]<< " " << yx[][i] << " " << Cr(xx2,yy2) <<endl;
}
}
method (2)
int Nbtriangle=th.nbe;
cout << “-----2nd Method-----” <<endl;
for (int k=0; k<Nbtriangle; k++)
{
int L=th.be(k).label;
if (L==1 || L==2)
{
real yy1=th.be(k)[1].y;
real xx1=th.be(k)[1].x;
file1 << xx1 << " " << yy1 << " " << Cr(xx1,yy1)<< endl;
}
}
when I plot the output file in excel there is a difference which confused me.
I don’t know why there is the difference between them and which one is correct? In addition, one of the trends is correct. For example either the top or the lower trend is acceptable and I don’t know why the orange one is periodically goes and back between these two trends?
BR