CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Negative initial temperature error (chtMultiRegionFoam)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 24, 2018, 12:31
Default
  #21
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
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
peterhess is offline   Reply With Quote

Old   September 24, 2018, 13:18
Default
  #22
New Member
 
jebin george
Join Date: Sep 2018
Posts: 16
Rep Power: 2
jebin is on a distinguished road
Thank You

Its working


Regards

Jebin
jebin is offline   Reply With Quote

Old   October 10, 2018, 08:52
Default
  #23
New Member
 
jebin george
Join Date: Sep 2018
Posts: 16
Rep Power: 2
jebin is on a distinguished road
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:
Solving for fluid region air
DILUPBiCGStab: Solving for Ux, Initial residual = 0.075587, Final residual = 0.00112334, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.0705004, Final residual = 0.00120841, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 0.0663973, Final residual = 0.00103926, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 0.087933, Final residual = 0.00234216, No Iterations 1
Min/max T:122.598 320.962
GAMG: Solving for p_rgh, Initial residual = 0.157459, Final residual = 0.000953278, No Iterations 7
time step continuity errors : sum local = 2.08971e-08, global = 4.83861e-10, cumulative = 4.83861e-10
Min/max rho:1.25 1.25
DILUPBiCGStab: Solving for epsilon, Initial residual = 0.165587, Final residual = 8.44694e-05, No Iterations 1
DILUPBiCGStab: Solving for k, Initial residual = 0.105424, Final residual = 0.0102582, No Iterations 1

Solving for solid region sink1
DICPCG: Solving for h, Initial residual = 0.0576979, Final residual = 0.000793985, No Iterations 2
Min/max T:273 273.254

Solving for solid region sink2
DICPCG: Solving for h, Initial residual = 0.0944488, Final residual = 0.00107547, No Iterations 2
Min/max T:240.337 273.904

Solving for solid region sink3
DICPCG: Solving for h, Initial residual = 0.0643086, Final residual = 0.00210273, No Iterations 2
Min/max T:268.778 273.556

Solving for solid region sink4
DICPCG: Solving for h, Initial residual = 0.05523, Final residual = 0.000666788, No Iterations 2
Min/max T:273 273.308
ExecutionTime = 1.05 s ClockTime = 1 s

Region: air Courant Number mean: 0.000203566 max: 1.31177
Region: sink1 Diffusion Number mean: 1.79415e-05 max: 0.00359824
Region: sink2 Diffusion Number mean: 1.80059e-05 max: 0.00593493
Region: sink3 Diffusion Number mean: 1.81173e-05 max: 0.00360216
Region: sink4 Diffusion Number mean: 1.80638e-05 max: 0.00360216
deltaT = 2.43604e-07
Time = 2.48342e-05


Solving for fluid region air
DILUPBiCGStab: Solving for Ux, Initial residual = 0.0829321, Final residual = 0.00126764, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.0767867, Final residual = 0.00128333, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 0.0724016, Final residual = 0.00113569, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 0.116394, Final residual = 0.0100272, No Iterations 1
Min/max T:13.397 332.724
GAMG: Solving for p_rgh, Initial residual = 0.134862, Final residual = 0.00106243, No Iterations 5
time step continuity errors : sum local = 2.33079e-08, global = 1.07985e-09, cumulative = 1.07985e-09
Min/max rho:1.25 1.25
DILUPBiCGStab: Solving for epsilon, Initial residual = 0.19324, Final residual = 7.02936e-05, No Iterations 1
DILUPBiCGStab: Solving for k, Initial residual = 0.111151, Final residual = 0.00946878, No Iterations 1

Solving for solid region sink1
DICPCG: Solving for h, Initial residual = 0.0523745, Final residual = 0.000721598, No Iterations 2
Min/max T:273 273.252

Solving for solid region sink2
DICPCG: Solving for h, Initial residual = 0.108476, Final residual = 0.00117726, No Iterations 2
Min/max T:213.326 274.044

Solving for solid region sink3
DICPCG: Solving for h, Initial residual = 0.0617277, Final residual = 0.00217327, No Iterations 2
Min/max T:265.775 273.556

Solving for solid region sink4
DICPCG: Solving for h, Initial residual = 0.0500799, Final residual = 0.00060383, No Iterations 2
Min/max T:273 273.291
ExecutionTime = 1.11 s ClockTime = 1 s

Region: air Courant Number mean: 0.000159806 max: 1.33704
Region: sink1 Diffusion Number mean: 1.36773e-05 max: 0.00274305
Region: sink2 Diffusion Number mean: 1.37265e-05 max: 0.00452438
Region: sink3 Diffusion Number mean: 1.38114e-05 max: 0.00274604
Region: sink4 Diffusion Number mean: 1.37705e-05 max: 0.00274604
deltaT = 1.82197e-07
Time = 2.50164e-05


