CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Using faceSets for probing (http://www.cfd-online.com/Forums/openfoam-solving/60458-using-facesets-probing.html)

hani September 29, 2005 05:47

Has anyone done run-time probi
 
Has anyone done run-time probing using faceSets? (c.f. probing in oodles) Or can someone give me a hint on how to do it?

I want to use faceSets to output the results at those 'internal patches' during the computation. The results on the faceSets should be output similar to how the external patches are output.

The main reasons why I want to do this are that I am mostly interested in the results at particular cuts of the domain, and that the disk won't allow the whole field to be written for all the needed timesteps. It would also be a nice tool to see how the solution propagates while making the computations. It would also save lots of time when post-processing in for instance Ensight, where I would then be able to read only the most interesting parts of the domain.

I got the following proposition By Mattijs Janssens on Thursday, September 22, 2005 - 10:35 am:

- you can make them (faceSets) into external patches using the splitMesh utility (discussed before)

- create a cellSet from the cells on one/both sides of the faceSet using the cellSet utility. Visualize the results on the cells with foamToVTK

As I understand it, these propositions require that the whole filed is saved each timestep, which is impossible for large computations that run for many timesteps.

Håkan.

mattijs September 29, 2005 13:14

I would do something like: -
 
I would do something like:
- get the sorted face labels from the faceSet
- get the values on the faces and dump them like probes, so preserving time directory.
- extend e.g. foamToVTK to read and convert these.

olivier October 18, 2005 11:42

Hi How can I get the label f
 
Hi
How can I get the label faces for volume cell ?
thank you for helping

olivier October 18, 2005 11:51

I think that faceCells (). it'
 
I think that faceCells (). it's right?
thank u :-)

hjasak October 18, 2005 12:27

faceCells() gives you cells ar
 
faceCells() gives you cells around the face. cellFaces() gives you faces of the cell.

Enjoy,

Hrv

olivier October 18, 2005 15:16

thank you Jasak, Can you give
 
thank you Jasak,
Can you give me the expression to use cellFaces()!

mattijs October 19, 2005 04:08

A 'cell' is a list of the face
 
A 'cell' is a list of the face labels (section 6.1.1.3 in user guide)

const cell& cFaces = mesh.cells()[cellI];

sega July 7, 2009 07:22

Quote:

Originally Posted by mattijs (Post 192808)
I would do something like:
- get the sorted face labels from the faceSet
- get the values on the faces and dump them like probes, so preserving time directory.
- extend e.g. foamToVTK to read and convert these.

Dear mattuijs.

Can you tell me how I can get the values at the faces?

I suppose I have to run faceSet first.
But what do I have to do with the list of face numbers to get the values at their face centers?!

mattijs July 7, 2009 16:41

Either you already have a field on faces (e.g. a surfaceScalarField) or you'll need to interpolate a volField (fvc::interpolate) to create one. Then you can just index the field using the face label (if it is an internal face). E.g.

surfaceScalarField s = fvc::interpolate(p);
Pout<< s[10] << endl;

sega July 7, 2009 17:32

Sounds promising to me.
Furthermore, can you tell me the two following things:
  • How can I read the face index out of the faceSet output file?
  • Is the output of your command s[index] the value at the face center?
  • How can I write the face center value (and maybe its coordinates) into a file?
Good night.


All times are GMT -4. The time now is 12:50.