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

linear distributed initial temperature

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By thiagopl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2020, 11:59
Default linear distributed initial temperature
  #1
New Member
 
Join Date: Jan 2020
Posts: 26
Rep Power: 6
PSander is on a distinguished road
I need to calculate the heatflux of a pipe filled with a fluid, which is surrounded by soil.
The initial temperature of the soil should be linear distributed along the vertical axis, for example 303°K at the surface and 293°K at the bottom, which means that in between temperature has to be linear distributed.
What kind of boundary condition allows me to handle the behavoir of the temperature?
I found some threads about groovyBC or codedfixedvalue, but I'm not sure how to implement them and if they are actually useful for this purpose.

Thank you in adavance for your help!
PSander is offline   Reply With Quote

Old   April 14, 2020, 15:03
Default
  #2
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 65
Rep Power: 15
thiagopl is on a distinguished road
Hi PSander,


To set a internalField with a linear behaviour you can use funkySetFields. For this you need the swak4Foam. You can follow the steps bellow to install it. It worked for me recently.

Code:
sudo apt-get install bison
sudo apt-get install mercurial
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam -u develop
cd swak4Foam
./maintainanceScripts/compileRequirements.sh
./Allwmake

Once installed check this example which creates a linear internalField for pressure. It is analogous of what you want.
PSander likes this.
__________________
Fields of interest: buoyantFoam, chtMultRegionFoam.
thiagopl is offline   Reply With Quote

Old   April 15, 2020, 11:45
Default
  #3
New Member
 
Join Date: Jan 2020
Posts: 26
Rep Power: 6
PSander is on a distinguished road
Thank you a lot thiagopl, this was exactly what I was looking for.
It does what it is meant to do but unfortunately when I used my model, one boundary condition (turbulentTemperatureCoupledBaffleMixed) between soil and pipe produced a Fatal Error:

--> FOAM FATAL IO ERROR:
Unknown patchField type compressible::turbulentTemperatureCoupledBaffleMix ed for patch type mappedWall

Valid patchField types are :...
-->


I've modified this condition to check it, and it worked indeed, however, I would like to remain with turbulentTemperatureCoupledBaffleMixed if it's posible. Is there a solution to implement it or what would you recommend me to do?
PSander is offline   Reply With Quote

Reply

Tags
codedfixedvalue, groovybc, temperature bc, temperature distribution


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
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 15:26
chtMultiRegionSimpleFoam turbulent case Aditya Patil OpenFOAM Running, Solving & CFD 6 April 24, 2017 23:13
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 12:08
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34


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