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

Version sniffing in sampleDict

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 13, 2012, 05:03
Default Version sniffing in sampleDict
  #1
New Member
 
Join Date: Jul 2011
Posts: 17
Rep Power: 6
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: 17
Rep Power: 6
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

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


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