How to sample a patch with swak?
Hi all,
I would like to replicate the behaviour of a heat flux sensor on surface. I think a nice way to do this is to sample running average over a subset of my wall patch. I need the time trace of this running average to calculate the spectrum. For internal mesh this was easy enough, but patches seem more difficult. First, this succeeds in calculating Nusselt number (in controlDict): Code:
functions Code:
nuSensor { Since I am writing here, it's not that easy. I can dump the whole patch, but since I need around 2*150k timesteps, it is a bit too much data. The cellSet method fails because NusseltNumber apparently belongs to patch, it's not found in cellSet. I also tried faceSet on surface, but with no improvement. Could someone please point me to right direction? Also non-swak solutions are welcome. br, Pekka |
Quote:
The problem with the faceSet approach was what? Maybe that the snGrad is not supported on faceSets? |
Quote:
I noticed that it's possible to cheat a bit and calculate the Nusselt number in wall adjacent cells if I know the geometry exactly. I'll post that solution when I get to my computer. But it will only work for relatively simple geometries. br, Pekka |
Quote:
The problem here is that I'm not aware of a functionObject described in point 2. Neither in OF nor in swak. But I could persuade the developer of swak to write such a FO (I'm on rather good terms with him ;) ) provided you promise to write a small description of the usage on the swak-page on the Wiki afterwards |
Quote:
I promised the cheat around the problem, so here it goes. I simplified a bit so that avid readers are not totally lost. This works still. My case is a circular cylinder in a cross flow, origin is at cylinder center. Further this approach works for constant wall temperature, but constant heat flux would be as easy. This is in controlDict and under functions: Code:
sensorDumb |
Quote:
|
I do not understand what exactly is the functionObject that hit the development version. Although I understand that pulling that file is the correct thing to do since I already have the development version on the git, I'm still not comfortable messing with my openfoam installation lest I break it. So is there any way I can check it out online?
This post seems to be the closest to what I want.. i.e probes/faceSets on a patch. See post here. http://www.cfd-online.com/Forums/ope...tml#post364016 @Bernhard: Is there any way I can use swak to create faceSets on a patch based on pos()? |
Quote:
Quote:
|
EDIT:
I was too slow, ignore this. Wiki coming up. |
Quote:
|
Quote:
ganesh |
Never mind the previous question. I never thought that a library included in the controlDict would have an effect on topoSet. Once I included it, it was able to run. However it doesn't seem to understand fpos.
Quote:
|
Quote:
I understand from the README for swak that "expressionToFace" works only on internal faces. Is this true or my misunderstanding? I tried the following in setSet faceSet jump1 new expressionToFace "fset(blade)" It just seg faults. I do have a face set called blade. |
Quote:
Will have a look at how to fix it ASAIFT (Hint: this process is usually sped up by a bug report with a small test-case) PS: ASAIFT stands for "As Soon As I Find Time" - a yet unknown abbreviation with a big future |
1 Attachment(s)
Quote:
ASAIFT! No probs Bernard. I wrote my own utility. Hopefully this will serve as an example to others to create their own faceSets. The essence of it is this Quote:
|
Quote:
|
Quote:
I am trying to calculated snGradT on the faceset made using the following toposet on the Top wall of my geometry Code:
actions |-------|----------------------|------- | | |_ | | (Faces of Interest) | |_ | But when I am using the faceset "Dummyface" in the swak4Foam function in controlDict Code:
Nu_ceiling_test Code:
--> FOAM FATAL ERROR: I will be thankful if you can provide some advice on it and how it can be done using Swak. The main objective is to calculate "Nusselt Number on the Selected Faces of Interest on the patch" Thank you Regards |
All times are GMT -4. The time now is 14:13. |