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

magSf: which surface?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 18, 2010, 10:15
Default magSf: which surface?
  #1
New Member
 
Join Date: Jun 2010
Posts: 14
Rep Power: 7
maximeg is on a distinguished road
Hello!
I'd like to know how I can access/choose the area (of only one of the 6 faces) of a internal cubical finite volume (not near a patch).
I know I have to use the magSf command, but I don't know which face area (or which direction) of the finite volume it gives me.
Thanking you in advance,
Maxime
maximeg is offline   Reply With Quote

Old   June 21, 2010, 02:27
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by maximeg View Post
Hello!
I'd like to know how I can access/choose the area (of only one of the 6 faces) of a internal cubical finite volume (not near a patch).
I know I have to use the magSf command, but I don't know which face area (or which direction) of the finite volume it gives me.
Thanking you in advance,
Maxime
Sf gives you the area and direction, magSf gives you the area of the corresponding global face number. If you want to work with primitive cell types (eg, tet, hex, etc), you'll need the mesh.cellShapes(). From there you can get the list of faces for this primitive shape.
Either read the user documentation or look at the etc/cellModels to see what the face order means for any particular primitive cell shape.
olesen is offline   Reply With Quote

Old   July 6, 2010, 16:08
Default
  #3
New Member
 
Join Date: Jun 2010
Posts: 14
Rep Power: 7
maximeg is on a distinguished road
Quote:
Originally Posted by olesen View Post
Sf gives you the area and direction, magSf gives you the area of the corresponding global face number. If you want to work with primitive cell types (eg, tet, hex, etc), you'll need the mesh.cellShapes(). From there you can get the list of faces for this primitive shape.
Either read the user documentation or look at the etc/cellModels to see what the face order means for any particular primitive cell shape.
Hello,
Excuse my incomprehension but is it possible to have a code example? I don't know what you mean. How can I get the face number and how do I use it to get the face surface? Someone else has the same problem (cf. About surface weighed average ).
Can you also give me an Internet address where I can find such examples (ideally on "how to use magSf() and Sf()", and not just huge lists of commands and enormous graphs like the ones on the pages you advised me to look at on a similar post I wrote) please? I'm sure it's not hard (at least it shouldn't be), but if the user documentation was more detailed/clear it would've helped everyone better.
Thank you.
Maxime
maximeg is offline   Reply With Quote

Old   July 7, 2010, 10:35
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by maximeg View Post
Hello,
Excuse my incomprehension but is it possible to have a code example? I don't know what you mean. How can I get the face number and how do I use it to get the face surface? Someone else has the same problem (cf. About surface weighed average ).
Can you also give me an Internet address where I can find such examples (ideally on "how to use magSf() and Sf()", and not just huge lists of commands and enormous graphs like the ones on the pages you advised me to look at on a similar post I wrote) please? I'm sure it's not hard (at least it shouldn't be), but if the user documentation was more detailed/clear it would've helped everyone better.
I don't understand your difficulty, but most especially I don't understand your tone. The forum is a place to help each other, not to demand that someone solve your problems.
Writing some sample code would not be difficult, but I'm unwilling to accept abuse in exchange to trying to help ... especially when you are apparently not willing to examine the existing documentation (doxygen + source code).
Besides which, any sample code that I could provide would certainly not meet your exact needs anyhow and then you are back to where you started.
olesen is offline   Reply With Quote

Old   January 10, 2011, 06:54
Default
  #5
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 116
Rep Power: 13
AlmostSurelyRob will become famous soon enough
I have looked through documentation and through various pieces of code that actually use magSf and I have to say that I am still uncertain how to access the values of magSf.

magSf returns a surfaceScalarField. This object has a method boundaryField() which allows to access values on each patch by boundaryField()[patchId].

Following olesen suggestion, I looked at etc/cellModels and I can clearly see cell shape definitions. The same thing seems to be described here in section 5.1.3:
http://www.openfoam.com/docs/user/mesh-description.php

For my purposes I am actually happy to use patch values. But out of curiosity I was wondering if you could give some additional suggestions on how to access the internal field of surface scalar field and extract the values in one direction only.


I am looking at this function
http://foam.sourceforge.net/doc/Doxy...ce.html#l00033
which seems to be just using magSf()[faceID].
AlmostSurelyRob is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Gmsh nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 18 April 22, 2015 08:43
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 39 June 5, 2013 19:02
boundaries with gmshToFoam‏ ouafa Open Source Meshers: Gmsh, Netgen, CGNS, ... 7 May 21, 2010 12:43
Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 June 29, 2009 00:48
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 18:13.