|
[Sponsors] |
How to change boundary types at a certain pressure during transient calculation |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Jun 2024
Posts: 2
Rep Power: 0 ![]() |
Hello everyone.
I'm using FLUENT 2024 to do a transient simulation about a diaphragm inside a tube which ruptures at 8 MPa. At beginning, the boundary type of the diaphragm is set as wall through GUI, and I'd like to change it into interior when the vertex max pressure of the diaphragm reaches 8 MPa. I did some research and wrote a scheme code in the “Calculation Activities - Execute Commands” module, but it did not seem to work. The code is given below. It's my first time using scheme programming in FLUENT. Thank you very much in advance. Regards. Asphodel Code:
(rp-var-define' pres1 0.101325' real #f) (define (change_bc_1) (let () (rpsetvar 'pres1 (pick-a-real "/report/surface-integrals/vertex-max diaphragm1 () pressure no")) (if (>= (rpgetvar 'pres1) 8) (begin (ti-menu-load-string "/define/boundary-conditions/zone-type diaphragm1 interior") ) ) ) ) |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Jun 2024
Posts: 2
Rep Power: 0 ![]() |
I figured it out. I set the monitor and named expression through GUI and used simplified scheme code to get it done.
Code:
(if(>(string->number (pick-robust"/define/named-expressions/compute expr1" 0.1)) 8)(ti-menu-load-string "/define/boundary-conditions/zone-type diaphragm1 interior")) |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF/SCHEME to Change Individual Cell Boundary Conditions Based on Pressure | JaySmall1 | Fluent UDF and Scheme Programming | 2 | March 31, 2022 23:13 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 01:44 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 05:57 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |