CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Exporting Face Normal of a patch and some other values

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By fredo490
  • 3 Post By ngj
  • 2 Post By ngj

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 25, 2012, 13:32
Default Exporting Face Normal of a patch and some other values
  #1
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
Dear all,
I want to do a post processing process of a patch (wall) where I need:
- Face center coordinate
- Normal to Face vector
- Face area
- Other data like density

1) I have tried first with a sampling but I cannot find a field "name" to get the face properties. Is it possible to get such a thing ? Here I put a "mesh.Sf()" as example of what I want.
Code:
interpolationScheme cellPointFace;

surfaceFormat	raw;

setFormat       raw;

surfaces
(
    wallTest
    {
        type            patch;
        patches         (wall);
	interpolate 	true;
	triangulate	false;
    }
);	


fields          ( rho U mesh.Sf() );
2) I also have tried to create a "fake" solver to get the values directly from OpenFoam but I cannot find how to write/export those data. Is there any function or library able to write arbitrary files ? Ideally I would like a single file containing all my data but I can also accept an openfoam file format.

Code:
label wallPatch = mesh.boundaryMesh().findPatchID("wall"); 

rho.boundaryField()[wallPatch] // Density

U.boundaryField()[wallPatch] // Velocity

mesh.Sf().boundaryField()[wallPatch] // Face normal vector

mesh.Cf().boundaryField()[wallPatch] // Face Center

mesh.magSf().boundaryField()[wallPatch] // Face magnitude

// "Export" data in the consol
Info<< U.boundaryField()[wallPatch] << endl;
Do you have any suggestion ? Thank you in advance.
fredo490 is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:48.