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

[CGNS] Computing a cellcentered scalarField from a vertexcentered scalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2005, 10:30
Default Computing a cellcentered scalarField from a vertexcentered scalarField
  #1
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
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, 11:02
Default Hmm, we haven't got one of tho
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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, 14:50
Default Thanks Hrvoje, Right now,
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
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, 12:29
Default Hi Martin, I have done the
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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, 07:08
Default Martin Beaudoin, Would it be p
  #5
Senior Member
 
Håkan Nilsson
Join Date: Mar 2009
Location: Gothenburg, Sweden
Posts: 205
Rep Power: 18
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: 60
Rep Power: 17
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, 18:12
Default Hello Martin, I am just get
  #7
New Member
 
Daniel Einstein
Join Date: Mar 2009
Posts: 22
Rep Power: 17
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, 13:43
Default Hello Daniel, I am currentl
  #8
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
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, 12:02
Default Hello Hrvoje, I can see tha
  #9
Member
 
anne dejoan
Join Date: Mar 2009
Location: madrid, spain
Posts: 66
Rep Power: 17
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, 13:12
Default Just E-mailed: enjoy. Hrv
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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: 35
Blog Entries: 1
Rep Power: 17
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


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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 10:21
CFD algorithm design with reconfigurable computing Beatríz Navarro CFX 4 June 27, 2006 05:39
CFD algorithm design with reconfigurable computing Beatríz Navarro Main CFD Forum 1 June 25, 2006 15:25
CFD algorithm design with reconfigurable computing Beatríz Navarro Fidelity CFD 0 June 24, 2006 19:23
CFD algorithm design with reconfigurable computing Beatríz Navarro FLUENT 0 June 24, 2006 19:22


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