CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Scheme command for volume-average value

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By macfly
  • 1 Post By cicatrix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2014, 22:54
Default Scheme command for volume-average value
  #1
New Member
 
Jemyung Cha
Join Date: Jul 2009
Posts: 12
Rep Power: 16
cicatrix is on a distinguished road
Hi guys.

I am doing some works about monitoring and changing boundary conditions
with scheme language.


I already know how to get area-weighted-avg temperature like below.

These two TUI commands are same. One is scheme and another one is journal command.

(define check_temp (surface-area-average (list (surface-name->id thermostat)) "temperature"))
;; Scheme command

/report/surface-integrals/area-weighted-avg thermostat () temperature ,
;; Journal command


But, I do not know how to get volume-average temperature and heat source value in specific cell zone with scheme.

Is there a anybody who can help me?

Last edited by cicatrix; May 27, 2014 at 00:04.
cicatrix is offline   Reply With Quote

Old   May 27, 2014, 04:52
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
I looked at the User manual, Fluent Text Command list.

You already found "/report/surface-integrals/area-weighted-avg"
But now you don't want a surface integral but a volume integral, so I looked further:
Quote:
volume-integrals/
Enter the volume integral menu.
...
volume-avg
Print volume-weighted average of scalar over cell zones.
So the journal command you are looking for is "/report/volume-integrals/volume-avg".
pakk is offline   Reply With Quote

Old   May 27, 2014, 10:09
Default
  #3
New Member
 
Jemyung Cha
Join Date: Jul 2009
Posts: 12
Rep Power: 16
cicatrix is on a distinguished road
Thanks for your helpful explanation.

But I need to know scheme commands to make some codes which can control temperature and source term.
cicatrix is offline   Reply With Quote

Old   May 27, 2014, 11:11
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
You can turn every journal command into a scheme command by using "(ti-menu-load-string ...)"

So in this case:
Quote:
(ti-menu-load-string "//report/volume-integrals/volume-avg volumename temperature")
pakk is offline   Reply With Quote

Old   May 27, 2014, 19:37
Default
  #5
New Member
 
Jemyung Cha
Join Date: Jul 2009
Posts: 12
Rep Power: 16
cicatrix is on a distinguished road
I know (ti-menu-load-string ...) can do measure volumename's temperature.

But I need to store variables in memory using the scheme commands.

(ti-menu-load-string ...) can just returen #f or #t.
cicatrix is offline   Reply With Quote

Old   May 28, 2014, 02:09
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
OK, you didn't mention yet that you wanted to use the value, and not just print it.

I now understand your problem, but don't know the solution. I am interested to know the answer, though...
pakk is offline   Reply With Quote

Old   November 12, 2014, 20:48
Default
  #7
New Member
 
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 12
Rep Power: 13
Heat80 is on a distinguished road
Quote:
Originally Posted by cicatrix View Post
Hi guys.

I am doing some works about monitoring and changing boundary conditions
with scheme language.


I already know how to get area-weighted-avg temperature like below.

These two TUI commands are same. One is scheme and another one is journal command.

(define check_temp (surface-area-average (list (surface-name->id thermostat)) "temperature"))
;; Scheme command

/report/surface-integrals/area-weighted-avg thermostat () temperature ,
;; Journal command


But, I do not know how to get volume-average temperature and heat source value in specific cell zone with scheme.

Is there a anybody who can help me?
--------------------------------------------------------------------
(ti-menu-load-string (format #f "report volume-int va thermostat () temperature yes yourfilename yes"))
------------------------------------------------------------------
Hopefully not too late
Heat80 is offline   Reply With Quote

Old   November 12, 2014, 20:52
Default
  #8
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Quote:
Originally Posted by Heat80 View Post
--------------------------------------------------------------------
(ti-menu-load-string (format #f "report volume-int va thermostat () temperature yes yourfilename yes"))
------------------------------------------------------------------
Hopefully not too late
probably volume-average instead of volume-int
Heat80 likes this.
macfly is offline   Reply With Quote

Old   November 15, 2014, 21:35
Default
  #9
New Member
 
Younis Najim
Join Date: Apr 2013
Location: Michigan State University
Posts: 12
Rep Power: 13
Heat80 is on a distinguished road
Quote:
Originally Posted by macfly View Post
probably volume-average instead of volume-int
You right. You can also divide the volume integral result by domain volume as another way to get the average value over the domain.
Heat80 is offline   Reply With Quote

Old   November 20, 2014, 07:53
Default
  #10
New Member
 
Jemyung Cha
Join Date: Jul 2009
Posts: 12
Rep Power: 16
cicatrix is on a distinguished road
I solved with follwing scheme commands.

(%fill-node-values 'temperature)
(define Temp_A (%volume-integrals 'volume-average '(Cell Zone ID) "temperature"))

;; Temp_A is a variable name what you want to make
;; You can get Cell Zone ID in cell zone conditions in flunet window.
Heat80 likes this.
cicatrix 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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
how to understand high resolution scheme and high order scheme iilw1314 Main CFD Forum 7 April 12, 2022 12:29
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? rsin CFX 19 December 29, 2018 04:43
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 01:50


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