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

fvm::div(T) or fvc::div(T)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2013, 22:12
Default fvm::div(T) or fvc::div(T)
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 839
Rep Power: 17
sharonyue is on a distinguished road
Hi guys,

I wanna make a discretisation on a turbulence stress tensor.\nabla \cdot \tau

In this term. \tau  = scale\left( {nut,\nabla U} \right)

In most of the situation, nut is a scalar. After discretisation, you can get:
\nabla  \cdot \tau  = \nabla  \cdot \left( {nut\left( {scalar} \right)\nabla U} \right) = fvm::laplacian\left( {nut,U} \right)

But in my case, nut is a turbulence tensor. So I cant turn it into laplacian term.I have to use fvc::div as follows:
\nabla  \cdot \tau  = \nabla  \cdot \left( {scale\left( {nut\left( {tensor} \right),\nabla U} \right)} \right) = fvc::div\left( {scale\left( {nut,\nabla U} \right)} \right)

But actually, I wanna discretize the term into the matrix equation. But I cant use fvm::div(). What should I do.? Thanks.
sharonyue is offline   Reply With Quote

Old   October 11, 2013, 22:18
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 839
Rep Power: 17
sharonyue is on a distinguished road
BTW.
scaling vector a by vector b would produce vector c whose components are
ci = scale(a, b) = (a1b1, a2b2, a3b3)
sharonyue is offline   Reply With Quote

Old   October 13, 2013, 19:51
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 839
Rep Power: 17
sharonyue is on a distinguished road
Any ideas?
sharonyue is offline   Reply With Quote

Old   October 13, 2013, 20:12
Default
  #4
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 839
Rep Power: 17
sharonyue is on a distinguished road
Am I clear on this topic?
I mean lets say I have a scalar "a" and a tensor "T". So this formula \nabla  \cdot \left( {a\nabla U} \right) in code is:
Code:
fvm::laplacian(a,u);
Regarding this formula:\nabla \cdot  \left( {T} \right)in code is:
Code:
fvc::div(U);
But I want it to be Imp. What should I do?
sharonyue 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



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