CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

How to acquire the value of field function in macro

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Owain_Parry

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2016, 08:13
Default How to acquire the value of field function in macro
  #1
New Member
 
Peter Hu
Join Date: Oct 2015
Posts: 16
Rep Power: 11
huecu588755 is on a distinguished road
Hi everyone
I am trying to use the macro java to do a transient simulation. I want to using the value of the field function in the code and I don't know how to acquire the value.
huecu588755 is offline   Reply With Quote

Old   April 24, 2016, 15:46
Default
  #2
New Member
 
Owain Parry
Join Date: Apr 2016
Location: Northampton
Posts: 6
Rep Power: 10
Owain_Parry is on a distinguished road
Hi,

Example below, the value of the "Current Value" report is passed to the Java variable "curVal" which is of type double. Beware that the value is passed to your macro only when the command below runs within your macro, if it changes then you need to ensure you have the latest value.

curVal = simulation_0.getReportManager().getReport("Current Valve").getReportMonitorValue();

Hope that helps, let me know if you need further help.
ddcampayo and mCiFlDk like this.
Owain_Parry is offline   Reply With Quote

Reply

Tags
macro java


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 08:15
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


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