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

energy equation for porousSimpleFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 26, 2013, 11:41
Default energy equation for porousSimpleFoam
  #1
Member
 
mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 86
Rep Power: 5
m5m5kh is on a distinguished road
Hi dear foamers
I do not know how to add an energy equation to my solver (porousSimpleFoam).my flow is incompressible and I do not know how to add TEqn.H to my own solver.what should I do with (rho of fluid, Cp of it and also Sigma,k and q"') ? while the equation the equation is something like this:

rho(fluid)*Cp(fluid)[sigma dt/dt + Udt/dx]=k d2T/dx2 + q'" + (mu/K) u^2

Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f

q"' = (1- porosity) q'"s

k= (porosity*kf) + (1- porosity)*ks

please help me.



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


TEqn.solve();


what should I do with these kf,ks,.... how and where should I define them?
Just right them in transportProperties in constant folder?

Best regards
Mohsen
m5m5kh is offline   Reply With Quote

Old   August 30, 2013, 23:50
Default energy equation for porousSimpleFoam
  #2
Member
 
mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 86
Rep Power: 5
m5m5kh is on a distinguished road
hi dear Foamers

has anyone write this equation for his/her solver?
I need emergent help in this case.
I understand how to define my porous zone
I want to add the energy equation to my solver
I did it but didn't work
I am here to ask you if you would help me or not
I'm looking forward to your reply my friend
I hope you can help me by your useful comments
my equation is something like this

rho(fluid)*Cp(fluid)[sigma dT/dt + UdT/dx]=k d2T/dx2 + q'" + (mu/K) u^2

Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f

q"' = (1- porosity) q'"s

k= (porosity*kf) + (1- porosity)*ks

I also don't know how and where to define sigma,k...

best regards
Mohsen
m5m5kh is offline   Reply With Quote

Old   August 31, 2013, 08:04
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,488
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Mohsen,

Have a look into the solver rhoPorousSimpleFoam. The source code for it is located at "applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/". You can see the full path to it by running:
Code:
echo $FOAM_SOLVERS/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/
This solver relies on enthalpy/energy exchanges, as solved in the file "EEqn.H". From it you can extract the current temperature from the "he" variable... although I'm not sure how exactly .
Or you can modify this equation to work the other way around, namely to solve the temperature and then calculate whatever else is needed.

Good luck! Best regards,
Bruno
wyldckat 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
energy equation in rhoCentralFoam nakul OpenFOAM 0 October 10, 2010 15:07
Pohlhausen energy equation MATLAB help abe_cooldude Main CFD Forum 2 May 3, 2010 16:58
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 06:06
How to discretize of energy equation ?? Asghari FLUENT 0 October 12, 2006 08:09
energy equation formulation Pedro Phoenics 1 July 5, 2001 12:17


All times are GMT -4. The time now is 10:41.