CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

TEqn.H

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 27, 2013, 02:10
Default TEqn.H
  #1
Member
 
mohsen kh
Join Date: Jan 2013
Posts: 86
Rep Power: 4
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 write this equation in openfoam.something like this format:

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

TEqn.solve();

I see programmer guide but I don't understand so much.


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 if you know about this


best regards
mohsen
m5m5kh is offline   Reply With Quote

Old   September 2, 2013, 11:33
Default
  #2
Member
 
Join Date: Apr 2013
Posts: 32
Rep Power: 3
rajcfd is on a distinguished road
Quote:
Originally Posted by m5m5kh View Post
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 write this equation in openfoam.something like this format:

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

TEqn.solve();

I see programmer guide but I don't understand so much.


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 if you know about this


best regards
mohsen
Hello mohsen,
You can add a TE eqn file to code. But first simplify the your eqn.
Also to make you understand code-
fvm::ddt(T)
+fvm::div(phi,T)
-fvm::laplacian(alpha,T)

this means
dT/dt + UdT/dx]=k d2T/dx2

also since you are adding new variables like sigma, porosity etc...you need to first define them in the code.

So, add TE eqn to code, define all new variables and include TE eqn it in main code file.... I think this will do.....
rajcfd is offline   Reply With Quote

Old   September 3, 2013, 03:36
Default
  #3
Member
 
mohsen kh
Join Date: Jan 2013
Posts: 86
Rep Power: 4
m5m5kh is on a distinguished road
Quote:
Originally Posted by rajcfd View Post
Hello mohsen,
You can add a TE eqn file to code. But first simplify the your eqn.
Also to make you understand code-
fvm::ddt(T)
+fvm::div(phi,T)
-fvm::laplacian(alpha,T)

this means
dT/dt + UdT/dx]=k d2T/dx2

also since you are adding new variables like sigma, porosity etc...you need to first define them in the code.

So, add TE eqn to code, define all new variables and include TE eqn it in main code file.... I think this will do.....
Hi raj
I did it but it did not work ,would you please send me your contact information to send you my files
m5m5kh is offline   Reply With Quote

Old   September 3, 2013, 07:08
Default
  #4
Member
 
Join Date: Apr 2013
Posts: 32
Rep Power: 3
rajcfd is on a distinguished road
Quote:
Originally Posted by m5m5kh View Post
Hi raj
I did it but it did not work ,would you please send me your contact information to send you my files


send it on che122791@chemical.iitd.ac.in....



regards,

Raj
rajcfd is offline   Reply With Quote

Old   September 3, 2013, 10:09
Default
  #5
Member
 
mohsen kh
Join Date: Jan 2013
Posts: 86
Rep Power: 4
m5m5kh is on a distinguished road
hi Raj
I sent it but it was not delivered
please give me a general email,something like gmail or yahoo,... not an academic one.


Thanks
mohsen

Quote:
Originally Posted by rajcfd View Post
send it on che122791@chemical.iitd.ac.in....



regards,

Raj
m5m5kh 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
uniform heating of fluid region santoo_cfd OpenFOAM 13 June 5, 2014 09:18
Solidification in OpenFoam luke.christ OpenFOAM 24 September 10, 2013 08:50
Differences simpleFoam vs. pimpleFoam / RASModel.H vs turbulenceModel.H uli OpenFOAM Programming & Development 7 January 26, 2013 16:01
simpleFoam with energy equation sega OpenFOAM Programming & Development 6 January 26, 2013 07:42


All times are GMT -4. The time now is 18:17.