CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   TEqn.H (https://www.cfd-online.com/Forums/openfoam-pre-processing/122733-teqn-h.html)

m5m5kh August 27, 2013 02:10

TEqn.H
 
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

rajcfd September 2, 2013 11:33

Quote:

Originally Posted by m5m5kh (Post 448232)
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.....

m5m5kh September 3, 2013 03:36

Quote:

Originally Posted by rajcfd (Post 449377)
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

rajcfd September 3, 2013 07:08

Quote:

Originally Posted by m5m5kh (Post 449482)
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

m5m5kh September 3, 2013 10:09

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 (Post 449529)
send it on che122791@chemical.iitd.ac.in....



regards,

Raj



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