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

magSf: which surface?

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

Like Tree1Likes
  • 1 Post By maximeg

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2010, 11:15
Default magSf: which surface?
  #1
New Member
 
Join Date: Jun 2010
Posts: 14
Rep Power: 15
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, 03:27
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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, 17:08
Default
  #3
New Member
 
Join Date: Jun 2010
Posts: 14
Rep Power: 15
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. http://www.cfd-online.com/Forums/ope...tml#post266026).
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
nepomnyi likes this.
maximeg is offline   Reply With Quote

Old   July 7, 2010, 11:35
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,679
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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. http://www.cfd-online.com/Forums/ope...tml#post266026).
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: 117
Rep Power: 22
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 Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 44 April 14, 2016 07:41
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 12:05
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 05:37.