|
[Sponsors] |
February 20, 2012, 07:16 |
interFoam : post processing
|
#1 |
New Member
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15 |
Hi,
I want to collect the cell information on the basis of alpha value ( 0.5 i.e. at interface) and the pressure at nearby cells with their x and y co-ordinates. The information i have to get is interface.sigmaK())*fvc::snGrad(alpha1) in the part fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1) - ghf*fvc::snGrad(rho) Please tell me how to extract these information? I need the information in the following format: for each value of alpha=0.5 i.e at interface Co- ordinates.... value of sigmaK* grad(alpha)....... Value of pressure at near by cells X Y................... (as mentioned above).................. p1 p2 p3 p4 regards, Yudhast Last edited by udiitm; February 21, 2012 at 02:06. |
|
February 20, 2012, 09:22 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
What is your question?
|
|
February 21, 2012, 02:10 |
|
#3 |
New Member
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15 |
Dear Bernhard,
Sorry for the incomplete thread...My question is how to get the information of Cell at interface and the corresponding value of sigmaK*grad(alpha) and pressure value at near by cell as i have edited in original thread? Thanks Yudhast |
|
February 21, 2012, 04:11 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
The easiest would be to do this during runtime.
Create a volVectorField (name X here), like for U in createFields.H (only replace MUST_READ by NO_READ) Then you can easily write X=interface.sigmaK()*fvc::grad(alpha1) or X=fvc::reconstruct( fvc::interpolate(interface.sigmaK() ) * fvc::snGrad(alpha1) ) This should be enough to recompile. During runtime you will now create a field X. You can combine this with sampling during runtime put this in your controlDict Code:
functions ( interface { type surfaces; functionObjectLibs ( "libsampling.so" ); outputControl outputTime; outputInterval 1; surfaceFormat vtk; fields ( alpha1 X ); surfaces ( freeSurface { type isoSurfaceCell; isoField alpha1; isoValue 0.5; interpolate false; regularise false; } ); interpolationScheme cell; } ); Good luck! Last edited by Bernhard; February 21, 2012 at 06:32. |
|
February 23, 2012, 05:58 |
|
#5 |
New Member
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15 |
Dear Bernhard,
Thanks for your reply. I have tried to compile the changes in createField.H but got an error: error: ‘interface’ was not declared in this scope when i used the expression for "X" i.e. X=fvc::interpolate(interface.sigmaK())*fvc::snGrad (alpha1) 'OR' X=fvc::reconstruct(fvc::interpolate(interface.sigm aK())*fvc::snGrad(alpha1)) Regards, Yudhast |
|
February 23, 2012, 06:32 |
|
#6 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
My excuses for being incomplete in my previous post.
In createFields.H you only create the field X as you create U (just to have it somewhere available) You want to update and store the value for X each timestep, so your expression should be inside the timeloop. createFields is of course only executed once, before the simulation really starts. I would put it in the main file (interFoam.C), just in front of runTime.write(). (Also give it a name different from X, to make it more or less self-explanatory for future users) Finally, it is always a good idea to carefully read the errormessages of the compiler, since they give a good explanation on where to find the error. As interface was not declared, I suppose you put the line with X higher than line 87 of createFields.H. |
|
March 2, 2012, 01:30 |
|
#7 |
New Member
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15 |
Dear Bernhard,
Thanks for your reply. your suggestion was very helpful for solving my problem Regards, yuhdast |
|
March 21, 2012, 06:47 |
|
#8 |
New Member
yudhast
Join Date: Mar 2011
Posts: 12
Rep Power: 15 |
Dear Bernhard,
Thanks for your suggestion. Now I want to get the information of cells ( elements) which contains some value for the variable "X" calculated by above steps. I am actually looking for the neighbour cells for the cells containing non-zero value of variable "X" to manipulate pressure and other values. i.e. suppose for cell(i,j) with X = non-zero value I need pressure (P) for cells ( i+1,j ; i-1,j ; i,j-1 ; i,j+1 ; i,j-1) Thanks and Regards, Yudhast |
|
August 11, 2015, 19:10 |
|
#9 |
New Member
Angel Monsalve
Join Date: Oct 2009
Posts: 7
Rep Power: 17 |
Thanks for this explanation!! couple of years later but works pretty well
|
|
Tags |
cell information, interface, interfoam, post processing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansys Post processing | ano999 | ANSYS | 1 | May 27, 2011 17:24 |
NO model vs post processing in coal combustion,CFX | sakalido | CFX | 1 | April 15, 2011 15:07 |
post processing for KIVA | dirga | Main CFD Forum | 5 | April 23, 2009 11:58 |
Post Processing in FEM | Abhijit Tilak | Main CFD Forum | 0 | April 26, 2004 12:59 |
post processing in CFD | MANISH BHARGAVA | Main CFD Forum | 0 | October 17, 1998 21:51 |