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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2019, 08:27
Default
  #41
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
I am sry Peter, still i couldn't access it.
could you please send it to my email mahaaadhu@gmail.com
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 08:40
Default
  #42
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
Hi Peter,


Thanks for your help, the reason for having less cells in the fins area is that the dimension is very small 10e-5.


I will try to increase the cell size.


Thanks for your advise,


Thanks,
Aadhavan
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 10:10
Default
  #43
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Hello!

Use the script to refine the mesh in the important boundaries.

Especially between water and fins...

else the free convection is not calculated right.

And u will have some convergence problems.

I did not calculate with refined mesh yet.

Regards

Peter
Attached Files
File Type: gz Refine.tar.gz (274 Bytes, 21 views)
peterhess is offline   Reply With Quote

Old   July 29, 2019, 10:32
Default
  #44
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
Hi Peter,



thank you very much for you help, sure I will refine the mesh.


could you please tell me how to use the script, do i need to simply execute it?


Thanks,
Aadhavan
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 10:34
Default
  #45
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
yes just execute it...
copy it to case folder and execute from there.
one time to refine 1 time.
and 2 for 2...
by the way, i deactivated the turbulence in the case!
you need to reactivate it if you need it.
peterhess is offline   Reply With Quote

Old   July 29, 2019, 10:44
Default
  #46
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
Thanks Peter,


Sure I will refine the mesh....


Regarding turbulence, yes I have seen it. I will take care of it.


Dankeschön,
Aadhavan
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 10:56
Default
  #47
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
I am Sorry Peter, I tried to use the script.

I am getting error , it says invalid region option.


Usage: refineWallLayer [OPTIONS] <patches> <edgeFraction>
options:
-case <dir> specify alternate case directory, default is the cwd
-decomposeParDict <file>
read decomposePar dictionary from specified location
-noFunctionObjects
do not execute functionObjects
-overwrite overwrite existing mesh/results files
-parallel run in parallel
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-useSet <name> restrict cells to refine based on specified cellSet name
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-v1706 (see www.OpenFOAM.com)
Build: v1706
Arch: "LSB;label=32;scalar=64"



--> FOAM FATAL ERROR:
Wrong number of arguments, expected 2 found 3
Invalid option: -region


FOAM exiting
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 11:01
Default
  #48
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
you need to put it in the folder

lNVapour

and execute it from there.

By me it works.

I use OF6!

I dont know if it works in v1706

try:

refineWallLayer -overwrite '(water_to_fins)' 0.5



Regards

Peter
peterhess is offline   Reply With Quote

Old   July 29, 2019, 11:04
Default
  #49
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
I am sry, is there any problem with the OF version.


I am using 17.06



--> FOAM FATAL ERROR:
Wrong number of arguments, expected 2 found 3
Invalid option: -region
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 11:10
Default
  #50
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
well form the error you get it says that

-region

does not recognized as an option...

This option is avaliable in OF6!

It seams that OF1706

has a problem using

refineWallLayer

U need to refine the original mesh in this case.

Regards

Peter
peterhess is offline   Reply With Quote

Old   July 29, 2019, 11:14
Default
  #51
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
in OF6 this option is avaliable:

Usage: refineWallLayer [OPTIONS] <patches> <edgeFraction>
options:
-case <dir> specify alternate case directory, default is the cwd
-fileHandler <handler>
override the fileHandler
-noFunctionObjects
do not execute functionObjects
-overwrite overwrite existing mesh/results files
-region <name> specify alternative mesh region
-useSet <name> restrict cells to refine based on specified cellSet name
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage

Using: OpenFOAM-6 (see www.OpenFOAM.org)
Build: 6-fa1285188035



--> FOAM FATAL ERROR:
Wrong number of arguments, expected 2 found 0


FOAM exiting
peterhess is offline   Reply With Quote

Old   July 29, 2019, 11:24
Default
  #52
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
is there any advantage using
OpenFOAM 6 or 7


instead of OF17,18,19
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 11:33
Default
  #53
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
I can not answer this question cause I did not make any benchmark between those...

Anyway from the problem we are facing here, at least the near wall refinement works in OF6 for a given region. In our case the water region...

Anyway you are able to refine the wall in the original mesh generated by blockMesh BEFORE you split the mesh to regions...

Using:

splitMeshRegions -cellZones -overwrite
peterhess is offline   Reply With Quote

Old   July 29, 2019, 11:38
Default
  #54
New Member
 
Aadhavan
Join Date: Jul 2019
Location: India
Posts: 17
Rep Power: 7
Aadhavann is on a distinguished road
Oh, its fine Peter....
I usually use 3rd party meshing tool ...


Also I checked the command,



it seems, that functionality is there but I need to figure out how to use it.


refineWallLayer -overwrite ************
Aadhavann is offline   Reply With Quote

Old   July 29, 2019, 11:48
Default
  #55
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Which mesher do you use?

The original mesh is not able to calculate the free convection in the water.

The velocity field is wrong.

And the 3 cells in IN2 between the fins are also too few.

Regards

Peter

Last edited by peterhess; July 30, 2019 at 06:41.
peterhess is offline   Reply With Quote

Old   March 25, 2020, 10:54
Default negative initial temperature error
  #56
New Member
 
pranay
Join Date: Mar 2020
Posts: 7
Rep Power: 6
pranay347 is on a distinguished road
Hi i am also working on CHT with radiation case, initial i too faced issues related to "negative initial temperature error" but i manage to deal with them, i want to know in what this kind of error is about, i mean what are the situations this kind of error will occur ? for me it happened
1) when my memory is less,
2) divschemes changed ( from gauss upwind to gauss linearUpwind ),
i changed the schemes as i got the residual plot for h for solid and fluid region around 0.01 but i gave the tolerance at 1E-6, so how to reduce the residual error?

