Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Calculating the heat flux: reacf? ntflux?
Posted 2010年9月27日 GMT-4 08:53 14 Replies
Please login with a confirmed email address before reporting spam
I'm struggling on calculating heat fluxes.
I have a model where a heat source is implemented as a Temperature-BC (e.g. T=300[K]+10[K/min]*t)
I also have heat flux BC on the "outside" of my model (heat transfer coefficients + ambient radiation).
How can i calculate accurate heatflux from my heating boundary? Usually would use "boundary integration" of "ntflux_htgh"
How can I use the reacf operator to calculate the heat flux? reacf(T)? (weak form is disabled - should i enable it for the use of lagrange multipliers?)
Because:
I compared it with another term:
I used subdomain integration of "C_htgh*rho_htgh*T" which should give me the global heat energy stored in the subdomains. The first time derivative of these should nearly be equal to the produced heat minus the lost energy across the outside boundarys. But i got quite big differences between time derivative of the energy and the net heat flux (ca. 30%).
So i think, the use of integrating ntflux is really coarse. Even when i use the "recover" values. I want to try the reacf operator which should be more usefull. But how???
Thank you for your help!
I'm using COMSOL 3.5a with heat transfer modul
Please login with a confirmed email address before reporting spam
First have you checked that your results are mesh denisty "independet" ?
As if you have large gradients then the erro on the integrations might become quickly rather large
then you could try the reacf() on your values BUT
I have never checked/used reacf() on HT, so is it applicaable that way ?
Good question, needs validation, try it on a simple case
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
It's nice to know "Ivar is there" ;)
I don't know if it is mesh dependent - not yet. :)
I tried "reacf(T)" on simple problems: E.g. on a very simple problems (only one Temperature-BC others Insultaion-BC) the result of integrate reacf(T) is nearly perfectly the same as integrate ntflux_htgh. If the problem becomes more complex - two subdomains with radiation interaction - the result of reacf(T) differs slightly to that of ntflux. So, that gives me a hint, that reacf(T) is the right way of computing reaction forces on dirichlet BC on heat transfer to get accurate heat fluxes.
if i apply the reactf(T) expression on my model, the differnce between d(integrate(C*rho*T*dV))/dt decreases - but it is still not negligible. Maybe the "last" difference of the two values has the origin in mesh dependency.
Is there any "energy variable" in the heat transfer module, which could be integrated much more trustworthy?
But my main question is still:
What is the result of "reacf(T)"
is it the (produced) heat flux? if yes, does it contain radiative flux?
IMHO i would answer "yes" the these both qusetions above.
Please login with a confirmed email address before reporting spam
Even if I'm "here" (and in a meeting) I cannot help like that because I'm not sure about the result, I would have to test it carefully, it could be that the radiation is not in, but, one (I) have to dig into the equations (physics Equation settings ...) to find out and I do not have COMSOL right here ;)
My way would anyhow be to make a simple "problem" and compare analytical and COMSOL results
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
- reacf is always more correct than ntflux. You can try comparing the values to the surface integrals which are usually more accurate (at least in my case). I also observed that dU/dt with direct derivatives do not give correct answers in time wrt surface integrals. In addition, what I am trying these days is that the boundary mesh in (heat) transfer module is really mesh dependant, specially for the cases of T or fluxT.
I would say:
- Check that your tolerances are fine enough (10e-6, 10e-7)
- Do a mesh analysis with flux being your fitness factor. Preferably use reacf(). If you enable weak form, then use the lagrange multiplier, which are more correct than reacf.
- Check also if you are using any artificial diffusion. These can be source of lot of uncertainty in the model. If you are using ALE, the implementation of artificial diffusion gives large errors (bug in C3.5a).
- Try using Comsol 4, if possible.
hope it can help.
Please login with a confirmed email address before reporting spam
Thanks for help!
At first, i want to point out, that there are at least 4 different ways for calculating heat fluxes when using Dirichlet RB:
1. using ntflux with deactivated "Recover"
2. using ntflux with activated "Recover"
3. using reacf(T) (independent on "Recover" option)
4. using weak constraints (lm1, ...)
I compared 1 - 3 (i did not made it to use weak constraints).
for a heating boundary the following relation occours when integrating them over the heated surface: (absolute values)
ntflux with recover < ntflux no recover < reac(T)
This is quite confusing. Using reacf(T) should be the best choice. Using "Recover" (approximation of the Tx-derivative is done by extra polynominal approximation) should be more accurate than without using "Recover". If "recover" is not enabled, COMSOL derives the derivatives of T (e.g. Tx) out of the derivativs of the shape functions - which is at least the most coarse approximation.
So the following relation should be right (when defining reacf as correct value)
ntflux no recover < ntflux with recover < reac(T)
But I don't know why it is the way around. Any ideas?
Secondly, the mesh dedendency:
it is only a little! I compared two different mesh cases: 247347 DoF and 446982 DoF.
I was surprised that the fluxes did not really change. Even the subdomain integration of C_htgh*rho_htgh*T had the same result. The only result was, that the results of the finer mesh has a much more smooth line, but this is negligible.
So the differnces betweeen d(integration of (C*rho*T))/dt and the netfluxes are still there.
Third:
Yes, i'm using artificial diffusion for stabilisation (GLS) of weakly NS. does anybody knows if this could change the fluxes of about 20-30%?
Fourth:
I'm using standard tolerances: 0.001 relative and 0.001 absolute as that were the default values.
Fifth:
Yes i would try Comsol 4 - but I can't ...
Best regards
Please login with a confirmed email address before reporting spam
Your tolerances may not be ok. I would suggest try setting individual absolute tolerances like this
u 1e-4 v 1e-4 p 1e-1 T 1e-7....
recover option in comsol 3 is accurate for surface integrals as much as I remember and not recommended for boundary integrals. But check yourself in the documentation.
If you don't have a moving boundary GLS should be generally ok. But as a rule of thumb, always try with very high mesh to see how much is there. I burned my fingers not doing it.
Please login with a confirmed email address before reporting spam
So is it possible to say that reacf is more accurate than T_x (with recover) and T_x (with recover) is more accurate than T_x (without recover)? Does it differ when using them for boundaray integration or just for "plotting"?
Mhh, how can I set up different tolerances for the different dependent variables? i only have one field for relative and one for absolute.
thanks!
Please login with a confirmed email address before reporting spam
Interesting discussion, I believe I would have to do some checks too, to be sure to follow ;)
To add a little: doubling the meh density is not really sufficient, sometimes just adding 10% more nodes (at the right places = high gradients) is sufficient, so you should also consider where (physically on the volume) are the maximum contributors to your variable and how is the mesh in this region
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi!
So is it possible to say that reacf is more accurate than T_x (with recover) and T_x (with recover) is more accurate than T_x (without recover)? Does it differ when using them for boundaray integration or just for "plotting"?
Mhh, how can I set up different tolerances for the different dependent variables? i only have one field for relative and one for absolute.
thanks!
As I mentioned before, I remember that recover was meant for surface actions not boundary, both for plotting and integration. But you have to check, as I saw somewhere in the documentation.
If you have fine enough mesh T_x and reacf and lm4 would be very close anyway. So: lmX> reacf > T_xx (without recover)
;)
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
But the surface is the boundary, since I'm using 3D :)
I see your point. I was thinking in 2D.
Here is from the manual:
Accurate Derivative Recovery
Plotting and evaluating stresses or fluxes boils down to evaluating space derivatives of the dependent variables. By default, postprocessing of a derivative like ux or uxx (first and second derivatives of u with respect to x) is done by evaluating the derivative of the shape functions used in the finite element approximation. These values have poorer accuracy than the solution u itself. For example, uxx=0 if u has linear elements. COMSOL Multiphysics then evaluates the derivatives (and u itself) using a polynomial-preserving recovery technique by Z. Zhang (see Ref. 1). The recovery is only applied on variables that are discretized using Lagrange shape functions.
The polynomial-preserving recovery is a variant of the superconvergent patch recovery by Zienkiewicz and Zhu that forms a higher-order approximation of the solution on a patch of mesh elements around each mesh vertex. For regular meshes, the convergence rate of the recovered gradient is O?hp+1?—the same as for the solution itself. However, near boundaries, the accuracy is not as good, and it might even be worse than without recovery. Postprocessing is about 2–5 times slower when using accurate derivative recovery. For this reason, prefer using recovery of stresses or fluxes for surface plots, contour plots, slice plots, and isosurface plots. Use recovery to a lesser extent for domain plots, boundary plots, and edge plots.
By default, the accurate derivative recovery smoothes the derivatives within each group of domains with equal settings. Thus, there is no smoothing across material discontinuities. You find the setting for accurate derivative recovery in the plot node’s Settings windows’ Quality section. Due to performance reason, the default value for Recover list is Off (that is, no accurate derivative recovery). Select Within domains to smooth the derivatives within each group of domains with equal settings. Select Everywhere to smooth the derivatives across the entire geometry.
Reference
1. A. Naga and Z. Zhang, “The polynomial-preserving recovery for higher order finite element methods in 2D and 3D,” Discrete and continuous dynamical systems—series B, vol. 5, pp. 769–798, 2005.
Please login with a confirmed email address before reporting spam
thanks. I read this part of the manual, but i didn't remember:
"However, near boundaries, the accuracy is not as good, and it might even be worse than without recovery."
So, sometimes "revover" improves the derivatives near the boundary and in other cases it is the way around. So, it is recommended to not use "recover" when using boundary integration, because you don't know weather the accuracy is better or worse than without recovery. But reacf should always be better than Tx without "Recover". Using weak constraints would increase the precision, but for good meshing, the differences should be small. In my case i got no differences of the fluxes (both reacf, ntflux) when (nearly) doubling the DoFs. So reacf should be okay.
Well, i think everthing is discussed about this topic or my special problem, except the differences between d(subdomainintegration(C_htgh*rho_htgh*T))dt and netflux. I have no idea whats that about, because it seems to be not a problem of meshing.
I'm thankful for your help! I really do!
Please login with a confirmed email address before reporting spam
and I'm glad I could help a bit.
Best,
Danial
Please login with a confirmed email address before reporting spam
Im havng a big trouble with my simulation, my team and I are trying to calibrate a calorimeter, so I´m using comsol to estimate the calorimeter sensitivity. My problem is that the integration of the normal total heat flux in the boundaries of my heat source element are almost the double of the total power supplied, all the boundaries are convective heat flux with h=10W/mK i was wondering if you could help me.
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.