CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Scheme and Fluent UDF?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2000, 03:26
Default Scheme and Fluent UDF?
  #1
Arthur Valais
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")

))

  Reply With Quote

Old   January 12, 2000, 15:57
Default Re: Scheme and Fluent UDF?
  #2
Chris
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.
  Reply With Quote

Old   January 12, 2000, 19:18
Default Re: Scheme and Fluent UDF?
  #3
Arthur Valais
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
  Reply With Quote

Old   January 13, 2000, 11:41
Default Re: Scheme and Fluent UDF?
  #4
Paul Malan
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.
  Reply With Quote

Old   January 14, 2000, 14:29
Default Re: Scheme and Fluent UDF?
  #5
Chris
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).

  Reply With Quote

Old   January 25, 2000, 22:24
Default Re: Scheme and Fluent UDF?
  #6
LunSheng Pan
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.
  Reply With Quote

Old   January 26, 2000, 14:14
Default Re: Scheme and Fluent UDF?
  #7
Joe Maruszewski
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.
  Reply With Quote

Old   January 26, 2000, 20:32
Default Re: Scheme and Fluent UDF?
  #8
LunSheng Pan
Guest
 
Posts: n/a
Thank you, Joe Maruszewski. I will try it.
  Reply With Quote

Old   January 26, 2000, 22:20
Default Re: Scheme and Fluent UDF?
  #9
LunSheng Pan
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.
  Reply With Quote

Old   January 28, 2000, 14:47
Default Re: Scheme and Fluent UDF?
  #10
Paul Malan
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.
  Reply With Quote

Old   January 31, 2000, 05:15
Default Re: Scheme and Fluent UDF?
  #11
LunSheng Pan
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
  Reply With Quote

Old   January 31, 2000, 14:19
Default Re: Scheme and Fluent UDF?
  #12
Joe Maruszewski
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.

  Reply With Quote

Reply


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
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 02:50
How to combine UDF and Scheme? ali hemmati Fluent UDF and Scheme Programming 3 March 19, 2011 15:45
Fluent Scheme + Wiki jasond CFD-Wiki 7 October 16, 2009 05:39
Integrating Scheme with a FLUENT journal file Pete Willemsen FLUENT 0 May 19, 2006 18:00
FLUENT scheme language Luca FLUENT 2 October 21, 2004 05:51


All times are GMT -4. The time now is 14:28.