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

Version sniffing in sampleDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2012, 05:03
Default Version sniffing in sampleDict
  #1
New Member
 
Join Date: Jul 2011
Posts: 18
Rep Power: 14
hugo17 is on a distinguished road
Hi,

I'm working with OF 1.7.1 and 2.0 on different machines and having the problem that the old version demands "patchName mypatch" in the definition for the sample surface while the code is "patches (mypatch)" in OF 2.0. Is there any possibility to include a switch into sampleDict which makes each version reading the appropriate definition?

Best regards
Hugo
hugo17 is offline   Reply With Quote

Old   April 13, 2012, 16:52
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Hugo,

You'll have to think the other way around, namely having two separate sampleDict files and then call depending on the version of OpenFOAM:
Code:
case $WM_PROJECT_VERSION in
 1.7.*)
   sampleDict -dict sampleDict.17
  ;;
  2.*)
   sampleDict -dict sampleDict.2
   ;;
esac
In case you can re-use most of the file, then you can try the "#include" capability that OpenFOAM has, but I can't remember if 1.7.* had it already

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 16, 2012, 07:05
Default
  #3
New Member
 
Join Date: Jul 2011
Posts: 18
Rep Power: 14
hugo17 is on a distinguished road
Thank you very much, Bruno - this way is a good idea.

Best regards
Hugo
hugo17 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
wmake error zxj160 OpenFOAM 0 March 26, 2012 10:52
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 07:11
bubbleFoam validation case balkrishna OpenFOAM Running, Solving & CFD 24 August 30, 2010 04:37
[OpenFOAM] Problem with paraFoam on a linux-64 bit bunni ParaView 4 April 14, 2010 20:55
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 16:38.