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

[Other] Hint: double-click for lazy Win users

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

Like Tree1Likes
  • 1 Post By FrankFlow

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2014, 11:05
Wink Hint: double-click for lazy Win users
  #1
New Member
 
Frank
Join Date: Oct 2013
Location: Germany
Posts: 2
Rep Power: 0
FrankFlow is on a distinguished road
Hi there,

how about running OpenFoam cases under Windows using a compiled OF just by a double-click? I am a happy user of blueCFD-Core, but this should also work for similar compiled OF versions.

(1) In the attachment you find two identical files named "Allclean.bat" and "Allrun.bat". Each dos batch file looks for a unix batch file with the same file name in the same directory and starts it. The files can just be renamed and will then look for any new file name. The files can also be copied into any new directory and will keep working. Initially, you might need to adjust the path to your OF installation (see comments).

Code:
@echo off
cls
set PATH=%WINDIR%;%WINDIR%\SYSTEM32
 
rem get dos path
set S_DIR=%~dp0
 
rem get file name (without extension)
set S_FILE=%~n0
 
rem merge dos path and file name
set S_MSYS=%S_DIR:~0,-1%\%S_FILE%
 
rem exchange dos path "\" to unix path "/"
set S_MSYS=%S_MSYS:\=/%
set S_MSYS=%S_MSYS:Program Files=PROGRA~1%
echo *** MSYS will start %S_MSYS% ***
 
rem start shell (if required, please change path to msys)
C:\PROGRA~1\blueCFD-Core-2.3\msys\bin\sh.exe --login -i -c %S_MSYS%
set /p DUMMY=Hit ENTER to continue...
(2) For viewing, one can associate a file named "para.foam" with the paraview.exe (via right click and "open with") to allow post-processing from Windows with one click (works with 4.1.0 64-bit).

Hope this might be helpful and doesn't keep you too far away from unix!
Attached Files
File Type: zip DoubleClick_v02.zip (1.1 KB, 2 views)
wyldckat likes this.

Last edited by FrankFlow; November 7, 2014 at 10:58.
FrankFlow is offline   Reply With Quote

Reply

Tags
batch runs, tutorial, unix, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[TUTORIAL] Run fluent on distributed memory with 2 windows 7 64 bit machines ghost82 FLUENT 54 February 9, 2022 04:32
Parallel User Defined Real Gas Model aeroman FLUENT 4 July 1, 2015 07:09
Error in run Batch file saba1366 CFX 4 February 10, 2013 02:15
How to show the transient case? H.P.LIU Phoenics 7 July 13, 2010 05:31
Fluent 5.5. What the differences with fluent 5.3?? confused FLUENT 2 July 29, 2001 22:58


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