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

Fluent change boundary condition type using Scheme syntax in journal file

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2019, 18:08
Default Fluent change boundary condition type using Scheme syntax in journal file
  #1
New Member
 
Mark Lytell
Join Date: Apr 2019
Location: Chicago area
Posts: 4
Rep Power: 7
lytemar is on a distinguished road
I have a pressure-outlet BC called "outlet-postchill" that I would like to change to a wall from within a journal file after some amount of flow time. I created a couple variables for the name of the BC using:

(make-new-rpvar 'outlet_wtr "postchill" 'string)
(make-new-rpvar 'outlet/water (string-append "outlet-" (%rpgetvar 'outlet_wtr)) 'string)

Both of these together make the string "outlet-postchill"

When I try the TUI command "/define/boundary-conditions/modify-zones zone-type (%rpgetvar 'outlet/water) wall" I get the following errors:

Error: get-thread: invalid thread id (integer) or name (symbol)
Error Object: 'outlet/water
invalid command [wall]

I would like to do this using Scheme, but I don't know the syntax. I tried "(define boundary-conditions modify-zones zone-type (%rpgetvar 'outlet/water) wall)" but that didn't work either.

Can someone please help with the syntax for this? I have many of these operations to do at certain flow times?
lytemar is offline   Reply With Quote

Old   November 10, 2019, 23:09
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
(ti-menu-load-string (format #f "define boundary-conditions modify-zones zone-type ~a wall" (%rpgetvar 'outlet/water)))
lytemar likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   November 11, 2019, 09:41
Default
  #3
New Member
 
Mark Lytell
Join Date: Apr 2019
Location: Chicago area
Posts: 4
Rep Power: 7
lytemar is on a distinguished road
Thanks. Looks like I need to learn the Scheme language and how it works with Fluent.
lytemar is offline   Reply With Quote

Old   April 27, 2022, 10:58
Default
  #4
Senior Member
 
alberto
Join Date: Apr 2016
Location: Mexico
Posts: 117
Rep Power: 10
dewey is on a distinguished road
Hi, did you find how to change the boundary conditions from outlet to wall?


I have to do this for some different bpundaries. Change the boundary conditions of each one in different types and the go back to the other.




change outlet-wall-outlet-wall-outlet--- etc



Quote:
Originally Posted by lytemar View Post
Thanks. Looks like I need to learn the Scheme language and how it works with Fluent.
dewey is offline   Reply With Quote

Old   April 28, 2022, 02:13
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you can control boundary conditions type using TUI commands

also, you can put TUI commands in journal file and execute it
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
fluent, scheme, scheme programming, tui


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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


All times are GMT -4. The time now is 04:03.