CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Heat source problem chtMultiregionSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By mwaqas
  • 1 Post By pete20r2
  • 1 Post By pete20r2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2018, 01:55
Default Heat source problem chtMultiregionSimpleFoam
  #1
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello Everyone,


I am using OF50 for 2D steady state conjugate heat transfer problem (using chtMultiregionSimpleFoam) with heat source. I have 84 disconnected solid region (blue part in image) and fluid passing across solid regions (green part). I have used following fvOptions file for heat source
Quote:
energySource
{
type scalarSemiImplicitSource;
active true;
selectionMode all;
scalarSemiImplicitSourceCoeffs
{
volumeMode specific;//
selectionMode all;
injectionRateSuSp
{
h (89878 0); // q in [W]; or in [W/m³] if you use specific mode (90570 0)
}
}
}
I have placed this fvOptions file in every system/solid.

The heat source is correct for my setup because same heat source has been used in Ansys and giving physical results.
In my case (OpenFOAM), I used 298K as initial temperature for both solid and fluid regions. Once I start simulation, the temperature keep on increasing for both sold and fluid region (I checked temperature rise up to 500K in 50000 iteration). I am unable to figure out my mistake. Could anyone please tell me the right direction to look for my mistake. I have attached my log file with it (due to size constraints I could not attach my complete log file).





Moreover, I have used same simulation setup for transient case with initial temperature of solid 333K and it was fine with results comparable with ansys as well as experiments.


PS: Unfortunately, I cannot share my entire case here


Regards
Attached Images
File Type: png 1.png (30.8 KB, 21 views)
Attached Files
File Type: txt log.txt (114.3 KB, 5 views)
marcoberna23 likes this.
mwaqas is offline   Reply With Quote

Old   August 24, 2018, 03:12
Default
  #2
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
1.5W each cell shouldn't make temperatures like that!
Can you share fvSchemes and fvSolution for solid and fluid region?
Which version are you on? v1712 introduced sub-looping which is worth checking out.
v1712 Improvements
pete20r2 is offline   Reply With Quote

Old   August 24, 2018, 03:26
Default
  #3
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Thank you for your reply. I am using OFv5.0. I didn't try v1712. Here is my fvScheme, fvSolution and thermophysical properties for both fluid and solids. Exactly, this heat should not increase that much temperature.


As I mentioned in my above post, the same heat source with same fluid velocity and physical data has been used in Ansys and results are physical (max temp rise was 303k from 298).
Moreover I did transient simulation using the exactly same physical properties and fluid velocity but that was without heat source (only initial temp of 333k of solid regions).


Regards
Attached Files
File Type: txt fvSolution.txt (1.1 KB, 19 views)
File Type: txt fvSchemes.txt (1.2 KB, 11 views)
File Type: txt thermophysicalProperties_fluid.txt (1.4 KB, 8 views)
File Type: txt thermophysicalProperties_solid.txt (1.3 KB, 8 views)
mwaqas is offline   Reply With Quote

Old   August 24, 2018, 03:33
Default
  #4
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
here is the fvscheme and fvSolution for fluid region. In previous post were for solid regions
Attached Files
File Type: txt fvSchemes_fluid.txt (1.5 KB, 13 views)
File Type: txt fvSolution_fluid.txt (1.8 KB, 13 views)
mwaqas is offline   Reply With Quote

Old   August 24, 2018, 05:31
Default
  #5
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Your set up seems logical. I would probably remove or reduce the relaxation from the solid domains, since it slows things down, but you are currently adding 89878 W/m³. This a 2D Simulation. Have you thought about the depth of your case? Is that included correctly in that ?
Bloerb is offline   Reply With Quote

Old   August 24, 2018, 06:31
Default
  #6
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello Bloreb,


Thank you for your reply. As it is a 2D simulation and top and bottom part have empty patch type. I don't think so the depth will matter (as far as your question, I didn't change depth of my domain). Actually, I had started with 0.6 relaxation factor but it was too slow to converge but still there was continuous increase in temperature.


I was playing around with different parameters, I have noticed one strange thing. I used following function in controlDict to check the density of my fluid (liquid).



Quote:
functions
{
inletFlux
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
writeControl timeStep;
log true;
writeFields false;
regionType patch;
region fluid;
name fluid_to_inlet1;
operation average;
fields
( rho );
}

I am using equationofState rhoConst and in this case one has to define density specifically at the end of thermoPhysicalProperties. In my case I have defined density 1660 but the above function always give average value of 2 for rho.

Then I checked for OpenFOAM tutorial where above function calculates air density as 1.18 (Mean above controlDict function is working correctly). But no matter what value of rho I use in my case, it always calculate rho =2.
mwaqas is offline   Reply With Quote

Old   August 24, 2018, 07:29
Default
  #7
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
give this a whirl:

in fvOptions:
Code:
limitT{
	type	limitTemperature;
	active	yes;

	limitTemperatureCoeffs
	{
		selectionMode	all;
		min		5;
		max		1000;
	}
}
in fvSolution:
Code:
solvers
{
    h
    {
        solver          PCG
        preconditioner  DIC;
        tolerance       1e-9;
        relTol          0;
    }
}

relaxationFactors
{
    fields
    {

    }
    equations
    {
        h               1;
    }
}
If this goes nuts, try chucking the limitT fvOption on the fluid too.
You may also need to lower UR of h to .9999 for initial steps, it's very sensitive.

Once you have this running I'd suggest you look again at the accuracy you want. I suspect over your operating range hydro-fluoro ethers will exhibit substantial enough changes in thermophysical properties that it would be worth implementing some of the more advanced equations of state.

I nearly forgot, try using the frozenFlow switch once your fluid field is converged. Since your fluid properties are not dependent on T field at this stage you can solve for T field alone with converged fluid field.
Throw this is the fvSolution for the fluid:
Code:
SIMPLE
{
    momentumPredictor yes;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       100000;
    rhoMin          0.2;
    rhoMax          2;
    frozenFlow		true;
}
This is not runtime modifiable as far as I know so you'll have to stop the run, change the switch and continue. It will now only solve for h.

How are you managing 84 solid regions?? I hope you have the folders symlinked!
mwaqas likes this.
pete20r2 is offline   Reply With Quote

Old   August 24, 2018, 07:37
Default
  #8
Senior Member
 
Peter Baskovich
Join Date: Jul 2014
Posts: 127
Rep Power: 11
pete20r2 is on a distinguished road
Quote:
Originally Posted by mwaqas View Post

Then I checked for OpenFOAM tutorial where above function calculates air density as 1.18 (Mean above controlDict function is working correctly). But no matter what value of rho I use in my case, it always calculate rho =2.
You have rhoMax and rhoMin set in fvSolution, you can either make them both the same value as the one given in thermoPhysicalProperties or remove them.
mwaqas likes this.
pete20r2 is offline   Reply With Quote

Old   August 25, 2018, 03:42
Default
  #9
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Thank you so much Peter for your help. You are life saver for me . I didn't noticed that there is a limit on density in fvSolution. I didn't try yet but I am pretty much sure that the problem was with my value of rho. Because I have checked the value of rho in my transient solition and there it is using correct value of it. I will remove limits on rho and update about my result.
mwaqas is offline   Reply With Quote

Reply


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
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 13:14
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 18:28.