|
[Sponsors] |
Negative initial temperature error (chtMultiRegionFoam) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 14, 2018, 11:06 |
Negative initial temperature error (chtMultiRegionFoam)
|
#1 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi,
I am fairly new to OpenFoam using version 6. I am trying to solve the heat transfer between a heatsink with heat source at the bottom and air traveling through the pipe in which only the heat sink is exposed. I am using chtMultiRegionFoam solver. Split the mesh into two regions and created cellzones. I gave the thermophysical properties to both heatsink and air and also defined the boundary conditions and the contact boundary as compressible::turbulentTemperatureCoupledBaffleMix ed. Using RAS model for turbulence properties of air. Initial temperature of air is 300k and that of heat sink is 273K but I am getting very low values of about -206k I used fvschemes and fvsoultion from tutorial/heatTransfer/chtMultiRegionFoam/multiregionheater for both separately. When I try to solve it, its showing "Negative initial temperature T0: -206.172" and is exiting at 2.5 s while solving the solid The error message is: Code:
Solving for fluid region waterCellSet DILUPBiCGStab: Solving for Ux, Initial residual = 0.0201238, Final residual = 0.000422419, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 0.0189649, Final residual = 0.000425249, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 0.00718987, Final residual = 0.000186804, No Iterations 1 DILUPBiCGStab: Solving for h, Initial residual = 0.00431549, Final residual = 0.000122464, No Iterations 1 Min/max T:-206.151 339.013 GAMG: Solving for p_rgh, Initial residual = 0.0455872, Final residual = 0.000385342, No Iterations 2 time step continuity errors : sum local = 0.000534267, global = 8.44534e-05, cumulative = 8.44534e-05 Min/max rho:1.25 1.25 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00599105, Final residual = 8.33063e-05, No Iterations 1 DILUPBiCGStab: Solving for k, Initial residual = 0.0191864, Final residual = 0.000366755, No Iterations 1 Solving for solid region heaterCellSet DICPCG: Solving for h, Initial residual = 0.738924, Final residual = 7.06039e-07, No Iterations 32 --> FOAM FATAL ERROR: Negative initial temperature T0: -206.172 From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo<Foam::rhoConst<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::heSolidThermo<Foam::solidThermo, Foam::pureMixture<Foam::constIsoSolidTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:? #3 Foam::heSolidThermo<Foam::solidThermo, Foam::pureMixture<Foam::constIsoSolidTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:? #4 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam" #5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #6 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam" Aborted (core dumped) The Temp conditions I gave for air is given: Code:
dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 300; boundaryField { inlet { type fixedValue; value uniform 300; } outlet { type inletOutlet; value uniform 300; inletValue uniform 300; } wall-domain { type zeroGradient; } default_wall { type compressible::turbulentTemperatureCoupledBaffleMixed; value $internalField; Tnbr T; kappaMethod fluidThermo; } } Code:
dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 273; boundaryField { base { type fixedValue; value uniform 273; inletValue uniform 273; } sinkbody { type zeroGradient; } wall-domain { type zeroGradient; } default_wall { type compressible::turbulentTemperatureCoupledBaffleMixed; value uniform 273; Tnbr T; kappaMethod solidThermo ; } } Code:
ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(U) cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) bounded Gauss upwind; div(phi,h) bounded Gauss upwind; div(phi,e) bounded Gauss upwind; div(phi,K) bounded Gauss upwind; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear limited corrected 0.33; } interpolationSchemes { default linear; } snGradSchemes { default limited corrected 0.33; } Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; } laplacianSchemes { default none; laplacian(alpha,h) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } |
|
September 14, 2018, 16:49 |
|
#2 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Your ddt shemes for fluid and solid are different...
For fluid you have steady state and for solid you have euler! I am not sure if this is relevant or could cause such a problem. Test this and see what happens. Post the case please. Last edited by peterhess; September 15, 2018 at 02:02. |
|
September 15, 2018, 02:33 |
case setup without polymesh directory
|
#3 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Here is the case setup. I could not include the polymesh directory because the case exceeded the upload limit. Do not mind that air casesetup is called watercellset
|
|
September 15, 2018, 02:40 |
|
#4 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thank You for replying.
I changed ddt schemes for solid and air to steady state and the temperature drop in error reduced to -7k. SO its probably the error of choosing the wrong schemes. I have uploaded the case setup. I do not have much knowledge in choosing the appropriate schemes. Please look into it and suggest the appropriate schemes for each part. |
|
September 15, 2018, 03:02 |
|
#5 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hi!
Well, by problems with the setups it is always a good idea to use the default setup. Simply copy the setup (i.e. fvSchemes and fvSolution) from the working tutorial and use them in your case. If it works, then compare the difference to find the cause. There is no mesh in the case you uploaded. The mesh is needed to run the case and test the progress. Upload a case with mesh setup please. Regards Peter |
|
September 15, 2018, 03:38 |
|
#6 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
I used the fvSchemes and fvSolution from your case for both solid and fluid regions in an example case that I have...
I replaced my fvSchemes and fvSolution with those from your case. The case (my case) works with your fvSchemes and fvSolution fine. The problem you are facing is somewhere else! What about the pressure? Change p_rgh from 0 to 1e5! p_rgh should look like this: /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0/waterCellSet"; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 1 -1 -2 0 0 0 0 ]; internalField uniform 1e5; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 1e5; } wall-domain { type zeroGradient; } default_wall { type fixedFluxPressure; value uniform 1e5; } wall_domain { type fixedFluxPressure; value uniform 1e5; } } // ************************************************** *********************** // Regards Peter Last edited by peterhess; September 15, 2018 at 04:39. |
|
September 15, 2018, 06:43 |
|
#7 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thank you for taking your time to help me.
I have included the case with the mesh file in the link. https://drive.google.com/open?id=1jf...nOUshYzvDdiK8J Can you please run it to see the problem, If I defined the boundaries wrong. Also what does ".*" mean. Am i supposed to solve using chtMultiRegionSimpleFoam. Regards Jebin |
|
September 15, 2018, 07:23 |
|
#8 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
".*" means apply for all bouandries independent of the name...
In OF6.0 there is no chtMultiRegionSimpleFoam anymore. It has been merged with chtMultiRegionFoam. By the way, the mesh quality in the case you uploaded is very poor. You need to fix this! ---------------------------------------- And now to the divergence problem... Add the folllowing lines to the bottom of controlDict: maxCo 1; //This limits courant number going higher than 1 maxDi 100; //This limits the diffusity going higher than 100 adjustTimeStep yes; //This let the time steps (deltaT) you defined as 0.1 to be modified to hold maxCo and maxDi The default deltaT = 0.1 is very high and the courant number becomes very high, since your simulation defined to be transient. You need to reduce it or make it automatic controlled applying the changes I added here. At least the simulation runs now without any problems... The file should looks like this: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application chtMultiRegionFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 100; deltaT 0.1; writeControl adjustableRunTime; writeInterval 5; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; maxCo 1; maxDi 100; adjustTimeStep yes; ---------------------------------- To make the simulation steady state you need to do the following: - For all solid regions in your simulation use fvSchemes and fvSolution from here: /tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeaterRadiation/system/heater/ - For all fluid regions in your simulation use fvSchemes and fvSolution from here: /tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeaterRadiation/system/bottomAir/ Those shemes and solver setups are made for steady state! Regards Peter Last edited by peterhess; September 15, 2018 at 10:27. |
|
September 15, 2018, 14:45 |
|
#9 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thank you sir for giving me the directions.
Right now, I am not facing the initial temperature error and am running the simulation. |
|
September 16, 2018, 03:18 |
|
#10 | |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Quote:
I wanted to obtain a temperature profile on the heat sink walls which is at 273k by the flow of air over it whose inlet temperature is 300k. Right now, I am only getting the air to cool to a lower temperature from 300k because of the heatsink . The temperature profile is formed by conduction of heat from air into the heat sink. This was validated from an ansys fluent simulation. Do you know of any way I can include this by changing the boundary conditions. |
||
September 16, 2018, 04:26 |
|
#11 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
The pressure p defined in the internalField in:
/0/waterCellSet/p need to be changed from 0 to 1e5! This will solve the divergence problem in steady state case you are facing. This change is a good idea for both situations transient and steady state... Last edited by peterhess; September 16, 2018 at 16:10. |
|
September 17, 2018, 07:31 |
|
#12 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
The case setup is working in steady state now.
During solving, the temperature on the surface of the heatsink fin surface is only rising to 275K (from being at 273k initially) when exposed to air of 300k in a time span of 45 seconds. I increased the air temperature to 500k but still the heatsink fins are at 275k. In a ansys simulation recreating the conditions, the temperature of the heatsink after post-processing was more than 280k. Is there a reason as to the temperature of heatsink stopping at 275k or if i simulate for a longer time will it rise to higher temperature ? |
|
September 17, 2018, 07:58 |
|
#13 | |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
To compare the results of openFoam and Fluent, you need to be sure that all parameters are identical. Especially the boundaries conditions.
There are many reasons to get different results using openFoam and Fluent. In my opinion, I would say that having 275 K on the surface is possible, cause you have very high thermal conductivity in the solid and constant temperatur at the base 273 K! 2 K difference between the base and the fins are in my opinion right! Are Fluent results right and plausible? Quote:
See attached file! Last edited by peterhess; September 17, 2018 at 16:01. |
||
September 19, 2018, 03:06 |
|
#14 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thank you for doing the simulation. Was it the same case setup I uploaded? How long was the simulation for?
|
|
September 19, 2018, 04:10 |
|
#15 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Yes, your case.
I just changed the following: - making the case steady state (as described above) - changing internalField p = 1e5 (fluid!) - changing internalField p_rgh = 1e5 - changing the temperature at the inlet to 500 K - adding the 3 lines for controlling the time steps, as described above (the simulation works as steady state without this step!) Those actualy the necessery steps I made, as I remember... I run the simulation in parallel. I cant say how much time I needed. I already deleted the simulation. Anyway, about 4 or 5 minutes, then the mesh size is very small. In about 600 iterations I reached convergence. The simulation run 1000 iterations then I stopped manually! By the way, I still dont like the mesh. 2 or 3 cells between the fins is unacceptable for me... Regards Peter Last edited by peterhess; September 19, 2018 at 06:09. |
|
September 19, 2018, 10:12 |
|
#16 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
I am not using a good mesh now because I am running the simulation on my laptop in a virtual box with only two processors.
So its took about 2hrs for me to simulate 10 seconds because of very small time steps. When i tried using good mesh, the system froze which is why i am sticking to poor mesh. Right now, I am learning openFoam as part of a internship I am doing. Once I am capable to do the simulation on my own, I will be using a server to do the simulation Also how can I see the graph? Which commands should i use? I also wanted to know if Salome software can create named section and can be exported as .msh file? |
|
September 19, 2018, 11:05 |
|
#17 | |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Quote:
- install gnuplot (if not already installed) - copy the file attached to the simulation folder - start the simulation by typing: chtMultiRegionsFoam > log This will write the simulation iterations progress to a log file called log instead of the terminal! - in a new terminal type: gnuplot Plot.txt I cant talk about Salome, cause I dont use it! Regards Peter Last edited by peterhess; September 19, 2018 at 16:55. |
||
September 24, 2018, 08:35 |
|
#18 | |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi Peter,
I created a new case with four heat sinks arranged in serial in air domain with same conditions as the previous case. I solved it using one core processor. - Then, I tried decomposing it using the decomposeParDict but its showing an error-- Quote:
-I am using the steady state solver and the same values as before. -The case setup is https://drive.google.com/file/d/16Vk...ew?usp=sharing -Can you please check the case file and tell me what I have done wrong? Also do I have to setup any file after it is decomposed, to run the 'mpirun -np ....' command and get the result. Disclaimer- The mesh is extremely poor. I created this only to learn the decomposition and reconstruction. Regards Jebin |
||
September 24, 2018, 10:03 |
|
#19 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hello,
Changing the name of the Folder from: airdomain with 4heatsinks--steady To airdomain_with_4heatsinks--steady Solves the problem! Spaced in the name are not allowed Regards Peter Last edited by peterhess; September 24, 2018 at 12:11. |
|
September 24, 2018, 12:55 |
|
#20 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Wow! That was simple!
Thank you for clearing that out. I couldn't have reached here without your help, sir. I divided the case between two processors by running the command decomposePar -The 0 folder in each processors only have cellToRegion file. -Do I need to add any files or can I directly run the command " mpirun -np 2 chtMultiRegionFoam" ? -Will the time required for processing decrease if I increase the number of cores ? Regards Jebin |
|
Tags |
chtmultiregionfoam, error, negative initial temp |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free surface issues with interDyMFoam for hydroturbine | oumnion | OpenFOAM Running, Solving & CFD | 0 | October 6, 2017 15:05 |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Cannot run the code properly: very large time step continuity error | crst15 | OpenFOAM Running, Solving & CFD | 9 | December 14, 2014 19:17 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 09:35 |
SLTS+rhoPisoFoam: what is rDeltaT??? | nileshjrane | OpenFOAM Running, Solving & CFD | 4 | February 25, 2013 05:13 |