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

Adding two Energy Equations to Porous Solver

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

Like Tree1Likes
  • 1 Post By Cyp

Reply
 
LinkBack Thread Tools Display Modes
Old   October 29, 2013, 11:38
Default Adding two Energy Equations to Porous Solver
  #1
New Member
 
Faraj
Join Date: Feb 2010
Posts: 22
Rep Power: 8
Filankes is on a distinguished road
Hello everyone,

I want to simulate porous media with solid heat transfer.

I am going to add "addTwoEquationsEnthalpy" to hEqn.h

fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
);
pZones.addTwoEquationsEnthalpySource(thermo, gamma, ts, hEqn);
hEqn.relax();
hEqn.solve();
thermo.correct();

Apart from it I should add tsEqn.h equation somewhere in solver folder "I guess so"

fvScalarMatrix tsEqn
(
-fvm::laplacian(kappa,ts)
);
pZones.addTwoEquationsTsSource(thermo, gamma, ts, tsEqn);
tsEqn.relax();
tsEqn.solve();}

Here "kappa" is convection constant and "ts" is temperature of solid.

I just don't know the procedure of adding this equation to the solver. If you could help me, that would be very nice. Thank you.
Filankes is offline   Reply With Quote

Old   October 30, 2013, 17:19
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 245
Rep Power: 10
Cyp is on a distinguished road
Is your simulation domain only a porous medium ? In that case, I suggest you to program your own solver. You will get what you are doing under control !

Here is a full tutorial to program a 2 temperatures heat transfer solver in porous media (from slide #60)
https://www.imft.fr/IMG/pdf/INITIATI...OME_1v3-05.pdf

Everything is in French (I prepare an english version.. but not for now) but there is all the snippets and you could easily understand what you have to code.

Regards,
Cyp
Bahram likes this.
Cyp is offline   Reply With Quote

Old   December 3, 2013, 06:20
Default
  #3
New Member
 
Faraj
Join Date: Feb 2010
Posts: 22
Rep Power: 8
Filankes is on a distinguished road
This is perfrect, Thank you very much. I already started to modification of the solvers.

My simulation domain is partially (20 %) porous medium.
Filankes 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 based steady state solver. atareen64 OpenFOAM Running, Solving & CFD 6 May 6, 2011 11:21
Maths problem when deriving conservation of energy equations. Demonwolf Main CFD Forum 1 June 15, 2009 14:21
free " ordinary differential equations solver" ztdep Main CFD Forum 2 March 21, 2006 02:58
Porous media convection UDS equations cp FLUENT 1 September 19, 2003 19:53
Navier-stokes equations and iterative solver?? wuliang Main CFD Forum 2 January 13, 2003 23:28


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