Access a probed value
Hello!
I probe the pressure in a point (x,y,z) and it is written to a file and I can post-process it later, so far so good. In OpenFoam 2 there is the new codedFixedValue boundary condition, and in the code I would like to implement there, I want to use the pressure from my probe; so the question is, how do I access it? Can someone help me with that part of the code? Thanks! / Anders |
Quote:
(Disclaimer: the next part will be seen as a shameless self-advertisment by some people ;) ) If you just need the value of the probe and the BC you want to set depending on it is an expression (nothing that involves multiple iterations) you should be able to do it with the groovyBC that come with swak4Foam (see the fillingTheDam-example. Just use a sampledSet of type cloud) |
Hi Bernhard,
do you need swak4Foam for using sampledSet? Thanks Ivan |
Quote:
|
Hi Bernhard,
thanks for your reply. I have tried to use sampledSet in my controlDict, but I become this error message: Quote:
Thanks you very much Ivan |
Quote:
|
Quote:
Ivan |
Hi everyone,
I'm willing to use a probe monitoring to control a boundary condition. The problem : - multiregion (1 fluid, 1 solid), - 1 probe in temperature in the fluid domain, - the energy flux at the outside of the solid region is a function of the probed temperature. I'm aiming to use swak4Foam (OF.2.x) for this purpose. I'm looking at fillingTheDam example which use function type addGlobalVariable. But I don't find any exemple of probe reading in swak4Foam. 1) Does anyone have any idea how to link my function "probes" to the function "globalVariable" ? 2) How can I link a globalVariable to the flux boundary condition ? I guess I have to use a BC of type "groovyBC" ? This is done by using "0" in fractionExpression right ? Thank you. |
Well I didn't find out how to link the probe value to the boundary condition. Here is what I wrote for now. It seems that global variables are linked to 1 domain zone and are not shared with the others.
NB : The probe is perfectly working this way. ControlDict file : Code:
createProbe Code:
solidExternalWall |
Quote:
I think I showed a case with such probes at the 6th Workshop (see http://openfoamwiki.net/index.php/Co...er_information) and there is also the (rather elaborate) CleaningTank-example in Examples/FromPresentation For accessing the other mesh use "/other" as described in http://openfoamwiki.net/index.php/Co...al_expressions |
Quote:
This application seems to be quite popular. Would be nice if someone added it at http://openfoamwiki.net/index.php/Co...Usage_examples |
Thank you for the answer.
Yes it's a very usefull tool when a PID controler is in the loop. Thanks to your answer (I was pretty sure to saw this earlier but I read "another patch" instead of another mesh...), I'm now able to impose a fixedValue (dirichlet condition) : Twall = f(Tprobe, time). I'm now looking to swtich to a Neumann's one. I'll try it tomorow morning and if everything is fine, I'll write something up for the wiki. Though I might ask you how to upload it. |
Quote:
|
All times are GMT -4. The time now is 08:57. |