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

Assigning values to a cartesian grid from a binary image (or stl)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ngj

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 5, 2014, 17:06
Cool Assigning values to a cartesian grid from a binary image (or stl)
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Dear all,

I stuck with the problem of assigning value to a field (let's call it alpha).

Let's say I have a very fine cartesian grid generated with blockMesh and that I want to assign value to a field alpha defined on this grid in order to match the binary image shown below. The cells in the black region will have the value 1 and the cells in the white region will have the value alpha=0.

I have a .stl file of this file and I am able to generate a grid with snappyHexMesh for either the black region. Then with mapField I can assign the value I want for alpha. However, the workflow is a little far-fetched.

Do you think of a more direct way to assign this value? Using snappyHexMesh and this *.stl file to assign values to my field alpha defined on a cartesian grid ?

Any ideas will be strongly appreciated.

Cheers,
Cyp

Cyp 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulating square cylinder using cartesian grid? zonexo Main CFD Forum 5 October 10, 2005 08:12
cartesian grid generation method Abu Taleb Main CFD Forum 7 April 14, 2001 09:49
Cartesian grid generation method Abu Taleb Main CFD Forum 0 April 8, 2001 12:15
Cartesian grid generation method Abu Taleb Main CFD Forum 0 April 8, 2001 12:03
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


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