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

Saving Value of Surface Integral

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Kushal Puri

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2016, 17:10
Default Saving Value of Surface Integral
  #1
New Member
 
Liam111
Join Date: Oct 2015
Posts: 5
Rep Power: 8
bigbird142 is on a distinguished road
Hello All,

I am attempting to find the value of a surface-integral and store it to a variable. (I would prefer an answer using Journal however is it is only possible in Scheme then I will work with that).

So far I have tried:
(define machnum1 ("/report/surface-integrals/mass-weighted-avg 13 , mach no"))

I get an error:

Error: eval: invalid function
Error Object: "/report/surface-integrals/mass-weighted-avg 13 , mach no"


Any help with this would be highly appreciated!
bigbird142 is offline   Reply With Quote

Old   December 13, 2016, 01:35
Default
  #2
Senior Member
 
Kushal Puri
Join Date: Nov 2013
Posts: 183
Rep Power: 10
Kushal Puri is on a distinguished road
Quote:
Originally Posted by liamheidt View Post
Hello All,

I am attempting to find the value of a surface-integral and store it to a variable. (I would prefer an answer using Journal however is it is only possible in Scheme then I will work with that).

So far I have tried:
(define machnum1 ("/report/surface-integrals/mass-weighted-avg 13 , mach no"))

I get an error:

Error: eval: invalid function
Error Object: "/report/surface-integrals/mass-weighted-avg 13 , mach no"


Any help with this would be highly appreciated!
(define (machnum1)
(pick-a-real"report/surface-integral/mwa (13) mach no"))
bigbird142 likes this.
Kushal Puri is offline   Reply With Quote

Old   December 13, 2016, 06:05
Default
  #3
New Member
 
Liam111
Join Date: Oct 2015
Posts: 5
Rep Power: 8
bigbird142 is on a distinguished road
Quote:
Originally Posted by Kushal Puri View Post
(define (machnum1)
(pick-a-real"report/surface-integral/mwa (13) mach no"))
Thank you Kushal! Your help is appreciated!

I thought this would be enough, however I am running into a second issue.

Basically I am trying to determine if the Mach number is greater than 1 and depending if it is or isn't change the cfl number.

I have done:
(if (> machnum1 1) (ti-menu-load-string "/solve/set/courant-number/10") (ti-menu-load-string "/solve/set/courant-number/100"))

However it doesn't seem to be working, as "machnum1" is not an value (I should have specified I required this in numerical form in my original question - apoligies)

I really have no clue where to go from here.

Again, any help would be greatly appreciated!

Cheers

Last edited by bigbird142; December 13, 2016 at 08:50.
bigbird142 is offline   Reply With Quote

Old   December 13, 2016, 09:23
Default
  #4
New Member
 
Liam111
Join Date: Oct 2015
Posts: 5
Rep Power: 8
bigbird142 is on a distinguished road
Quote:
Originally Posted by liamheidt View Post
Thank you Kushal! Your help is appreciated!

I thought this would be enough, however I am running into a second issue.

Basically I am trying to determine if the Mach number is greater than 1 and depending if it is or isn't change the cfl number.

I have done:
(if (> machnum1 1) (ti-menu-load-string "/solve/set/courant-number/10") (ti-menu-load-string "/solve/set/courant-number/100"))

However it doesn't seem to be working, as "machnum1" is not an value (I should have specified I required this in numerical form in my original question - apoligies)

I really have no clue where to go from here.

Again, any help would be greatly appreciated!

Cheers

I have found the solution:

(define machnum1(string->number (pick "/report/surface-integrals/mass-weighted-avg (11) mach-number")))

This will create machnum1 as a double and allow one to use it in standard operations.
bigbird142 is offline   Reply With Quote

Reply

Tags
fluent, journal, scheme

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Surface integral on only part of a surface? nathanblank ANSYS 2 January 23, 2022 06:39
new-parameter :surface integral of velocity nenazarian Fluent UDF and Scheme Programming 1 December 6, 2013 02:16
[snappyHexMesh] Snap Precision to a STL Surface malaboss OpenFOAM Meshing & Mesh Conversion 16 July 26, 2013 01:44
[snappyHexMesh] Layers don't fully surround surface EVBUCF OpenFOAM Meshing & Mesh Conversion 14 August 20, 2012 04:31
Surface Integral - Mass Flow Rate Venkatesh V FLUENT 3 October 10, 2008 16:18


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