CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

Computing a cellcentered scalarField from a vertexcentered scalarField

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 30, 2005, 09:30
Default Hello, I am in the process
  #1
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Hello,

I am in the process on finalizing a CGNS to OpenFoam converter.

So far, I was able to convert structured and unstructured meshes, including the Boundary Conditions, from the CGNS file format to OpenFoam.

I am also able to convert a CGNS vertex-centered scalar field as an OpenFoam pointScalarField, save it on disk and visualize the scalar field using paraFoam. So far so good, OpenFoam is really a great package, very well written.

Now, I need to compute a cell-centered scalarField (volScalarField) from the vertex-centered scalar field stored in a pointScalarField, and quite frankly, I am stuck...

Basically, I need to interpolate the pointScalarField at the cell centres, but I am not really sure which OpenFoam API is better suited for doing this.

A quick pointer would really be appreciated.

Regards,

Martin
mbeaudoin is offline   Reply With Quote

Old   August 30, 2005, 10:02
Default Hmm, we haven't got one of tho
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Hmm, we haven't got one of those at the moment. I suspect what you are after is something like the volPointInterpolation class:

src/OpenFOAM/interpolations/volPointInterpolation/volPointInterpolation.H

but going in the oppisite direction. If you feel adventurous, you could have a go at writing one yourself and I'm prepared to give you a hand.

Incidentally, is there a good way of doing point-to-cell interpolation or do you just want inverse distance weighting - there may be issues with conservation.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 30, 2005, 13:50
Default Thanks Hrvoje, Right now,
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Thanks Hrvoje,

Right now, I would settle for a simple inverse distance weighting interpolation.

Since this feature is not available right now, I will give it a shot myself, and try to come up with something similar to volPointInterpolation.

I will keep you posted.

As a matter of fact, it would be very easy to use the VTK interpolation algorithms for such a task... I have already written some interpolation stuff using the VTK API... Pretty straightforward once you are familiar with the VTK data model..

Have you ever considered using the VTK libraries with OpenFoam for something other than visualization?

Thanks again for your help!

Martin
mbeaudoin is offline   Reply With Quote

Old   August 31, 2005, 11:29
Default Hi Martin, I have done the
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Hi Martin,

I have done the pointVolInterpolation class you wanted - please send me an E-mail and I'll pass it over. It's quite fun actually, much easier than the other way around because you don't need to worry about the boundary corrections :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 6, 2005, 06:08
Default Martin Beaudoin, Would it be p
  #5
Senior Member
 
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 193
Rep Power: 8
hani is on a distinguished road
Martin Beaudoin, Would it be possible to take part of your CGNStoFoam converter? I have a grid with boundary conditions in CGNS format and would just like to convert it to OpenFoam. I don't need any more functionality right now.
hani is offline   Reply With Quote

Old   January 16, 2006, 11:55
Default Hallo Martin, could you mak
  #6
Member
 
Oliver Borm
Join Date: Mar 2009
Posts: 59
Rep Power: 8
deepblue17 is on a distinguished road
Hallo Martin,

could you make the cgnsToFoam utility available for the public?

Thanks
Oliver
deepblue17 is offline   Reply With Quote

Old   May 29, 2006, 17:12
Default Hello Martin, I am just get
  #7
New Member
 
Daniel Einstein
Join Date: Mar 2009
Posts: 22
Rep Power: 8
deinstein is on a distinguished road
Hello Martin,

I am just getting started with OpenFOAM and wondered what progress you made with your CGNS--> FOAM converter and whether it was publically available?

Regards,
Dan
deinstein is offline   Reply With Quote

Old   June 5, 2006, 12:43
Default Hello Daniel, I am currentl
  #8
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 330
Rep Power: 13
mbeaudoin will become famous soon enough
Hello Daniel,

I am currently in the process of testing a new C++ wrapper over the latest CGNS standard MLL library. That wrapper was developed by a colleague of mine.

I still need to integrate this new code to the two converters we have developed, cgnsToFOAM and foamToCGNS.

I have the go ahead to release the code publicly for both converters, so it is basically just a matter of integrating the new code, testing and cleaning up the source code a little bit (lots of french comments.. ) , and of course, writing a quick doc.

As soon as I can release the source code, I will probably publish it somewhere on the Wiki, and post a message here.

So watch this space...

Martin
mbeaudoin is offline   Reply With Quote

Old   June 14, 2006, 11:02
Default Hello Hrvoje, I can see tha
  #9
Member
 
anne dejoan
Join Date: Mar 2009
Location: madrid, spain
Posts: 66
Rep Power: 8
anne is on a distinguished road
Hello Hrvoje,

I can see that you wrote a pointVolInterpolation
class tool.
I would be interested to get it, if possible, so that I could read a turbulent
point field issued from
another code and run it with OpenFoam.

Please, let me know if it is possible,

Thanks You,

Anne
anne is offline   Reply With Quote

Old   June 14, 2006, 12:12
Default Just E-mailed: enjoy. Hrv
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Just E-mailed: enjoy.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   February 22, 2007, 08:43
Default Hi in the meantime, did you
  #11
Member
 
Vivek Kumar
Join Date: Mar 2009
Location: Switzerland
Posts: 34
Blog Entries: 1
Rep Power: 8
vivekcfd is on a distinguished road
Hi
in the meantime, did you guys relesed cgnstofoam code? I am quite interested in a copy of this conversion tool.

thnx

VK
vivekcfd 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
How to set up an AUTO_WRITE scalarField xiao OpenFOAM Running, Solving & CFD 9 July 22, 2010 03:23
max for scalarField maka OpenFOAM Bugs 9 February 19, 2009 10:43
How does one convert a scalarField into a volScalarField Marco Kupiainen (Kupiainen) OpenFOAM Running, Solving & CFD 22 June 5, 2008 05:26
How to sum up scalarField wese OpenFOAM Running, Solving & CFD 0 March 14, 2008 08:50
ScalarField division maka OpenFOAM Pre-Processing 2 August 27, 2007 05:10


All times are GMT -4. The time now is 10:45.