Solving for fluid region air
DILUPBiCGStab: Solving for Ux, Initial residual = 0.0873665, Final residual = 0.00139368, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.0808745, Final residual = 0.00136352, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 0.074665, Final residual = 0.00119347, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 0.152651, Final residual = 0.0109152, No Iterations 1
Min/max T:-171.22 350.329
GAMG: Solving for p_rgh, Initial residual = 0.143484, Final residual = 0.000942494, No Iterations 6
time step continuity errors : sum local = 1.85403e-08, global = -2.16911e-10, cumulative = -2.16911e-10
Min/max rho:1.25 1.25
DILUPBiCGStab: Solving for epsilon, Initial residual = 0.21113, Final residual = 5.87881e-05, No Iterations 1
DILUPBiCGStab: Solving for k, Initial residual = 0.103981, Final residual = 0.00802518, No Iterations 1

Solving for solid region sink1
DICPCG: Solving for h, Initial residual = 0.0479425, Final residual = 0.000661248, No Iterations 2
Min/max T:273 273.249

Solving for solid region sink2
DICPCG: Solving for h, Initial residual = 0.128372, Final residual = 0.00130444, No Iterations 2
Min/max T:165.642 274.195

Solving for solid region sink3
DICPCG: Solving for h, Initial residual = 0.061425, Final residual = 0.00225856, No Iterations 2
Min/max T:261.364 273.517

Solving for solid region sink4
DICPCG: Solving for h, Initial residual = 0.0457474, Final residual = 0.000550226, No Iterations 2
Min/max T:273 273.277
ExecutionTime = 1.16 s ClockTime = 1 s

Region: air Courant Number mean: 0.00012424 max: 1.35926
Region: sink1 Diffusion Number mean: 1.02296e-05 max: 0.00205159
Region: sink2 Diffusion Number mean: 1.02663e-05 max: 0.00338388
Region: sink3 Diffusion Number mean: 1.03298e-05 max: 0.00205382
Region: sink4 Diffusion Number mean: 1.02993e-05 max: 0.00205382
deltaT = 1.34041e-07
Time = 2.51504e-05


Solving for fluid region air
DILUPBiCGStab: Solving for Ux, Initial residual = 0.0913099, Final residual = 0.00151306, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.084689, Final residual = 0.00143228, No Iterations 1
DILUPBiCGStab: Solving for Uz, Initial residual = 0.0761007, Final residual = 0.00122369, No Iterations 1
DILUPBiCGStab: Solving for h, Initial residual = 0.19134, Final residual = 0.0120598, No Iterations 1


--> FOAM FATAL ERROR:
Negative initial temperature T0: -171.22

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/ubuntu/OpenFOAM/OpenFOAM-6/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::species::thermo<Foam::hConstThermo<Foam::rho Const<Foam::specie> >, Foam::sensibleEnthalpy>::THs(double, double, double) const at ??:?
#3 Foam::heRhoThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::singleComponentMixture<F oam::constTransport<Foam::species::thermo<Foam::hC onstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::calculate() at ??:?
#4 Foam::heRhoThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::singleComponentMixture<F oam::constTransport<Foam::species::thermo<Foam::hC onstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > > >::correct() at ??:?
#5 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/chtMultiRegionFoam"
Aborted (core dumped)

-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
jebin is offline   Reply With Quote

Old   October 10, 2018, 13:54
Default
  #24
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
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
peterhess is offline   Reply With Quote

Old   October 10, 2018, 15:27
Default
  #25
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
Importing Multiple Meshes
peterhess is offline   Reply With Quote

Old   October 11, 2018, 03:49
Default
  #26
New Member
 
jebin george
Join Date: Sep 2018
Posts: 16
Rep Power: 2
jebin is on a distinguished road
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
jebin is offline   Reply With Quote

Old   October 11, 2018, 10:04
Default Salome multi regions export to openFoam using *.UNV
  #27
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
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 08:07.
peterhess is offline   Reply With Quote

Old   October 12, 2018, 08:08
Default
  #28
New Member
 
jebin george
Join Date: Sep 2018
Posts: 16
Rep Power: 2
jebin is on a distinguished road
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 09:29.
jebin is offline   Reply With Quote

Old   October 12, 2018, 08:39
Default
  #29
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
Quote:
Originally Posted by jebin View Post
Hi Peter

I will run the simulation soon.
What is the use of renumberMesh -region FLUID -overwrite command?

Regards
Jebin
renumberMesh do renumber the cells bandwidth. This command is for this simple case unnecessary and could be deleted.

https://openfoamwiki.net/index.php/RenumberMesh

Last edited by peterhess; October 12, 2018 at 12:34.
peterhess is offline   Reply With Quote

Old   October 13, 2018, 00:13
Default Salome multi regions export to openFoam using salomeToOpenFOAM.py
  #30
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
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 03:31.
peterhess is offline   Reply With Quote

Old   October 14, 2018, 12:16
Default
  #31
New Member
 
jebin george
Join Date: Sep 2018
Posts: 16
Rep Power: 2
jebin is on a distinguished road
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
jebin is offline   Reply With Quote

Old   October 14, 2018, 12:41
Default
  #32
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Germany
Posts: 110
Rep Power: 9
peterhess is on a distinguished road
Quote:
Originally Posted by jebin View Post

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 ?
I can not answer this. I do not know...

Quote:
Originally Posted by jebin View Post

-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.
You do not define any mappedWalls in Salome!

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 11:50.
peterhess is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, error, negative initial temp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 14:05
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 18:17
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 08:35
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13


All times are GMT -4. The time now is 17:38.