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

Add temprature equation in openFoam solver???

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 16, 2015, 05:29
Post Add temprature equation in openFoam solver???
  #1
Member
 
alireza
Join Date: Feb 2015
Posts: 53
Rep Power: 2
rapierrz is on a distinguished road
Hi friends,

I want to add energy equation in below form:

ddt(rho*Cp,T)+div(rho*Cp*U,T)=div(K*grad(T))

that rho and Cp and K vary with volume fraction.for example :

rho = rho1*alpha+(1-alpha)*rho2;

phi define with createCompressiblePhi.H

How I can define rho*Cp*U in div???

I try it with below codes but T has very strange contour and values.

surfaceScalarField phiEnergy
(
IOobject :
(
"phiEnergy",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(rho*Cp*U) & mesh.Sf()
);

Thank you.
rapierrz is offline   Reply With Quote

Old   July 16, 2015, 11:25
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 145
Rep Power: 2
ssss is on a distinguished road
Try using the energy equation used in compressibleInterFoam, it seems to be more stable because it doesnt use the cp in the convective term.

If you want to use your approximation then use:

phicp= phi*fvc::interpolate(cp)

You might also find other approximations in the forum ir you search a bit more
ssss is offline   Reply With Quote

Old   July 16, 2015, 12:35
Default
  #3
Member
 
alireza
Join Date: Feb 2015
Posts: 53
Rep Power: 2
rapierrz is on a distinguished road
Quote:
Originally Posted by ssss View Post
Try using the energy equation used in compressibleInterFoam, it seems to be more stable because it doesnt use the cp in the convective term.

If you want to use your approximation then use:

phicp= phi*fvc::interpolate(cp)

You might also find other approximations in the forum ir you search a bit more
Thank you ssss,

In my case in inlet and outlet i have high gradient but it isn't normal.

how i can remove this unnatural treat???
rapierrz is offline   Reply With Quote

Old   July 16, 2015, 16:59
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 145
Rep Power: 2
ssss is on a distinguished road
Could you describe your testcase, BC, solver, etc?
ssss is offline   Reply With Quote

Old   July 17, 2015, 01:45
Default
  #5
Member
 
alireza
Join Date: Feb 2015
Posts: 53
Rep Power: 2
rapierrz is on a distinguished road
Quote:
Originally Posted by ssss View Post
Could you describe your testcase, BC, solver, etc?
my solver is settlingFoam with small change and my case is dahl with

change in geometry that change to a circular channel.

fisrt I convert settlingFoam from turbulence to laminar then i use it in flow in

a circular pipe.

My BC is the same there is in dahl case and for temperature for top patch:

top
{
type groovyBC;
valueExpression "298";
variables "q=20000;";
gradientExpression "q/K";
fractionExpression "0";
timelines();
value uniform 298;
}

K is thermal conductivity.
rapierrz is offline   Reply With Quote

Reply

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
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Solving Advection-reaction Equation using OpenFoam arijith OpenFOAM Programming & Development 1 October 13, 2014 10:02
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 0 January 1, 2014 20:21
Wave Action Equation Solver for OpenFOAM chyczewski OpenFOAM Programming & Development 7 September 4, 2013 11:06
Memory protection in OpenFOAM / combinig with FORTRAN botp OpenFOAM Programming & Development 1 February 6, 2013 05:26


All times are GMT -4. The time now is 22:08.