Thank you @cmd and @marchywka for your useful comments. I have a few doubts need to ask here!
There are too many zeros in HF, what does that represent?
How I can see from HF, flux values at a specific point say the flux at theta=0, theta=pi/4, etc…
I have seen the visualization (Visualization), and I can plot 2D and contour plots. I haven’t plotted HF type data before and did not obtain any fruitful information from Visualization.
In addition, I can export 2D and contour plots using the .dat file later I plot it in tecplot. How does HF type data export using ofstream command or any other way?
I am waiting for your positive response. Thanks
All the values at points that are not along the boundary.
The easiest way is probably to use a visualization software, unless the point of interest is a node of the mesh.
3.&4. HF[] is just data on an fespace. The square brackets just let you access and output the data like a normal real[int] array.
Thank you Sir @cmd for your detailed response. Although I frequently used Tecplot (visualization software), I think the data HF is hard to tackle since it is not in the form (too much irrelevant data i.e., zeros) that Tecplot accepted. Therefore, could you please guide me to another easier way to find the flux (defined above ∂T/∂n) at any point on a curve boundary?
Thank you @cmd I exported the data using the following code:
varf vHF(p,q) = on(C, p = N.xdx(U) + N.ydy(U));
Vh HF;
HF = vHF(0,Vh,tgv=1);
//cout<<xxx<<" “<<HF<<endl;
for(int i=0;i<n;i++)
{xx[i] = (2pii)/(n-1);
flux1[i]=HF(0.5+racos(xx[i]),0.2sqrt(3)+rasin(xx[i]));
//cout<<raxx[i]<<” “<<flux1[i]<<endl;
NusSq<<ra*xx[i]<<” "<<flux1[i]<<endl;
}
I used the parametric equation of x and y so I plotted the exported data for 0<=xx[i]<=2*pi and the flux against each value of xx[i]. My way is correct???
Your code looks like it could be correct for continuous data, provided nothing else is wrong with your code. But since the circle is approximated by triangles in the discretization, this approach may lead to significant errors when the mesh is not very fine.
Use my approach to fix the x and y on the actual nodes of the elements in the discretization. Or use a `fine enough’ mesh such that the interpolation errors aren’t significant. (Check convergence!)
Hi Chris, so is the purpose of integrating the normal derivative over the boundary to circumvent the error present in the value of the point-wise normal derivative, the error being the result of the mesh coarseness? I’m still a little bit unsure of why you might suggest this as a means of testing the normal derivative at the boundary. Many thanks!
Hi James, I’m not sure I follow your question exactly. There is no integral here. The point is that you have to use the on (or int1d) functions in order to access N.x and N.y.
Hi Chris, I was referring to your first response to this question. I was just wondering why you integrated over the normal derivative, but it seems you’ve now answered that question now. Would you recommend that we use the second method you posted instead as it gives the point-wise normal derivatives?
I did not understand that the objective was to determine the pointwise values, and was offering a solution for the total heat flux. Yes, the second approach is the correct solution for point-wise values.