|
[Sponsors] |
June 13, 2020, 16:18 |
Temperature dependent heat flux condition
|
#1 |
New Member
Nicoḷ Badodi
Join Date: Mar 2020
Posts: 20
Rep Power: 6 |
Hi everyone, I have a funny challange for you!
I'm performing a thermal simulation on a component using chtMultiregionFOAM and need to implement on a boundary surface of one of the solids a particular boundary condition, which is a heat flux which is dependent on the temperature of the surface itself. In particular I need to apply on this patch the following boundary condition: so that a heat flux dependent on the surface temperature is extracted from the surface itself. I was thinking to do that with scalarCodedSource, but I don't even know from where to start, any idea?? Is it even possible to do that with the codedSource or do I need to implement from scratch a whole new boundary condition? Thanks in advance for your replies! |
|
June 15, 2020, 07:58 |
|
#2 |
Senior Member
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 11 |
Hi NBad,
Try with codedMixed. You didn't mention if the patch should be attached into a solid region or a fluid one, that will affect to the thermal conductivity (kappa in the code). You need the thermal conductivity because you cannot apply directly a heat flux, you need to tell a gradient of T, which is the meaningful variable, and this factor is required for conversion. I've attached a version for a solid region. In case you want to apply it to a fluid one you may need to change the way to get the thermo property (rather use the fluid properties themselves, or use the effective ones given by the turbulent model). Try the code and let me know if it worked for you! Code:
<patchName> { type codedMixed; value uniform 300; name temperatureHeatFlux; refValue uniform 600; refGradient uniform 0; valueFraction uniform 0; //1 - Dirictlect ; 0 - Neumann code #{ // Get the basic thermo properties (for solid region) const solidThermo& thermo = db().lookupObject<solidThermo>(basicThermo::dictName); // Get current patchi const label patchi = patch().index(); // This is the temperature of current patch const scalarField& Tp(*this); // Constant of the equation const scalar C1 = 1; const scalar C2 = 0; // Calculate the values on each face of the patch // Note: Eq is divided by thermal conductivity to units of grad(T) this->refGrad() = C1*pow(Tp, 2)*pow(M_E, C2*Tp)/thermo.kappa(patchi); bool debug = true; if (debug) { Info << "Evaluating temperatureHeatFlux on " << patch().name() << endl; Info << "temperatureHeatFlux::average(Tp) = " << gAverage(Tp) << " K" << endl; Info << "temperatureHeatFlux::average(Q) = " << gAverage(this->refGrad()*thermo.kappa(patchi)) << " W/m2K" << endl << endl; } #}; codeInclude #{ #include "solidThermo.H" #}; codeOptions #{ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ #}; } |
|
December 19, 2021, 11:43 |
|
#3 | |
New Member
Giacomo Quattrucci
Join Date: Mar 2021
Posts: 2
Rep Power: 0 |
Quote:
|
||
December 20, 2021, 04:17 |
|
#4 |
Senior Member
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 11 |
Hi Giacomo,
As soon as you use valueFraction = 0 the refValue will be ignored so it doesn't matter which value you use. If you need further information about what means each term you can check the info in the source code. |
|
February 22, 2022, 03:31 |
|
#5 |
New Member
dhiraj
Join Date: Nov 2021
Posts: 6
Rep Power: 5 |
hello everyone. I have a solar receiver in which at outer surface of the receiver i have to apply non-uniform heat flux [cosine profile - q(θ) = qnet ·
cos θ(−90 ≤ θ ≤ 90)] with radiation and convection losses to ambient. can anyone give me the idea for writing the UDF for ansys fluent for this condition. thanks ! |
|
February 22, 2022, 03:57 |
Thank you!
|
#6 | |
New Member
Nicoḷ Badodi
Join Date: Mar 2020
Posts: 20
Rep Power: 6 |
Quote:
Thank you very much crubio! In the end I left OpenFOAM to use some other enterprise software, since I was not able to get my simulation to converge in any way, even with simpler BC and without using this variable term. Still, thank you for your reply, it was very interesting!! Sincerely, Nicoḷ. |
||
February 22, 2022, 04:10 |
|
#7 | |
New Member
Nicoḷ Badodi
Join Date: Mar 2020
Posts: 20
Rep Power: 6 |
Quote:
Hi dhiraj, I don't think this is the right thread to ask, here we are discussing about OpenFOAM which is a different software. You might want to post your question as a new thread in the blog so you can get proper help. |
||
July 29, 2022, 13:02 |
|
#8 |
New Member
Marco Rosatti
Join Date: Mar 2019
Location: Argentina
Posts: 4
Rep Power: 7 |
Hi folks!
I have tested this code in my example. It is compounded by two regions, one of them solid and another one a fluid. I have implemented this boundary condition in a solid region and it compiles. I haven't verified the convergence. Regards! |
|
July 29, 2022, 13:05 |
|
#9 |
New Member
Marco Rosatti
Join Date: Mar 2019
Location: Argentina
Posts: 4
Rep Power: 7 |
Hi folks!
I have tested this code in my example. It is compounded by two regions, one of them solid and another one a fluid. I have implemented this boundary condition in a solid region and it compiles. I haven't verified the convergence. Regards! P/D: the line that I added is the following: -I$(LIB_SRC)/transportModels/compressible/lnInclude \ for ESI version v2112 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Temperature dependent Heat flux (Peltier effect) | Student3 | FLUENT | 8 | February 4, 2021 05:13 |
temperature dependent heat flux on wall | tjliang | OpenFOAM Running, Solving & CFD | 0 | December 8, 2014 10:37 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 18:30 |
Temperature and heat flux wall boundary condition | L. Hamid | Main CFD Forum | 3 | February 22, 2014 22:10 |
Temperature and heat flux wall boundary condition | L. Hamid | FLUENT | 2 | February 10, 2014 00:59 |