|
[Sponsors] |
June 30, 2011, 05:48 |
Extract average pressure
|
#1 |
New Member
Godard Pierre-Henri
Join Date: Jun 2011
Posts: 5
Rep Power: 15 |
Hello everyone,
today I do a trainning session for my study. I have to automate the oppening of flaps during a fluent calculation. In fluent it means change the surface representing the flap from wall to interior. For this purpose I want to test the average pressure on the surface with my reference pressure. But I can't extract the average pressure alone so I can't run the test. Anyone has an idea to help me ? Thanks for reading, Sincerely. |
|
June 30, 2011, 13:36 |
|
#2 |
Senior Member
Micael
Join Date: Mar 2009
Location: Canada
Posts: 157
Rep Power: 18 |
Can you give more details about the system and what you want to do?
|
|
June 30, 2011, 15:01 |
|
#3 |
New Member
Godard Pierre-Henri
Join Date: Jun 2011
Posts: 5
Rep Power: 15 |
To resume, I have a box with a surface on a face. At the beginning all the face are defined as walls. There is another cube inside that produces energy and mass. So, with the time, the pressure grows inside the box.
I want automate the transition of the flap from wall to interior when the reference pressure is reached. During the afternoon I found a solution. Export a profil from a point created in front of the flap. And with a command read the list inside the text file and do some operation on it to keep only the pressure. Like that i can operate a condition between this pressure and the reference pressure. But it's quite heavy... Do you have another idea to extract the pressure from a point or the average pressure on a face and operate a condition on it ? When i'll be able, I post the part of my code that refer to this. |
|
July 1, 2011, 05:29 |
|
#4 |
New Member
Godard Pierre-Henri
Join Date: Jun 2011
Posts: 5
Rep Power: 15 |
Below a macro which could do that :
(cx-macro-define '( (macro_test_pression_flap_1 . " (ti-menu-load-string (format #f \"/file/write-profile pression_falp_1 ok (point_flap_1) pressure \" )) (define port1 (open-input-file \"pression_flap_1.prof\")) (define a (list-ref (list-ref (read port1) 4) 1)) (close-input-port port1) ( cond ( (> a (rpgetvar 'auto/PF_1)) (begin (if (rpgetvar 'auto/nom_flap) (begin (ti-menu-load-string (format #f \"/define/boundary-conditions/zone-type trappe interior\" )) (ti-menu-load-string (format #f \"/solve/execute-commands/disable test_flap_1\")))) (if (rpgetvar 'auto/nom_soupape) (begin (ti-menu-load-string (format #f \"/define/boundary-conditions/zone-type soupape interior\" )) (ti-menu-load-string (format #f \"/solve/execute-commands/disable test_flap_1\")))) ) ) ) ") )) But, it isn't... The macro works when I call it in the text interface but it doesn't work when it is automacly called throw an "execute command" in the "calculaton activities".... Last edited by pH-ich; July 1, 2011 at 06:01. |
|
July 1, 2011, 07:05 |
|
#5 |
New Member
Godard Pierre-Henri
Join Date: Jun 2011
Posts: 5
Rep Power: 15 |
In fact I wrote again manualy the first sentence of my macro and it is working perfectly.
But if you have other idea that avoid to write in a file and read it after, I am open ! |
|
July 5, 2011, 18:27 |
|
#6 |
Senior Member
Micael
Join Date: Mar 2009
Location: Canada
Posts: 157
Rep Power: 18 |
It is an interesting problem and it seems to me that your approach it good (exeption of write-and-read detour). However, I have very little experience with Scheme language, I don't know how you can efficiently get and use the pressure value. If you find a neat solution, post it here. Good luck.
|
|
July 7, 2011, 06:57 |
|
#7 |
New Member
Godard Pierre-Henri
Join Date: Jun 2011
Posts: 5
Rep Power: 15 |
Thanks for your comments. I did found another solution to extract my pressure. This is the reason why I continu to read and post on this subject :-)
I agree with you, the detour write-and-read is flimsy but I didn't find another way. I tried to put in a variable a report (for example the vertex-maximum of a surface) but it didn't work at all... So I'm open-minded to your suggestions . Sincerely. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Average static Pressure | san.pirate | CFX | 35 | September 27, 2020 12:47 |
Pulsatile pressure inlet with pressure outlet | a.lynchy | FLUENT | 3 | March 23, 2012 14:45 |
Fluent natural ventilation pressure boundary condition | pierresandre | FLUENT | 24 | November 8, 2011 15:32 |
Pressure BC for combustion chamber | Giuki | FLUENT | 1 | July 19, 2011 12:35 |
UDF to define or adjust pressure??? | engahmed | FLUENT | 0 | July 6, 2010 18:19 |