# TEqn.H

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

 August 27, 2013, 01:10 TEqn.H #1 Member   mohsen kh Join Date: Jan 2013 Location: Iran Posts: 88 Rep Power: 6 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

September 2, 2013, 10:33
#2
Member

Join Date: Apr 2013
Posts: 32
Rep Power: 5
Quote:
 Originally Posted by m5m5kh 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.....

September 3, 2013, 02:36
#3
Member

mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 88
Rep Power: 6
Quote:
 Originally Posted by rajcfd 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

September 3, 2013, 06:08
#4
Member

Join Date: Apr 2013
Posts: 32
Rep Power: 5
Quote:
 Originally Posted by m5m5kh 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

September 3, 2013, 09:09
#5
Member

mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 88
Rep Power: 6
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 send it on che122791@chemical.iitd.ac.in.... regards, Raj

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post santoo_cfd OpenFOAM Running, Solving & CFD 15 March 18, 2016 04:32 luke.christ OpenFOAM 24 September 10, 2013 07:50 uli OpenFOAM Programming & Development 7 January 26, 2013 16:01 sega OpenFOAM Programming & Development 6 January 26, 2013 07:42

All times are GMT -4. The time now is 00:22.