|
[Sponsors] |
June 8, 2015, 12:09 |
UDF to modify coordinates in Moment Monitor
|
#1 |
New Member
Alessandro
Join Date: May 2014
Posts: 2
Rep Power: 0 |
Hi all,
I have to modify the moment centre and the moment axis in the "moment Monitor" with a function of time. It's possible at every time-step change these values? For the mesh motion in the cell zone condition I did with a "DEFINE_ZONE_MOTION". It's a simulation with a dynamic mesh and I was able to do. Thank you very much Alessandro |
|
June 9, 2015, 10:46 |
|
#2 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 13 |
This might be a job for a scheme macro rather than a UDF. If your moment center varies with time in a complex way, you could do that in a UDF and write it to a scheme variable with RP_Set_Real. If its simpler, you could calculate it in scheme. Then, create a macro that changes the moment monitor, something like:
Code:
(cx-macro-define '( (moment-update . " (ti-menu-load-string \"solve/monitors/force/set-moment-monitor monitorname y 123 , y y moment-history.txt n n (rpgetvar 'xc) (rpgetvar 'yc) (rpgetvar 'zc) 0 0 0\") "))) |
|
June 11, 2015, 10:47 |
|
#3 |
New Member
Alessandro
Join Date: May 2014
Posts: 2
Rep Power: 0 |
Thank you very much Kookemoor!
It's working on my computer but not in the cluster. At the end I used wrote this command directly in the command line of "Calculation Activities --> Execute commands" Code:
(Define t (rpgetvar'flow-time)) solve/monitors/force/set-moment-monitor cm-p y 53 55 57 61 58 59 56 60 , y y mom-tot.txt n n 0 0 -6 (sin (* 0.0872 (sin (* 25 t)))) 0 (cos (* 0.0872 (sin (* 25 t)))) The error is: " Error: GENERAL-CAR-CDR: invalid argument [1]: improper list Error Object: () " The problem is that I want to run the simulation in the cluster of my University but in the HPC fluent read the command but doesn't write the file.txt. Do you have any idea? Thank you again. |
|
June 11, 2015, 11:13 |
|
#4 |
Senior Member
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 13 |
It might be a rights issue? You could try writing to a network location. Instead of "mom-tot.txt" have "\\computername\folder\mom-tot.txt".
|
|
Tags |
udf; moment monitor |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF: Given coordinates, How to identify the cell? | Zhang | Fluent UDF and Scheme Programming | 26 | August 15, 2022 05:54 |
modify a intern variable of Fluent with scheme and UDF | fanch33 | Fluent UDF and Scheme Programming | 3 | March 2, 2015 11:01 |
How can I modify surface reaction using UDF | Juun | Fluent UDF and Scheme Programming | 0 | July 28, 2014 09:13 |
UDF Wall Temperature Problem - Coordinates | Marc | FLUENT | 1 | July 3, 2008 11:10 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |