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

Stream-wise periodic heat transfer using fvOptions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2015, 04:02
Default Stream-wise periodic heat transfer using fvOptions
  #1
New Member
 
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 14
hrvig is on a distinguished road
Dear all,

I modelling fully developed flow in a pipe having streamwise periodic dimensions. I am to investigate heat transfer and pressure drop characteristics. The momentum equation is corrected using the fvOptions:
Quote:
momentumSource
{
type pressureGradientExplicitSource;
active true;
selectionMode all;

pressureGradientExplicitSourceCoeffs
{
fieldNames (U);
Ubar ( 0 0 35 );
}
}
which works just fine for the velocity alone. I want to obtain a fully developed thermal boundary layer as well. I found the channelFoam.C fine which contains an example of how the velocity can be updated:
Quote:
// Correct driving force for a constant mass flow rate

// Extract the velocity in the flow direction
dimensionedScalar magUbarStar =
(flowDirection & U)().weightedAverage(mesh.V());

// Calculate the pressure gradient increment needed to
// adjust the average flow-rate to the correct value
dimensionedScalar gragPplus =
(magUbar - magUbarStar)/rAU.weightedAverage(mesh.V());

U += flowDirection*rAU*gragPplus;

gradP += gragPplus;

Info<< "Uncorrected Ubar = " << magUbarStar.value() << tab
<< "pressure gradient = " << gradP.value() << endl;
As I am quite new to C++ programming (still learning), I am having a hard to correct the temperature. I am using a modified simpleFoam solver which includes the temperature as a passive scalar:
Quote:
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

// --- Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"
#include "pEqn.H"
}

turbulence->correct();

fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);

TEqn.solve();

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Can anyone give hints on how to make the temperature scalar periodic to obtain a constant area average temperature field at the inlet of my geometry?

Best,
Jakob

Last edited by hrvig; March 30, 2015 at 11:47.
hrvig is offline   Reply With Quote

Old   March 30, 2015, 09:47
Default
  #2
New Member
 
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 14
hrvig is on a distinguished road
Did anyone make the temperature distribution cyclic using the fvOptions functionality of OpenFOAM 2.2?
The temperature can be considered as a passive scalar and therefore the energy equation is not solved.

For the velocity I added a source term to the momentum equation using
Quote:
momentumSource
{
type pressureGradientExplicitSource;
active true;
selectionMode all;

pressureGradientExplicitSourceCoeffs
{
fieldNames (U);
Ubar ( 0 0 35 );
}
}
What about the temperature if I want to set the upstream mean temperature? I use constant wall temperature.

Best,
Jakob
hrvig is offline   Reply With Quote

Old   April 3, 2015, 13:31
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Jakob,

I've moved your 2nd post from another thread: http://www.cfd-online.com/Forums/ope...m-2-2-2-a.html - because it was a bit out of context back there. Technically, the answer to your second post is: the "fvOption" "pressureGradientSource" only changes the pressure and flow fields, it does not affect directly all other fields.

As for your question from both posts, it seems you've managed to solve this issue, according to what you wrote on this thread: http://www.cfd-online.com/Forums/ope...tml#post539477 - posts #8 and onward

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 3, 2015, 17:56
Default
  #4
New Member
 
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 14
hrvig is on a distinguished road
Hi Bruno,

Sorry for bring unclear. What I actually wanted to do was to use the new fvOptions to change a passive scalar field. I found options such as "scalarcodedsource" which I guess could do what I needed.

Anyway, I guess modifying the solver directly is still the way to go in most cases.

Best,
Jakob
hrvig is offline   Reply With Quote

Old   March 21, 2017, 11:13
Default
  #5
CI8
New Member
 
Edoardo Cascioli
Join Date: Mar 2017
Posts: 3
Rep Power: 9
CI8 is on a distinguished road
Send a message via Skype™ to CI8
I have the same need. Have you solved this issue?
CI8 is offline   Reply With Quote

Old   March 22, 2017, 09:17
Default
  #6
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hello

what you can do is to use a semiImplicitSource, but first you need to know your heat flux, so you can get an idea of the input power. If you are working without density and specific heat capacity, then divide your heat source value by them, and use it in your fvOptions.

I hope that it would be helpful.

PS: hello Edoardo
agustinvo is offline   Reply With Quote

Old   March 22, 2017, 11:39
Default
  #7
CI8
New Member
 
Edoardo Cascioli
Join Date: Mar 2017
Posts: 3
Rep Power: 9
CI8 is on a distinguished road
Send a message via Skype™ to CI8
Hi agustinvo, thanks! Let's continue on the other discussion:

Heat source using fvOptions in laplacianFoam

Ps. Ciao Agustin!!!
CI8 is offline   Reply With Quote

Reply

Tags
cyclic heat transfer, periodic heat transfer


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
High values of heat transfer coefficient for laminar flow in pipe Allankey CFX 2 May 28, 2014 13:44
Porous domain:Interfacial area density and heat transfer coefficient l.te CFX 2 May 18, 2014 00:45
Boussinesq with periodic heat transfer kiurigan FLUENT 0 December 5, 2013 13:22
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
periodic flows and heat transfer? scarecrow FLUENT 3 December 2, 2003 01:59


All times are GMT -4. The time now is 21:52.