|
[Sponsors] |
January 12, 2000, 02:26 |
Scheme and Fluent UDF?
|
#1 |
Guest
Posts: n/a
|
Dear All,
I'd like to be able export my data in format specified by File/Export, at every iteration. If I run a macro, then the file is overwritten each time (%i etc only work with autosave [!]). Looking at the macro in scheme, I would like to change the filename 'data' to 'data-current-time-in seconds' to make each file unique (or some other method). Can anyone help for this simple procedure in scheme? Thank You, Arthur Valais Attached is the macro: (cx-macro-define '((macro-1 . "(cx-gui-do cx-activate-item \"MenuBar*FileMenu*Export...\")\n(cx-gui-do cx-activate-item \"Export*PanelButtons*PushButton1(OK)\")\n;PATHNAM E \"d:\cfd2000\raw-data\\"\n(cx-gui-do cx-set-text-entry \"Select File*Text\" \"data\")\n(cx-gui-do cx-activate-item \"Select File*OK\")\n(cx-gui-do cx-activate-item \"Export*PanelButtons*PushButton2(Cancel)\")\n( cx-gui-do cx-activate-item \"Monitor Commands*PanelButtons*PushButton1(End Macro)\")\n") )) |
|
January 12, 2000, 14:57 |
Re: Scheme and Fluent UDF?
|
#2 |
Guest
Posts: n/a
|
I find that filenames with %i does work in File/Export macros using Fluent 5.3.18, so maybe it has been fixed. I don't think there is a variable for time, though, just iteration and time step.
Anyway, I think replacing \"data\" in your macro with something like (format #f \"data-~f\" (rpgetvar 'flow-time)) might do what you want. |
|
January 12, 2000, 18:18 |
Re: Scheme and Fluent UDF?
|
#3 |
Guest
Posts: n/a
|
Thanks Chris,
It was a good idea, but fluent stops with... Error: malformed pair: too many objects in CDR Error Object: (macro-1 . "(cx-gui-do cx-activate-item \"MenuBar*FileMenu*Export...\")\n(cx-gui-do cx-activate-item \"Export*PanelButtons*PushButton1(OK)\")\n;PATHNAM E \"d:\cfd2000\raw-data\") I was using 5.2.3. Editing is also a pain as fluent just won't let go of the macros.scm file once its read it for further editing. Cheers, Arthur |
|
January 13, 2000, 10:41 |
Re: Scheme and Fluent UDF?
|
#4 |
Guest
Posts: n/a
|
Here's how I would do it. I would define a text interface command something like this:
/file export fieldview myfile-%t xvel yvel q Note that the above command is entered manually inside the line "Command" in the command monitors panel. It exports x and y velocity in Fieldview format. The resulting file names look like: myfile-5107.fvc myfile-5107.fvd myfile-5108.fvc myfile-5108.fvd etc. Note that %t appends the time step number. You can also use %i for iteration number and %n for a consecutive file name numbers. This is explained in the online help. Also, if you want to save different data, or in a different format, you can experiment with different text interface commands in the console window. Hope this helps. |
|
January 14, 2000, 13:29 |
Re: Scheme and Fluent UDF?
|
#5 |
Guest
Posts: n/a
|
That message would imply that you are missing a backslash \ to escape one of the double quotes " (the double quotes need to be escaped so they are not seen as the end of the macro definition string).
|
|
January 25, 2000, 21:24 |
Re: Scheme and Fluent UDF?
|
#6 |
Guest
Posts: n/a
|
Dear friends, I am a CFD engineer and now encounter a problem on UDF. In my project, one of the boundaries is a curve plate moving in its tangential direction. Hence components of velocity on the boundary change with position (or cell). The Fluent UDF specifying boundary condition can only define one function (or one component). I am very grateful to you If you are willing to help me to overcome this difficulty.
|
|
January 26, 2000, 13:14 |
Re: Scheme and Fluent UDF?
|
#7 |
Guest
Posts: n/a
|
Fluent 5 allows you to use UDFs for the wall velocities. In the wall boundary condition select "Moving Wall", then select "Components". You can then specify a UDF for x-, y-, or z-velocity.
|
|
January 26, 2000, 19:32 |
Re: Scheme and Fluent UDF?
|
#8 |
Guest
Posts: n/a
|
Thank you, Joe Maruszewski. I will try it.
|
|
January 26, 2000, 21:20 |
Re: Scheme and Fluent UDF?
|
#9 |
Guest
Posts: n/a
|
Hi, Dr. Joe Maruszewski, I have tried it according to your suggestion. But after selecting "moving wall", the components of velocity on the wall must be constant, can not change with position (or cell on the wall). Although the speed of wall is same every where, the wall is curve plate and the components change whit the cell on the wall. Thank you previously.
|
|
January 28, 2000, 13:47 |
Re: Scheme and Fluent UDF?
|
#10 |
Guest
Posts: n/a
|
Hi LunSheng Pan:
If you select "Components" as Dr. Maruszewski suggested, you will get a drop-down list next to each of the components. This is where you specify the UDF function. |
|
January 31, 2000, 04:15 |
Re: Scheme and Fluent UDF?
|
#11 |
Guest
Posts: n/a
|
Thank you, Paul Malan for your responce. I tried it already. But if choosing as Dr. Joe and you suggested, the components must be constants, and can input different user defined functions for different components. Thank you anyway and wish you to give me a help continuely.
Best regards. Pan |
|
January 31, 2000, 13:19 |
Re: Scheme and Fluent UDF?
|
#12 |
Guest
Posts: n/a
|
You will be able to set it to something other than "constant" after you read a profile file or a user defined function (UDF). Please see the manual for more details on how to use profile boundary conditions or UDFs.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2nd order upwind scheme (Fluent and CFX) | Far | FLUENT | 0 | May 22, 2011 01:50 |
How to combine UDF and Scheme? | ali hemmati | Fluent UDF and Scheme Programming | 3 | March 19, 2011 14:45 |
Fluent Scheme + Wiki | jasond | CFD-Wiki | 7 | October 16, 2009 04:39 |
Integrating Scheme with a FLUENT journal file | Pete Willemsen | FLUENT | 0 | May 19, 2006 17:00 |
FLUENT scheme language | Luca | FLUENT | 2 | October 21, 2004 04:51 |