|
[Sponsors] |
Negative initial temperature error (chtMultiRegionFoam) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 24, 2018, 13:31 |
|
#21 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Well, to decompose the case you need to run the command:
decomposePar -allRegions because u have multiple regions... To run in parallel you need to type: mpirun -np 4 chtMultiRegionFoam -parallel where the 4 is the number of cores you want to use... You need to type -parallel, else the simulation will start multiple times in single mode. For sure the calculation time will decrease when running in parallel. That is the reason actualy why the parallel mode is used. In the forum there are many topics about running in parallel and its advatages. Regards Peter |
|
September 24, 2018, 14:18 |
|
#22 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thank You
Its working Regards Jebin |
|
October 10, 2018, 09:52 |
|
#23 | |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi Peter
I have run into the same problem I had initially. I am getting negative temperature and the solver is aborting. -I am using the same geometry of four heatsinks exposed to air. -I used salome for generating the mesh and defined the boundary conditions as well as cellzones. I unpacked the mesh and changed the boundarys accordingly. -I copied the rest of the files( properties, fvScheme, fvSolution, thermal and turbulence properties etc.) from my other working steady simulation with the same geometry. -Max courant no is 1. Max Diffusivity is 100. DeltaT =0.001 -Yet, fluid temperature is dropping to -171k and aborting. -When I used transient solver, it became -5k. Quote:
-The mesh is of poor quality because I was doing the simulation for learning. -I have provided the case setup in the link -I hope you reply to this message. Regards Jebin |
||
October 10, 2018, 14:54 |
|
#24 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hello!
Well, as I said before, I am not the best one talking about Salome, cause I myself still doing my baby steps in Salome! Anyway, As the original Simulation works, and during salome usage process a problem exists, then the problem must be during the meshing by salome, or during the export of the mesh... I suppose that the setup of the case is right, cause it works originaly. If you take a look to the: /air-exp/constant/sink1/polyMesh/boundary/ you will notice that the base1 boundary is patch. Well, it should be a wall... That means, there is at least here an export/import problem. How did you separated the zones from the original mesh generated by salome? Did you use the script from here: https://github.com/nicolasedh/salomeToOpenFOAM salomeToOpenFOAM.py or you exported the whole mesh as one region and then separated those regions using: ideasUnvToFoam *.unv splitMeshRegions -cellZones -overwrite ? Upload the *.hdf file please! Regards Peter |
|
October 10, 2018, 16:27 |
|
#25 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
||
October 11, 2018, 04:49 |
|
#26 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi Peter
-I exported the mesh from salome as UNV file -ran ideasUnvToFoam <mesh> -Then used the command splitMeshRegions -cellZones -overwrite . This created separate regions as air sink1 etc like I had named the volume groups in salome. -All the boundary conditions were recognized as paches initially and then i changed them to wall and mapped walls -I created the mesh as 1. imported step file 2.exploded the solids 3. created the mesh as gmsh 4. created geomtry groups as faces and volumes in GEOM and then added it to the mesh using option 'geometry to mesh' I have included the study Regards Jebin |
|
October 11, 2018, 11:04 |
Salome multi regions export to openFoam using *.UNV
|
#27 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
https://drive.google.com/open?id=136...GT8WdBdpY3MbTM
Hier is a working example based on your cooler. I used just one cooler instread of 4... I made the simulation laminar to reduce the complexity. You can reactivate the turbulence again by need. You could use it as a plattform. Generate the mesh, export the mesh then run ./Allrun! The mesh size has been hold on minimum. Better results could be reached by refinement. I just executed some iterations. No divergence happen, anyway, I cant give a warranty that all setups are correct... Give a feed back please, if everything works fine. Regards Peter Last edited by peterhess; October 13, 2018 at 09:07. |
|
October 12, 2018, 09:08 |
|
#28 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi Peter
I will run the simulation soon. What is the use of renumberMesh -region FLUID -overwrite command? Regards Jebin Last edited by jebin; October 12, 2018 at 10:29. |
|
October 12, 2018, 09:39 |
|
#29 | |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Quote:
https://openfoamwiki.net/index.php/RenumberMesh Last edited by peterhess; October 12, 2018 at 13:34. |
||
October 13, 2018, 01:13 |
Salome multi regions export to openFoam using salomeToOpenFOAM.py
|
#30 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
And here is a suggestion for using GMSH mesher under Salome.
https://drive.google.com/open?id=1Df...m28zeVc_hoR1ty The Mesh has better quality and a symmetry bc. Just the half of the Geometry has been recognized to reduce the number of cells. to execute do the following: - Salome --> generate the mesh (All setups has been predefind) Do not export *.UNV!!! - file --> load script --> salomeToOpenFOAM.py [1] Wait until the mesh exported. The mesh is stored in a new generated folder called Mesh_1. - Copy /Cooler_Salome_GMSH/Mesh_1/constant/polyMesh/ folder to /Cooler_Salome_GMSH/constant/ - Execute ./Allrun Separation the mesh to the diffrenet regions will be done here. done! The advantage here is that you are able to use hexa or pyramids in your mesh. Using ideasUnvToFoam *.UNV is (at least in Salome 8.5 for my poor knowledge) not possible! Regards Peter [1] https://github.com/nicolasedh/salomeToOpenFOAM Last edited by peterhess; October 15, 2018 at 04:31. |
|
October 14, 2018, 13:16 |
|
#31 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Hi Peter
-Thank you for suggesting the salomeToOpenFOAM script. I am using it now. How can I run it in the terminal without the GUI? Do I run it as runSalome -t salomeToOpenFOAM.py after running my case study as runSalome -t study.py ? -Also what steps did you use in salome as that the contact regions were recognised as mappedWalls ? -When I create geometry and export it, all BCs are recognized as patches. -If my geometry has two different solids in step file, do I need to fuse and partition them in order to get mappedWalls after I mesh the 'partition'? Regards Jebin |
|
October 14, 2018, 13:41 |
|
#32 | ||
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Quote:
Quote:
The mappedWalls are generated automaticlly when using: splitMeshRegions -cellZones -overwrite Yes, all the regions are exported as patches. The changeDictionary in Allrun_Pre changes the boundaries by need to wall (and symmetry). The changeDictionary in Allrun_Pre takes its input from /systen/changeDictionaryDict. This dictionary just changes the bouandries type before you separate with splitMeshRegions. The steps are: - Generate the mesh in Salome - Execute the script salomeToOpenFOAM.py to export the mesh - Copy the mesh from the export folder to constants - Run changeDictionary to change the needed bouandaries to walls - Split the mesh. This will generate the mappedWalls automatically - Run changeDictionary for every region to change the boundaries types of those Run the Allrun script step by step to see what habbens. Regards Peter Last edited by peterhess; October 15, 2018 at 12:50. |
|||
October 25, 2018, 07:00 |
|
#33 |
New Member
jebin george
Join Date: Sep 2018
Posts: 17
Rep Power: 8 |
Thanks Peter for the support!
Now openfoam directly recognises the mappedWalls and I am able to runt he simulations without error. Regards Jebin |
|
July 23, 2019, 11:24 |
|
#34 |
New Member
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7 |
Hello Peterhess and Jebin,
I am facing the same issue (Negative Temperature) with chtMultiRegionFoam Solver, also I tried to fix the problem by following the instruction given by Dr.Peterhess. I couldn't win, still the issue is existing. My case is here https://drive.google.com/open?id=1mK...s43Yly7ZBngvDW please help me to solve the issue,, Also I am wondering why the rho is always 0? Please have a look at the case and help me as much as possible. Solving for fluid region lN2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCGStab: Solving for h, Initial residual = 0.88776239, Final residual = 6.8342222e-08, No Iterations 5 Min/max T:-2637.8648 2227.0076 GAMG: Solving for p_rgh, Initial residual = 0.79198179, Final residual = 0.0050460533, No Iterations 3 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (lN2): sum local = 0.10399421, global = -0.04578917, cumulative = -0.045783532 GAMG: Solving for p_rgh, Initial residual = 0.035194033, Final residual = 6.518507e-08, No Iterations 15 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (lN2): sum local = 2.7940322e-07, global = -8.7959749e-08, cumulative = -0.04578362 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.041351503, Final residual = 1.6870796e-08, No Iterations 3 DILUPBiCGStab: Solving for k, Initial residual = 0.066150485, Final residual = 3.3648615e-08, No Iterations 4 Solving for fluid region water diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCGStab: Solving for h, Initial residual = 0.72883781, Final residual = 4.6050801e-10, No Iterations 2 Min/max T:297.96332 298.02833 GAMG: Solving for p_rgh, Initial residual = 0.089626583, Final residual = 0.00046828838, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (water): sum local = 3.5616599e-06, global = 1.3074672e-06, cumulative = 1.177379e-05 GAMG: Solving for p_rgh, Initial residual = 0.025745004, Final residual = 3.2365845e-08, No Iterations 9 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (water): sum local = 2.6740809e-10, global = 4.043691e-11, cumulative = 1.177383e-05 Solving for solid region fins DICPCG: Solving for h, Initial residual = 0.80769291, Final residual = 5.2976207e-07, No Iterations 25 Min/max T:297.99953 298.00006 ExecutionTime = 4.94 s ClockTime = 6 s Region: lN2 Courant Number mean: 0.34626088 max: 4.0626464 Region: water Courant Number mean: 0.015689499 max: 0.021081137 Region: fins Diffusion Number mean: 11.607087 max: 57.661024 deltaT = 3.5024889e-05 Time = 0.00042424 Solving for fluid region lN2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCGStab: Solving for h, Initial residual = 0.25949184, Final residual = 9.6254955e-08, No Iterations 4 --> FOAM FATAL ERROR: Negative initial temperature T0: -4.4134952 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::rho Const<Foam::specie> >, Foam::sensibleEnthalpy>] in file /home/sivakumar/OpenFOAM/OpenFOAM-v1706/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54. FOAM aborting Thanks for your help, Aadhavan |
|
July 24, 2019, 01:54 |
|
#35 | |
Member
Adam
Join Date: Nov 2018
Posts: 36
Rep Power: 8 |
Quote:
In the constant/PhaseName directory you can create an fvOptions file like this (syntax can vary with your OF version). Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // options { temperatureLimit { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; min 300; max 310; } } } // ************************************************************************* // |
||
July 24, 2019, 03:36 |
|
#36 |
New Member
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7 |
Hi Adam,
Yes, I have seen in another thread and given that fvOption, the case is running. I am really wondering, how it is fixing that issue? what is causing that issue? totally confused. but the case is running..... Also I am wondering why the rho is 0 always? if you have any input please clear it for me... Thanks, Aadhavan |
|
July 24, 2019, 09:32 |
|
#37 |
New Member
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7 |
I found the answer for this question from another thread, I am wondering why the rho is 0 always?[/B]
We can edit it in the thermoPhysicalProperties. Last edited by Aadhavann; July 29, 2019 at 00:59. |
|
July 28, 2019, 21:32 |
|
#38 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Hello Aadhavan!
Sorry for the late answer. I did not recognized the thread immediately I made some changes in the case. Using my working files from other case... See the link. I used your case as a layout. https://drive.google.com/file/d/1aPA...ew?usp=sharing Regards Peter |
|
July 29, 2019, 01:07 |
|
#39 |
New Member
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7 |
Hi Peter,
Guten Tag, Thanks for your response, Since i have no access to the old email id, please give me permission to access the files. new email id is "mahaaadhu@gmail.com" Thanks, Aadhavan Last edited by Aadhavann; July 29, 2019 at 02:34. |
|
July 29, 2019, 08:20 |
|
#40 |
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17 |
Sorry!
Try it now... By the way, having just 3 cells in the height for the region water is really too few! At least you need to have 10 Cells in my opinion, or more... Regards Peter |
|
Tags |
chtmultiregionfoam, error, negative initial temp |
|
|
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 |