|
[Sponsors] |
How to save /adjoint/observable/evaluate result to scheme variable? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 19, 2018, 14:40 |
How to save /adjoint/observable/evaluate result to scheme variable?
|
#1 |
New Member
Join Date: Dec 2018
Posts: 3
Rep Power: 8 |
I have an observable ld(lift drag ratio) which I'm calculating through scheme script by which is calling command /adjoint/observable/evaluate.
The result is printed to TUI console. Code:
Observable name: ld Observable Value (undefined): 2.6054044 For example the scheme script should look like this: Code:
1. apply command /adjoint/observable/evaluate 2. save that ld value to scheme variable 3. do something next with that variable |
|
December 20, 2018, 00:44 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
try to use following command
Code:
(rpgetvar 'monitor/lift) best regards |
|
January 6, 2019, 06:57 |
|
#3 |
New Member
Join Date: Dec 2018
Posts: 3
Rep Power: 8 |
Code:
(rpgetvar 'monitor/lift) Code:
() |
|
January 7, 2019, 02:44 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you may get lift/drag coef value using following command
Code:
(car (cdr (car (rpgetvar 'adjoint/multiobjective-data )))) Code:
(define (make-new-rpvar name default type) (if (not (rp-var-object name)) (rp-var-define name default type #f))) (make-new-rpvar 'my_lift/drag 0.0 'real) Code:
(rpsetvar 'my_lift/drag (car (cdr (car (rpgetvar 'adjoint/multiobjective-data ))))) Code:
(rpgetvar 'my_lift/drag) best regards |
|
May 10, 2019, 18:07 |
|
#5 |
New Member
Join Date: Dec 2018
Posts: 3
Rep Power: 8 |
Thank you for your contribution. The solution you proposed worked for the observable `ld`. How would I get values of other observables (lift, drag, le_moment)?
|
|
October 8, 2019, 09:55 |
|
#6 |
New Member
Riccardo Frezza
Join Date: Dec 2018
Posts: 12
Rep Power: 8 |
Hi, I'm new in using the scheme language and I need to get the "pressure-drop" observable into a variable in scheme script. Did you find a different solution? With (rpgetvar 'adjoint/multiobjective-data) it shows me the pressure-drop observable value. Adjoint/multiobjective-data isn't a TUI command. Where can I find those commands?
|
|
Tags |
fluent, observable, result, scheme |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
can you tell me best gradient, pressure & momentum order selection in fluent | sanjiiv | FLUENT | 6 | February 14, 2020 07:07 |
Scheme programing, variable definition | Leonlow | Fluent UDF and Scheme Programming | 1 | September 3, 2014 20:21 |
scheme variable | Gimli | FLUENT | 7 | December 21, 2012 04:03 |
Scheme variable problem | syavash | Fluent UDF and Scheme Programming | 0 | August 13, 2012 00:11 |
Cavity air flow with radiation – result variable | Yingchun | CFX | 1 | November 25, 2005 12:13 |