Dear users,
I am working on a Natural convection problem via freeFEM?
A researcher has plotted the results of Normal(grad(T)) along a circle see the top right figure.
what will be the command of Normal(grad(T)) along a Circle in FreeFEM?
Detail is attached in the image below.
just do
macro grad(u) [dx(u),dy(u)]//
real flux = int1d(Th,circle)( grad(T)'*[N.x,N.y]) ;
Thanks for your kind guidance. It works fine for entire length but it gives only one values.
How do i plot along the running circle for entire running flux. mean x-axis (0-2pi) and y-axis (flux calculation from 0 to 2pi).
Check this command please .
see the first post where the results are plotted along a circle
for (int ii = 0 ; ii < nn; ii++)
{xx[ii] = ii/nn;
macro grad(u) [dx(u),dy(u)]//
flux[ii] = int1d(Th,circle)( grad(T)’*[N.x,N.y])(ii/nn,ii/nn) ;
ofstream gnu ( “Flux=.txt” );
for (int ii = 0; ii < nn; ii++)
gnu << flux[ii] << endl;}
Your question is not clear, so your idea never works.
I think, (but I am not sur) you to compute the flux on arc of size theta
where arc go from 0 to theta.
so the flux on the arc will be something like
int1d on arc(theta) of ( grad(T)’*[N.x,N.y])
if ( xc,yc) is the center of the circle the angle of circle is atan2(y-yc,x-xc) in [-pi,p2[ with 0 angle on axis x in -pi, pi
So you can compute make a loop for theta in [0, 2*pi]
int1d(Th,circle)( (pi+atan2(y-yc,x-xc) < theta )grad(T)’[N.x,N.y]);
Dear Professor, @frederichecht thanks for the useful discussion. The above command will work? If I just want to compute the rate of heat transfer i.e.
∂T/∂n
every point of the circle (radius=0.1, center=(0.5,0.2*sqrt(3))), where n is normal at every point of the circle. If the surface is not a curve, where I want to compute heat transfer, I simply use dx(T)(x,y) or dy(T)(x,y), where x and y are those points where I have to compute the rate of heat exchange.