other issue if i run the steady state simulations for long time i mean endTime= 120 sec for a domain L=0.2m what happens? ( as 0.2 m domain should reach a stable state around 2 sec, but in my case its changing temperature even beyond 2 sec, so i am not sure how long should i run to reach stable state)
pranay347 is offline   Reply With Quote

Old   March 25, 2020, 15:42
Default
  #57
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Well, The most common mistake man makes using this solver is wrong pressure (p_rgh)!

Many users are giving 0 pa if they have an atmospheric pressure...

Instead man must use 1.013e5...

If man use cht*SimpleFoam (SteadyState in old solvers) then the pressure is 0 for atmospheric!!!

Also, very high pressure differences between the regions creats unstability.

Anyway more stabillity could be achieved, if at the outlets istead of zeroGradient, man should use inletOutlet!

Store the results shortly before divergence happens and have a look to the pressure (p_rgh) to see where (at which region) the pressure is wrong or "bad" defined.

Bad mesh also creates such a mistake. It is always a good idea to run checkMesh and be sure the skewness is not to high.

A worng radiation defination creates also such a mistake. Simply turn of the radiation and see if the mistakes went,. In this case man should check up the radiation.

The same for turbulence... If k and/or epsilon properties at the inlets are wrong pre-defined, then such an error could happens, simply turn turbulence of and see what happens.

A good source to define tubulence properties at inlets could be found here:

https://www.simscale.com/forum/t/def...nditions/80895

Very big cells size is a also a problem here. Try a finer mesh and see the results of checkMesh to see if the size of the geomatry is right of you need to rescale.

Regards

Peter

Last edited by peterhess; March 26, 2020 at 13:21.
peterhess is offline   Reply With Quote

Old   March 26, 2020, 09:17
Default
  #58
New Member
 
pranay
Join Date: Mar 2020
Posts: 7
Rep Power: 6
pranay347 is on a distinguished road
Thanks for ur reply Peterhess, its a very good information, currently i have few doubts with my test case:
1) how to decide whether i need to run a steady state or unsteady state ?

2) i found some references in which they took steady state, so i too consider steady state but how long the simulations need to run i mean endTime ? ( i gave initially 2 sec as L=0.2m, 10x0.2m=2, but didnt reach steady state)

3)residual plot for h is fluctuating at 0.01, how to reduce residuals ?( i tried changing divschemes from Gauss upwind to linearUpwind but giving negative temperature error)

4) in my problem 100 watts power supply is applied form bottom surface of heat sink, i gave temperature boundary conditions for heats sink bottom as "exterWallHeatFluxTemperature" with mode "power", Q 100, Ta 544, value 544 (T=544 K i obtained this from radiation formula at 100 watts power ), so is this the correct boundary condition ? or should i apply fixedValue with value as 544 K as this is the temp at 100 watts supply ?

can u please answer these, thanks in advance.
pranay347 is offline   Reply With Quote

Old   March 26, 2020, 13:33
Default
  #59
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by pranay347 View Post
1) how to decide whether i need to run a steady state or unsteady state ?
In the older versions of OF, I think until version OF5.0 there were two solvers for CHT. one for stady state and on for transient.

For steady state the solver called: chtMultiRegionsSimpleFoam

For transient the solver called: chtMultiRegionsFoam

If u use an older versions, then u just need to use the right solver.

Form version 6.0 (I think) those two solvers has been melted in one solver called: chtMultiRegionsFoam Which is for transient cases.

To make this solver works for steady state, you need to go to "ALL" fvSchemes in your case and change the ddtSchemes from Euler (transient) to steadyState (for steady state).

See tutorial: tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger

Regards

Peter

Last edited by peterhess; March 27, 2020 at 13:55.
peterhess is offline   Reply With Quote

Old   March 26, 2020, 13:36
Default
  #60
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
Quote:
Originally Posted by pranay347 View Post
2) i found some references in which they took steady state, so i too consider steady state but how long the simulations need to run i mean endTime ? ( i gave initially 2 sec as L=0.2m, 10x0.2m=2, but didnt reach steady state)
There is no answer for this question cause it depends on so many factors and setups...

Quote:
Originally Posted by pranay347 View Post
3)residual plot for h is fluctuating at 0.01, how to reduce residuals ?( i tried changing divschemes from Gauss upwind to linearUpwind but giving negative temperature error)
I can not comment this questions. My knowledge in schemes is limited!

Quote:
Originally Posted by pranay347 View Post

4) in my problem 100 watts power supply is applied form bottom surface of heat sink, i gave temperature boundary conditions for heats sink bottom as "exterWallHeatFluxTemperature" with mode "power", Q 100, Ta 544, value 544 (T=544 K i obtained this from radiation formula at 100 watts power ), so is this the correct boundary condition ? or should i apply fixedValue with value as 544 K as this is the temp at 100 watts supply ?
Well, this boundary offers the possibility to add heat source:

See 4.8 here:

https://k.kakaocdn.net/dn/cjKN6m/btq...&knm=tfile.pdf

Or add the heat source using fvOptions.

See tutorial:

tutorials/heatTransfer/chtMultiRegionFoam/heatedDuct/


Regards

Peter
peterhess is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, error, negative initial temp


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 Off
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 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


All times are GMT -4. The time now is 14:19.