CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

how to obtain divergence via FVM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2012, 02:04
Default how to obtain divergence via FVM
  #1
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
hello everyone
I need to calculate a form like div (coef * grad Phi), I think it is better to assemble it as a summation of fluxes around a control volume . Can you please tell me how to implement it via fortran?Thank you very much!

Regards!

lg88
lg88 is offline   Reply With Quote

Old   March 25, 2012, 06:43
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
What is Phi? Is the coefficient a constant?
ghorrocks is offline   Reply With Quote

Old   March 26, 2012, 00:05
Default
  #3
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
Phi is a additional variable and the coef is a constant.Thank you for your help.


Regards

lg88
lg88 is offline   Reply With Quote

Old   March 26, 2012, 00:51
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You might be able to do this without fortran. If you define an algebraic additional variable as phi.grad, then take the div of that algebraic additional variable you might be able to do it entirely in CEL. Then you don't need to worry about the details of summing fluxes and all that.
ghorrocks is offline   Reply With Quote

Old   March 26, 2012, 01:26
Default
  #5
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
Thanks to ghorrocks.After I get the phi.grad ,how can I take the div of that algebraic additional variable?Are there any use like .grad?

Regards!

lg88
lg88 is offline   Reply With Quote

Old   March 26, 2012, 01:29
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
There is not a function for div like that, so you just write the equation out in its direction components long hand. So you define one equation for each cartension direction.
ghorrocks is offline   Reply With Quote

Old   March 26, 2012, 01:44
Default
  #7
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
So I need to calculate the gradient of the phi.grad in x,y,z direction respectively and then add them together ?

I have another question.I need to use the div(coff*grad phi) scale with the volume of the cell.Are there any word standing the volume of the cell, just like the u stand the velocity of x direction?

regards!

lg88
lg88 is offline   Reply With Quote

Old   March 26, 2012, 01:54
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Have a look in the list of available variables in the CFX reference guide.

Also, don't forget CEL has functions like volumeInt() so if you use them you might not need to get the volume either.
ghorrocks is offline   Reply With Quote

Old   March 26, 2012, 02:39
Default
  #9
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
oh,I find that it is not easy as you said.
Firstly, ''define an algebraic additional variable as phi.grad".Is it a vector? then where can I write the expression .grad?And when I calculate the div,maybe I just need use the second component of the grad rather than a whole vector . Are there any guides I can refer to?

Then ,I have read the function of volumeInt().I find that it is total volume of a domain or subdomain rather than a cell volume.Are there any about the cell volume?


regards

lg88
lg88 is offline   Reply With Quote

Old   March 26, 2012, 04:51
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I have never used the .grad function, try it and you should be able to work it out.

Quote:
I find that it is total volume of a domain or subdomain rather than a cell volume.
No. It is the volume integral. It can be made to return total volume, but in general it is.... well.... the volume integral.

Cell volume is an available variable (see the CFX Reference manual) but again, I bet the volumeInt() function does what you want without requiring cell volumes.
ghorrocks is offline   Reply With Quote

Reply

Tags
divergence


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
Divergence problem for species transport model MY FLUENT 3 January 11, 2014 04:46
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
FVM in 1-D spherical coordinates lost.identity Main CFD Forum 0 January 17, 2011 09:06
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM kenn Main CFD Forum 2 July 18, 2004 18:28
FVM: how to obtain the values on vertex? remi Demersseman Main CFD Forum 4 May 20, 1999 06:29


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