|
[Sponsors] |
July 17, 2019, 09:42 |
changeable boundary condition?
|
#1 |
New Member
amirbhr
Join Date: Jul 2019
Posts: 4
Rep Power: 7 |
Hi everyone
I have a cfd problem with changeable boundary condition at outlet of the box. Would anyone please help me to solve the problem with the details below? The outlet would be as wall until the maximum temperature of the domain reaches 350 (K). Then, the outlet changes to Mass flow outlet until the domain maximum temperature decreases to 330 (K) and once again the outlet converts to wall. How can I set this boundary condition in Fluent using UDF? |
|
July 18, 2019, 01:19 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
if you want to change boundary condition type -> you should use scheme language and TUI commands
1. Make *.scm file, here you will define variable (RPVAR) to check your criteria. exhample Code:
(define (make-new-rpvar name default type)(if (not (rp-var-object name))(rp-var-define name default type #f))) (make-new-rpvar 'my_switch_boundary #f 'boolean) 3. Inside UDF compare Tmax with 350k, if Tmax>350 than change flag 4. Get variable from scheme. exhample Code:
cxboolean udf_switch_boundary = False; if (Tmax>350) udf_switch_boundary =True; else udf_switch_boundary =False; Code:
if (RP_Variable_Exists_P("my_switch_boundary")) {RP_Set_Boolean("my_switch_boundary",udf_switch_boundary); Message0("switch was sent to scheme\n");} else { Message0("failed to send data to scheme\n");} activate command, when -> each timestep If the wall, you wanna change has name wall-1, than inside command put following: Code:
(if (%rpgetvar 'my_switch_boundary) (begin (ti-info "**************SWITCH IS TRUE****************") (ti-menu-load-string (format #f "define boundary-conditions modify-zones zone-type wall-1 pressure-outlet")) ) (ti-info "**************SWITCH IS FALSE | NO CHANGE****************") ) best regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
Accessing multiple boundary patches from a custom boundary condition file | ripudaman | OpenFOAM Programming & Development | 0 | October 22, 2014 19:34 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |