|
[Sponsors] |
How to change boundary types at a certain pressure during transient calculation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 13, 2024, 02:04 |
How to change boundary types at a certain pressure during transient calculation
|
#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") ) ) ) ) |
|
July 13, 2024, 11:19 |
|
#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")) |
|
|
|
Similar Threads | ||||
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 | April 1, 2022 00:13 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |