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

Writing the following equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2017, 17:08
Default Writing the following equation
  #1
New Member
 
Achuth Nair Balachandran Nair
Join Date: Apr 2017
Location: Austria
Posts: 3
Rep Power: 9
Achuth is on a distinguished road
Hello,

I am working with multiphase flow through a porous medium and I am implementing the temperature equation. I have a doubt regarding how the following convection term needs to be implemented.

(rho*cp) * u * del(T)

How I have implemented it is: rhocf * fvm::div(Uf,T)
where Uf = fvc::interpolate(U) & mesh.Sf();

Is it right? Or should I take the temperature field as a fvc::grad(T) to be precise.

I would really appreciate the help!
Achuth is offline   Reply With Quote

Old   July 14, 2017, 04:23
Default
  #2
Member
 
Join Date: Mar 2015
Posts: 36
Rep Power: 11
K.C. is on a distinguished road
I don't know exactly your meaning of del(T).

I guess you want to implement the advection of your temperature-field, right?
This would mean for constant density and heat capacity your equation reads:

dT/dt = -divergence(u*T) as differential equation.

Most of the time divergence(u) = 0. Therefore you will see dT/dt = -u*gradient(T) most of the time, but the equation above is more generall.

Therfore you need fvc:: (Uf*T_face) for explicit or fvm:: (Uf,T) for implicit discretisation (and fvm::ddt(T)).

I hope this was usefull for you.
K.C. is offline   Reply With Quote

Old   July 14, 2017, 17:40
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
See this presentation pages 84 to 93. See also pages 100 to 108 for a 2 temperatures model.

Cheers,
Cyprien
Cyp is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Derivation of the Temperature Equation Tobi OpenFOAM Programming & Development 21 April 10, 2018 22:15
Writing an equation of state FAKHREDDINE CFX 2 April 3, 2017 12:08
Pressure distribution on a wall darazsbence CFX 17 October 6, 2015 10:38
Basic question about writing a differential equation related to finite element RbBb Main CFD Forum 1 April 10, 2014 03:50
How to? Extra term in k-e equation. Implicit-Explicit be_inspired OpenFOAM Programming & Development 1 March 19, 2013 10:50


All times are GMT -4. The time now is 14:34.