|
[Sponsors] |
November 22, 2013, 11:44 |
conjugate heat transfer in OpenFOAM
|
#1 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Dear FOAMers
I'm new in OpenFoam and would like to model steady state conjugate heat transfer(solid and fluid region) in a heat exchanger which consists of a few vertical metal plates attached to a horizontal plate with fluid flowing in gaps between plates. My current experience with OpenFoam is restricted by “Lid-driven cavity flow tutorial” and “Stress analysis of a hole” tutorials. I know that there are “chtMultiRegionFoam” and “chtMultiRegionSimpleFoam” cases in /tutorials/heatTransfer/ folder. However, i didn't findt tutorials which would explain these cases and it's hard to understand what is going on in these cases without explanation. I wonder if there is a step-by-step tutorial similar to “Lid-driven cavity” tutorial explaining conjugate heat transfer. I also wonder if there are tutorials explaining - how to create a case containing regions with different properties(fluid and solid), assign regions and boundaries; - how to use conjugate heat transfer solvers; My next step will be to model a steady state conjugate heat transfer in a porous material consisting of orthogonally interlaced cylindrical wires and fluid between them. I have a geometry for this case created in Abaqus. I wonder if there is any way to translate my geometry from Abaqus to Open Foam preserving surfaces and regions definitions. Or what would be appropriate tool consistent with Open FOAM where I can create such geometry and define regions and surfaces? Thank you! |
|
November 22, 2013, 17:30 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings skuznet and welcome to the forum!
Have a look into this (unofficial) tutorial: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D - and feel free to add information to it, when you've understood better how things work! As for Abaqus, I have no idea if there is a direct way. You can try looking here in the forum. You can even use Google: Code:
site:www.cfd-online.com/Forums/ Abaqus OpenFOAM Best regards, Bruno
__________________
|
|
November 22, 2013, 20:12 |
|
#3 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno,
thank you for your answer. Actually I've run already the planeWall2D case. It didn't work. There was an error message in log.chtMultiRegionSipleFOAM Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.2.2-9739c53ec43f Exec : chtMultiRegionSimpleFoam Date : Nov 22 2013 Time : 19:54:37 Host : "scyld.localdomain" PID : 65269 Case : /home/skuznetsov/OpenFOAM/RUN/planeWall2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL IO ERROR: keyword regions is undefined in dictionary "/home/skuznetsov/OpenFOAM/RUN/planeWall2D/constant/regionProperties" file: /home/skuznetsov/OpenFOAM/RUN/planeWall2D/constant/regionProperties from line 18 to line 20. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 402. FOAM exiting and I also had error message when was trying to open results with paraview Code:
ERROR: In ..\..\..\src\VTK\IO\vtkOpenFOAMReader.cxx, line 7200 vtkOpenFOAMReaderPrivate (058864C8): Error reading line 58 of E:\Dropbox\planeWall2D\constant/bottomAir/polyMesh/boundary: Expected number, string or (, found ; ERROR: In ..\..\..\src\VTK\IO\vtkOpenFOAMReader.cxx, line 7200 vtkOpenFOAMReaderPrivate (058865E0): Error reading line 58 of E:\Dropbox\planeWall2D\constant/topAir/polyMesh/boundary: Expected number, string or (, found ; ERROR: In ..\..\..\src\VTK\IO\vtkOpenFOAMReader.cxx, line 7200 vtkOpenFOAMReaderPrivate (058866F8): Error reading line 47 of E:\Dropbox\planeWall2D\constant/wall/polyMesh/boundary: Expected number, string or (, found ; ERROR: In ..\..\..\src\VTK\Filtering\vtkExecutive.cxx, line 756 vtkCompositeDataPipeline (05BAEC40): Algorithm vtkPOpenFOAMReader(05AD8AA8) returned failure for request: vtkInformation (05B304F0) Debug: Off Modified Time: 95148 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 Last edited by skuznet; November 25, 2013 at 16:46. |
|
November 23, 2013, 08:29 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
Have a look into the wiki page again: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D - I've added an adapted case for OpenFOAM 2.2. Best regards, Bruno
__________________
|
|
November 23, 2013, 13:14 |
|
#5 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Awesome! Thank you Bruno!
|
|
November 23, 2013, 19:38 |
|
#6 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno,
the case now seems to run well. But when I'm trying to open it paraview I still can't see anything. I downloaded all case files on my pc and trying to open it with paraview (i tried versions 3.81, 3.12, 3.98.0). -I choose .OpenFOAM file to open, -choose OpenFOAM reader, -check Mesh Regions box -and click Apply and nothing appears. I see message Code:
ERROR: In ..\..\..\src\VTK\IO\vtkOpenFOAMReader.cxx, line 4498 vtkOpenFOAMReaderPrivate (05944570): Error opening E:\Dropbox\planeWall2D\constant/polyMesh/faces.gz: Can't open. If you are trying to read a parallel decomposed case, set Case Type to Decomposed Case. ERROR: In ..\..\..\src\VTK\Filtering\vtkExecutive.cxx, line 756 vtkCompositeDataPipeline (05CB2EA0): Algorithm vtkPOpenFOAMReader(05B9E960) returned failure for request: vtkInformation (05BE93C8) Debug: Off Modified Time: 98373 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FROM_OUTPUT_PORT: 0 FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 but still don't see anything. The time panel is not active, I can't change time and in Color panel I can't choose anything except Solid Color. If I open the cavity case, then I can see geometry and pressure and velocity distributions. Last edited by skuznet; November 25, 2013 at 16:44. |
|
November 24, 2013, 08:58 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
Please, when posting code and error outputs, please use the "[CODE]" markers, as explained in the second link of my signature. And you can edit your previous posts as well, so please add this marker to them, to make it easier to read the posts. Regarding your question: the "*.gz" files might not be opened with success with ParaView's internal ".foam" reader. First unzip the files; on Linux, you can run this command: Code:
find . -name "*.gz" | xargs gunzip Best regards, Bruno
__________________
|
|
December 5, 2013, 00:49 |
|
#8 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno, thank you for the help!
I installed ubuntu, openfoan and paraview on my homecomputer and now it works well. I can run case planeWall2d and multiRegionHeatre and can open results. I think my previous issues with opening results were because I was opening them in Windows and files were not transferred or opened correctly in paraview under windows. |
|
December 10, 2013, 13:36 |
|
#9 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Dear Bruno:
Thank you for adapting the planeWall2D. I was able to run this case and I got some basic understanding how it works. Based on planeWall2D tutorial I was able to set up and run a simple 3d fin case - there is a fin which is heated from the bottom and the fluid flow removes the heat from the fin. I was able to run it with air and it looks ok. However, when I try to put water instead of air by replacing themoPhysicalProperties with file from HTML Code:
/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties Code:
\*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } mixture { specie { nMoles 1; molWeight 18; } equationOfState { rho 1000; } thermodynamics { Cp 4181; Hf 0; } transport { mu 959e-6; Pr 6.62; } } // ************************************************************************* // Something is going wrong. Open FOAM starts solving it but during iterations my temperature (minimal temperature in solid and in fluid domains) is reducing, which should not occur, since I have a heater. At the end temperature in fluid domain becomes even negative, and OpenFOAM crashes. Can you please tell me if I have to change anything else in my case when I replaced my thermophysicalProperties file with water? I guess the problem might be because thermophysicalProperties for water has different equation of state - rhoConst instead of perfectGas. Thank you! |
|
December 10, 2013, 17:55 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
A few questions:
Bruno
__________________
|
|
December 10, 2013, 19:53 |
|
#11 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
1. I'm using chtMultiRegionSimpleFoam solver, but the thermophysicalProperties file was taken from the example for chtMultiRegionFoam.
2. I have only one fluid - water, the inlet velocity is 0.1 m/s, while the size of the fin 1x1x3 m. 3. I didn't check the solid. How can I check? The very first fluid iteration gives also very high temperature 2000, while initial temperature was 300 and temperature of the warmed surface of solid is 350: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.2.x-37940e0cd1ae Exec : /home/sergkuznet/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin/chtMultiRegionSimpleFoam Date : Dec 11 2013 Time : 16:43:49 Host : "ubuntu" PID : 8592 Case : /home/sergkuznet/OpenFOAM/run/fin2R_initial nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create fluid mesh for region fluidDomain for time = 0 Create solid mesh for region solidDomain for time = 0 *** Reading fluid mesh thermophysical properties for region fluidDomain Adding to thermoFluid Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding to rhoFluid Adding to UFluid Adding to phiFluid Adding to gFluid Adding to turbulence Selecting turbulence model type laminar Adding to ghFluid Adding to ghfFluid Radiation model not active: radiationProperties not found Selecting radiationModel none Adding fvOptions No finite volume options present *** Reading solid mesh thermophysical properties for region solidDomain Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding to radiations Radiation model not active: radiationProperties not found Selecting radiationModel none Adding fvOptions No finite volume options present Time = 1 Solving for fluid region fluidDomain DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.041964, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0001767454, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0003058668, No Iterations 2 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.02843725, No Iterations 1 Min/max T:299.9999 2035.089 GAMG: Solving for p_rgh, Initial residual = 0.8476081, Final residual = 0.003588793, No Iterations 11 time step continuity errors : sum local = 0.7781759, global = -0.07076251, cumulative = -0.07076251 Min/max rho:2 2 Solving for solid region solidDomain DICPCG: Solving for h, Initial residual = 1, Final residual = 0.05509895, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 300 max(T) [0 0 0 1 0 0 0] 350 ExecutionTime = 1.39 s ClockTime = 1 s Time = 2 Solving for fluid region fluidDomain DILUPBiCG: Solving for Ux, Initial residual = 0.3551669, Final residual = 0.003849144, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.05855359, Final residual = 0.001012355, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.02422332, Final residual = 0.0003484752, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.5433119, Final residual = 0.007134343, No Iterations 1 Min/max T:264.6221 2035.089 GAMG: Solving for p_rgh, Initial residual = 0.04481994, Final residual = 0.0004256873, No Iterations 18 time step continuity errors : sum local = 3.010856, global = 1.085556, cumulative = 1.014794 Min/max rho:2 2 Solving for solid region solidDomain DICPCG: Solving for h, Initial residual = 0.189656, Final residual = 0.014255, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 299.7434 max(T) [0 0 0 1 0 0 0] 350 ExecutionTime = 1.92 s ClockTime = 2 s Time = 3 Solving for fluid region fluidDomain DILUPBiCG: Solving for Ux, Initial residual = 0.1454075, Final residual = 0.001948315, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.09988127, Final residual = 0.001433494, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0186658, Final residual = 0.0001720673, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.3185567, Final residual = 0.01199445, No Iterations 1 Min/max T:244.3615 1008.353 GAMG: Solving for p_rgh, Initial residual = 0.2012721, Final residual = 0.001699132, No Iterations 18 time step continuity errors : sum local = 0.8901295, global = 0.2734903, cumulative = 1.288284 Min/max rho:2 2 Solving for solid region solidDomain DICPCG: Solving for h, Initial residual = 0.09596577, Final residual = 0.00727127, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 299.396 max(T) [0 0 0 1 0 0 0] 350 ExecutionTime = 2.44 s ClockTime = 2 s Last edited by skuznet; December 11, 2013 at 18:31. |
|
December 11, 2013, 00:34 |
|
#12 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno,
I can see some inconsistency in what i'm trying to do: the chtMultiRegionSimpleFoam in compressible solver, and in thermophysicalProperties which I used the density is constant. Can it be the reason for temperature decrease and OF crash? |
|
December 15, 2013, 15:28 |
|
#13 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
Quote:
Check the file "constant/wall/thermophysicalProperties". Quote:
Quote:
Best regards, Bruno
__________________
|
||||
December 16, 2013, 16:40 |
|
#14 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno,
I took the file "constant/solidDomain/thermophysicalProperties" from multiRegionHeater tutorial, and it looks OK to me. I was reffering to the file "constant/fluidDomain/thermophysicalProperties", which describes my fluid properties. I can't find out what is wrong with this case. Could you please take a look at it? Thank you! |
|
December 27, 2013, 15:35 |
|
#15 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Dear Bruno, I've modified file fluidRegion/fvSolutions - changed rhoMin and rhoMax so that constant value of rho prescribed in thermophysicalProperties fits this interval
Code:
SIMPLE { momentumPredictor on; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 100000; rhoMin rhoMin [1 -3 0 0 0] 999; rhoMax rhoMax [1 -3 0 0 0] 1001; } Temperature distribution in the whole model: Temperature_WholeModel_crop.jpg Temperature in fluid domain: T_fluid_cut.jpg Fluid velocity in fluid domain: U_fluid_cut.jpg Pressure_rgh in fluid domain: p_rgh_fluid_cut.jpg the case: fin2.tar.gz The p_rgh distribution is obviously not realistic. One can see that fluid velocity in the vicinity of top surface changes smoothly from 0 to some value, however in the vicinity of the bottom boundary such a smooth transition doesn't exist, while it should be same because the wall condition is prescribed at the top and there is fluid solid interface at the bottom, which is equivalent to wall condition. |
|
December 29, 2013, 16:17 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
Sorry, I only managed to look at this today. I've had some very busy weeks. I've done the following modifications: Code:
diff -ur fin2_orig/system/fluidDomain/fvSolution fin2/system/fluidDomain/fvSolution --- fin2_orig/system/fluidDomain/fvSolution 2013-11-26 20:37:33.000000000 +0000 +++ fin2/system/fluidDomain/fvSolution 2013-12-29 20:06:05.448515088 +0000 @@ -52,9 +52,9 @@ momentumPredictor on; nNonOrthogonalCorrectors 0; pRefCell 0; - pRefValue 100000; - rhoMin rhoMin [1 -3 0 0 0] 0.2; - rhoMax rhoMax [1 -3 0 0 0] 2; + pRefValue 1e5; + rhoMin rhoMin [1 -3 0 0 0] 999; + rhoMax rhoMax [1 -3 0 0 0] 1001; } Beyond this, the case is still running on my computer, so I don't if this fixed the problem or not. edit: Something is still wrong with the pressure, because in the solid region the pressure is still set to 100000 Pa. I've stopped the simulation on my computer and will wait for feedback from your side. Best regards, Bruno
__________________
Last edited by wyldckat; December 29, 2013 at 16:46. Reason: see "edit:" |
|
December 30, 2013, 01:09 |
|
#17 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno, thank you for your answer!
I did try to run already with rhoMin rhoMin [1 -3 0 0 0] 999; rhoMax rhoMax [1 -3 0 0 0] 1001; and the results do not look correct, they are shown on the previous post (#15). regarding pressure - 100000 (five zeros) is exactly 1e5 which is athmospheric pressure, so this should be ok, However, I discovered that in changeDictionaryDict for fluid region i misspelled the inlet patch name for temperature BC: Code:
fron { type fixedValue; value uniform 300; } Code:
front { type fixedValue; value uniform 300; } I don't understand the meaning of some BC used in planeWall2D and multiRegionHeater, I just copied them to my case without understanding. So not sure if I'm using them properly. for example for velocity Code:
U { internalField uniform (0 0 0.1); boundaryField { ".*" { type fixedValue; value uniform (0 0 0); } front { type fixedValue; value uniform ( 0 0 0.1 ); } Code:
back { type inletOutlet; inletValue uniform ( 0 0 0 ); value uniform ( 0 0 0.1 ); } } } Similar BC for temperature are used at the outlet. I also don't understand the BC used at the fluid-solid interface. For temperature: Code:
"fluidDomain_to_.*" { type compressible::turbulentTemperatureCoupledBaffleMixed; neighbourFieldName T; kappa fluidThermo; kappaName none; value uniform 300; } |
|
December 30, 2013, 07:58 |
|
#18 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sergey,
Quote:
Wow... now that I think about it, I did have a weird numeric mess in my mind. Quote:
Quote:
Did you go properly study the tutorials in the User Guide? Or did you just go through them as fast as you could? Best regards, Bruno
__________________
|
||||
December 30, 2013, 15:21 |
|
#19 |
Member
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13 |
Bruno, thanks for explanation.
In tutorial http://www.openfoam.org/docs/user/boundaries.php inletOutlet and solid-surface BC are not well detailed, your explanation is better. I fixed the misspelled patch name and run case again. But result still doesn't look correct, in fact it became even worse - I don't see anymore temperature variation inside fluid domain, only on boundaries. Can you please explain to me also the pressure BC? HTML Code:
p_rgh { internalField uniform 1e5; boundaryField { ".*" { type fixedFluxPressure; value uniform 1e5; } back { type fixedValue; value uniform 1e5; } } } p { internalField uniform 1e5; boundaryField { ".*" { type calculated; value uniform 1e5; } back { type calculated; value uniform 1e5; } } } |
|
December 30, 2013, 16:58 |
|
#20 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quoting Tobi:
Quote:
I ran the simulation for 1600 iterations and it seems that the fluid part is highly efficient in either absorbing heat or very efficient at running away from it Two questions:
__________________
|
||
Tags |
cht, solid-fluid interface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conjugate Heat Transfer: Wall Heat Flux at Coupled Walls? | MaxHeat | FLUENT | 4 | September 14, 2017 11:44 |
openfoam for heat transfer | kirankarki | OpenFOAM Running, Solving & CFD | 29 | February 12, 2015 19:46 |
Conjugate Heat transfer in CFX | ksp1717 | CFX | 11 | December 10, 2010 23:07 |
Conjugate Heat Transfer of Motorized EGR | enr_venkat | CFX | 1 | October 12, 2010 19:17 |
best mesh generator for conjugate heat transfer? | phsieh2005 | Main CFD Forum | 1 | June 1, 2007 18:35 |