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

Can I assign ID for boundary conditions after FLUENT assigned them automatically?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 30, 2014, 09:35
Question Can I assign ID for boundary conditions after FLUENT assigned them automatically?
  #1
New Member
 
Zeng Liyue
Join Date: Sep 2014
Posts: 21
Rep Power: 11
soriyoshi is on a distinguished road
I am wondering...Can I assign ID for boundary conditions after FLUENT assigned them automatically?..This is important because I have so many UDFs contains IDs. I don't want my UDFs seem a mess...
soriyoshi is offline   Reply With Quote

Old   December 1, 2014, 10:26
Default
  #2
Senior Member
 
Andrew Kokemoor
Join Date: Aug 2013
Posts: 122
Rep Power: 13
Kokemoor is on a distinguished road
As far as I know, there isn't, but I'd be eager to know if there is. What I do is have a scheme macro to get the ID of a zone by name, then pull that into the UDF.

Scheme:
(if (not (rp-var-object 'zone-id)) (rp-var-define 'zone-id 0 'integer #f))
(rpsetvar 'zone-id (zone-name->id "zone"))

UDF:
if (RP_Variable_Exists_P("zone-id")) {zone_id = RP_Get_Integer("zone-id");}

The first line of scheme initializes the "zone-id" scheme variable, the second one writes the ID of the zone "zone" to that variable. The UDF line writes the value of the "zone-id" scheme variable to the "zone_id" variable in the UDF. Then you've got the ID of "zone" available for your UDF. You could do this for any number of zones.
Kokemoor is offline   Reply With Quote

Old   December 1, 2014, 17:15
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
You can, but it actually consists in editing case files manually while exposing your cases to error prone modifications. There is no reason to do that on the case files instead of the UDFs.
sbaffini is offline   Reply With Quote

Old   December 5, 2014, 02:08
Default
  #4
New Member
 
Zeng Liyue
Join Date: Sep 2014
Posts: 21
Rep Power: 11
soriyoshi is on a distinguished road
That's very helpful~~It's very kind of you~~
Actually I found it possible to define the ID number by adding boundary conditions in ICEM(I always define boundary conditions in fluent). But that is too slow compared to the scheme you've provided, since I have to define them every time I build a mesh...

Thank you again~
soriyoshi is offline   Reply With Quote

Old   December 5, 2014, 02:11
Default
  #5
New Member
 
Zeng Liyue
Join Date: Sep 2014
Posts: 21
Rep Power: 11
soriyoshi is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
You can, but it actually consists in editing case files manually while exposing your cases to error prone modifications. There is no reason to do that on the case files instead of the UDFs.
Yes, I totally agree...
By the way, can you explain a little more about how to do that by editing case files?
soriyoshi is offline   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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 12:23
Automatically start new calculation after the one before is completed? (FLUENT 12.1) mars21t FLUENT 4 March 27, 2011 09:52
Fluent accuracy and boundary conditions Paolo Lampitella Main CFD Forum 0 June 12, 2008 10:22
ICEM --> FLUENT, boundary conditions Tobias CFX 1 July 9, 2007 10:35
Boundary conditions in Fluent 4.5 Arturo Ortiz FLUENT 0 January 25, 2001 17:52


All times are GMT -4. The time now is 15:54.