|
[Sponsors] |
Add temprature equation in openFoam solver??? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 16, 2015, 06:29 |
Add temprature equation in openFoam solver???
|
#1 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
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. |
|
July 16, 2015, 12:25 |
|
#2 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
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 |
|
July 16, 2015, 13:35 |
|
#3 | |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
Quote:
In my case in inlet and outlet i have high gradient but it isn't normal. how i can remove this unnatural treat??? |
||
July 16, 2015, 17:59 |
|
#4 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Could you describe your testcase, BC, solver, etc?
|
|
July 17, 2015, 02:45 |
|
#5 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
Memory protection in OpenFOAM / combinig with FORTRAN | botp | OpenFOAM Programming & Development | 2 | February 15, 2016 13:25 |
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 11:02 |
Wave Action Equation Solver for OpenFOAM | chyczewski | OpenFOAM Programming & Development | 7 | September 4, 2013 12:06 |