|
[Sponsors] |
How to acquire the value of field function in macro |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 21, 2016, 08:13 |
How to acquire the value of field function in macro
|
#1 |
New Member
Peter Hu
Join Date: Oct 2015
Posts: 16
Rep Power: 11 |
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. |
|
April 24, 2016, 15:46 |
|
#2 |
New Member
Owain Parry
Join Date: Apr 2016
Location: Northampton
Posts: 6
Rep Power: 10 |
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. |
|
Tags |
macro java |
|
|
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 |