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

Add temprature equation in openFoam solver???

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By rapierrz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2015, 05:29
Post Add temprature equation in openFoam solver???
  #1
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
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.
elham usefi likes this.
rapierrz is offline   Reply With Quote

Old   July 16, 2015, 11:25
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
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
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
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: 205
Rep Power: 12
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
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
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


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


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