|
[Sponsors] |
June 4, 2017, 14:36 |
Heat transfer problem
|
#1 |
New Member
Davide
Join Date: Jun 2017
Posts: 17
Rep Power: 9 |
Hey all!
I am a complete newbie and I'm having some troubles with the simulation of a countercorrent heat exchanger (turbulent), stationary solution. There are two coassial pipes. In the outer one flows hot C02 and in the inner one flows colder air. My problem is that at the end of the simulation I have a wrong power balance: the air absorbs way more heat than the C02 releases. (I mean that cp_air*ΔT_air*ṁ_air is not equal to cp_C02*ΔT_CO2*ṁ_CO2 ). I have already checked that the geometry is fine, and that the cp of both are correct. At first i thought that maybe the flux of air dissipated kinetic energy in thermal energy but looking at the solution given by openFoam I noticed that the velocity keeps almost constant . For the solution I used chtMultiResgionSimpleFoam and a K-omega model. If anyone can help I'm really freaking out cause seems that air takes that energy from nowhere Thanks a lot in advance |
|
June 4, 2017, 15:50 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Calculate the wall heat flux in all regions and report back. Depending on your OF version with the wallHeatFlux utility or the function object. Do they match?
Plot the temperature at a patch or the min max value over the iterations using a function object. Has this reached steady state? Post your inlet and outlet boundary conditions. How is your y+ value etc. Some examples below: Depending on your version of OF you need to modify these. Look in the .H files inside the src/functionObjects or src/postProcessing/functionObjects folders for examples. Code:
Average_temp_outlet { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl timeStep; writeFields false; surfaceFormat none; regionType patch; name outlet; region fluidA; operation areaAverage; fields ( T ); } yPlus_fluidB { type yPlus; region fluidB; writeControl outputTime; libs ("libfieldFunctionObjects.so"); } residualsFluidA { type residuals; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; region fluidA; fields (p_rgh U h k omega); } residualsFluidB { type residuals; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; region fluidB; fields (p_rgh U h k omega); } residualsSolid { type residuals; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; region solid; fields (h); } |
|
June 4, 2017, 16:52 |
|
#3 |
New Member
Davide
Join Date: Jun 2017
Posts: 17
Rep Power: 9 |
When i said I am a newbie I really meant that
I tried to have a look on how to calculate the wallHeatFlux but can't really figure out. About the inlet and outlet conditions which ones do you need (p_rgh, T, U, nut, alphat , all of them?) . Regarding the steady state, how can I know if it has reached it? I gave it for granted but from your answer obviously is not. Sorry for the stupid questions and thanks a lot for your patience |
|
June 5, 2017, 05:54 |
|
#4 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Lets start from the top.
You do need appropriate boundary conditions: U Code:
inlet { type flowRateInletVelocity; massFlowRate 0.100; // kg/s - volumetricFlowRate is also possible extrapolateProfile no; // turn to yes for a developed velocity profile value $internalField; } outlet { type pressureInletOutletVelocity; inletValue uniform (0 0 0); value $internalField; } fluidA_to_solid { type noSlip; value uniform (0 0 0); } Code:
inlet { type calculated; value $internalField; } outlet { type calculated; value $internalField; } fluidA_to_solid { type calculated; value $internalField; } Code:
internalField uniform 1e5; boundaryField { inlet { type zeroGradient; value $internalField; } outlet { type fixedValue; value $internalField; } fluidA_to_solid { type fixedFluxPressure; value $internalField; } } Code:
internalField uniform 313.15; boundaryField { inlet { type fixedValue; value uniform 313.15; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } fluidA_to_solid { type compressible::turbulentTemperatureCoupledBaffleMixed; value $internalField; Tnbr T; kappaMethod fluidThermo; } } All walls should have wall functions in those boundary conditions. All outlets are zeroGradient, inletOutlet, or calculated. The inlets fixedValue or calculated. The next step is solver settings. I always advice not relaxing h or e in all regions. Introducing relaxation makes your simulation seem more stable, but it converges much much slower and crashes are just later in the run. The next step is to check your mesh: Code:
checkMesh -allTopology -allGeometry -region fluidA checkMesh -allTopology -allGeometry -region solid checkMesh -allTopology -allGeometry -region fluidB Code:
gradSchemes { default Gauss linear; grad(U) cellLimited Gauss linear 1; } laplacianSchemes { default Gauss linear limited 0.333; } snGradSchemes { default limited 0.333; } Code:
limitT { type limitTemperature; active yes; limitTemperatureCoeffs { selectionMode all; min 300; max 500; } } Code:
wallHeatFlux -region fluidA wallHeatFlux -region fluidB wallHeatFlux -region solid The tricky part about cht calculations is that the residuals are not always the full picture. (To be honest the aren't in all other calculations as well, but here people notice it when their results are still wrong). Always check temperature, velocity, pressure etc over the iterations next to the residuals to make sure they are not oscillating or steadily dropping. Also calculate your y+ value. CHT calulations need a finely resolved boundary layer. Calculate your Prandtl, Reynolds, Biot, Peclet numbers and estimate the height of your boundary layer. If all the heat transfer happens in 0.1 mm and your first layer is 5cm big you won't get good results. |
|
June 5, 2017, 09:30 |
|
#5 |
New Member
Davide
Join Date: Jun 2017
Posts: 17
Rep Power: 9 |
Thanks a lot!
1) MESH The problem is a project from the university and the mesh has been provided by the professor so I guess it's correct. I checked anyway and the Non-orthogonal factor is 37 and the y+ seems good enough. 2) Boundary conditions Even if not identical the boundary are pretty similar to the ones you provided me. While doing the simulation I used a test case that we did in class for a simple pipe. 3) Heatflux The heatfluxes are really different for the different walls but I saw that the difference is decreasing (even if not a lot) with the number of iterations. I did 5000 iterations : should I do more? Someone suggested me 50k 4) THANKS A LOT you have been super kind and it has already been really useful. |
|
June 5, 2017, 10:27 |
|
#6 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
The non-orthogonality is excellent. I suppose it is a hex mesh. The most likely reason for the slow convergence is the mentioned relaxation.
Check your fvSolution files of each region. Increase your relaxation parameter to 1.0 for h or e. If it crashes lower it to 0.999 or start with 0.7 and increase it as the simulation goes on. With this 50k Iterations should not be needed. Probably not even one thousand. (This does depend on your domain, cell count and flow complexity though). A pipe heat exchanger however should have forced convection flow of high reynolds numbers into only one direction. Monitor the residuals of the flow with the function object or by monitoring the output. Make sure that in fvSolution a minIter flag is set inside each solver setting. This will prevent that the flow stops solving while the temperature has not yet converged. Code:
"(U|k|...)" { ... minIter 1; ... } |
|
June 5, 2017, 15:16 |
|
#7 |
New Member
Davide
Join Date: Jun 2017
Posts: 17
Rep Power: 9 |
YAY!!! I took the result of the 5k iteration and renamed it as 0. Then changed the relaxation parameter as you said and run it again! Now the heat fluxes are slighlty different but way better than before!! Thanks a lot mate!
One last question, can you explain me why changing the relaxation factor helped and how did you know that i had to change exaclty the 'h' relaxation factor? |
|
June 5, 2017, 16:47 |
|
#8 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
You are solving three equations
Now the energy equation (solved for h or e, which is transformed into the temperature) is linear. Hence it is much more stable and does not need the relaxation (at least in most cases). Hence changing the relaxation for h makes sure your get your results faster. The low numbers in the openfoam tutorials is a mystery to me. |
|
June 5, 2017, 20:45 |
|
#9 |
New Member
Davide
Join Date: Jun 2017
Posts: 17
Rep Power: 9 |
Super clear!
Thanks for all! Problem solved |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Heat transfer problem in a two phase eulerian fluidized bed | Jack_lumber | Fluent Multiphase | 2 | December 15, 2018 07:50 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Problem heat transfer CFX | mark1 | CFX | 5 | August 10, 2016 04:13 |
How can I increase Heat Transfer at Domain Interf? | B.Simon | CFX | 3 | October 28, 2008 19:53 |
Heat Transfer Problem Help | JB | FLUENT | 2 | October 18, 2006 19:54 |